Unified Neural Backdoor Removal With Only Few Clean Samples Through Unlearning and Relearning

Nay Myat Min, Long H. Pham, Jun Sun

TL;DR

This paper introduces ULRL, a novel two-phase approach to remove neural network backdoors using only a small set of clean data. By first "unlearning" (intentionally degrading performance on clean data to expose sensitive neurons) and then "relearning" (recalibrating these neurons), ULRL effectively neutralizes backdoors while preserving the model's accuracy on legitimate tasks, even with as little as 1% of clean data.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are powerful but vulnerable to "backdoor attacks." In these attacks, malicious triggers are embedded during training, causing the model to behave normally on clean data but misbehave when presented with a specific trigger. This poses a significant security risk, especially when deploying pre-trained models or in resource-constrained environments where large amounts of clean data for defense are unavailable. Existing defense methods often require extensive clean datasets, are computationally expensive, or compromise the model's performance on benign data. This paper tackles the critical challenge of effectively removing backdoors with minimal clean data and computational resources.

Methods

ULRL employs a unique two-phase strategy:

  • Unlearning Phase: This counterintuitive phase intentionally maximizes the loss on a small clean dataset. The insight is that neurons highly sensitive to backdoor triggers will respond differently to this process compared to normal neurons. By observing abnormal weight changes during this "unlearning," the method identifies suspicious neurons. This phase uses gradient ascent to maximize the loss until the model's accuracy on the clean defense dataset drops below a predefined threshold.
  • Relearning Phase: Once suspicious neurons are identified (using Median Absolute Deviation (MAD) to detect significant weight deviations), they are recalibrated. This involves targeted reinitialization (using He initialization) and a novel cosine similarity regularization term. This regularization encourages the recalibrated weights to diverge from their compromised states, effectively neutralizing backdoor influences without sacrificing performance on benign data. This phase uses stochastic gradient descent (SGD) to minimize a composite loss function that balances clean task performance with targeted weight divergence.

Datasets

The paper evaluates ULRL on four standard datasets:

  • CIFAR-10
  • GTSRB
  • CIFAR-100
  • Tiny-ImageNet

It also tests ULRL across three different architectures:

  • PreAct-ResNet18
  • VGG19-BN
  • ViT-B-16

Key Insights and Ideas

  • Unlearning as a Diagnostic Tool: The core idea of intentionally degrading a model's performance on clean data to expose backdoor-sensitive neurons is a novel diagnostic approach.
  • Targeted Neuron Recalibration: Instead of broad interventions, ULRL precisely targets and recalibrates only the identified suspicious neurons, preserving the model's overall functionality.
  • Cosine Similarity for Divergence: Using cosine similarity for regularization is crucial because it focuses on the orientation of weight vectors, which is often how backdoors manipulate neuron behavior, rather than just their magnitude. This allows for more precise and effective neutralization.
  • Data Efficiency is Key: The method's ability to perform effectively with as little as 1% of clean data is a significant practical advantage, addressing a major limitation of existing defenses.

Key Results

  • ULRL significantly reduces the Attack Success Rate (ASR) across a wide range of 12 backdoor attack types and multiple datasets and architectures.
  • The method maintains high clean accuracy (C-ACC), often even improving it slightly, demonstrating its ability to preserve model utility.
  • Even with only 1% of clean data, ULRL achieves substantial ASR reduction, with performance improving as the clean data size increases to 1-2%.
  • ULRL outperforms five state-of-the-art defense methods in terms of both ASR reduction and C-ACC preservation.
  • The computational cost of ULRL is competitive and practical, especially compared to more complex methods.
  • ULRL is effective on Vision Transformer (ViT-B-16) architectures, demonstrating its versatility.

Limitations and Future Work

  • Limited Clean Data: ULRL's effectiveness decreases with extremely limited clean data (below 1%), as it requires a sufficient amount to reliably identify suspicious neurons.
  • Neuron Coverage: If a very large number of neurons are compromised (e.g., all last-layer neurons), the MAD-based identification might fail, potentially slowing down optimization if all neurons are reinitialized.
  • Future Work: The authors suggest extending ULRL to other network types and backdoor threats, including data-free settings. They also plan to explore more sophisticated attacks and further optimize the unlearning and relearning processes.

Summary updated

BibTeX
@article{min2024unified,
  author = {Nay Myat Min and Long H. Pham and Jun Sun},
  title = {{Unified Neural Backdoor Removal With Only Few Clean Samples Through Unlearning and Relearning}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2024},
  url = {https://openreview.net/forum?id=mf4OAfOPCg},
}
Figure