Trusting Only What a Short Trajectory Can Certify: Test-Time Adaptation of Chaotic Emulators

Neural emulators of chaotic systems, such as turbulent flows, can now stay stable over very long simulations. They manage this because they are trained to reproduce the system's long-run statistics rather than its exact path. The usual name for these statistics is the invariant measure: the distribution of states the system visits over infinite time, which you can think of as its "climate." The catch is that these methods need a long, plentiful record of the very system they will simulate. Change the Reynolds number, the forcing, or the damping, and the emulator either drifts or is actively pulled back toward the old climate. In practice, the new system often comes with only a few seconds of observed trajectory. That short record is enough to measure some statistics well and far too short to measure others. Existing methods treat the two kinds the same.

We propose test-time adaptation that matches only the statistics the short target trajectory can actually certify. The method estimates each long-run statistic from the snippet, together with a bootstrap estimate of how uncertain that number is. It then adjusts a small set of emulator parameters so that the emulator's own rollouts reproduce each statistic, with each term weighted by its certainty. Wherever the data is silent, the source model serves as the prior. The bet behind this is that in spatially homogeneous chaos, small-scale statistics converge from very little data, because one snapshot already holds many nearly independent small patches. Large-scale statistics converge slowly. An adaptation objective that ignores this difference will overfit to noise in the slow statistics.

Core Claim

Invariant-measure matching has so far been an offline training regularizer. DySLIM adds a maximum mean discrepancy (MMD, a kernel distance between two sample sets) penalty between emulator and data distributions. Training neural operators to preserve invariant measures matches known summary statistics with optimal transport. Learning Chaotic Dynamics in Dissipative Systems enforces dissipativity with Sobolev losses. All three assume an abundant sample of a fixed measure, and DySLIM explicitly flags stationarity and abundant data as limits.

Test-time adaptation methods have the opposite profile. Tent adapts normalization scale and shift parameters without labels, and IT³ uses idempotence as a self-supervised signal. Both are built for static classification and regression, and neither gives a meaningful signal for an autoregressive continuous field.

Our claim is that the missing ingredient is not "MMD at test time." It is an uncertainty-aware target. A statistic estimated from a short trajectory should constrain the adapted emulator only in proportion to how well that trajectory determines it. If this holds, adaptation from one to a few Lyapunov times of data should recover target climate statistics that unweighted matching gets wrong. A Lyapunov time is the time over which small errors grow by a factor of e. Concretely, unweighted matching should overfit large-scale statistics and stay biased toward whatever transient the snippet happened to sample.

Research Program

The method starts from an emulator pre-trained on a source regime with DySLIM-style regularization, for example 2D Kolmogorov flow at one Reynolds number. At test time it receives a single unlabeled target trajectory segment of length $T$ and no source data. It first computes a family of statistics $\hat s_k$ from the segment. These are energy-spectrum bands, vorticity and gradient histograms, and two-time correlations. It also computes their sampling variances $\hat\sigma_k^2$ with a block bootstrap over space and time, so that correlated samples are accounted for.

It then adapts only per-channel scale and shift parameters $\phi$, borrowing Tent's restriction to keep the update low-dimensional. The objective is

$$ \mathcal{L}(\phi)=\sum_k \frac{\big(s_k(\phi)-\hat s_k\big)^2}{\hat\sigma_k^2+\tau^2}\;+\;\beta\,\mathcal{L}_{\text{1-step}}(\phi)\;+\;\lambda\,\|\phi-\phi_0\|^2 . $$

The symbols are defined as follows. $s_k(\phi)$ is the same statistic computed on emulator rollouts launched from observed target states. $\tau^2$ is a small floor that keeps any single statistic from dominating. $\mathcal{L}_{\text{1-step}}$ is the one-step prediction error on consecutive target frames, which a short trajectory does certify. $\phi_0$ are the source parameters, which act as the prior.

The $1/\hat\sigma_k^2$ weighting is the Gaussian log-likelihood of the observed statistic. The objective is therefore a maximum a posteriori estimate, in the spirit of treating source knowledge as a prior shifted toward the target, as in Bayesian Power Steering. That paper does this for image diffusion models; we do it for dynamical statistics.

