Abstract
Most deep-learning-based image classification methods assume that all samples are generated under an independent and identically distributed (IID) setting. However, out-of-distribution (OOD) generalization is more common in practice, which means an agnostic context distribution shift between training and testing environments. To address this problem, we present a novel Partial Feature Decorrelation Learning (PFDL) algorithm, which jointly optimizes a feature decomposition network and the target image classification model. The feature decomposition network decomposes feature embeddings into the independent and the correlated parts such that the correlations between features will be highlighted. Then, the correlated features help learn a stable feature representation by decorrelating the highlighted correlations while optimizing the image classification model. We verify the correlation modeling ability of the feature decomposition network on a synthetic dataset. The experiments on real-world datasets demonstrate that our method can improve the backbone model's accuracy on OOD image classification datasets.
Introduction: The Challenge of Agnostic Distribution Shift
Standard deep learning models often fail when the "context" of an image changes because they overfit to spurious correlations. For instance, a model might learn that "green leafy background" is a key feature of a "bear" because most training photos of bears are taken in forests. When that model is tested on a "bear in the water," it fails because the context has shifted. This is known as the agnostic distribution shift problem.
While previous "stable learning" methods tried to fix this by re-weighting individual training samples, those methods do not scale well to massive datasets because the number of parameters grows with the number of samples. The authors aim to create a more scalable way to achieve "causality-based" learning that ignores these distracting environmental correlations.
Partial Feature Decorrelation Learning (PFDL)
The authors propose Partial Feature Decorrelation Learning (PFDL). The core innovation is a two-step iterative training process involving a Feature Decomposition Network:
- Feature Decomposition: Instead of treating a feature embedding as a single block, PFDL assumes it can be split into two parts: an independent part (the true signal) and a correlated part (the noise/context). They use a multi-layer perceptron (MLP) to explicitly model the function that connects different dimensions of the feature vector.
- Modeling Correlations: The feature extractor is fixed, and the decomposition network is trained to predict one part of the feature vector from the others. This "highlights" which features are currently correlated.
- Decorrelation: The decomposition network is fixed, and the feature extractor and classifier are updated. A special decorrelation loss ($L_{decorr}$) is added to the standard classification loss. This forces the feature extractor to produce embeddings where the previously identified correlations are minimized.
Unlike previous methods that require a massive re-weighting matrix, PFDL uses a neural network whose size is independent of the number of training samples, making it much more efficient for large-scale applications.
Experimental Evaluation
The researchers evaluated PFDL on three distinct types of datasets:
- MMADS: A synthetic dataset designed to mimic three types of causal relationships (independent, dependent, and "causes") to quantitatively measure how well the model handles correlation.
- NICO (Non-I.I.D. Image Classification): A real-world dataset containing images of animals and vehicles in various contexts. This is the primary benchmark for OOD generalization.
- Colored-MNIST: A variant where colors are purposefully correlated with labels during training but switched during testing.
Key Results
- Superior Accuracy on NICO: On the challenging NICO dataset, PFDL achieved a classification accuracy of 50.87% in the most biased setting (5:1 dominant ratio), significantly outperforming the state-of-the-art DWR method (43.72%) and standard CNN baselines.
- Stability Across Biases: In synthetic tests (MMADS), PFDL showed much lower "Stability Error" (SE) compared to OLS or Lasso regression. This means the model's performance remained consistent even as the testing environment became increasingly different from the training environment.
- Colored-MNIST Success: PFDL improved test accuracy on Colored-MNIST to 67.5%, compared to just 17.1% for standard Empirical Risk Minimization (ERM), proving it successfully ignored the misleading color cues.
Conclusion and Future Work
PFDL represents a significant step toward scalable, causality-based learning. By moving beyond sample weights and using a secondary network to learn the structure of feature correlations, the method effectively regularizes models against spurious biases. While it adds complexity to the training pipeline, the gains in OOD generalization are substantial. Future work may explore integrating this approach with self-supervised learning or applying it to large-scale foundation models to mitigate inherited societal biases.
Summary updated