Skip to main content
QUICK REVIEW

[Paper Review] How to Inject Backdoors with Better Consistency: Logit Anchoring on Clean Data

Zhiyuan Zhang, Lingjuan Lyu|arXiv (Cornell University)|Sep 3, 2021
Adversarial Robustness in Machine LearningComputer Science38 references10 citations
TL;DR

This paper proposes logit anchoring, a novel method to inject backdoors into pre-trained models with improved consistency by freezing model behavior on clean data. By theoretically and empirically demonstrating that adversarial weight perturbations naturally occur during backdoor tuning, the method enhances both global and instance-wise consistency, significantly reducing logit variance compared to baseline methods like BadNets.

ABSTRACT

Since training a large-scale backdoored model from scratch requires a large training dataset, several recent attacks have considered to inject backdoors into a trained clean model without altering model behaviors on the clean data. Previous work finds that backdoors can be injected into a trained clean model with Adversarial Weight Perturbation (AWP). Here AWPs refers to the variations of parameters that are small in backdoor learning. In this work, we observe an interesting phenomenon that the variations of parameters are always AWPs when tuning the trained clean model to inject backdoors. We further provide theoretical analysis to explain this phenomenon. We formulate the behavior of maintaining accuracy on clean data as the consistency of backdoored models, which includes both global consistency and instance-wise consistency. We extensively analyze the effects of AWPs on the consistency of backdoored models. In order to achieve better consistency, we propose a novel anchoring loss to anchor or freeze the model behaviors on the clean data, with a theoretical guarantee. Both the analytical and the empirical results validate the effectiveness of the anchoring loss in improving the consistency, especially the instance-wise consistency.

Motivation & Objective

  • To understand why adversarial weight perturbations (AWP) naturally occur when injecting backdoors into pre-trained models.
  • To formalize the concept of consistency in backdoored models, distinguishing between global and instance-wise consistency.
  • To develop a method that improves both global and instance-wise consistency during backdoor injection without degrading clean accuracy or attack success rate.
  • To provide theoretical justification for why logit anchoring enhances consistency in backdoored models.
  • To validate the effectiveness of logit anchoring across diverse vision and NLP benchmarks under limited data settings.

Proposed method

  • Propose a novel anchoring loss that minimizes the L2 distance between model logits on clean data and the original clean model's logits, effectively freezing behavior on clean inputs.
  • Introduce a theoretical analysis showing that AWP naturally emerges during backdoor tuning due to the proximity of optimal backdoored parameters to the clean model's parameters.
  • Apply the anchoring loss during fine-tuning to stabilize model predictions on clean samples, reducing logit variance across instances.
  • Use multiple consistency metrics—logit distance, P-distance, KL divergence, and Pearson correlation—to evaluate instance-wise consistency.
  • Train the model with a hyperparameter λ that controls the strength of the anchoring loss, balancing clean accuracy and consistency.
  • Visualize loss basins and instance-wise logit consistency to compare the proposed method with BadNets and L2-penalized baselines.

Experimental results

Research questions

  • RQ1Why do adversarial weight perturbations (AWP) naturally occur when injecting backdoors into pre-trained models?
  • RQ2How can the consistency of backdoored models be formally defined and measured, particularly in terms of instance-wise behavior?
  • RQ3Can a novel anchoring loss improve both global and instance-wise consistency in backdoored models without degrading clean accuracy or attack success rate?
  • RQ4How does logit anchoring compare to existing methods like L2 penalty, PGD, and EWC in terms of consistency and robustness?
  • RQ5To what extent does improved consistency reduce the detectability of backdoors in real-world scenarios?

Key findings

  • The proposed logit anchoring method achieves significantly higher instance-wise consistency, with a Pearson correlation of 0.859 compared to 0.697 for BadNets on CIFAR-10.
  • The anchoring method reduces logit variance by 80% compared to BadNets, as shown by a 0.48 logit distance (vs. 0.00 for clean model) and 0.014 mKL divergence (vs. 0.110 for BadNets).
  • On CIFAR-100 and Tiny-ImageNet, the anchoring method maintains high consistency even with only 640 training images, outperforming L2 penalty and PGD baselines.
  • The method achieves 97.28% attack success rate (ASR) and 94.41% clean accuracy on CIFAR-10, with minimal degradation in performance.
  • Visualizations confirm that the anchoring method produces more consistent logits across clean samples than BadNets and L2-penalized models.
  • Theoretical analysis confirms that AWP naturally emerges during backdoor tuning due to the proximity of optimal backdoored parameters to the clean model’s parameters.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.