mlsanityData to 7 Oct 2026

Test-time Detection and Repair of Adversarial Samples via Masked Autoencoder

arXiv 2303.12848 ↗First posted 22 Mar 2023cs.CV cs.LGcited by 4

Not on the map. Why?

Abstract (arXiv)

Training-time defenses, known as adversarial training, incur high training costs and do not generalize to unseen attacks. Test-time defenses solve these issues but most existing test-time defenses require adapting the model weights, therefore they do not work on frozen models and complicate model memory management. The only test-time defense that does not adapt model weights aims to adapt the input with self-supervision tasks. However, we empirically found these self-supervision tasks are not sensitive enough to detect adversarial attacks accurately. In this paper, we propose DRAM, a novel defense method to detect and repair adversarial samples at test time via Masked autoencoder (MAE). We demonstrate how to use MAE losses to build a Kolmogorov-Smirnov test to detect adversarial samples. Moreover, we use the MAE losses to calculate input reversal vectors that repair adversarial samples resulting from previously unseen attacks. Results on large-scale ImageNet dataset show that, compared to all detection baselines evaluated, DRAM achieves the best detection rate (82% on average) on all eight adversarial attacks evaluated. For attack repair, DRAM improves the robust accuracy by 6% ~ 41% for standard ResNet50 and 3% ~ 8% for robust ResNet50 compared with the baselines that use contrastive learning and rotation prediction.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 37 of its 46 references that are in the map. First posted on arXiv 22 Mar 2023.

Builds on

37 of 46 references.

References · 37

  1. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  3. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  4. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  5. 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,339
  6. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  7. 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
  8. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
  9. 2020Unsupervised Learning of Visual Features by Contrasting Cluster Assignmentscited by 2,845
  10. 2020Improved Baselines with Momentum Contrastive Learningcited by 2,282
  11. 2018Unsupervised Representation Learning by Predicting Image Rotationscited by 1,586
  12. 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
25 more
  1. 2016Unsupervised Learning of Visual Representations by Solving Jigsaw Puzzlescited by 1,379
  2. 2020Big Self-Supervised Models are Strong Semi-Supervised Learnerscited by 1,375
  3. 2021SimMIM: A Simple Framework for Masked Image Modelingcited by 1,147
  4. 2015Unsupervised Visual Representation Learning by Context Predictioncited by 1,062
  5. 2016Adversarial Machine Learning at Scalecited by 934
  6. 2017Learning to Generalize: Meta-Learning for Domain Generalizationcited by 762
  7. 2017ZOO: Zeroth Order Optimization based Black-box Attacks to Deep Neural Networks without Training Substitute Modelscited by 656
  8. 2020Contrastive Learning for Unpaired Image-to-Image Translationcited by 637
  9. 2021Domain Generalization with MixStylecited by 563
  10. 2019Using Self-Supervised Learning Can Improve Model Robustness and Uncertaintycited by 511
  11. 2017Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networkscited by 484
  12. 2018Invariant Information Clustering for Unsupervised Image Classification and Segmentationcited by 454
  13. 2019Domain Generalization via Model-Agnostic Learning of Semantic Featurescited by 405
  14. 2021MEMO: Test Time Robustness via Adaptation and Augmentationcited by 376
  15. 2021SSD: A Unified Framework for Self-Supervised Outlier Detectioncited by 264
  16. 2016Learning Representations for Automatic Colorizationcited by 251
  17. 2020Deep Domain-Adversarial Image Generation for Domain Generalisationcited by 231
  18. 2022Test-Time Training with Masked Autoencoderscited by 208
  19. 2021TSDAE: Using Transformer-based Sequential Denoising Auto-Encoder for Unsupervised Sentence Embedding Learningcited by 116
  20. 2019Metric Learning for Adversarial Robustnesscited by 77
  21. 2022Evaluating the Adversarial Robustness of Adaptive Test-time Defensescited by 64
  22. 2019A New Defense Against Adversarial Images: Turning a Weakness into a Strengthcited by 49
  23. 2021Adversarial Attacks are Reversible with Natural Supervisioncited by 47
  24. 2021Enhancing Adversarial Robustness via Test-time Transformation Ensemblingcited by 27
  25. 2022Reverse Engineering of Imperceptible Adversarial Image Perturbationscited by 17

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 0; 2025: 3.

4 papers.