KPP mechanism representation and the differentiation barrier
Atmospheric chemical mechanisms are commonly distributed in the language of the Kinetic PreProcessor KPP. This format generates efficient Fortran or C code but does not integrate into the differentiable programming frameworks where machine-learning models are developed. The authors present KPPax a kinetic preprocessor that generates differentiable just-in-time compiled and vectorisable chemistry code in JAX from mechanisms written in the KPP language.
Sparse log-space rate-law evaluation in KPPax
KPPax evaluates the rate law with sparse operations in log space. This choice keeps the evaluation differentiable because logarithmic transformations convert multiplicative terms into additions. Sparse selection avoids dense matrix materialisation when only a subset of reactants participates in a given reaction step.
Implicit ODE integration and adjoint sensitivities via diffrax
The stiff system is integrated with implicit solvers and the forward and reverse mode adjoints of the diffrax library. Exact sensitivities are obtained without hand-derived adjoint code. This means parameter gradients flow automatically through the chemistry stage.
Fisher information analysis for the POLLU mechanism
In the first application the Fisher information matrix computed from an automatically differentiated Jacobian predicts before any fit which of the 25 rate coefficients a flow-tube-like design can identify. Noisy synthetic estimation confirms the predicted uncertainties of the nine identifiable rate coefficients to within about 30 percent while revealing clusters of fast reactions of which only ratios are constrained.
Neural-network emission correction trained on 4D-Var retrievals
In the second application a neural-network correction of an emission inventory is trained offline on per-scenario 4D-Var retrievals and then fine-tuned online through the chemical model. This reduces the error of the biogenic correction by a factor of 2.4 to 5 and recovers information on low-temperature emissions that the individual retrievals lose.
Constraints of JIT compilation for stiff chemical systems
The approach requires KPP mechanism input as a starting point. JIT compilation cost remains acceptable for the mechanism sizes typically encountered in atmospheric chemistry applications. Adjoint-driven sensitivity analysis replaces manual derivative derivation.
KPPax makes KPP mechanisms directly usable for parameter estimation and hybrid physics-machine-learning modelling
KPPax makes KPP mechanisms directly usable for parameter estimation and hybrid physics-machine-learning modelling. The approach extends to mechanism sizes encountered in atmospheric chemistry where JIT compilation cost remains acceptable and adjoint-driven sensitivity analysis replaces manual derivative derivation. Read the paper on arXiv