Gradients flow through truncated rollout windows after a burn-in period, as in DySLIM's conditional variant, to avoid exploding gradients through long chaotic unrolls. The program has three parts. The first characterizes how fast each statistic converges with $T$ on each benchmark; this tells us whether the premise holds. The second builds and compares the adaptation procedure. The third tests whether a Thermalizer correction becomes target-consistent once it is paired with the adapted emulator. Thermalizer pairs a frozen emulator with a diffusion model of the invariant measure and denoises drifting states back toward it. Here the test is to replace its source-trained diffusion prior with an inexpensive check against the certified statistics.

Baselines

The naive reference is the source emulator run unchanged on the target. It shows how much the shift costs.

The second reference is the source emulator with a source-trained Thermalizer. On its own system, Thermalizer extends stable horizons "by up to two orders of magnitude." It is the strongest existing stabilizer, and we expect it to stay stable while drifting toward the wrong climate. No reported result found on Lacuna for Thermalizer under a Reynolds or forcing shift.

The strongest direct competitor is DySLIM-style adaptation. This means unweighted MMD plus one-step loss on the same short segment, updating the same parameters $\phi$, with the same rollout lengths, step budget, and hyperparameter search. It differs from our method only in the $1/\hat\sigma_k^2$ weighting and the source anchor, so it doubles as the ablation that isolates the key ingredient. For context, DySLIM reports that its regularizer improves the Time Correlation Metric (TCM) on 2D Kolmogorov flow from 5.39 to 2.45 under 1-step training. That figure is for in-domain training with plentiful data; no reported result found on Lacuna for DySLIM as a few-shot adapter.

We also run short-horizon MSE fine-tuning of $\phi$, and of all weights, with the same budget. As a targeted in-family comparison we include a parameter-conditioned emulator whose parameter is inferred from the segment. As an upper bound, we use an emulator adapted on a long target record.

On Lorenz-96 and dysts (Context parroting: A simple but tough-to-beat baseline for foundation models in scientific machine learning) we add context parroting, which forecasts by copying the continuation of the nearest match in the observed history, as the low-dimensional reference.

Beating the competitor means lower energy-spectrum and histogram error than unweighted MMD adaptation at $T\le 5$ Lyapunov times. The gap should shrink as $T$ grows, which is the signature our mechanism predicts. Adaptation must also not raise the blow-up rate.

Why not just…?

Why not just fine-tune with DySLIM's MMD loss on the short segment? This is the real threat, and it is the head-to-head comparison above. If weighting adds nothing at small $T$, the proposal's central claim is wrong. The convergence study predicts where it should matter: on large-scale statistics whose bootstrap variance is large.

Why not just condition the emulator on the physical parameter and infer it from the data? For shifts inside a trained parameter family, this may well match or beat us, and we will report that honestly. For that reason the main targets are out-of-family. These are Reynolds numbers beyond the training range, a changed forcing wavenumber, and added linear drag that no conditioning variable represents.

Why not just update normalization statistics, as in MemBN? That approach rescales activations but has no signal tying the rollout to the target climate. Even on ImageNet-C, Tent reports normalization-only adaptation at 49.9% error against 44.0% with optimization. We will include it as a baseline.

Why not just context parroting? Its authors document that it fails on short contexts and under parameter drift, and it cannot produce dynamics absent from the context, which is exactly our regime. We run it anyway on Lorenz-96 and dysts.

Proposed Experiments

The benchmarks follow the cited work:

  • 2D Kolmogorov flow: source at one Reynolds number; targets at extrapolated Reynolds numbers, a shifted forcing wavenumber, and added drag.
  • Kuramoto–Sivashinsky: targets with changed domain length and coefficients.
  • Lorenz-96: targets with changed forcing.
  • 2-layer quasi-geostrophic turbulence: for the Thermalizer pairing.

Target budgets are 1, 5, and 20 Lyapunov times. Metrics are energy-spectrum error, histogram error, TCM, leading Lyapunov exponent, valid prediction time, and blow-up rate over long rollouts.

Two checks decide the outcome. The first is the convergence study: if small- and large-scale statistics converge at similar rates, the weighting has nothing to exploit and the idea should be dropped. The second is the ablation curve of our method minus unweighted MMD as a function of $T$. A positive gap that closes as $T$ grows confirms the mechanism. No gap means the simpler DySLIM-style adaptation suffices.