Neural Collapse in Test-Time Adaptation

Xiao Chen, Zhongjing Du, Jiazhen Huang, Xu Jiang, Li Lu, Jingyan Jiang, Zhi WangarXiv 2025 · DOI

TL;DR

This paper introduces "Neural Collapse" (NC) principles to Test-Time Adaptation (TTA), a technique for improving model robustness to unseen data during inference. They propose a novel method, NCTTA, that aligns feature embeddings with classifier weights, significantly boosting performance on corrupted datasets.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are notoriously brittle when faced with data that differs from their training distribution (out-of-distribution or OOD data). This performance degradation is a major hurdle for deploying DNNs in real-world, dynamic environments. Test-Time Adaptation (TTA) offers a practical solution by adapting pre-trained models on the fly using unlabeled test data, without retraining. However, existing TTA methods often lack a theoretical understanding of why performance degrades and how to best adapt. This paper aims to bridge this gap by leveraging the geometric properties of well-trained DNNs, known as Neural Collapse (NC), to develop a more principled and effective TTA approach.

Methods

The core of this work lies in extending the concept of Neural Collapse (NC) from a class-wise perspective to a sample-wise one, termed Sample-wise Alignment Collapse (NC3+). NC3+ posits that during training, each sample's feature embedding should align closely with its corresponding classifier weight. The authors then observe that performance degradation in TTA under domain shifts is caused by this sample-wise alignment breaking down.

To address this, they propose NCTTA, a novel TTA method that explicitly promotes feature-classifier alignment. Since direct alignment with the true class label is impossible in TTA (due to unlabeled data), NCTTA uses a hybrid target strategy. This strategy combines:

  1. Geometric Proximity: Measures how close a sample's feature embedding is to a classifier weight.
  2. Predictive Confidence: Leverages the model's current prediction confidence.

This hybrid target helps mitigate the unreliability of pseudo-labels, which are often inaccurate under domain shifts. NCTTA also incorporates an entropy-based filtering strategy to focus on confident predictions and uses adaptive weighting to balance alignment and confidence.

Datasets

The proposed method was evaluated on several standard benchmarks for evaluating robustness to corruptions and domain shifts:

  • CIFAR-10-C and CIFAR-100-C: These datasets are corrupted versions of CIFAR-10 and CIFAR-100, respectively, with various types of corruptions (e.g., Gaussian noise, snow, fog) at different severity levels.
  • ImageNet-C: Similar to CIFAR-C, but for the larger ImageNet dataset.
  • PACS: A domain generalization dataset featuring four distinct domains: cartoon, art, photo, and sketch.
  • Waterbirds: A dataset designed to test robustness to spurious correlations between image features and labels.

Key Insights and Ideas

  • NC3+ as a Foundation for TTA: The paper successfully extends the theoretical framework of Neural Collapse to the sample-wise level, providing a new lens through which to understand DNN behavior during adaptation.
  • Misalignment is the Root Cause: The authors empirically demonstrate that performance degradation in TTA is directly linked to the breakdown of sample-wise feature-classifier alignment, rather than just general prediction uncertainty.
  • Hybrid Targets for Robustness: Simply relying on pseudo-labels for alignment is insufficient. NCTTA's novel hybrid targets, blending geometric proximity and predictive confidence, are crucial for effective adaptation, especially under severe domain shifts.
  • TTA Benefits from Geometric Priors: This work highlights that leveraging inherent geometric properties of well-trained models (like NC3+) can lead to more principled and effective TTA strategies.

Key Results

NCTTA consistently outperformed state-of-the-art TTA baselines across various challenging scenarios:

  • CIFAR-10-C and ImageNet-C: NCTTA achieved the highest average accuracy on nearly all corruption types, with notable improvements. For example, it outperformed Tent by 14.52% on ImageNet-C.
  • PACS and Waterbirds: Similar gains were observed, demonstrating NCTTA's effectiveness in handling spurious correlations and domain shifts.
  • Challenging Settings: NCTTA showed strong performance in Continual Test-Time Adaptation (CTTA) and in scenarios with very small batch sizes (batch size = 1), where adaptation is particularly difficult.
  • Improved Feature-Classifier Alignment: Quantitative analysis (G-FCA distance) and qualitative visualizations (t-SNE) confirmed that NCTTA significantly improves feature-classifier alignment and leads to more discriminative feature spaces.

Limitations and Future Work

The authors acknowledge several limitations and suggest future research directions:

  • Class Prototypes in Mini-Batch TTA: Further research is needed to explore how NC properties can be leveraged to compute or learn class prototypes in mini-batch TTA settings, which is currently challenging due to the lack of labels.
  • Vision-Language Models (VLMs): The applicability of NC principles to VLMs is an open area for future investigation.
  • Generalizability of NC: While this work focuses on NC3+, exploring other NC properties for TTA could yield further advancements.

Overall, this paper provides a significant theoretical and practical contribution to the field of Test-Time Adaptation by grounding it in the principles of Neural Collapse.

Summary updated

BibTeX
@misc{chen2025neural,
  author = {Xiao Chen and Zhongjing Du and Jiazhen Huang and Xu Jiang and Li Lu and Jingyan Jiang and Zhi Wang},
  title = {{Neural Collapse in Test-Time Adaptation}},
  year = {2025},
  eprint = {2512.10421},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.10421},
}
Figure