Skip to main content
QUICK REVIEW

[Paper Review] Feature Alignment and Uniformity for Test Time Adaptation

Shuai Wang, Daoan Zhang|arXiv (Cornell University)|Mar 20, 2023
Domain Adaptation and Few-Shot LearningComputer Science3 citations
TL;DR

This paper proposes a test time adaptation method that treats adaptation as feature revision through alignment and uniformity. It introduces Test Time Self-Distillation for feature uniformity and Memorized Spatial Local Clustering for feature alignment, achieving state-of-the-art performance on domain generalization and medical image segmentation benchmarks with consistent gains over ERM and existing TTA methods.

ABSTRACT

Test time adaptation (TTA) aims to adapt deep neural networks when receiving out of distribution test domain samples. In this setting, the model can only access online unlabeled test samples and pre-trained models on the training domains. We first address TTA as a feature revision problem due to the domain gap between source domains and target domains. After that, we follow the two measurements alignment and uniformity to discuss the test time feature revision. For test time feature uniformity, we propose a test time self-distillation strategy to guarantee the consistency of uniformity between representations of the current batch and all the previous batches. For test time feature alignment, we propose a memorized spatial local clustering strategy to align the representations among the neighborhood samples for the upcoming batch. To deal with the common noisy label problem, we propound the entropy and consistency filters to select and drop the possible noisy labels. To prove the scalability and efficacy of our method, we conduct experiments on four domain generalization benchmarks and four medical image segmentation tasks with various backbones. Experiment results show that our method not only improves baseline stably but also outperforms existing state-of-the-art test time adaptation methods. Code is available at \href{https://github.com/SakurajimaMaiii/TSD}{https://github.com/SakurajimaMaiii/TSD}.

Motivation & Objective

  • To address domain shift in test time adaptation by reframing it as a feature representation revision problem.
  • To improve model robustness on out-of-distribution test data without access to training data or labels.
  • To simultaneously optimize feature alignment and uniformity during test-time adaptation.
  • To develop a scalable, parameter-efficient method applicable across diverse backbones and tasks.
  • To validate effectiveness on both generalization and medical image segmentation benchmarks.

Proposed method

  • Proposes Test Time Self-Distillation (TSD) to enforce uniformity by aligning model predictions with prototype-based classifiers using a memory bank of past features and logits.
  • Introduces Memorized Spatial Local Clustering to enhance feature alignment by grouping neighborhood samples and aligning their representations using pseudo-labels.
  • Employs a memory bank to store and update feature representations and logits across batches, enabling temporal consistency in uniformity.
  • Uses entropy and consistency filters to detect and drop noisy pseudo-labels during adaptation.
  • Applies the method with only batch normalization affine parameters updated, reducing GPU memory usage by 2 GB while maintaining 89% accuracy on PACS.
  • Adapts the method to medical image segmentation using DeepLabv3+ with MobileNetV2, using Dice score as evaluation metric.

Experimental results

Research questions

  • RQ1Can test time adaptation be effectively framed as a feature representation revision problem focusing on alignment and uniformity?
  • RQ2How can feature uniformity be maintained across online batches without ground-truth labels?
  • RQ3Can spatial local clustering with memorized features improve feature alignment in the latent space?
  • RQ4How does the method perform compared to SOTA TTA and SFDA methods on diverse benchmarks?
  • RQ5Can the method be effectively applied to low-shot, cross-domain medical image segmentation tasks?

Key findings

  • The method improves the ERM baseline by 3.9%, 4.44%, 3.57%, and 12.72% on four medical image segmentation tasks, respectively.
  • On the PACS dataset, the method achieves 89% accuracy with only batch normalization layer updates, matching 89.4% from full fine-tuning while reducing GPU memory by 2 GB.
  • The method outperforms both ERM and Tent on all four medical segmentation tasks, with the largest improvement of 12.72% on the RIM-ONE-r3 dataset.
  • Test Time Self-Distillation ensures consistent uniformity by aligning current batch predictions with historical prototype distributions via self-distillation.
  • Memorized Spatial Local Clustering effectively aligns features of similar-class samples by leveraging spatial proximity and pseudo-label consistency.
  • The method is scalable and effective across multiple backbones and tasks, demonstrating strong generalization and robustness in real-world deployment scenarios.

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.