Correct-N-Contrast: a Contrastive Approach for Improving Robustness to Spurious Correlations
Michael Zhang, Nimit Sharad Sohoni, Hongyang R. Zhang, Chelsea Finn, Christopher Ré
Abstract
Spurious correlations pose a major challenge for robust machine learning. Models trained with empirical risk minimization (ERM) may learn to rely on correlations between class labels and spurious attributes, leading to poor performance on data groups without these correlations. This is particularly challenging to address when spurious attribute labels are unavailable. To improve worst-group performance on spuriously correlated data without training attribute labels, we propose Correct-n-Contrast (CnC), a contrastive approach to directly learn representations robust to spurious correlations. As ERM models can be good spurious attribute predictors, CnC works by (1) using a trained ERM model's outputs to identify samples with the same class but dissimilar spurious features, and ( 2 ) training a robust model with contrastive learning to learn similar representations for same-class samples. To support CnC, we introduce new connections between worst-group error and a representation alignment loss that CnC aims to minimize. We empirically observe that worst-group error closely tracks with alignment loss, and prove that the alignment loss over a class helps upper-bound the class's worst-group vs. average error gap. On popular benchmarks, CnC reduces alignment loss drastically, and achieves state-of-the-art worst-group accuracy by 3.6% average absolute lift. CnC is also competitive with oracle methods that require group labels.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 9df9ec9d-0837-48a0-8475-690c44a4ffbeCited by top-tier papers83
- Improving Out-of-Distribution Robustness via Selective AugmentationHuaxiu Yao, Yu Wang, Sai Li, Linjun Zhang et al.ICML 2022 · 275 citations
- Learning Causally Invariant Representations for Out-of-Distribution Generalization on GraphsYongqiang Chen, Yonggang Zhang, Yatao Bian, Han Yang et al.NeurIPS 2022 · 246 citations
- On Feature Learning in the Presence of Spurious CorrelationsPavel Izmailov, Polina Kirichenko, Nate Gruver, Andrew Gordon WilsonNeurIPS 2022 · 208 citations
- Contrastive Adapters for Foundation Model Group RobustnessMichael Zhang, Christopher RéNeurIPS 2022 · 94 citations
- Towards Last-layer Retraining for Group Robustness with Fewer AnnotationsTyler LaBonte, Vidya Muthukumar, Abhishek KumarNeurIPS 2023 · 73 citations
Builds on25
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 citations
- WILDS: A Benchmark of in-the-Wild Distribution ShiftsPang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie et al.ICML 2021 · 1,773 citations
- Contrastive Multi-View Representation Learning on GraphsKaveh Hassani, Amir Hosein Khas AhmadiICML 2020 · 1,663 citations
Related papers
- Improving Group Robustness on Spurious Correlation Requires Preciser Group InferenceYujin Han, Difan ZouICML 2024 · 13 citations
- Avoiding spurious correlations via logit correctionSheng Liu, Xu Zhang, Nitesh Sekhar, Yue Wu et al.ICLR 2023 · 3 citations
- Gradient Extrapolation for Debiased Representation LearningIhab Asaad, Maha Shadaydeh, Joachim DenzlerICCV 2025 · 4 citations
- Spurious Correlation-Aware Embedding Regularization for Worst-Group RobustnessSubeen Park, JOOWANG KIM, Hakyung Lee, Sunjae yoo et al.ICLR 2026 · 2 citations
- Label-Efficient Group Robustness via Out-of-Distribution Concept CurationYiwei Yang, Anthony Z. Liu, Robert Wolfe, Aylin Caliskan et al.CVPR 2024
