Skip to main content
QUICK REVIEW

[Paper Review] Revisiting Realistic Test-Time Training: Sequential Inference and Adaptation by Anchored Clustering

Yongyi Su, Xun Xu|arXiv (Cornell University)|Jun 6, 2022
Domain Adaptation and Few-Shot LearningComputer Science12 citations
TL;DR

This paper proposes Test-Time Anchored Clustering (TTAC), a method for sequential test-time training (sTTT) that improves domain adaptation by aligning target domain features to source domain clusters using KL divergence minimization. TTAC uses exponential moving averages for online cluster updates, pseudo label filtering for robustness, and iterative refinement, consistently outperforming SOTA methods across six datasets under realistic sTTT protocols without modifying the source training objective.

ABSTRACT

Deploying models on target domain data subject to distribution shift requires adaptation. Test-time training (TTT) emerges as a solution to this adaptation under a realistic scenario where access to full source domain data is not available and instant inference on target domain is required. Despite many efforts into TTT, there is a confusion over the experimental settings, thus leading to unfair comparisons. In this work, we first revisit TTT assumptions and categorize TTT protocols by two key factors. Among the multiple protocols, we adopt a realistic sequential test-time training (sTTT) protocol, under which we further develop a test-time anchored clustering (TTAC) approach to enable stronger test-time feature learning. TTAC discovers clusters in both source and target domain and match the target clusters to the source ones to improve generalization. Pseudo label filtering and iterative updating are developed to improve the effectiveness and efficiency of anchored clustering. We demonstrate that under all TTT protocols TTAC consistently outperforms the state-of-the-art methods on six TTT datasets. We hope this work will provide a fair benchmarking of TTT methods and future research should be compared within respective protocols. A demo code is available at https://github.com/Gorilla-Lab-SCUT/TTAC.

Motivation & Objective

  • To resolve confusion in test-time training (TTT) evaluation protocols by categorizing existing methods based on two key factors: source objective modification and sequential inference.
  • To establish a realistic TTT protocol—sequential test-time training (sTTT)—where test samples arrive one-by-one and inference must be instant, with no access to source data or modifications to the source training objective.
  • To develop TTAC, a test-time anchored clustering method that matches target domain clusters to source domain category-wise statistics using KL divergence to improve feature generalization.
  • To enhance robustness and efficiency through pseudo label filtering based on prediction confidence and iterative model updates with a memory-efficient exponential moving average strategy.
  • To demonstrate TTAC's superiority across six TTT benchmark datasets under all TTT protocols, including sTTT, and to advocate for protocol-specific benchmarking in future research.

Proposed method

  • TTAC discovers clusters in both source and target domains using a mixture of Gaussians, where each component corresponds to a class, and uses category-wise source statistics as anchors.
  • Target domain clusters are matched to source anchors by minimizing KL divergence between target component Gaussians and source anchors during test-time optimization.
  • An exponential moving average (EMA) strategy is used to update target cluster statistics incrementally as new test samples arrive, enabling online learning under the sTTT protocol.
  • Pseudo label filtering is applied by discarding samples with low prediction confidence, reducing noise from incorrect assignments and improving cluster quality.
  • Filtered samples are used to update component Gaussians, while unfiltered samples contribute to a global feature alignment loss to preserve useful information.
  • TTAC is compatible with existing TTT techniques like contrastive learning if source objective modification is allowed, enabling further performance gains.

Experimental results

Research questions

  • RQ1How can test-time training be fairly evaluated given the lack of standardized protocols in existing literature?
  • RQ2What are the key factors that differentiate realistic test-time training protocols, and how do they impact method performance and reproducibility?
  • RQ3Can anchored clustering with source domain statistics as fixed anchors improve test-time feature learning without modifying the source training objective?
  • RQ4How does pseudo label filtering based on prediction confidence improve the robustness and accuracy of test-time clustering?
  • RQ5To what extent does iterative updating and sample queue usage affect the performance and efficiency of test-time adaptation methods?

Key findings

  • TTAC consistently outperforms state-of-the-art methods across six TTT benchmark datasets, including CIFAR10-C and ImageNet-C, under all TTT protocols, including the most realistic sTTT setting.
  • On CIFAR10-C with level 5 snow corruption, TTAC achieves a top-1 error of 10.88 under sTTT with a sample queue and 4 update epochs, outperforming TENT (13.87) and SHOT (13.75).
  • Even without any source domain statistical information, TTAC achieves 11.91% error on ImageNet-C, surpassing all competing methods, demonstrating its strong generalization under minimal assumptions.
  • Maintaining a test sample queue improves performance significantly for distribution-estimating methods like TTAC and SHOT, with error decreasing from 11.91 to 9.96 on ImageNet-C as update epochs increase from 1 to 4.
  • TTAC’s per-sample wall time is 0.0083 seconds without a queue and 0.1524 seconds with a 4-epoch queue on 4096 samples, making it only twice as slow as BN and TENT while offering superior accuracy.
  • The ablation study confirms that both the sample queue and multiple update epochs are crucial for performance, with TTAC showing consistent improvement across all settings.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.