NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mitigating Backdoor Attacks using Activation-Guided Model Editing

Felix Hsieh, Huy H. Nguyen, AprilPyone MaungMaung, Dmitrii Usynin, Isao Echizen · DOI

Abstract

Deep neural networks are increasingly vulnerable to backdoor attacks, where malicious triggers embedded during training cause misclassification at inference time. Traditional defenses, such as retraining or extensive fine-tuning, are computationally prohibitive and data-intensive. We present a novel "model editing" technique that neutralizes backdoors in seconds using as few as four clean samples. By directly modifying model weights based on internal activation patterns, this method effectively "unlearns" malicious features without requiring prior knowledge of the specific trigger.

Introduction

Deep learning models are susceptible to backdoor attacks, a form of training-time poisoning where an attacker injects a "trigger" (e.g., a specific pixel pattern) into a subset of the training data. The resulting model performs normally on clean inputs but is subverted whenever the trigger is present.

Existing defenses typically rely on retraining the model from scratch or performing extensive fine-tuning. However, these methods are often impractical due to high computational costs, the need for large clean datasets, and the assumption that the defender knows the trigger's characteristics. This research addresses the challenge of machine unlearning: efficiently removing backdoor features in realistic scenarios where data is scarce and attack specifics are unknown.

Overview of the backdoor unlearning framework compared to traditional retraining.

Activation-Guided Model Editing

The proposed method, Activation-Guided Model Editing, offers a surgical approach to weight modification that bypasses traditional backpropagation. The process follows four primary steps:

  1. Activation Extraction: A minimal set of samples (clean or poisoned) is passed through the model to capture activations ($A$) in the later layers.
  2. Negation & Normalization: Assuming that the most strongly firing neurons are associated with the features to be forgotten, the method negates these activations ($A = -A$) and normalizes them to create a suppression mask.
  3. Direct Weight Editing: Model weights ($\theta$) are directly updated by this negated activation factor: $\theta_{new} = \theta \cdot A_{negated}$. This effectively "mutes" the neural pathways responsible for recognizing the backdoor.
  4. Optional Repair Phase: To prevent collateral damage to the model's general accuracy for the target class, a brief, one-epoch fine-tuning step is performed on a handful of samples to restore utility.

The method is evaluated in two settings: BDK (Backdoor Knowledge), where the trigger is known, and $\neg$BDK (No Backdoor Knowledge), where only clean samples guide the edit.

Experimental Evaluation

The framework was tested across five image classification benchmarks: MNIST, CIFAR10, CIFAR100, CINIC10, and TinyImageNet. The evaluation included eight distinct trigger types, ranging from simple visible patches to sophisticated invisible steganography and optimized "Narcissus" triggers.

The variety of backdoor triggers evaluated, ranging from simple patches to invisible noise.

Key Insights

  • The "Later Layer" Hypothesis: Editing the second half of the model's layers proved most effective, as early layers handle general low-level features while later layers encode the high-level logic where backdoors typically reside.
  • Extreme Sample Efficiency: Unlike fine-tuning, which requires hundreds of images, this method remains effective with just 4 to 5 samples, allowing defenders to use a small, verified "gold standard" dataset.
  • Sub-Second Latency: By avoiding iterative backpropagation, the unlearning process is remarkably fast, completing in approximately 0.36s compared to 114s for competing methods like Neural Attention Distillation (NAD).

Results and Robustness

The method consistently reduced the Attack Success Rate (ASR) from near 100% to near 0% across various architectures, including ResNet18, VGG16, EfficientNetV2, and MobileNetV3. Crucially, the Clean Test Accuracy (ACC) remained high after the repair step, often matching or exceeding state-of-the-art (SOTA) baselines. In the $\neg$BDK scenario, the method significantly outperformed existing defenses, demonstrating that specific knowledge of the poison is not required for effective remediation.

Limitations and Future Work

While highly effective, the editing process can be "blunt," occasionally unlearning the entire target class along with the backdoor. Although the repair step mitigates this, it introduces a dependency on labeled data. Furthermore, this study focused on Convolutional Neural Networks (CNNs); future research is required to determine if activation-negation logic extends to Vision Transformers (ViTs) or other modalities like natural language processing.

Summary updated

BibTeX
@inproceedings{hsieh2024mitigating,
  author = {Felix Hsieh and Huy H. Nguyen and AprilPyone MaungMaung and Dmitrii Usynin and Isao Echizen},
  title = {{Mitigating Backdoor Attacks using Activation-Guided Model Editing}},
  booktitle = {ACCV Workshops},
  year = {2024},
  doi = {10.1007/978-981-96-2641-0\_21},
}
Figure