NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deep Learning Emulator Towards Both Forward and Adjoint Modes of Atmospheric Gas-Phase Chemical Process

Yulong Liu, Meicheng Liao, Jiacheng Liu, Zhen ChengAtmosphere 2025

TL;DR

This paper introduces a deep learning emulator that can accurately and efficiently replace the computationally intensive gas-phase chemistry calculations in atmospheric chemical transport models (CTMs), for both forward and adjoint simulations. This novel approach significantly accelerates sensitivity analysis, a crucial component for understanding atmospheric processes and inverse modeling.

What Problem Does This Paper Address?

Atmospheric chemical transport models (CTMs) are essential tools for simulating and understanding air quality and climate. However, a major bottleneck in these models is the calculation of gas-phase chemistry, which involves solving complex systems of differential equations. This computational burden is significant in both "forward mode" (simulating the evolution of atmospheric composition over time) and "adjoint mode" (calculating how sensitive the model's output is to its inputs or parameters). The adjoint mode is particularly demanding, often requiring 1.5 to 11 times more computational resources than the forward mode due to the need for backward integration and storing intermediate states. While deep learning has shown promise in accelerating forward simulations, its application and validation in the adjoint mode for atmospheric chemistry have been largely unexplored. This paper aims to bridge this gap by developing and rigorously evaluating a deep learning emulator for both forward and adjoint gas-phase chemistry simulations.

Methods

The core of this work is the development of a deep learning emulator based on a FiLM-ResNet (Feature-wise Linear Modulation-Residual Neural Network) architecture. This architecture is chosen because:

  • ResNet backbone: It's well-suited for emulating continuous-time dynamics, akin to approximating Ordinary Differential Equations (ODEs).
  • FiLM layers: These layers allow the network to dynamically adjust its internal representations based on specific conditions, in this case, distinguishing between photochemical and non-photochemical environments using a sunlight flag.

The emulator takes inputs like initial species concentrations, meteorological variables, and photolysis rates, and predicts the change in species concentrations over a single timestep. This change is then added to the initial concentrations to get the final state. Crucially, the entire preprocessing (e.g., Box-Cox transformation, Z-score normalization) and inverse transformation steps are integrated within the emulator, simplifying its use.

For adjoint simulations, the emulator leverages its differentiable nature. By using automatic differentiation (via PyTorch's autograd engine), the emulator can efficiently compute the Jacobian matrix (representing sensitivities of concentrations at the next timestep to the current timestep) and propagate gradients backward through its computational graph. This avoids the need to explicitly construct large Jacobian matrices.

The emulator is embedded into the CMAQ model using a custom framework that compiles the PyTorch model into a C++ shared library (via TorchScript and LibTorch). This allows seamless integration with CMAQ's Fortran code and eliminates Python dependencies, which is critical for efficient large-scale simulations.

Datasets

The training and evaluation dataset was generated using the Community Multiscale Air Quality (CMAQ) model version 5.0.

  • Simulation Domain: China and parts of Southeast Asia.
  • Resolutions: Multiple horizontal resolutions were used for training (96 km, 48 km, 24 km, and 12 km) to capture both large-scale trends and fine-grained local features.
  • Temporal Aspects: Simulations covered different months (January, April, July, October) and used varying synchronization timesteps (4, 6, and 10 minutes) to ensure representativeness across diverse chemical regimes and temporal resolutions.
  • Meteorological Data: Generated using the Weather Research and Forecasting (WRF) model.
  • Emissions Data: From the Multi-resolution Emission Inventory for China (MEIC).
  • Test Dataset: A separate 7-day period (January 1-7, 2020) not included in the training data was used for evaluating the emulator's generalization capabilities.

Key Insights and Ideas

  • Adjoint Mode is Feasible with Deep Learning: The most significant insight is the successful demonstration that deep learning emulators, trained for forward simulations, can be effectively used for adjoint sensitivity analysis. This opens up a new avenue for accelerating computationally expensive adjoint calculations.
  • FiLM Enhances Adaptability: The Feature-wise Linear Modulation (FiLM) layers are crucial for allowing the emulator to adapt its behavior to different photochemical conditions (day vs. night), which is essential for accurately capturing gas-phase chemistry.
  • "Concentration Change" as Target is Key: Using the change in concentration as the training target, rather than the absolute concentration, provides a more sensitive signal for the model to learn chemical evolution, especially for small variations.
  • End-to-End Differentiable Pipeline: Integrating preprocessing and inverse transformations within the emulator, and then using automatic differentiation, creates a fully differentiable pipeline that simplifies adjoint computations.
  • Computational Bottleneck Mitigation: The emulator offers substantial speedups, not just for forward simulations but critically for the more demanding adjoint simulations, making complex sensitivity analyses more tractable.

Key Results

  • Forward Mode Accuracy:
    • Single-timestep prediction: Achieved R² > 0.999 for 74% of gas-phase species.
  • Multi-timestep simulation: Showed close agreement with the numerical model over a one-week period with minimal error accumulation.
  • Adjoint Mode Accuracy:
    • Single-timestep adjoint sensitivities: Achieved a maximum R² of 0.995 for ozone (O3) self-sensitivities and R² > 0.90 for cross-sensitivities with NO, NO2, and OH.
  • 24-hour adjoint simulation: Maintained spatially consistent adjoint sensitivity distributions compared to the numerical model.
  • Computational Efficiency:
    • Forward mode: 80x to 130x speed-up (CPU/GPU).
  • Adjoint mode: 45x to 102x speed-up (CPU/GPU).
  • Integrated CMAQ: ~2x speed-up on CPU and ~4.6x on GPU for adjoint mode.

Limitations and Future Work

  • Limitations:
    • Sensitivity to Reactive Species: The emulator's adjoint gradients showed weaker alignment for highly reactive, short-lived species like isoprene (ISOP), with R² as low as 0.441. This is attributed to the amplification of small forward errors during backpropagation and the potential lack of explicit representation of complex solver dynamics.
  • Training Data for Nighttime: For nighttime, non-photochemical conditions, species concentrations often decay to near-zero. The "concentration change" labels used for training might correspond to "no variation" samples, potentially limiting the emulator's ability to capture subtle dynamics and nonlinearities in these cases.
  • Indirect Dependencies: Certain indirect dependencies between species might be less accurately captured in the adjoint mode compared to direct ones.
  • Future Work:
    • Expand Training Data: Increase coverage with more representative high-dimensional state-space sampling to improve generalization and robustness.
  • Joint Training with Gradients: Incorporate gradient information (e.g., Jacobian matrices, adjoint gradients) directly into the training loss function (e.g., using Sobolev training) to simultaneously optimize functional approximation and sensitivity consistency.
  • 4D-Var Data Assimilation: Integrate the adjoint emulator into 4D-Var frameworks to correct simulation biases by incorporating observational constraints.
  • Broader Receptor Species Evaluation: Conduct more extensive adjoint sensitivity analyses with other receptor species to fully assess reliability.

Summary updated

BibTeX
@inproceedings{liu2025deep,
  author = {Yulong Liu and Meicheng Liao and Jiacheng Liu and Zhen Cheng},
  title = {{Deep Learning Emulator Towards Both Forward and Adjoint Modes of Atmospheric Gas-Phase Chemical Process}},
  booktitle = {Atmosphere},
  year = {2025},
  doi = {10.3390/atmos16091109},
}
Figure