Masked Images Are Counterfactual Samples for Robust Fine-tuning
Not on the map. Why?
Abstract (arXiv)
Deep learning models are challenged by the distribution shift between the training data and test data. Recently, the large models pre-trained on diverse data have demonstrated unprecedented robustness to various distribution shifts. However, fine-tuning these models can lead to a trade-off between in-distribution (ID) performance and out-of-distribution (OOD) robustness. Existing methods for tackling this trade-off do not explicitly address the OOD robustness problem. In this paper, based on causal analysis of the aforementioned problems, we propose a novel fine-tuning method, which uses masked images as counterfactual samples that help improve the robustness of the fine-tuning model. Specifically, we mask either the semantics-related or semantics-unrelated patches of the images based on class activation map to break the spurious correlation, and refill the masked patches with patches from other images. The resulting counterfactual samples are used in feature-based distillation with the pre-trained model. Extensive experiments verify that regularizing the fine-tuning with the proposed masked images can achieve a better trade-off between ID and OOD performance, surpassing previous methods on the OOD performance. Our code is available at https://github.com/Coxy7/robust-finetuning.
Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). Builds on 42 of its 54 references that are in the map. First posted on arXiv 6 Mar 2023.
Builds on
42 of 54 references.
References · 42
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2014Microsoft COCO: Common Objects in Contextcited by 17,498
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,339
- 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2021Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervisioncited by 3,848
- 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,875
- 2015Learning Deep Features for Discriminative Localizationcited by 2,430
30 more
- 2021BEiT: BERT Pre-Training of Image Transformerscited by 2,360
- 2021Masked-attention Mask Transformer for Universal Image Segmentationcited by 2,338
- 2020The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalizationcited by 1,842
- 2019Invariant Risk Minimizationcited by 1,832
- 2019Do ImageNet Classifiers Generalize to ImageNet?cited by 1,507
- 2019Natural Adversarial Examplescited by 1,401
- 2022Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timecited by 1,366
- 2021SimMIM: A Simple Framework for Masked Image Modelingcited by 1,147
- 2019Learning Robust Global Representations by Penalizing Local Predictive Powercited by 1,010
- 2018Robustness May Be at Odds with Accuracycited by 873
- 2021Robust fine-tuning of zero-shot modelscited by 785
- 2020Out-of-Distribution Generalization via Risk Extrapolation (REx)cited by 737
- 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 722
- 2018Recognition in Terra Incognitacited by 655
- 2021Masked Feature Prediction for Self-Supervised Visual Pre-Trainingcited by 573
- 2019Variational Autoencoders and Nonlinear ICA: A Unifying Frameworkcited by 494
- 2020Measuring Robustness to Natural Distribution Shifts in Image Classificationcited by 452
- 2020What is being transferred in transfer learning?cited by 365
- 2021Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformerscited by 316
- 2021Accuracy on the Line: On the Strong Correlation Between Out-of-Distribution and In-Distribution Generalizationcited by 248
- 2021Towards Causal Representation Learningcited by 207
- 2020Invariant Risk Minimization Gamescited by 188
- 2019A Meta-Transfer Objective for Learning to Disentangle Causal Mechanismscited by 158
- 2020Counterfactual Samples Synthesizing for Robust Visual Question Answeringcited by 153
- 2020Learning Causal Semantic Representation for Out-of-Distribution Predictioncited by 60
- 2021Out of Distribution Generalization in Machine Learningcited by 59
- 2021Systematic Evaluation of Causal Discovery in Visual Model Based Reinforcement Learningcited by 53
- 2022SwapMix: Diagnosing and Regularizing the Over-Reliance on Visual Context in Visual Question Answeringcited by 38
- 2022Can Foundation Models Talk Causality?cited by 30
- 2022On the Generalization and Adaption Performance of Causal Modelscited by 8
Built on by
Citing papers per year: 2023: 5; 2024: 6; 2025: 7; 2026: 2.
20 papers.
Sort:
By area:
- 2024Masked Image Modeling: A Surveycited by 28
- 2026Causal-JEPA: Learning World Models through Object-Level Latent Maskingcited by 25
- 2024DGMamba: Domain Generalization via Generalized State Space Modelcited by 21
- 2024Decompose-and-Compose: A Compositional Approach to Mitigating Spurious Correlationcited by 18
- 2023Masked Modeling for Self-supervised Representation Learning on Vision and Beyondcited by 13
- 2024Toward a Holistic Evaluation of Robustness in CLIP Modelscited by 13
- 2024Efficient and Versatile Robust Fine-Tuning of Zero-shot Modelscited by 7
- 2023Foundation Model-oriented Robustness: Robust Image Model Evaluation with Pretrained Modelscited by 6
- 2025Generalized Semantic Contrastive Learning via Embedding Side Information for Few-Shot Object Detectioncited by 6
- 2023CausalVLR: A Toolbox and Benchmark for Visual-Linguistic Causal Reasoningcited by 5
- 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directionscited by 5
- 2023Rethinking Radiology Report Generation via Causal Inspired Counterfactual Augmentationcited by 3
8 more
- 2025Just as Humans Need Vaccines, So Do Models: Model Immunization to Combat Falsehoodscited by 3
- 2025DGFamba: Learning Flow Factorized State Space for Visual Domain Generalizationcited by 1
- 2025Two-stage Vision Transformers and Hard Masking offer Robust Object Representationscited by 1
- 2025Did Models Learn Sufficiently? Attribution-Guided Training via Subset-Selected Counterfactual Augmentationcited by 1
- 2023Towards Debiasing Frame Length Bias in Text-Video Retrieval via Causal Interventioncited by 0
- 2024Approximate Nullspace Augmented Finetuning for Robust Vision Transformerscited by 0
- 2025CaFlow: Enhancing Long-Term Action Quality Assessment with Causal Counterfactual Flowcited by 0
- 2026Clinically-Grounded Counterfactual Reasoning for Medical Video Diagnosiscited by 0
- 2026Clinically-Grounded Counterfactual Reasoning for Medical Video Diagnosis26 May 2026
- 2026Causal-JEPA: Learning World Models through Object-Level Latent Masking11 Feb 2026
- 2025CaFlow: Enhancing Long-Term Action Quality Assessment with Causal Counterfactual Flow26 Nov 2025
- 2025Did Models Learn Sufficiently? Attribution-Guided Training via Subset-Selected Counterfactual Augmentation15 Nov 2025
- 2025Two-stage Vision Transformers and Hard Masking offer Robust Object Representations10 Jun 2025
- 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directions8 Jun 2025
- 2025Just as Humans Need Vaccines, So Do Models: Model Immunization to Combat Falsehoods23 May 2025
- 2025DGFamba: Learning Flow Factorized State Space for Visual Domain Generalization10 Apr 2025
- 2025Generalized Semantic Contrastive Learning via Embedding Side Information for Few-Shot Object Detection9 Apr 2025
- 2024Toward a Holistic Evaluation of Robustness in CLIP Models2 Oct 2024
- 2024Masked Image Modeling: A Survey13 Aug 2024
- 2024Efficient and Versatile Robust Fine-Tuning of Zero-shot Models11 Aug 2024
8 more
- 2024DGMamba: Domain Generalization via Generalized State Space Model11 Apr 2024
- 2024Approximate Nullspace Augmented Finetuning for Robust Vision Transformers15 Mar 2024
- 2024Decompose-and-Compose: A Compositional Approach to Mitigating Spurious Correlation29 Feb 2024
- 2023Masked Modeling for Self-supervised Representation Learning on Vision and Beyond31 Dec 2023
- 2023Rethinking Radiology Report Generation via Causal Inspired Counterfactual Augmentation22 Nov 2023
- 2023Towards Debiasing Frame Length Bias in Text-Video Retrieval via Causal Intervention17 Sep 2023
- 2023Foundation Model-oriented Robustness: Robust Image Model Evaluation with Pretrained Models21 Aug 2023
- 2023CausalVLR: A Toolbox and Benchmark for Visual-Linguistic Causal Reasoning30 Jun 2023
- 2024Toward a Holistic Evaluation of Robustness in CLIP Modelscited by 13
- 2024Masked Image Modeling: A Surveycited by 28
- 2024Decompose-and-Compose: A Compositional Approach to Mitigating Spurious Correlationcited by 18
- 2023Masked Modeling for Self-supervised Representation Learning on Vision and Beyondcited by 13
- 2024Efficient and Versatile Robust Fine-Tuning of Zero-shot Modelscited by 7
- 2023Foundation Model-oriented Robustness: Robust Image Model Evaluation with Pretrained Modelscited by 6
- 2025Generalized Semantic Contrastive Learning via Embedding Side Information for Few-Shot Object Detectioncited by 6
- 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directionscited by 5
- 2023Rethinking Radiology Report Generation via Causal Inspired Counterfactual Augmentationcited by 3
- 2025Just as Humans Need Vaccines, So Do Models: Model Immunization to Combat Falsehoodscited by 3
- 2025Two-stage Vision Transformers and Hard Masking offer Robust Object Representationscited by 1
- 2025Did Models Learn Sufficiently? Attribution-Guided Training via Subset-Selected Counterfactual Augmentationcited by 1
- 2023Towards Debiasing Frame Length Bias in Text-Video Retrieval via Causal Interventioncited by 0
12 most cited of 15 All 15 (JSON)
- 2026Clinically-Grounded Counterfactual Reasoning for Medical Video Diagnosis26 May 2026
- 2025CaFlow: Enhancing Long-Term Action Quality Assessment with Causal Counterfactual Flow26 Nov 2025
- 2025Did Models Learn Sufficiently? Attribution-Guided Training via Subset-Selected Counterfactual Augmentation15 Nov 2025
- 2025Two-stage Vision Transformers and Hard Masking offer Robust Object Representations10 Jun 2025
- 2025Evaluating and Improving Robustness in Large Language Models: A Survey and Future Directions8 Jun 2025
- 2025Just as Humans Need Vaccines, So Do Models: Model Immunization to Combat Falsehoods23 May 2025
- 2025Generalized Semantic Contrastive Learning via Embedding Side Information for Few-Shot Object Detection9 Apr 2025
- 2024Masked Image Modeling: A Survey13 Aug 2024
- 2024Efficient and Versatile Robust Fine-Tuning of Zero-shot Models11 Aug 2024
- 2024Approximate Nullspace Augmented Finetuning for Robust Vision Transformers15 Mar 2024
- 2024Decompose-and-Compose: A Compositional Approach to Mitigating Spurious Correlation29 Feb 2024
- 2023Masked Modeling for Self-supervised Representation Learning on Vision and Beyond31 Dec 2023
12 newest of 15 All 15 (JSON)