Decoupled Prototype Learning for Reliable Test-Time Adaptation

Guowei Wang, Changxing Ding, Wentao Tan, Mingkui Tan · DOI

TL;DR

This paper introduces Decoupled Prototype Learning (DPL), a novel approach to Test-Time Adaptation (TTA) that replaces standard sample-centric cross-entropy loss with a prototype-centric contrastive loss. By decoupling class prototype updates and leveraging the "style" of unconfident samples, DPL prevents models from collapsing due to noisy pseudo-labels and maintains high performance even with tiny batch sizes.

What Problem Does This Paper Address?

Deep learning models often fail when they encounter data from a "target domain" that differs from their training data (e.g., a model trained on photos trying to classify sketches). Test-Time Adaptation (TTA) attempts to fix this by updating the model on the fly using unlabeled data as it arrives.

The standard way to do this is through "self-training": the model predicts "pseudo-labels" for new data and then treats those labels as ground truth to calculate a Cross-Entropy (CE) loss. However, the authors identify a fatal flaw: CE loss is sample-centric. It forces every class prototype (classifier weight) to adjust simultaneously to fit a single sample's pseudo-label. If that pseudo-label is wrong (noisy), the entire classifier is dragged in the wrong direction, leading to a "vicious cycle" where the model becomes increasingly less accurate.

Methods

The authors propose three key mechanisms to make TTA more reliable:

  1. Decoupled Prototype Learning (DPL): Instead of fitting samples to labels, DPL focuses on the prototypes. For each class, it reduces the distance to "positive" samples (those predicted to be in that class) and increases the distance to "negative" samples in a contrastive manner. This "prototype-centric" approach prevents a single noisy sample from corrupting the entire weight matrix.
  2. Memory-Based Feature Updates: TTA often deals with very small batches where some classes might be missing entirely. DPL uses a memory bank to store and momentum-update "pseudo-features" for every class, ensuring that prototypes can be refined even when a specific class isn't present in the current batch.
  3. Style Transfer for Unconfident Samples: Usually, TTA methods simply discard samples where the model isn't confident. DPL argues these samples are valuable because they represent the most difficult domain shifts. Using Adaptive Instance Normalization (AdaIN), the authors transfer the "style" of these unconfident samples onto confident ones. This creates new, reliable training samples that better represent the target domain's distribution.

Datasets

The authors evaluated DPL across several rigorous benchmarks:

  • Domain Generalization (DG): PACS (Art, Cartoon, Photo, Sketch), VLCS, OfficeHome, and TerraIncognita.
  • Single Domain Generalization (SDG): DomainNet-126.
  • Image Corruption: CIFAR-10-C, CIFAR-100-C, and ImageNet-C (testing robustness against 15 types of blur, weather, and digital noise).

Key Insights and Ideas

  • Sample-Centric vs. Prototype-Centric: The core "aha" moment is that standard classification loss is too aggressive for noisy environments. By decoupling the optimization—treating each class prototype as an independent entity to be pulled toward its members—the model becomes significantly more robust to label noise.
  • Unconfident Samples are Style-Rich: We often think of unconfident samples as "bad data." This paper suggests they are actually "high-shift data." Their content might be confusing, but their style (texture, lighting, etc.) is exactly what the model needs to learn to adapt to the new domain.
  • Robustness to Batch Size: Most TTA methods (like TENT or SHOT) collapse when the batch size is very small (e.g., 2 or 4). Because DPL uses a memory bank and decoupled updates, its performance remains remarkably stable regardless of batch size.

Key Results

  • State-of-the-Art Performance: DPL achieved an average accuracy of 73.3% across the four major DG benchmarks, outperforming the previous best method (SWR&NSP) by 2%.
  • Corruption Robustness: On ImageNet-C, DPL reduced the average error rate to 64.7%, a significant improvement over the source model's 82.0%.
  • Hard Domain Success: In the notoriously difficult "Sketch" domain of the PACS dataset, DPL improved accuracy by over 10% compared to standard ResNet-18 baselines.
  • Synergy: The authors showed that DPL can be combined with other TTA methods (like AdaContrast) to further reduce error rates by up to 8%.

Limitations and Future Work

  • Computational Overhead: The style transfer mechanism requires two forward passes (one to identify confident samples and one for the actual adaptation). While the authors suggest a more efficient "next-batch" style transfer strategy, the base method is more computationally intensive than simple entropy minimization.
  • Supervised Trade-off: Interestingly, the authors note that DPL performs worse than standard Cross-Entropy in a fully supervised setting (where labels are 100% accurate). This suggests DPL is a specialized tool for high-noise, unsupervised environments rather than a general-purpose replacement for CE loss.
  • Future Directions: The authors suggest exploring how this prototype-centric approach might scale to even larger, more complex models like Vision Transformers (ViT) in real-world, streaming data scenarios.

Summary updated

BibTeX
@article{wang2025decoupled,
  author = {Guowei Wang and Changxing Ding and Wentao Tan and Mingkui Tan},
  title = {{Decoupled Prototype Learning for Reliable Test-Time Adaptation}},
  journal = {IEEE Trans. Multimedia},
  year = {2025},
  doi = {10.1109/tmm.2025.3535400},
}
Figure