cs.LGNov 19, 2026

Approximate Adjoint Models for Memory and Compute-Efficient Online Learning of Hybrid Models

Authors: Emilio González-Zamora, Pierre Tandeo, Laurent Debreu, Said Ouala

Organizations: IMT Atlantique, Lab-STICC, UMR CNRS 6285, 29238, Brest, France · ODYSSEY Team-Project, INRIA IMT-Atlantique CNRS, Brest, France · Univ. Grenoble Alpes, Inria, CNRS, Grenoble INP, LJK, Grenoble, France

Abstract

Differentiable programming enables online calibration of numerical models by minimizing errors accumulated along simulated trajectories. This includes estimating physical parameters and training neural sub-models in hybrid configurations. Gradients are typically computed using adjoint methods, or backpropagation through time (BPTT), whose computational and memory costs grow with the length of the training window. This limits the duration and resolution of hybrid-model training, a major bottleneck for realistic geophysical applications. Approaches like truncated BPTT reduces memory use by discarding sensitivities across truncation boundaries, introducing gradient bias and neglecting long-range dependencies. We propose a class of gradient approximation methods that preserve the adjoint recurrence over the full trajectory while approximating only the pullback operators within it. Exact pullbacks are computed by automatic differentiation at sparse anchor states only. Between anchors, sensitivities propagate either through the identity (Zero-order) or through a reused, frozen pullback (Pullback Reuse). This approximation makes the parameter pullback constant within each chunk, allowing the gradient sum to factorize so that a single evaluation per chunk replaces one per time step. We evaluate both on three systems of increasing complexity, an incomplete Lorenz-63 model, a large-eddy closure for two-dimensional quasi-geostrophic turbulence, and bias correction in a multilayer quasi-geostrophic ocean model. Peak memory falls by up to an order of magnitude and runtime up to fourfold, with Pullback Reuse staying closest to the exact gradient direction. In all three cases, approximate gradients support hybrid-model training at comparable accuracy, showing that effective online learning does not require exact gradients.

Figures & tables

Appendix figures & tables4 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Oct 30, 2023

Gradient-free online learning of subgrid-scale dynamics with neural emulators

In this paper, we propose a generic algorithm to train machine learning-based subgrid parametrizations online, i.e., with a posteriori\textit{a posteriori} loss functions, but for non-differentiable numerical solvers. The proposed approach leverages a neural emulator to approximate the reduced state-space solver, which is then used to allow gradient propagation through temporal integration steps. We apply this methodology on a chaotic two-timescales Lorenz-96 system and a single layer quasi-geostrophic system with zonal dynamics, known to be highly unstable with offline strategies. Using our algorithm, we are able to train a parametrization that recovers most of the benefits of online strategies without having to compute the gradient of the original solver. We found that training the neural emulator and parametrization components separately with different loss quantities is necessary in order to minimize the propagation of approximation biases. Experiments on emulator architectures with different complexities also indicates that emulator performance is key in order to learn an accurate parametrization. This work is a step towards learning parametrization with online strategies for climate models.
Mar 30, 2026

Immediate Derivatives Suffice for Online Recurrent Adaptation

For three decades online recurrent learning has been assumed to require propagating a Jacobian tensor through the network's dynamics at O(n4)O(n^4) per step. We show it doesn't. Dropping the propagation entirely (d=0d=0, O(n2)O(n^2) memory) matches full RTRL within CI on held-out BCI cross-session drift (TOST equivalent within ±3\pm 3 pp at n=20n=20, Adam, float64), and across vanilla-RNN synthetic cells (sine and Lorenz under Adam and SGD) and LSTM/sine under Adam. A decomposition gRTRL=gimm+gpastg_{RTRL} = g_{imm} + g_{past} explains why. On BCI, gpastg_{past} concentrates in a single direction (top-1 singular fraction 0.62-0.74 across four optimizers, vs 0.333 for gimmg_{imm}), and the four-optimizer full-RTRL-vs-d=0d=0 recovery gap tracks each optimizer's per-layer update-magnitude ratio ∥ΔWhh∥/∥ΔWout∥\|ΔW_{hh}\|/\|ΔW_{out}\| monotonically. A stationary (no-drift) control collapses both concentrations to ~0.6: the drift-specific signal is the differential, not gpastg_{past}'s absolute rank-1 structure. The signature and the behavioral gap both collapse on LSTM, consistent with a mechanism specific to additive linear recurrence. On synthetic sine, gimmg_{imm} is redundant with gpastg_{past}, which predicts the synthetic null. Full RTRL's one robust advantage is LARS (+17 to +27 pp), but d=0d=0+LARS also fails to adapt independently; the gap is an optimizer×\timesmethod interaction, not a method-quality claim. We characterize the regime: d=0d=0+Adam+float64 is robust; SGD, Adafactor, and float32 have specific fragilities documented in the paper. On the evaluated cells, the 1000×1000\times memory saving at n=1024n=1024 (O(n2)O(n^2) vs O(n4)O(n^4)) comes with no measured recovery cost.
Mar 16, 2026

Massive Redundancy in Gradient Transport Enables Sparse Online Learning

Real-time recurrent learning (RTRL) computes exact online gradients by propagating a Jacobian tensor forward through recurrent dynamics, but at O(n^4) cost per step. Prior work has sought structured approximations (rank-1 compression, graph-based sparsity, Kronecker factorization). We show that, in the continuous error signal regime, the recurrent Jacobian is massively redundant:propagating through a random 6% of paths (k=4 of n=64) recovers 84 +/- 6% of full RTRL's adaptation ability across five seeds, and the absolute count k=4 remains effective from n=64 to n=256 (6% to 1.6%, recovery 84 to 78%), meaning sparse RTRL becomes relatively cheaper as networks grow. In RNNs, the recovery is selection-invariant (even adversarial path selection works) and exhibits a step-function transition from zero to any nonzero propagation. Spectral analysis reveals the mechanism: the Jacobian is full-rank but near-isotropic (condition numbers 2.6-6.5), so any random subset provides a directionally representative gradient estimate. On chaotic dynamics (Lorenz attractor), sparse propagation is more numerically stable than full RTRL (CV 13% vs. 88%), as subsampling avoids amplifying pathological spectral modes. The redundancy extends to LSTMs (k=4 matches full RTRL) and to transformers via sparse gradient transport (50% head sparsity outperforms the dense reference; 33% is borderline), with higher thresholds reflecting head specialization rather than isotropy. On real primate neural data, sparse RTRL (k=4) adapts online to cross-session electrode drift (80 +/- 11% recovery, 5 seeds), where sparse propagation is again more stable than full RTRL. Without continuous error signal, Jacobian propagation accumulates numerical drift and degrades all RTRL variants, a scope condition for all forward-mode methods. Results hold with SGD (92 +/- 1% recovery), suggesting independence from optimizer choice.