Closing the Norm Shortcut in Test-Time Low-Rank Adaptation

When a trained classifier meets data unlike its training set (fog-corrupted photos, a new hospital's scanners), one popular remedy is to keep adapting it at deployment using only unlabeled test inputs. The usual training signal is "become more confident": minimize the entropy of the model's predicted class distribution. To keep this cheap, recent work updates only small low-rank adapters, a parameter-efficient fine-tuning method (LoRA) that adds a trainable product of two thin matrices to each frozen weight matrix. This combination is known to fall into a "confidence trap," where the model becomes confidently wrong and errors accumulate over a stream. We propose a simple mechanistic explanation and a matching fix. A network with a linear output layer can lower entropy in two ways. It can rotate its output scores toward one class, which may change the decision. Or it can simply scale all its scores up, which leaves every decision unchanged while confidence rises. The second route is the cheapest for a gradient step, and it buys miscalibration without any accuracy.

The fix is prediction clipping: cap the norm of the model's output scores (logits) during test-time adaptation, at a level inherited from the source model's own behavior on source data. Once the cap is reached, the scale route is closed and all of the adapter's update must go into changing the direction of the scores. Our claim is that this cap, rather than more elaborate adapter architectures or teacher models, is what prevents much of the collapse in continual low-rank test-time adaptation. The claim makes a checkable prediction. The benefit should appear for linear-head classifiers and largely disappear for CLIP-style models, whose scores are scaled cosine similarities and therefore already norm-limited.

Core Claim

Write the softmax-relevant scores as mean-centered logits $z$, and factor them as $z = \rho u$, where $\rho = \|z\|_2$ is the score scale and $u$ is a unit vector giving the score direction. Any test-time change in prediction entropy $H$ splits into a scale part and a direction part:

$$\Delta H \approx \frac{\partial H}{\partial \rho}\,\Delta\rho + \nabla_u H \cdot \Delta u .$$

We hypothesize that under unclipped entropy minimization with LoRA adapters, the scale term carries most of the entropy reduction on shifted inputs. We further hypothesize that this share predicts the later rise in calibration error and the error accumulation seen in continual streams. Our intervention replaces $z$ in the adaptation loss with $\min(1, \tau/\|z\|_2)\, z$. Here $\tau$ is set without any target labels, as a high quantile (for example the 95th percentile) of the source model's centered-logit norms on held-out source data. The adapter can make the model more decisive only by changing which class it favors, and never more confident in scale than the source model already was.

This design builds on Mitigating Memorization of Noisy Labels by Clipping the Model Prediction (LogitClip), which caps the logit norm during supervised training so that cross-entropy stays bounded on mislabeled examples. That paper supplies the operator. We differ from it in three ways. We apply the cap to an unsupervised test-time objective. We center the logits, because softmax ignores constant shifts. We remove LogitClip's open problem of hand-tuning $\tau$ by tying the cap to the source model, which matters because no labeled target data exist for tuning. The theoretical motivation comes from Stability and Hypothesis Transfer Learning. It shows that truncating predictions makes transfer from a source hypothesis safe, so that the clipped learner never does worse than learning from scratch, but only for square loss in kernel models. We test whether the spirit of that safety guarantee survives for entropy losses in deep adapters. We do not attempt the proof.

Research Program

The work has three parts. The first is diagnostic. On standard continual test-time adaptation streams, we instrument LoRA-based entropy minimization (TENT-style updates applied to adapters) and log $\rho$, $u$, the decomposition above, accuracy, and expected calibration error at every step. The question is whether scale inflation precedes accuracy collapse, and whether samples whose entropy fell mostly through scale are disproportionately wrong. This evidence motivates everything else. If scale inflation turns out to be small, the proposal is wrong, and we will report that.

The second part is the intervention, source-anchored centered logit clipping. It is added to the plain LoRA entropy-minimization baseline and to the mean-teacher pipeline of ViDA: Homeostatic Visual Domain Adapter for Continual Test Time Adaptation. ViDA adapts a low-rank branch and a high-rank branch using pseudo-labels from a slowly averaged teacher model, and it acknowledges that error accumulation remains a hazard. There we clip the student's logits and the teacher's logits before the pseudo-label is formed. This targets the observation in Revisiting Logit Distributions for Reliable Out-of-Distribution Detection that shifted inputs naturally produce flatter, smaller logits, which an unchecked adaptation loop can inflate.

The third part is the mechanism control. We repeat the intervention in the CLIP setting of Test-time low rank adaptation via confidence maximization for zero-shot generalization of vision-language models (TTL). TTL optimizes LoRA adapters in CLIP's vision encoder on augmented views of each test image. Because CLIP's logits are a fixed scale times cosine similarities, the scale route is mostly unavailable. Our account therefore predicts a small effect there, and a large effect would mean something other than norm inflation is at work.

Baselines

The naive reference point is the unadapted source model. On ImageNet-C, ViDA reports a mean error of 82% for it, and ViDA itself reaches 61.2% on the same benchmark (ViDA). The direct ablation of our key ingredient is LoRA entropy minimization with identical adapters, placement, learning rate, step count and batch order, run once without the cap and once with it. The cap is the only difference between the two runs.

The strongest existing method in the continual setting is ViDA. We will rerun it from its released configuration on ImageNet-C, CIFAR-10-C and Cityscapes-to-ACDC. On Cityscapes-to-ACDC, ViDA reports 61.9% mean IoU and a rise from 61.1% to 62.3% mIoU over ten repeated weather cycles. Adding clipping changes nothing else in its pipeline, so the comparison isolates the cap. Beating ViDA means lower mean error on the full ImageNet-C stream across three seeds. It also means at least matching ViDA's stability over the ten-cycle test.

In the CLIP setting the strongest baseline is TTL, which reports 62.80% average accuracy on ImageNet out-of-distribution variants, against 60.69% for test-time prompt tuning and 55.31% for zero-shot CLIP. Here "beating" is not the goal. Our prediction is a change of less than about half a point, and that is the result we would count as confirming the mechanism.

Two competitor ablations address the reviewer alternatives below. The first replaces our output cap with Norm-Bounded Low-Rank Adaptation (NB-LoRA), which bounds the singular values of the adapter update instead of the outputs. The second uses a fixed temperature inside the entropy loss. Both receive the same tuning budget as $\tau$: a small grid evaluated only on held-out source data, never on target labels.

Why not just…?

Why not just bound the adapter weights, as NB-LoRA does? NB-LoRA shows that limiting rank alone does not limit how large the adapter update grows, and it fixes this by bounding the update's matrix norms. A bounded weight change can still produce a large change in logit scale, however, because the change compounds through many layers and is amplified on shifted inputs. A weight bound strong enough to stop scale inflation may also block the useful direction changes. This is a genuine competitor. The NB-LoRA arm with matched budget settles it. If NB-LoRA alone recovers the clipping gain and the scale share of entropy reduction stays low, the output cap is redundant, and we will say so.

Why not just use a temperature in the entropy loss? Dividing logits by a constant $T$ rescales the loss but leaves its gradient pointing toward larger scale. The model can still drift to arbitrarily large $\rho$; the drift just takes longer. LogitClip makes the same argument against post-hoc rescaling in the supervised case (LogitClip). The tuned-temperature arm, together with the $\rho$ trajectories it produces, tests this directly.

Why not just lower the learning rate or reset the adapters periodically? Both slow drift in every direction, useful or not. Clipping removes only the scale direction. We will sweep the learning rate for unclipped LoRA entropy minimization and compare the full accuracy–calibration curves of the two methods. If a well-chosen small learning rate matches clipping across the whole stream, the cap offers only convenience, and we will report that.

Proposed Experiments

The main experiments use ImageNet-C and CIFAR-10-C as continual streams over all 15 corruptions at the highest severity, with ViT backbones carrying LoRA adapters, following the ViDA protocol. Cityscapes-to-ACDC, including the ten-cycle repetition, serves as the long-horizon test. ImageNet out-of-distribution variants under TTL serve as the CLIP control. As a real-world check beyond synthetic corruption, we add Camelyon17-WILDS, where WILDS reports ERM accuracy falling from about 93% in-distribution to about 70% out-of-distribution. There we run test-time LoRA adaptation on the unlabeled test hospitals. The metrics are error or mIoU, expected calibration error, the per-step share of entropy reduction due to scale, and error as a function of stream position.

Three checks decide the proposal. First, on unclipped runs, the scale share of entropy reduction must be large and must predict later calibration loss and error. Without that, the mechanism fails. Second, clipping must improve late-stream error and calibration over the unclipped ablation on linear-head models, and must not be matched by the NB-LoRA arm, the temperature arm, or the best learning-rate setting. Third, the gain must largely vanish in CLIP. The proposal is supported only if all three hold. If clipping helps in CLIP as much as in linear-head models, our explanation is wrong, even if the method works.