# A nudge to the truth: atom conservation as a hard constraint in models of atmospheric composition using an uncertainty-weighted correction

arXiv: https://arxiv.org/abs/2408.16109 · HTML: https://mlsanity.com/paper/2408.16109/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 61 references that are in the map.
- First posted on arXiv 28 Aug 2024.

## Builds on (most cited first, 12 of 12)

- [XGBoost: A Scalable Tree Boosting System](https://mlsanity.com/paper/1603.02754/) (2016)
- [A Survey of Uncertainty in Deep Neural Networks](https://mlsanity.com/paper/2107.03342/) (2021)
- [Neural Conservation Laws: A Divergence-Free Perspective](https://mlsanity.com/paper/2210.01741/) (2022)
- [Learning Physical Models that Can Respect Conservation Laws](https://mlsanity.com/paper/2302.11002/) (2023)
- [Imposing Hard Constraints on Deep Networks: Promises and Limitations](https://mlsanity.com/paper/1706.02025/) (2017)
- [Hard-Constrained Deep Learning for Climate Downscaling](https://mlsanity.com/paper/2208.05424/) (2022)
- [Theory-guided hard constraint projection (HCP): a knowledge-based data-driven scientific machine learning method](https://mlsanity.com/paper/2012.06148/) (2020)
- [Graph Neural PDE Solvers with Conservation and Similarity-Equivariance](https://mlsanity.com/paper/2405.16183/) (2024)
- [Deep Factors with Gaussian Processes for Forecasting](https://mlsanity.com/paper/1812.00098/) (2018)
- [Finite Volume Neural Network: Modeling Subsurface Contaminant Transport](https://mlsanity.com/paper/2104.06010/) (2021)
- [Exact conservation laws for neural network integrators of dynamical systems](https://mlsanity.com/paper/2209.11661/) (2022)
- [Physics-Informed Learning of Aerosol Microphysics](https://mlsanity.com/paper/2207.11786/) (2022)

## Abstract (arXiv)

Computational models of atmospheric composition are not always physically consistent. For example, not all models respect fundamental conservation laws such as conservation of atoms in an interconnected chemical system. In well performing models, these nonphysical deviations are often ignored because they are frequently minor, and thus only need a small nudge to perfectly conserve mass. Here we introduce a method that anchors a prediction from any numerical model to physically consistent hard constraints, nudging concentrations to the nearest solution that respects the conservation laws. This closed-form model-agnostic correction uses a single matrix operation to minimally perturb the predicted concentrations to ensure that atoms are conserved to machine precision. To demonstrate this approach, we train a gradient boosting decision tree ensemble to emulate a small reference model of ozone photochemistry and test the effect of the correction on accurate but non-conservative predictions. The nudging approach minimally perturbs the already well-predicted results for most species, but decreases the accuracy of important oxidants, including radicals. We develop a weighted extension of this nudging approach that considers the uncertainty and magnitude of each species in the correction. This species-level weighting approach is essential to accurately predict important low concentration species such as radicals. We find that applying the uncertainty-weighted correction to the nonphysical predictions slightly improves overall accuracy, by nudging the predictions to a more likely mass-conserving solution.
