Calibrating Ecosystem Models When the Weather Stops Teaching

Process-based ecosystem models predict how forests and grasslands exchange carbon and water by solving equations for photosynthesis, respiration and soil microbes. Their free parameters, such as how fast stomata close under dry air or how strongly respiration rises with temperature, are tuned to observations. That tuning breaks down exactly when it matters most. During a long heatwave or drought, the weather a flux tower records stays stuck in one hot, dry pattern for weeks. The tuning procedure then sees data that inform only a few parameter combinations. Under pressure from the model's own structural errors, it quietly pushes the other parameters wherever they reduce error in that one regime. When the drought ends, the model is miscalibrated.

The machine-learning literature on contextual bandits under adversarial contexts has a name and a cure for this failure. A bandit here means a sequential learner that observes a context, makes a prediction or choice, and is then scored. When an adversary confines the learner's inputs to a low-dimensional subspace, the learner goes blind in the orthogonal directions. The literature's response is to measure how much information has arrived in each direction and to act only where it suffices. We propose to carry that machinery into online calibration of ecosystem models. The context is not the raw weather. It is the model's parameter sensitivities, and persistent climate regimes play the role of the adversary.

Core Claim

The quantity that should govern online calibration of a process model is the excitation matrix of its parameter sensitivities. Let $f(m_t;\theta)$ be the model's predicted flux, for example gross primary productivity or net ecosystem exchange, given meteorology $m_t$ at hour $t$ and parameters $\theta$. Let $J_t = \partial f(m_t;\theta)/\partial\theta$ be its sensitivity vector. Then

$$G_T = \sum_{t=1}^{T} J_t J_t^\top$$

plays the role that the context covariance $\sum x_t x_t^\top$ plays in linear bandits. Persistent weather regimes make the $J_t$ nearly collinear, which leaves $G_T$ with tiny eigenvalues. We claim that a calibrator built on three rules from the adversarial-context literature will track parameters through extremes with lower error after the regime ends than either offline batch calibration or standard sequential filtering. The first rule restricts updates to well-excited eigen-directions of $G_T$. The second downweights contaminated observations with a non-convex robust step rather than a convex robust loss. The third switches between simple and complex stress formulations according to a test of whether the data have enough variety to tell them apart. We also claim that the gain should concentrate in the weakly excited directions, and that this concentration is a falsifiable signature.

Where This Sits

The ecosystem side supplies both the motivation and the constraints. Models diverged widely from top-down observations during the 2023 extremes, when the net land sink fell to $0.44 \pm 0.21$ GtC yr⁻¹. Low latency carbon budget analysis reveals a large decline of the land carbon sink in 2023 combined models driven by reanalysis weather with satellite-based inversions to show this. It attributed the divergence to failed assumptions about moisture stress and carbon-use efficiency. Temperature extremes of 2022 reduced carbon uptake by forests in Europe and Regional and seasonal partitioning of water and temperature controls on global land carbon uptake variability show that the temperature–water interactions governing these responses are non-linear and regime-dependent. Those are precisely the conditions under which a single hot, dry regime informs only part of the parameter space.

Convergence in simulating global soil organic carbon by structurally different models after data assimilation provides our offline calibration baseline. That work assimilated over 50,000 soil profiles into two structurally different models with Bayesian sampling and neural networks, which raised the spatial correlation between them from −0.026 to 0.51. It also documents equifinality, meaning many parameter sets fit equally well. And it finds that Michaelis–Menten kinetics, a saturating rate law for microbial decomposition, collapse to first-order behavior at global scale. Our approach differs in being online and in monitoring which parameter directions the stream can actually identify. The paper's negative finding also constrains our design: uniformly adding model complexity is not an answer.

CarbonSense: A Multimodal Dataset and Baseline for Carbon Flux Modelling supplies the benchmark. Its transformer, EcoPerceiver, is the strongest purely data-driven predictor available to us. EcoPerceiver is offline and has no physical structure, so it offers no handle on which parameters a drought leaves unconstrained.

