Reading Fine-Tuning Diffs Through Lenses: Model Diffing for Backdoor Detection
Abstract
We introduce a common scoring system based on token readouts to evaluate weight, activation and output-based model diffing methods for backdoor detection in fine-tuning processes. We also improve existing weight and activation based methods by incorporating the -lens and its refinement, the -lens. We test our setup in experiments where we compare a backdoored model with the base model from which it was fine-tuned. Our results show that incorporating the -lens improves the weight-based method in all our settings, while the -lens improves its ranks within single layers. The strongest single method is , the weight difference decoded through the -lens of the base model, which ranks a token naming the backdoor among its first ten tokens in 11 of our 12 settings. Moreover, we show that output and activation based methods such as ADL and Diff Mining can easily break if the backdoored model is penalised during fine-tuning for giving the backdoor's words probability on clean inputs, whereas the weight-based methods are not affected. Conversely, permuting the hidden units or training only the layers that read the residual stream hides the backdoor from the weight-based methods but not from ADL and Diff Mining. No single method resists both attacks.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI, cs.CL
- Comments
- 31 pages, 16 figures, 14 tables. Code and data available at https://github.com/maxipetro/lens-diffing-backdoors
Related papers
From Prediction to Decision: Decision-Focused Fine-Tuning of Autoregressive Tabular Transformers for Cost-Sensitive Financial Events
Shared title terminologycs.LGAshkan Golgoon, Giacomo Domeniconi, Samuel Atkins et al.
Amortizing Exact Orthogonality: Drift-Triggered Restoration for Orthogonal Fine-Tuning
Shared title terminologycs.LGLanxin Zhao, Xiaoyu Li, Dai Shi et al.
Two Timescales of Forgetting in Fine-tuning of Language Models: Fast Behavioral Suppression and Slow Representational Drift
Shared title terminologycs.LGYilin Luo, Jin Hwa Lee, Andrew M. Saxe et al.
When to Trust a PFN: Detecting Harmful Shift in Tabular Foundation Models
Shared title terminologycs.LGViet Nguyen, Herman Bergström, Stephan Rabanser et al.
Do We Still Need Reinforcement Learning When We Can Read the World Model?
Shared title terminologycs.LGMingchao Zhang, Miduo Cui, Kangze He et al.
Tune for Retention, Not Just Gain: SFT Forgets Far Less than You Think
Shared title terminologycs.LGNirmit Joshi, Nathan Srebro, Eran Malach