Class Is Invariant to Context and Vice Versa: On Learning Invariance for Out-Of-Distribution Generalization
Not on the map. Why?
Abstract (arXiv)
Out-Of-Distribution generalization (OOD) is all about learning invariance against environmental changes. If the context in every class is evenly distributed, OOD would be trivial because the context can be easily removed due to an underlying principle: class is invariant to context. However, collecting such a balanced dataset is impractical. Learning on imbalanced data makes the model bias to context and thus hurts OOD. Therefore, the key to OOD is context balance. We argue that the widely adopted assumption in prior work, the context bias can be directly annotated or estimated from biased class prediction, renders the context incomplete or even incorrect. In contrast, we point out the everoverlooked other side of the above principle: context is also invariant to class, which motivates us to consider the classes (which are already labeled) as the varying environments to resolve context bias (without context labels). We implement this idea by minimizing the contrastive loss of intra-class sample similarity while assuring this similarity to be invariant across all classes. On benchmarks with various context biases and domain gaps, we show that a simple re-weighting based classifier equipped with our context estimation achieves state-of-the-art performance. We provide the theoretical justifications in Appendix and codes on https://github.com/simpleshinobu/IRMCon.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 56 of its 73 references that are in the map. First posted on arXiv 6 Aug 2022.
Builds on
56 of 73 references.
References · 56
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2014Microsoft COCO: Common Objects in Contextcited by 17,498
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
- 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,690
- 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,712
- 2019Benchmarking Neural Network Robustness to Common Corruptions and Perturbationscited by 2,857
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,261
- 2019Invariant Risk Minimizationcited by 1,832
38 more
- 2019Do ImageNet Classifiers Generalize to ImageNet?cited by 1,507
- 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,430
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
- 2017Adversarial Discriminative Domain Adaptationcited by 1,309
- 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,232
- 2016Deep CORAL: Correlation Alignment for Deep Domain Adaptationcited by 1,194
- 2020In Search of Lost Domain Generalizationcited by 1,042
- 2018Generalized Cross Entropy Loss for Training Deep Neural Networks with Noisy Labelscited by 994
- 2017Deeper, Broader and Artier Domain Generalizationcited by 983
- 2017Learning to Generalize: Meta-Learning for Domain Generalizationcited by 762
- 2020Out-of-Distribution Generalization via Risk Extrapolation (REx)cited by 737
- 2019Large-Scale Long-Tailed Recognition in an Open Worldcited by 704
- 2013Domain Generalization via Invariant Feature Representationcited by 622
- 2017Zero-Shot Learning -- A Comprehensive Evaluation of the Good, the Bad and the Uglycited by 536
- 2015Causal inference using invariant prediction: identification and confidence intervalscited by 533
- 2018Generalizing to Unseen Domains via Adversarial Data Augmentationcited by 451
- 2019Domain Generalization by Solving Jigsaw Puzzlescited by 449
- 2021Towards Out-Of-Distribution Generalization: A Surveycited by 431
- 2020Self-Challenging Improves Cross-Domain Generalizationcited by 426
- 2018Towards a Definition of Disentangled Representationscited by 294
- 2019Don't Take the Easy Way Out: Ensemble Based Methods for Avoiding Known Dataset Biasescited by 279
- 2020Gradient Starvation: A Learning Proclivity in Neural Networkscited by 262
- 2021Gradient Matching for Domain Generalizationcited by 258
- 2020Long-Tailed Classification by Keeping the Good and Removing the Bad Momentum Causal Effectcited by 256
- 2018Learning Not to Learn: Training Deep Neural Networks with Biased Datacited by 255
- 2020Domain Generalization using Causal Matchingcited by 224
- 2019Learning De-biased Representations with Biased Representationscited by 199
- 2020Improve Unsupervised Domain Adaptation with Mixup Trainingcited by 185
- 2015Cost Sensitive Learning of Deep Feature Representations from Imbalanced Datacited by 167
- 2019REPAIR: Removing Representation Bias by Dataset Resamplingcited by 157
- 2021Deep Stable Learning for Out-Of-Distribution Generalizationcited by 153
- 2020Learning from Failure: Training Debiased Classifier from Biased Classifiercited by 133
- 2019Learning Robust Representations by Projecting Superficial Statistics Outcited by 123
- 2021Learning Debiased Representation via Disentangled Feature Augmentationcited by 116
- 2018Robustly Disentangled Causal Mechanisms: Validating Deep Representations for Interventional Robustnesscited by 108
- 2021EnD: Entangling and Disentangling deep representations for bias correctioncited by 105
- 2021Heterogeneous Risk Minimizationcited by 90
- 2021Causal Attention for Unbiased Visual Recognitioncited by 80
50 most cited of 56 All 56 (JSON)
Built on by
Citing papers per year: 2023: 3; 2024: 2; 2025: 1.
6 papers.
- 2024Unbiased Faster R-CNN for Single-source Domain Generalized Object Detectioncited by 29
- 2023DomainDrop: Suppressing Domain-Sensitive Channels for Domain Generalizationcited by 21
- 2023General Debiasing for Multimodal Sentiment Analysiscited by 10
- 2024DeNetDM: Debiasing by Network Depth Modulationcited by 6
- 2023Partition-and-Debias: Agnostic Biases Mitigation via A Mixture of Biases-Specific Expertscited by 3
- 2025Generative Classifier for Domain Generalizationcited by 0
- 2025Generative Classifier for Domain Generalization3 Apr 2025
- 2024Unbiased Faster R-CNN for Single-source Domain Generalized Object Detection24 May 2024
- 2024DeNetDM: Debiasing by Network Depth Modulation28 Mar 2024
- 2023DomainDrop: Suppressing Domain-Sensitive Channels for Domain Generalization20 Aug 2023
- 2023Partition-and-Debias: Agnostic Biases Mitigation via A Mixture of Biases-Specific Experts19 Aug 2023
- 2023General Debiasing for Multimodal Sentiment Analysis20 Jul 2023