Open Domain Generalization with a Single Network by Regularization Exploiting Pre-trained Features

Inseop Chung, KiYoon Yoo, Nojun KwakarXiv 2023 · DOI

Abstract

Open Domain Generalization (ODG) is a challenging task where models must generalize to unseen target domains that contain both domain shifts and previously unseen "open" classes. Traditional approaches often rely on computationally expensive ensembles of source-specific networks to bridge these gaps. This paper proposes a more efficient alternative: Regularization through Pre-trained Features (RPF). By leveraging dual regularization terms—feature clustering and head entropy maximization—RPF enables a single network to match or exceed the performance of ensemble-based methods while significantly reducing computational overhead.

The Challenge of Open Domain Generalization

Standard Domain Generalization (DG) focuses on training models that can perform well on unseen target domains, assuming the label space remains constant. However, real-world scenarios often involve Open Domain Generalization (ODG), where the target domain may contain categories not present in any source domain.

The Open Domain Generalization (ODG) setting involves both domain shift and category shift (open classes).

As shown in Figure 1, ODG requires handling two types of shifts simultaneously: domain shift (changes in data distribution) and category shift (the presence of "open" classes). Previous state-of-the-art methods like DAML addressed this by training an ensemble of networks, one for each source domain. While effective, this approach scales poorly with the number of source domains, leading to high memory and compute requirements. The authors of this paper demonstrate that a single network can achieve superior results through strategic regularization.

Regularization through Pre-trained Features (RPF)

The authors introduce RPF, a training framework designed to achieve robust ODG using a single network. RPF builds upon the "Linear Probing then Fine-Tuning" (LP-FT) paradigm, which is known to preserve pre-trained features better than standard fine-tuning. To further enhance this, RPF introduces two specific regularization terms during the fine-tuning phase.

The RPF training scheme utilizes a pre-trained feature extractor and two regularization terms: feature clustering ($\mathcal{L}_{fr}$) and head entropy maximization ($\mathcal{L}_{hr}$).
  1. Feature Clustering ($\mathcal{L}_{fr}$): This term prevents the feature extractor from distorting the generalizable representations learned during pre-training. It calculates class "prototypes" (centroids) from the frozen pre-trained model and penalizes the active feature extractor if its outputs deviate significantly from these anchors. This encourages tight class clustering and maintains the integrity of the feature space.
  2. Head Entropy Maximization ($\mathcal{L}_{hr}$): To combat the natural tendency of neural networks to be overconfident, this term forces the classification head to output high-entropy (uncertain) predictions when processing features from the frozen pre-trained network. This smoothing of the softmax distribution is critical for identifying unseen "open" classes, as it prevents the model from incorrectly assigning high confidence to unknown categories.

Experimental Evaluation

The RPF method was evaluated on several benchmarks, including PACS, Office-Home, and a complex Multi-Datasets scenario. The results highlight both the accuracy and the efficiency of the single-network approach.

  • Superior Performance: RPF consistently outperformed the previous ensemble-based SOTA (DAML). For instance, on the Office-Home dataset, RPF achieved a 58.70% accuracy on known classes and a 54.51 H-score (the harmonic mean of known and open class accuracy), surpassing DAML's 56.45% and 53.34% respectively.
  • Massive Efficiency Gains: By utilizing a single network instead of an ensemble, RPF reduces computational costs by approximately 66%. On an RTX 3090, RPF requires only 3.64 GFLOPs and 3.25 ms per image, compared to 10.91 GFLOPs and 8.37 ms for DAML.
  • Better Feature Spaces: Quantitative analysis indicated that RPF effectively reduces intra-class variance and narrows the domain gap, leading to a more robust feature space for both known and unknown classes.

Conclusion

RPF demonstrates that a single, well-regularized network can solve the Open Domain Generalization problem more efficiently than complex ensembles. By anchoring features to pre-trained prototypes and smoothing classifier predictions, RPF provides a scalable and high-performing solution for real-world deployment where both environment and category shifts are prevalent. Future work may focus on improving the selection of entropy regularization weights and developing dynamic thresholds for open-class detection.

Summary updated

BibTeX
@misc{chung2023open,
  author = {Inseop Chung and KiYoon Yoo and Nojun Kwak},
  title = {{Open Domain Generalization with a Single Network by Regularization Exploiting Pre-trained Features}},
  year = {2023},
  eprint = {2312.05141},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.05141},
}
Figure