On the adversarial side, we reuse methods directly. Universal and data-adaptive algorithms for model selection in linear contextual bandits clips low-energy covariance directions (MODCB.U) and tests context diversity online to choose between simple and complex models (MODCB.A). We transplant both into the sensitivity space of a process model. Online and Distribution-Free Robustness: Regression and Contextual Bandits with Huber Contamination proves that every convex robust loss, Huber and $L_1$ included, can incur error proportional to the output range rather than the noise level under adaptively chosen contexts. It gives a non-convex spectrally regularized alternative, SCRAM, for contamination below one third. That result motivates our robust step and explains why we do not stop at Huber loss.

Robust Neural Contextual Bandit against Adversarial Corruptions shows that repeated, near-identical contexts break uncertainty estimates, and it downweights high-uncertainty samples in response. Persistent weather produces exactly such repeated contexts, so its weighting idea informs ours. All of these adversarial papers evaluate on synthetic data, MNIST, MovieLens or OpenML suites, and none imposes physical structure. The file reports no prior work connecting these methods to process-based ecosystem models.

Research Program

We will build a compact process model that runs per site at hourly resolution and can be differentiated. It has three parts: a light-use-efficiency photosynthesis module with temperature, vapor-pressure-deficit and soil-moisture stress scalars; a temperature-sensitive respiration term; and two alternative water-stress formulations, one linear-threshold and one saturating non-linear. Automatic differentiation provides $J_t$ at every step.

The calibrator maintains $G_T$ with exponential forgetting so that it can follow genuine parameter change. At each step it applies an update restricted to the span of the eigenvectors of $G_T$ whose eigenvalues exceed a threshold $\tau$:

$$\theta_{t+1} = \theta_t - \eta\, P_\tau(G_t)\, w_t\, J_t\,\big(f(m_t;\theta_t) - y_t\big)$$

Here $y_t$ is the observed flux and $\eta$ is a step size. $P_\tau(G_t)$ projects onto the well-excited eigen-directions; in directions below the threshold, parameters relax toward their prior values. The weight $w_t$ comes from an alternating spectral step in the style of SCRAM, which identifies and downweights observations whose residuals are inconsistent with the excited subspace. A MODCB.A-style test compares the excitation of the extra parameters in the non-linear stress formulation against a threshold. It activates the complex formulation only when the stream has varied enough to identify it, and falls back otherwise.

Analysis has two parts. First, we will state an online regret bound against the best fixed parameter in hindsight, restricted to the excited subspace, under contamination below one third. This adapts existing proofs and is not a new theorem. Second, we will characterize empirically how much parameter drift occurs along weak directions under each method.

Baselines

The naive reference is the process model with fixed prior parameters and no calibration. Any method that cannot beat it after a regime shift is harmful.

The first strong process-based competitor is offline batch Bayesian calibration in the spirit of PRODA from Convergence in simulating global soil organic carbon by structurally different models after data assimilation, fitted once on all data available before each evaluation window. The paper reports a cross-model spatial correlation of 0.51 for soil carbon, but the file contains no reported flux-prediction result for this approach on CarbonSense.

The strongest process-based competitor is sequential Bayesian filtering of parameters: an ensemble Kalman filter and a particle filter over $\theta$, with the same prior and the same forgetting horizon as our method. This is the method ecologists would actually use online, and in principle it already leaves unidentified directions at the prior. We will tune its covariance inflation and observation noise with the same validation budget we give our threshold $\tau$ and step size: an equal number of hyperparameter trials on the same pre-period data.

Plain online gradient descent with Huber loss isolates the value of our robust step.

As a data-driven reference we will train EcoPerceiver on the same pre-period data. On CarbonSense its reported savanna Nash–Sutcliffe efficiency is 0.7368, against 0.5802 for XGBoost, according to CarbonSense: A Multimodal Dataset and Baseline for Carbon Flux Modelling. Nash–Sutcliffe efficiency is one minus squared error relative to the variance of the observations.

