MEMO: Test Time Robustness via Adaptation and Augmentation
Marvin Zhang, Sergey Levine, Chelsea Finn
Abstract
While deep neural networks can attain good accuracy on in-distribution test points, many applications require robustness even in the face of unexpected perturbations in the input, changes in the domain, or other sources of distribution shift. We study the problem of test time robustification, i.e., using the test input to improve model robustness. Recent prior works have proposed methods for test time adaptation, however, they each introduce additional assumptions, such as access to multiple test points, that prevent widespread adoption. In this work, we aim to study and devise methods that make no assumptions about the model training process and are broadly applicable at test time. We propose a simple approach that can be used in any test setting where the model is probabilistic and adaptable: when presented with a test example, perform different data augmentations on the data point, and then adapt (all of) the model parameters by minimizing the entropy of the model's average, or marginal, output distribution across the augmentations. Intuitively, this objective encourages the model to make the same prediction across different augmentations, thus enforcing the invariances encoded in these augmentations, while also maintaining confidence in its predictions. In our experiments, we evaluate two baseline ResNet models, two robust ResNet-50 models, and a robust vision transformer model, and we demonstrate that this approach achieves accuracy gains of 1-8% over standard model evaluation and also generally outperforms prior augmentation and adaptation strategies. For the setting in which only one test point is available, we achieve state-of-the-art results on the ImageNet-C, ImageNet-R, and, among ResNet-50 models, ImageNet-A distribution shift benchmarks.
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 b22350b4-1122-4540-9788-51b3f7af4d0eCited by top-tier papers139
- Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language ModelsManli Shu, Weili Nie, De-An Huang, Zhiding Yu et al.NeurIPS 2022 · 603 citations
- Test Time Adaptation via Conjugate Pseudo-labelsSachin Goyal, Mingjie Sun, Aditi Raghunathan, J. Zico KolterNeurIPS 2022 · 152 citations
- Align Your Prompts: Test-Time Prompting with Distribution Alignment for Zero-Shot GeneralizationJameel Abdul Samadh, Hanan Gani, Noor Hussein, Muhammad Uzair Khattak et al.NeurIPS 2023 · 147 citations
- Dream the Impossible: Outlier Imagination with Diffusion ModelsXuefeng Du, Yiyou Sun, Jerry Zhu, Yixuan LiNeurIPS 2023 · 114 citations
- Entropy is not Enough for Test-Time Adaptation: From the Perspective of Disentangled FactorsJonghyun Lee, Dahuin Jung, Saehyung Lee, Junsung Park et al.ICLR 2024 · 106 citations
Builds on19
- 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
- The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution GeneralizationDan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath et al.ICCV 2021 · 2,294 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
- Tent: Fully Test-Time Adaptation by Entropy MinimizationDequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno A. Olshausen et al.ICLR 2021 · 1,731 citations
- AugMix: A Simple Data Processing Method to Improve Robustness and UncertaintyDan Hendrycks, Norman Mu, Ekin Dogus Cubuk, Barret Zoph et al.ICLR 2020 · 1,572 citations
Related papers
- Bayesian Adaptation for Covariate ShiftAurick Zhou, Sergey LevineNeurIPS 2021 · 40 citations
- On Pitfalls of Test-Time AdaptationHao Zhao, Yuejiang Liu, Alexandre Alahi, Tao LinICML 2023 · 72 citations
- Learning Loss for Test-Time AugmentationIldoo Kim, Younghoon Kim, Sungwoong KimNeurIPS 2020 · 131 citations
- MATE: Masked Autoencoders are Online 3D Test-Time LearnersMuhammad Jehanzeb Mirza, Inkyu Shin, Wei Lin, Andreas Schriebl et al.ICCV 2023 · 24 citations
- Test-Time Classifier Adjustment Module for Model-Agnostic Domain GeneralizationYusuke Iwasawa, Yutaka MatsuoNeurIPS 2021 · 456 citations
