Active Test-Time Adaptation: Theoretical Analyses and An Algorithm
Shurui Gui, Xiner Li, Shuiwang Ji
TL;DR
Active Test-Time Adaptation (ATTA) integrates limited labeled test-time samples into fully online adaptation to address substantial distribution shifts without access to source data. The authors establish learning-theoretic bounds showing that labeled test instances tighten the test-domain error, leveraging the $\mathcal{H}\Delta\mathcal{H}$-distance and a weighted empirical risk $\hat{\epsilon}_{\bm{w}}(h(t))$, while addressing catastrophic forgetting through balanced entropy minimization. They introduce SimATTA, a lightweight algorithm that partitions incoming data by entropy, maintains informative anchors via incremental clustering, and trains on a mix of pseudo-labeled source-like anchors and actively labeled anchors. Across PACS, VLCS, Office-Home, and Tiny-ImageNet-C, ATTA demonstrates substantial gains over traditional TTA and competitive performance with ADA, validating both the theoretical guarantees and practical viability of budgeted, real-time adaptation.
Abstract
Test-time adaptation (TTA) addresses distribution shifts for streaming test data in unsupervised settings. Currently, most TTA methods can only deal with minor shifts and rely heavily on heuristic and empirical studies. To advance TTA under domain shifts, we propose the novel problem setting of active test-time adaptation (ATTA) that integrates active learning within the fully TTA setting. We provide a learning theory analysis, demonstrating that incorporating limited labeled test instances enhances overall performances across test domains with a theoretical guarantee. We also present a sample entropy balancing for implementing ATTA while avoiding catastrophic forgetting (CF). We introduce a simple yet effective ATTA algorithm, known as SimATTA, using real-time sample selection techniques. Extensive experimental results confirm consistency with our theoretical analyses and show that the proposed ATTA method yields substantial performance improvements over TTA methods while maintaining efficiency and shares similar effectiveness to the more demanding active domain adaptation (ADA) methods. Our code is available at https://github.com/divelab/ATTA
