KPPax makes atmospheric reaction mechanisms written in the Kinetic PreProcessor language usable in differentiable JAX computations. This matters for research that combines chemical models with machine learning or estimates reaction parameters from observations.
Conventional KPP mechanisms are translated into efficient Fortran or C code, which the authors say does not fit directly into the differentiable programming frameworks used to develop many machine-learning models. KPPax generates JAX code that can be compiled just in time and vectorised. It evaluates reaction rates with sparse operations in log space, then solves stiff chemical systems using implicit methods from the diffrax library. The paper says forward- and reverse-mode adjoints provide sensitivities without requiring manually derived adjoint equations.
The study demonstrates two applications with the POLLU benchmark mechanism. An automatically differentiated Fisher information matrix predicts which of 25 rate coefficients can be identified by a flow-tube-like experimental design. Noisy synthetic estimates confirm the predicted uncertainties for nine identifiable coefficients to within about 30%; for some fast reactions, only ratios can be constrained.
In the second example, a neural network is first trained on 4D-Var retrievals and then refined through the chemistry model. The reported error for the biogenic emission correction falls by a factor of 2.4 to 5. The original paper provides further details on both applications and their calculations: arXiv: KPPax