arXiv:2610.36628cs.LGOct 2026

Manuscript Offprint

arXiv:2610.36628

The Batch Size Can Be One: Test-Time Adaptation from Classifier Geometry

Jaeho Hwang, Yujin Oh, Juhyeon Shin, Juhye Lee, Sungroh Yoon, Uiwon Hwang

ABSTRACT

Test-time adaptation updates a deployed model on an unlabeled test stream. In practice this stream often arrives one sample at a time, with the classes in no particular order. A single sample then provides limited information for estimating distribution-level statistics, and selecting samples by confidence can admit predictions that are wrong yet confident. A corruption, however, shifts the features while leaving the decision regions of the frozen classifier unchanged. We therefore propose Origin-recentered Test-Time Adaptation (OriTTA), which constructs fixed geometric targets from the source model and adapts selected features toward them. Seen from the origin of the feature space, the classes lean toward a common direction. We choose a new origin to bring class scores closer together while keeping it near the mean feature of one synthetic prototype per class. From this origin, prototype directions spread more evenly, and each class obtains an axis and an ideal point before any test data arrives. During adaptation, OriTTA aligns selected features with their predicted class axis and penalizes excessive radius, keeps one input per predicted class in memory to limit feature changes for classes absent from the stream, and resets the model when re-classifying this memory reveals collapse. Without tuning for each setting, OriTTA achieves the highest mean accuracy at batch size 1 on CIFAR-10-C, CIFAR-100-C and ImageNet-C in all sixteen combinations of four backbones, two protocols and two stream orders. On ImageNet-C fog, recent methods collapse in up to two thirds of one hundred runs, while OriTTA never does.

1 INTRODUCTION

In real-world deployment, a model may encounter test data from distributions that differ from its training data. Test-time adaptation (TTA) addresses this by updating the model on the unlabeled test stream itself, most commonly by minimizing the entropy of the model's own predictions with respect to its normalization parameters (Wang et al., 2021). Later methods refine which samples to learn from and how large a step to take (Niu et al., 2022; 2023; Lee et al., 2024; Hu et al., 2025).

Existing TTA methods face two difficulties in realistic test streams. First, many of them estimate normalization statistics from the current test batch, and these estimates become unreliable when samples arrive one at a time or in a non-shuffled class order (Niu et al., 2023). A single sample then provides limited information for estimating distribution-level statistics, and when a class arrives as one long run, even a large batch is dominated by that class, so its statistics capture the class rather than the distribution shift. Second, methods that update the model with its own predictions risk reinforcing their own mistakes. Confidence-based selection (Niu et al., 2022) filters out uncertain samples but can still admit confidently incorrect predictions, which subsequent updates then reinforce. When adaptation continues across a sequence of shifts (Wang et al., 2022), these errors compound over the stream until predictions collapse onto a few classes (Press et al., 2023).

*Corresponding authors (sryoon@snu.ac.kr, uiwon.hwang@ewha.ac.kr)

Since the classifier is frozen during TTA, its decision regions stay unchanged and a corruption only displaces the features. The geometry of these fixed regions then indicates where the features of each class should lie, without depending on the test stream. Using this geometry directly is difficult, however, because of three properties of the classifier and its feature space. First, the classifier rows share a component that shifts every logit equally without changing predictions. Second, some feature directions affect neither predicted labels nor class probabilities. Third, class prototypes point toward a common direction when measured from the feature-space origin, making their angular arrangement sensitive to the choice of origin.

We therefore propose Origin-recentered Test-Time Adaptation (OriTTA), which places an ideal point for each class using the frozen classifier and synthetic class prototypes, and adapts selected features toward the ideal point of their predicted class. OriTTA centers the classifier rows and projects features onto their span and moves the origin to a point where class scores are close together while staying near the mean feature of one synthetic prototype per class. From this origin, prototype directions spread more evenly, and each class obtains an axis, its ideal point on the axis and a cone around it, all fixed before adaptation begins. On CIFAR-100, the fraction of prototypes inside the cone of their own class rises from 47% to 99%.

During adaptation, OriTTA applies angular and radial losses to the current test feature only if it lies inside the cone of its predicted class and near its ideal point. These losses encourage class-axis alignment and penalize excessive radius. A memory initialized with synthetic prototypes holds one input per predicted class and is updated with low-entropy test inputs. OriTTA periodically pulls stored features toward their ideal points to limit changes while their classes are absent from the stream. Reclassifying this memory detects concentration of predictions on a few classes and triggers restoration of the source model. Without per-setting tuning, OriTTA achieves the highest mean accuracy at batch size 1 on CIFAR-10-C, CIFAR-100-C and ImageNet-C in all sixteen combinations of four backbones, episodic and continual adaptation, and shuffled and class-blocked streams.

Our contributions are the following:

• We propose OriTTA, which takes the target of adaptation from the frozen classifier, measured from a recentered origin computed before any test data arrives.

• We design per-sample losses requiring neither batch statistics nor classifier softmax probabilities, and a collapse detector that evaluates prediction concentration across class-indexed memory slots.

• We analyze classifier and prototype geometry across four source models and demonstrate accuracy gains from projection and recentering in the evaluated ablations.

• We show that OriTTA achieves the highest mean accuracy at batch size 1 in all sixteen settings and never collapses in 100 runs on ImageNet-C fog.

References (69)