Introduction
Machine learning models often fail when test data comes from a different distribution than the training data—a phenomenon known as domain shift. Domain Generalization (DG) aims to solve this by training on multiple "source" domains to create a model that works on completely "unseen" target domains.
The current gold standard involves adversarial learning, where a model tries to learn features that a "domain discriminator" cannot distinguish. However, these methods usually only guarantee marginal invariance ($P(F(X))$ is the same across domains). They ignore conditional invariance ($P(Y|F(X))$), meaning the features might look the same, but their relationship to the actual labels might still vary. If a "feature A" means "Cat" in Domain 1 but "Dog" in Domain 2, marginal invariance won't save the model.
This paper introduces an entropy regularization approach to ensure that the relationship between features and labels remains consistent, leading to significantly better performance on unseen datasets.
Methodology
The authors propose a new objective function that combines standard classification loss and adversarial loss with a novel Entropy Regularization ($L_{er}$) term.
- Entropy Regularization: The core idea is to minimize the dependency between learned features and class labels across domains. Theoretically, minimizing the negative conditional entropy is equivalent to minimizing the Jensen-Shannon Divergence (JSD) between class-conditional distributions.
- The Minimax Game: Since the true conditional distribution is unknown, the authors introduce $K$ additional classifiers (one for each source domain). They set up a minimax game where these classifiers try to identify the labels from the features, while the feature extractor tries to make the features "conditionally invariant" so that these domain-specific classifiers converge to a common, stable prediction.
- Stability Fix ($L_{cel}$): To prevent the minimax game from becoming unstable or preventing the model from learning useful features, a supplementary cross-entropy loss is added to ensure the domain-specific classifiers remain accurate during training.
Key Insights: Marginal vs. Conditional Invariance
The most important insight of this work is the demonstration that aligning feature distributions (marginal) is insufficient if the label mapping (conditional) shifts. In simulated experiments, standard classifiers often latch onto features that are easy to discriminate but vary across domains. The proposed entropy term forces the network to ignore these "shortcuts" in favor of truly robust, invariant features.
The paper provides a mathematical bridge between conditional entropy and the Jensen-Shannon Divergence, justifying why maximizing conditional entropy (in this specific adversarial context) leads to proper distribution alignment.
Datasets and Key Results
The researchers evaluated their method on four major benchmarks: Rotated MNIST, Rotated CIFAR-10, VLCS, and PACS. The proposed method consistently outperformed state-of-the-art (SOTA) methods across all datasets:
- PACS Benchmark: Achieved an average accuracy of 75.67%, surpassing the previous SOTA (MASF) at 75.21%. The gains were particularly notable on the "Sketch" and "Art Painting" domains.
- Rotated MNIST: Reached 96.36% average accuracy, compared to 96.04% for the Feature-Critic method.
Qualitative evidence from t-SNE visualizations (feature maps) further showed that the proposed method clustered classes much more distinctly while simultaneously overlapping the different domains more effectively than baseline adversarial methods.
Limitations and Future Work
- Computational Overhead: The method requires training $K$ additional classifiers (where $K$ is the number of source domains), which increases the memory and computational footprint during training.
- Class Balance Assumption: The theoretical proof assumes classes are equally likely. While the authors suggest "biased batch sampling" as a workaround for imbalanced data, this adds another layer of preprocessing.
- Future Directions: The authors suggest extending this framework beyond image classification to more complex tasks like semantic segmentation, where domain shift is a notorious hurdle.
Summary updated