Beyond Pretrained Features: Noisy Image Modeling Provides Adversarial Defense
Zunzhi You, Daochang Liu, Bohyung Han, Chang Xu
Abstract
Recent advancements in masked image modeling (MIM) have made it a prevailing framework for self-supervised visual representation learning. The MIM pretrained models, like most deep neural network methods, remain vulnerable to adversarial attacks, limiting their practical application, and this issue has received little research attention. In this paper, we investigate how this powerful self-supervised learning paradigm can provide adversarial robustness to downstream classifiers. During the exploration, we find that noisy image modeling (NIM), a simple variant of MIM that adopts denoising as the pre-text task, reconstructs noisy images surprisingly well despite severe corruption. Motivated by this observation, we propose an adversarial defense method, referred to as De 3 , by exploiting the pretrained decoder for denoising. Through De 3 , NIM is able to enhance adversarial robustness beyond providing pretrained features. Furthermore, we incorporate a simple modification, sampling the noise scale hyperparameter from random distributions, and enable the defense to achieve a better and tunable trade-off between accuracy and robustness. Experimental results demonstrate that, in terms of adversarial robustness, NIM is superior to MIM thanks to its effective denoising capability. Moreover, the defense provided by NIM achieves performance on par with adversarial training while offering the extra tunability advantage. Source code and models are available at https://github.com/youzunzhi/NIM-AdvDef .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MIMIR: Masked Image Modeling for Mutual Information-based Adversarial Robustness cites A Simple Framework for Contrastive Learning of Visual Representations
- MIMIR: Masked Image Modeling for Mutual Information-based Adversarial Robustness cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- MIMIR: Masked Image Modeling for Mutual Information-based Adversarial Robustness cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- MIMIR: Masked Image Modeling for Mutual Information-based Adversarial Robustness cites Language Models are Few-Shot Learners
- An Empirical Study of Training Self-Supervised Vision Transformers cites A Simple Framework for Contrastive Learning of Visual Representations
- An Empirical Study of Training Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- An Empirical Study of Training Self-Supervised Vision Transformers cites Language Models are Few-Shot Learners
- Wavelet-Driven Masked Image Modeling: A Path to Efficient Visual Representation cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Wavelet-Driven Masked Image Modeling: A Path to Efficient Visual Representation cites An Empirical Study of Training Self-Supervised Vision Transformers
Cited by top-tier papers3
- MIMIR: Masked Image Modeling for Mutual Information-based Adversarial RobustnessXiaoyun Xu, Shujian Yu, Zhuoran Liu, Stjepan PicekNDSS 2026 · 12 citations
- Wavelet-Driven Masked Image Modeling: A Path to Efficient Visual RepresentationWenzhao Xiang, Chang Liu, Hongyang Yu, Xilin ChenAAAI 2025 · 3 citations
- Towards Fine-Grained Robustness: Attention-Guided Test-Time Prompt Tuning for Vision-Language ModelsJia-Wei Hai, Yijun Wang, Xiu-Shen WeiICML 2026
Builds on20
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- An Empirical Study of Training Self-Supervised Vision TransformersXinlei Chen, Saining Xie, Kaiming HeICCV 2021 · 2,340 citations
Related papers
- Removing Adversarial Noise in Class Activation Feature SpaceDawei Zhou, Nannan Wang, Chunlei Peng, Xinbo Gao et al.ICCV 2021 · 37 citations
- Ditch the Denoiser: Emergence of Noise Robustness in Self-Supervised Learning from Data CurriculumWenquan Lu, Jiaqi Zhang, Hugues Van Assel, Randall BalestrieroNeurIPS 2025 · 5 citations
- Adversarial Masking for Self-Supervised LearningYuge Shi, N. Siddharth, Philip H. S. Torr, Adam R. KosiorekICML 2022 · 110 citations
- Pre-training with Random Orthogonal Projection Image ModelingMaryam Haghighat, Peyman Moghadam, Shaheer Mohamed, Piotr KoniuszICLR 2024 · 15 citations
- Learning with Noisy labels via Self-supervised Adversarial Noisy MaskingYuanpeng Tu, Boshen Zhang, Yuxi Li, Liang Liu et al.CVPR 2023
