Table of Contents
Fetching ...

Class-Invariant Test-Time Augmentation for Domain Generalization

Zhicheng Lin, Xiaolin Wu, Xi Zhang

TL;DR

Domain generalization under distribution shifts is challenging and existing approaches often rely on costly training-time strategies or heavy test-time adaptation. This work introduces Class-Invariant Test-Time Augmentation (CI-TTA), which generates $N$ class-invariant variants of each test image via elastic and grid deformations, predicts on all views with a pretrained model $M$, and aggregates only high-confidence predictions above threshold $\tau$ to form the final distribution $\mathbf{p}_*$ (fallback to $\mathbf{p}_0$ if none pass). Empirically, CI-TTA yields consistent gains across domain generalization benchmarks PACS and Office-Home across multiple backbones (e.g., ResNet-18/50) and DG algorithms, proving its robustness and generality. The results establish CI-TTA as a lightweight, broadly applicable inference-time strategy that leverages shape cues to improve generalization, with potential future work on adaptive parameter tuning and integration with training-time methods.

Abstract

Deep models often suffer significant performance degradation under distribution shifts. Domain generalization (DG) seeks to mitigate this challenge by enabling models to generalize to unseen domains. Most prior approaches rely on multi-domain training or computationally intensive test-time adaptation. In contrast, we propose a complementary strategy: lightweight test-time augmentation. Specifically, we develop a novel Class-Invariant Test-Time Augmentation (CI-TTA) technique. The idea is to generate multiple variants of each input image through elastic and grid deformations that nevertheless belong to the same class as the original input. Their predictions are aggregated through a confidence-guided filtering scheme that remove unreliable outputs, ensuring the final decision relies on consistent and trustworthy cues. Extensive Experiments on PACS and Office-Home datasets demonstrate consistent gains across different DG algorithms and backbones, highlighting the effectiveness and generality of our approach.

Class-Invariant Test-Time Augmentation for Domain Generalization

TL;DR

Domain generalization under distribution shifts is challenging and existing approaches often rely on costly training-time strategies or heavy test-time adaptation. This work introduces Class-Invariant Test-Time Augmentation (CI-TTA), which generates class-invariant variants of each test image via elastic and grid deformations, predicts on all views with a pretrained model , and aggregates only high-confidence predictions above threshold to form the final distribution (fallback to if none pass). Empirically, CI-TTA yields consistent gains across domain generalization benchmarks PACS and Office-Home across multiple backbones (e.g., ResNet-18/50) and DG algorithms, proving its robustness and generality. The results establish CI-TTA as a lightweight, broadly applicable inference-time strategy that leverages shape cues to improve generalization, with potential future work on adaptive parameter tuning and integration with training-time methods.

Abstract

Deep models often suffer significant performance degradation under distribution shifts. Domain generalization (DG) seeks to mitigate this challenge by enabling models to generalize to unseen domains. Most prior approaches rely on multi-domain training or computationally intensive test-time adaptation. In contrast, we propose a complementary strategy: lightweight test-time augmentation. Specifically, we develop a novel Class-Invariant Test-Time Augmentation (CI-TTA) technique. The idea is to generate multiple variants of each input image through elastic and grid deformations that nevertheless belong to the same class as the original input. Their predictions are aggregated through a confidence-guided filtering scheme that remove unreliable outputs, ensuring the final decision relies on consistent and trustworthy cues. Extensive Experiments on PACS and Office-Home datasets demonstrate consistent gains across different DG algorithms and backbones, highlighting the effectiveness and generality of our approach.

Paper Structure

This paper contains 7 sections, 11 equations, 4 figures, 4 tables.

Figures (4)

  • Figure 1: Examples of class-invariant test-time augmentation.
  • Figure 2: Overview of the proposed CI-TTA framework for efficient domain generalization.
  • Figure 3: Effect of deformation strength $\sigma$ in CI-TTA on accuracy under ERM training without confidence filtering. Left: PACS (ResNet-18/50). Right: Office-Home (ResNet-18/50).
  • Figure 4: Confidence distributions of CI-TTA before confidence filtering under ERM training. Top: PACS with ResNet-18/50; Bottom: Office-Home with ResNet-18/50. Green indicates correct predictions, while red indicates incorrect predictions.