Lune

ICML2023Top-tier venue

Robust Weight Signatures: Gaining Robustness as Easy as Patching Weights?

Ruisi Cai, Zhenyu Zhang, Zhangyang Wang

Abstract

Given a robust model trained to be resilient to one or multiple types of distribution shifts (e.g., natural image corruptions), how is that "robustness" encoded in the model weights, and how easily can it be disentangled and/or "zero-shot" transferred to some other models? This paper empirically suggests a surprisingly simple answer: linearly -by straightforward model weight arithmetic! We start by drawing several key observations: (i) assuming that we train the same model architecture on both a clean dataset and its corrupted version, a comparison between the two resultant models shows their weights to mostly differ in shallow layers; (ii) the weight difference after projection, which we call "Robust Weight Signature" (RWS), appears to be discriminative and indicative of different corruption types; (iii) perhaps most strikingly, for the same corruption type, the RWSs obtained by one model architecture are highly consistent and transferable across different datasets. Based on those RWS observations, we propose a minimalistic model robustness "patching" framework that carries a model trained on clean data together with its pre-extracted RWSs. In this way, injecting certain robustness to the model is reduced to directly adding the corresponding RWS to its weight. We experimentally verify our proposed framework to be remarkably (1) lightweight. since RWSs concentrate on the shallowest few layers and we further show they can be painlessly quantized, storing an RWS is up to 13 × more compact than storing the full weight copy; (2) in-situ adjustable. RWSs can be appended as needed and later taken off to restore the intact clean model. We further demonstrate one can linearly re-scale the RWS to control the patched robustness strength; (3) composable. Multiple RWSs can be added simultaneously to patch more comprehensive robustness at once; and (4) transferable. Even when the clean model backbone is continually adapted or updated, RWSs remain as effective patches due to their outstanding crossdataset transferability.

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.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Expert Merging in Sparse Mixture of Experts with Nash Bargaining cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time cites WILDS: A Benchmark of in-the-Wild Distribution Shifts
  • The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization cites AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
  • Model merging with SVD to tie the Knots cites Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time
  • WILDS: A Benchmark of in-the-Wild Distribution Shifts cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Flextron: Many-in-One Flexible Large Language ModelRuisi Cai, Saurav Muralidharan, Greg Heinrich, Hongxu Yin et al.ICML 2024 · 38 citations
  2. Expert Merging in Sparse Mixture of Experts with Nash BargainingDung Viet Nguyen, Anh Nguyen Thi, Minh Hoang Nguyen, Luc Nguyen et al.ICLR 2026 · 3 citations
  3. Model merging with SVD to tie the KnotsGeorge Stoica, Pratik Ramesh, Boglarka Ecsedi, Leshem Choshen et al.ICLR 2025

Builds on26

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. 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
  3. 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
  4. 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
  5. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs et al.ICML 2022 · 1,464 citations

Related papers

  1. What It Thinks Is Important Is Important: Robustness Transfers Through Input GradientsAlvin Chan, Yi Tay, Yew-Soon OngCVPR 2020
  2. Benchmarking Low-Shot Robustness to Natural Distribution ShiftsAaditya Singh, Kartik Sarangmath, Prithvijit Chattopadhyay, Judy HoffmanICCV 2023 · 3 citations
  3. Does Robustness on ImageNet Transfer to Downstream Tasks?Yutaro Yamada, Mayu OtaniCVPR 2022 · 23 citations
  4. Defensive Patches for Robust Recognition in the Physical WorldJiakai Wang, Zixin Yin, Pengfei Hu, Aishan Liu et al.CVPR 2022 · 25 citations
  5. To Tackle Adversarial Transferability: A Novel Ensemble Training Method with Fourier TransformationWanlin Zhang, Weichen Lin, Ruomin Huang, Shihong Song et al.ICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines