Abstract
In unsupervised domain adaptation, existing theory focuses on situations where the source and target domains are close. In practice, conditional entropy minimization and pseudo-labeling work even when the domain shifts are much larger than those analyzed by existing theory. We identify and analyze one particular setting where the domain shift can be large, but these algorithms provably work: certain spurious features correlate with the label in the source domain but are independent of the label in the target. Our analysis considers linear classification where the spurious features are Gaussian and the non-spurious features are a mixture of log-concave distributions. For this setting, we prove that entropy minimization on unlabeled target data will avoid using the spurious feature if initialized with a decently accurate source classifier, even though the objective is non-convex and contains multiple bad local minima using the spurious features. We verify our theory for spurious domain shift tasks on semi-synthetic Celeb-A and MNIST datasets. Our results suggest that practitioners collect and self-train on large, diverse datasets to reduce biases in classifiers even if labeling is impractical.
Introduction: The Challenge of Spurious Features
Machine learning models are notorious for taking shortcuts. If a dataset of "cows vs. camels" always shows cows on green grass and camels on yellow sand, a model might simply learn to detect the color of the background rather than the animal itself. These are spurious features: they correlate with the label in the training (source) domain but fail to generalize to a new (target) domain where the background might change.
While practitioners have found that self-training on unlabeled target data often helps models adapt, existing theory usually assumes the source and target domains are very similar. This paper tackles a more difficult and realistic scenario: large domain shifts where features that were highly predictive in the source domain become completely independent of the label in the target domain. The core question is: why doesn't self-training just reinforce the model's existing biases?
Theoretical Framework and Methods
The authors analyze two popular unsupervised adaptation algorithms: Conditional Entropy Minimization and Pseudo-labeling, demonstrating that they are mathematically equivalent under certain conditions. To provide a rigorous proof, they focus on a linear classification setup where the input $x$ is composed of "signal" features ($x_1$) and "spurious" features ($x_2$). In the source domain, $x_2$ correlates with the label $y$, but in the target domain, $x_2$ is just Gaussian noise.
The mathematical heavy lifting involves showing that even though the loss landscape is non-convex and contains "bad" local minima (where the model relies entirely on spurious features), the gradient will naturally push the weights of spurious features toward zero if the starting model is "good enough."
Key Insights: Why Self-training Works
- The "Decent Initialization" Threshold: Self-training is a double-edged sword. The paper shows there is a critical threshold of initial accuracy. If the source model is "decently accurate" on the target signal, self-training prunes the spurious features. If it's too weak, self-training actually amplifies the bias and ruins the model.
- Log-Concavity is the Key: The success of self-training relies on the "shape" of the data distribution. Log-concave and smooth distributions ensure there is a continuum of data points. This allows the model to use "confident" predictions on the signal to slowly correct "unconfident" predictions that were previously led astray by spurious features.
- Unlabeled Data as a De-biasing Tool: Surprisingly, you don't need labels in the target domain to remove bias. Simply seeing the distribution of features in the target domain—and realizing that the spurious feature no longer clusters with the signal—is enough for the entropy objective to "clean" the classifier.
Empirical Results
The authors validated their theory using both synthetic and semi-synthetic datasets:
- Colored MNIST (CMNIST): In a variant where color is a spurious feature, self-training helped unless the source bias was extremely high ($p=0.97$). In that failure case, initial target accuracy was only 72%, and self-training decreased it to 67%, confirming the mandatory "decent" start.
- CelebA: A model trained on a biased source (where hair color correlates with gender) achieved 81% accuracy on the target. After self-training on unlabeled target data, accuracy jumped to 88% as the model stopped relying on hair color.
Discussion and Limitations
While the formal theory is restricted to linear models, empirical results show the intuition holds for multi-layer neural networks. However, the theory assumes spurious features become completely independent of the label in the target domain; real-world shifts might be more subtle. Additionally, the requirement for a "decently accurate" source classifier remains a practical hurdle. If the source domain is too biased, the model may never reach the "safe zone" where self-training helps. Future work will explore more complex, non-linear feature interactions and diverse types of non-robust features.
Summary updated