Is Test-Time Adaptation Collapse a Step-Size Problem?

Models deployed on shifting data streams often adapt themselves on the fly. The best-known example is test-time adaptation (TTA), where a classifier nudges a small set of its own weights at inference to make its predictions on unlabeled inputs more confident. These methods sometimes fail catastrophically, and they compete for a fixed time budget per frame. Numerical analysts studying stochastic differential equations have long known that a simple explicit update rule can blow up even when the underlying continuous process is perfectly stable. This happens when the step is too large for how steeply the forces change nearby. An adaptation update is exactly such an explicit step, taken once per batch along the gradient of an unsupervised loss. That raises a question nobody in the TTA literature has asked directly: how much of the observed collapse comes from a flawed objective, and how much is a discretization artifact that a correctly sized step would avoid?

We propose to separate these two failure modes empirically. The test compares each real adaptation run against a finely sub-stepped version that approximates the continuous-time dynamics. We then build a step controller that sizes each update to the local steepness ("stiffness") of the loss landscape, using quantities already computed in the one backward pass. The same stiffness signal ties into the latency problem. Under a deadline, it tells the system when a backward pass is worth its cost and when to fall back to a gradient-free update. If the decomposition shows that discretization accounts for little of the collapse, that is also a useful negative result. It would tell the field to stop tuning step rules and fix objectives instead.

Core Claim

Our claim has three parts. First, a measurable fraction of TTA failures on non-i.i.d. streams is numerical: the same objective, integrated with small enough steps, does not collapse. Second, this fraction is predicted by the ratio of step size to local stiffness crossing the explicit-Euler stability limit, and not by gradient magnitude alone. Third, a controller that keeps that ratio below the limit recovers most of the benefit of an implicit (unconditionally stable) update. It does so at essentially the latency of plain Tent, which matters most under the tight deadlines where heavy stabilizers become too slow to keep up with the stream.

The stability logic is standard. For an explicit step $\theta_{t+1} = \theta_t - \eta\, g_t$, where $\theta$ are the adapted parameters, $g_t$ the gradient and $\eta$ the step size, a locally linearized system is non-oscillatory and non-divergent only if

$$\eta \, \lambda_t < 2,$$

where $\lambda_t$ is the largest local curvature of the loss. This is the same mechanism behind the $\sqrt{2/\Delta t}$ overshoot threshold for cubic drift in Euler–Maruyama. We estimate $\lambda_t$ without extra backward passes using the secant ratio $\hat L_t = \|g_t - g_{t-1}\| / \|\theta_t - \theta_{t-1}\|$, smoothed over time. We then set $\eta_t = \min(\eta_0,\, c/\hat L_t)$ with $c < 2$.

This framing requires us to be honest about the setting. The superlinear-drift results we borrow come from specific numerical-analysis papers. Convergence of the Stochastic Euler Scheme for Locally Lipschitz Coefficients proves that explicit Euler moments explode under superlinear coefficients. Exponential Mean-Square Stability of Numerical Solutions to Stochastic Differential Equations shows that implicit schemes stay stable at any step size under a one-sided Lipschitz condition. Both concern parameters escaping to infinity. Tent-style collapse is different: the model settles onto a single-class, low-entropy state. Because entropy is bounded and softmax saturates, the entropy gradient may grow sublinearly far from the source weights. We therefore do not assume that the TTA drift is superlinear. We measure it. If collapse is a genuine attractor of the continuous gradient flow, no step rule can fix it. That is why the sub-stepping decomposition is the centerpiece rather than an afterthought.

Relation to Prior Work

The closest work, Parameter Dynamics of Online Machine Learning and Test-time Adaptation, models online SGD as a stochastic differential equation. It observes that the log-variance of stable parameter updates follows an Inverse-Gamma law, and its method SIGMA rescales update intervals when that fit breaks down. SIGMA treats collapse as a statistical distortion under a Gaussian transition assumption. We treat it as a question of whether the discretization is stable. We also test directly whether a failure is numerical or objective-driven, which SIGMA does not.

CONGA damps the learning rate using the ratio of parameter norm to gradient norm. It is motivated by "gradient shocks" but gives no stability criterion. Strong convergence of an explicit numerical method for SDEs with nonglobally Lipschitz continuous coefficients supplies the "tamed" explicit step $g/(1+\epsilon\|g\|)$, which reached comparable precision in 0.02 s versus 35 s for implicit Euler. For the tamed step we must state plainly what it becomes in this setting: soft gradient-norm clipping.

Our proposal differs from all three in what it keys on. They key on gradient size, whereas we key on curvature. A large gradient in a flat region is safe. A modest gradient in a steep region oscillates. The controller should behave differently from clipping exactly in these cases, and the ablations test whether it does.

Two papers motivate the latency side. Tempora shows that offline TTA rankings do not survive real-time deadlines. The offline winner, CMF, lost in 87.9% of temporal scenarios, while the gradient-free AdaBN (re-estimating normalization statistics only) dominated under tight budgets. Parameter-free Online Test-time Adaptation (LAME) documents silent collapse to 0% accuracy on non-i.i.d. streams and avoids it by freezing the weights. These results constrain the design. Any stabilizer that adds forward passes, such as CoTTA's up to 32 augmentations in Continual Test-Time Domain Adaptation or the Langevin sampling in TEA, is already known to be at risk under deadlines. Our controller must therefore cost no extra backward passes.

Research Program

The work has four stages.

The first stage is measurement. On ImageNet-C with ResNet-50 and ViT-Base, we adapt only the normalization-layer scale and shift parameters, as Tent does. Along each trajectory we record the gradient norm as a function of distance from the source parameters, whose growth exponent tells us whether the drift is superlinear. We also record the exact top curvature, computed by power iteration with extra backward passes in an offline diagnostic run only, and the secant estimate $\hat L_t$. We do this under both i.i.d. and temporally correlated (non-i.i.d.) orderings.