Ablations remove one ingredient at a time: the eigen-projection, the robust weighting, and the structure switch. The projection ablation is the key one, because it isolates the excitation-matrix idea. Beating the baselines means statistically lower post-regime error than the tuned ensemble Kalman filter across sites. Matching EcoPerceiver's in-distribution efficiency is not required. We do require at least matching it on out-of-regime windows, while also returning interpretable parameters.

Why not just…?

Why not just run an ensemble Kalman filter or particle filter on the parameters? This is the real threat. With a correct model and Gaussian noise, a Bayesian filter already refuses to move in flat-likelihood directions. Our hypothesis is that the conditions are rarely met in practice. The model structure is wrong, so weakly identified directions are not flat. They have small but persistent gradients that absorb structural error over weeks of a confined regime, and covariance inflation, which filters need for tracking, amplifies that drift. We will settle the question by measuring parameter drift projected onto the low-eigenvalue directions of $G_T$ for both methods, and by comparing post-regime error at equal tuning budget. If the tuned filter matches us, the contribution shrinks to a diagnostic, $G_T$, that tells modelers which parameters a given drought left unconstrained. We will report that outcome as such.

Why not just use Huber or $L_1$ loss against sensor faults? Online and Distribution-Free Robustness: Regression and Contextual Bandits with Huber Contamination proves that convex robust losses can fail under adaptively chosen contexts. That result is worst-case, however, and real tower faults may be benign. The corruption experiment below compares Huber against the spectral step at matched contamination. If Huber matches it, we will adopt Huber for its simplicity.

Why not just retrain a data-driven model such as EcoPerceiver as new data arrive? It already beats tabular models in 12 of 15 vegetation types according to CarbonSense: A Multimodal Dataset and Baseline for Carbon Flux Modelling, and it may well win within the training distribution. It has no parameters tied to physiological processes, though, and nothing guarantees how it extrapolates into a regime its training stream never excited. The adversarial-ordering protocol below tests exactly that extrapolation.

Why not just always use the more complex non-linear stress formulation? Convergence in simulating global soil organic carbon by structurally different models after data assimilation found that non-linear kinetics behaved like first-order kinetics globally, and extra parameters without diverse data worsen equifinality. The structure-switch ablation measures whether always-complex calibration loses accuracy after regime shifts.

Proposed Experiments

All experiments use the 385 CarbonSense sites, with hourly net ecosystem exchange, gross primary productivity and ecosystem respiration plus meteorology. The benchmark draws on the FLUXNET2015, ICOS and Ameriflux networks.

The first experiment uses natural extremes. For each site we identify the longest heat or drought episode in the record and calibrate online through it. We then score Nash–Sutcliffe efficiency and cumulative error over the 60 days after the episode ends, reported separately by vegetation type. Where ICOS sites cover 2022, the European heat extreme gives a shared regional test.

The second experiment is an adversarial-ordering stress test, which is the core novelty in evaluation. An adversary reorders and subsamples each site's own real meteorological windows to minimize the smallest eigenvalue of $G_T$ along a chosen parameter direction. Every method is calibrated on that stream and then tested on held-out real windows that strongly excite the starved direction. This turns the subspace-confinement construction from the bandit literature into an ecological benchmark built entirely from real weather.

The third experiment injects tower-like faults into the calibration stream at contamination levels from 0 to 0.3, within SCRAM's one-third limit. The faults are slow sensor drift, spikes, and flat-lined gap-filled segments.

The decisive checks follow from the core claim. The eigen-projection ablation must account for most of the post-regime gain. Measured drift along weak directions must be smaller for our method than for the tuned Kalman filter. And the advantage must grow as the adversary starves the excitation matrix more severely. If the gain does not concentrate in weak directions, the mechanism we propose is not what is helping, and we will say so.