arXiv:2610.37658cs.LGOct 2026

Manuscript Offprint

arXiv:2610.37658

When Should We Intervene at Test Time?

Jiahao Zhang, Xinling Wen, Liangliang Li, Yu Chen

ABSTRACT

Test-time adaptation helps a deployed model respond to changing inputs, but the same intervention can rescue one batch and damage the next. Updating normalization statistics, for example, can improve corrupted images yet fail when a batch contains mostly one class. Average accuracy hides these failures and cannot tell a model when to use an intervention. Target labels can guide this decision, but they are scarce and some choices are already clear. We introduce PORTAL, a controller that chooses when to deploy an intervention, which inputs to label, and when to stop querying. Each available prediction rule is a candidate, and its predictions are fixed before current feedback arrives. Every acquired label therefore evaluates all candidates on the same input. PORTAL combines these shared comparisons and directs queries toward candidates that can still overtake the current leader. It stops when the remaining labels cannot change the choice or when the possible accuracy gain no longer justifies another query. Our analysis links the required feedback to accuracy gaps and shared mistakes, explaining why some choices need much less evidence. Experiments show that this control turns an intervention that loses accuracy overall into a useful choice on selected batches. It prevents severe failures caused by changes in arrival order and preserves gains across complete corruption streams. When a fixed rule already works well, PORTAL uses little feedback to retain its performance. Periodic label checks reveal when past evidence needs refreshing and help the controller recover as conditions change. The acquired labels also train stronger candidates for future batches, and selection brings nearly all of their accuracy gains into deployment. The same feedback therefore improves both the choice made now and the predictions available to later batches.

1 INTRODUCTION

A deployed model encounters changes in both image appearance and class composition. Fog may replace clear weather, or one object class may dominate a run of inputs. Test-time adaptation responds by changing the model as data arrive. Yet an update that rescues one batch can break predictions on the next. Its average gain across a test set does not tell us when to use it. Consider batch normalization (BN), which normalizes activations using feature statistics. Recomputing these statistics on incoming images often helps under corruption. Averaging predictions from an image and its horizontally flipped view offers another intervention. We call each available prediction rule a candidate. Existing adaptation methods provide many such candidates (Wang et al., 2021; Niu et al., 2022; 2023). A fixed rule chooses one for the whole stream. Local selection chooses for each batch, retaining the unchanged model when an intervention is unhelpful.

The need for selection becomes clear on PACS, which contains Photo, Art, Cartoon and Sketch domains. Combining BN updates with original and flipped views gives BN+flip. This candidate works well when domains arrive in blocks or are mixed together. Grouping inputs by class, called class-block arrivals, changes the batch statistics and reduces its accuracy to 22.58%. We introduce PORTAL, a controller that uses sparse target labels to choose among the available predictions. 1^{1} It

1^{1}Code, data, and manuscript: https://anonymous.4open.science/r/PORTAL-8322/.

reaches 51.28% under the same arrivals. Choosing well requires evidence, but labels are scarce. Active test-time adaptation acquires labels to guide updates and selection (Gui et al., 2024; Li et al., 2024; Wang & Ding, 2025); adaptive labeling also supports evaluation under shift (Mittal et al., 2024). A close comparison may cost more feedback than its accuracy gain is worth. The controller must decide which candidate to deploy, which input to label, and when to stop. Appendix X places these decisions in the broader literature.

PORTAL uses one label to evaluate every candidate on the same input. Agreement gives candidates the same outcome; disagreement reveals which predictions are correct. We group inputs by the classes that candidates predict and estimate class probabilities within each group. Every label updates all comparisons, including the overlap between errors. Queries target rivals that can overtake the leader within the remaining budget. Selection stops when no remaining labels can change the winner or when the possible accuracy gain cannot justify another query. Our analysis relates the feedback requirement to accuracy gaps and shared errors. It also shows why biased queries can make a wrong choice more certain.

Earlier labels reduce query costs while their class relationships remain stable; periodic checks reveal when comparisons need refreshing. After choosing among fixed predictions, we use the new labels to train stronger candidates for later batches. Our experiments follow this progression from intervention failure to future learning. Holding a candidate fixed shows that targeted feedback turns its aggregate accuracy loss into a gain. A more harmful transfer shows how selection prevents most of an intervention's damage. Complete ImageNet-C corruption streams test control at scale. CIFAR comparisons show the label savings when a strong fixed rule already works well. Finally, learned candidates raise PACS deployment accuracy from 59.68% to 72.64%. The same labels improve current deployment decisions and train stronger candidates for later batches.