The second stage is the decomposition. For every stream we run Tent at its standard step size and a sub-stepped version that splits each update into $K$ steps of size $\eta/K$ on the same batch, with $K$ up to 64. This approximates the continuous flow of the same objective. A run that collapses at $K=1$ but not at large $K$ is a numerical failure. A run that collapses at every $K$ is an objective failure. The main result of this stage is the fraction of collapses in each class. We report it per corruption type and per degree of stream correlation.

The third stage is the controller. It is the secant-stiffness rule above, plus a deadline-aware skip rule. When the stability budget $c/\hat L_t$ would force the step so small that the expected loss decrease per millisecond falls below that of an AdaBN statistics update, we skip the backward pass for that batch. The skip decision reuses Tempora's time-contingent utility framing.

The fourth stage checks estimator contamination. In TTA the batch changes between steps, so the secant ratio mixes curvature with data shift. We compare $\hat L_t$ against a same-batch estimate that costs one extra backward pass. This quantifies the error of the cheap estimate and whether it matters for decisions.

Baselines

The naive reference points are the unadapted source model and AdaBN-style test-time normalization. Tent reports 49.9% ImageNet-C error for test-time normalization, versus 50.2% for its robust-training baseline and 44.0% for Tent itself Tent. Plain Tent at its published step size is the base method that every step rule modifies.

The strongest existing competitors are SIGMA and CONGA. Both are plug-in modifications of Tent's update, so they compete for exactly our role. On ImageNet-C with correlated inputs, SIGMA reports reducing error from 44.3% to 41.8%, and improving Tent's average error rate by 1.8% Parameter Dynamics. CONGA reports +2.7% accuracy over Tent on ResNet-50 and +3.2% on ViT-Base on ImageNet-C CONGA.

The most important baselines are ablations that isolate our key ingredient, curvature versus magnitude:

  • Tamed Tent: the Hutzenthaler–Jentzen–Kloeden tamed step applied to the gradient.
  • Hard gradient-norm clipping.
  • Tent with a globally smaller constant step.
  • An idealized "implicit" reference: a proximal step solved by inner iterations, which is unconditionally stable but slow.

Fairness rules apply to all of these. Every method runs on the same streams, orderings, backbones and batch sizes. Every method gets the same hyperparameter search budget, tuned on held-out corruptions and then frozen. Wall-clock time is measured on the same hardware, a GPU and a CPU-class device.

Our controller beats the field only if three conditions hold together. It must match or exceed SIGMA's and CONGA's accuracy on correlated ImageNet-C with Tent as the base. It must beat tamed or clipped Tent by a margin larger than seed variance, specifically on the streams the decomposition labels as numerical failures. And it must win Tempora-style utility at tight deadlines. No reported result was found on Lacuna for gradient clipping or tamed updates in TTA. Nor was any found for the implicit or proximal reference, so we must produce these numbers ourselves.

Why not just…?

Why not just use the tamed Euler step, i.e., clip the gradient norm? This is the most serious threat, because in this setting taming and soft clipping are the same thing. If curvature spikes coincide with gradient-norm spikes along real TTA trajectories, clipping will do as well as our controller and the stiffness story adds nothing practical. The stage-one measurements report how often the two signals disagree. The ablation compares the controller against clipping tuned to the same average step size. If they tie, we report that the numerical lens explains the failure but clipping is sufficient.

Why not just use CONGA or SIGMA? Both already beat Tent. However, neither separates objective collapse from discretization collapse, so neither can say when step control is futile. The decomposition runs quantify this. If most failures are objective-driven, all step rules, including ours, should plateau at the same accuracy. That would favor objective-level fixes over any of the three methods.

Why not just lower the learning rate? A small constant step is stable, but it adapts slowly. Tempora's results suggest that slow adaptation loses utility when frames arrive faster than updates can be made. The deadline experiments test whether a small constant step loses to curvature-adaptive steps in utility, even when it matches them in final accuracy.

Why not just freeze the weights (LAME) or update only normalization statistics (AdaBN)? Under the tightest deadlines these methods may simply win. Tempora already shows AdaBN dominating there, and our skip rule deliberately falls back to it. Their ceiling appears at moderate budgets: 49.9% error for test-time normalization versus 44.0% for Tent on ImageNet-C. LAME's authors also note that it cannot repair corrupted features. We report the full accuracy-versus-deadline curve so the crossover point is visible, rather than claiming dominance everywhere.

Proposed Experiments and Decisive Checks

The benchmarks are ImageNet-C under i.i.d. and correlated orderings, CIFAR-10-C in the continual protocol of CoTTA, which reports 16.2% error against 20.7% for continual Tent, and the Tempora deadline protocol run on both GPU and CPU. The metrics are error rate, collapse frequency (runs whose accuracy falls below a fixed fraction of the source model's), milliseconds per sample, and time-contingent utility.

Three checks decide the project.

The first is the decomposition. If fewer than roughly a fifth of collapses disappear under sub-stepping, the numerical hypothesis is largely wrong. In that case the paper becomes a characterization showing that TTA failure is an objective problem.

The second is predictiveness. Whether the step-to-stiffness ratio $\eta\hat L_t$ exceeds 2 should predict upcoming collapse better than gradient norm or SIGMA's variance-fit statistic, measured by area under the ROC curve on held-out streams.

The third is the head-to-head. The controller must beat tamed/clipped Tent and match SIGMA and CONGA at the same latency. It must also dominate them in utility at deadlines where CoTTA-style stabilizers are too slow to keep up.

A positive outcome on all three gives TTA a principled, zero-overhead stability rule. A negative outcome on the first check tells the field where not to look.