From Toxic to Trustworthy: Using Self-Distillation and Semi-supervised Methods to Refine Neural Networks

Xianda Zhang, Baolin Zheng, Jianbao Hu, Chengyang Li, Xiaoying BaiAAAI 2024 · DOI

TL;DR

This paper introduces "From Toxic to Trustworthy" (FTT), a novel approach to eliminate backdoor attacks in deep neural networks while simultaneously improving model accuracy. FTT combines self-attention distillation to remove triggers and semi-supervised learning to leverage poisoned data for enhanced performance, outperforming existing methods in both attack mitigation and accuracy gains.

What Problem Does This Paper Address?

Deep neural networks (DNNs) have become ubiquitous, but their reliance on pre-trained models from third-party sources introduces a significant security vulnerability: backdoor attacks. These attacks stealthily inject malicious behavior into a model during training, causing it to misbehave only when a specific "trigger" is present in the input. This is particularly concerning for safety-critical applications. While existing methods aim to "cleanse" these backdoored models, they often struggle against sophisticated attacks and, crucially, degrade the model's original performance. This paper addresses the critical need for a defense mechanism that can effectively remove backdoors without sacrificing accuracy, and ideally, even improve it.

Methods

FTT employs a two-stage approach:

  1. Self-Attention Distillation (SAD): This stage uses a small amount of clean data to remove backdoor triggers. The core idea is to partition the network into shallow sections, each with a small classifier. These shallow sections act as "student" models, learning to mimic the output of the deepest section (the "teacher"). By aligning the outputs of these shallow and deep parts, the network's inherent toxicity is reduced, effectively purifying it. This is inspired by the concept of mutual distillation between models of varying toxicity.
  2. Semi-Supervised Learning (SSL): This stage leverages the otherwise unusable poisoned data. Instead of discarding it, FTT strategically removes the toxic labels and uses the data as unlabeled input. It employs a FixMatch-like strategy: a model generates "pseudo-labels" for weakly-augmented versions of poisoned data based on high-confidence predictions. These pseudo-labels are then used to train the model on strongly-augmented versions of the same data. This process helps to further purify the backdoor and enhance overall model accuracy.

Datasets

The paper evaluates FTT on the following datasets:

  • CIFAR-10
  • CIFAR-100

Key Insights and Ideas

  • Leveraging Poisoned Data: The most striking insight is the innovative use of poisoned data. Instead of treating it as purely detrimental, FTT transforms it into a valuable resource for improving model robustness and accuracy through SSL.
  • Self-Distillation for Purification: The SAD mechanism effectively "distills" knowledge within the network itself, aligning different parts to reduce the impact of malicious injections. This internal alignment is key to its purification capabilities.
  • Dual Benefit: FTT doesn't just remove backdoors; it actively improves model accuracy. This addresses a major limitation of prior work where defense often came at the cost of performance.
  • Robustness to Sophisticated Attacks: The paper highlights that FTT is effective against advanced attacks like ATTEQ-NN, which challenge existing defense methods. This suggests FTT's approach to trigger identification and removal is more fundamental.

Key Results

  • Attack Success Rate (ASR) Reduction: FTT(SAD+SSL) reduced the average ASR from nearly 100% to as low as 1.89% on CIFAR-10 with PreActResNet-18, a significant improvement over other methods.
  • Accuracy (ACC) Improvement: FTT(SAD+SSL) improved accuracy by an average of 4.43% compared to the original model, a stark contrast to other methods that often decreased accuracy.
  • Efficiency with Limited Clean Data: FTT can effectively erase backdoors with as little as 0.5% of clean data, outperforming other methods that require significantly more.
  • Effectiveness Across Architectures: FTT demonstrated effectiveness on WRN-16-1, Resnet-50, and PreActResNet-18 models, with larger models showing better defense performance.
  • Poison Ratio Insensitivity: After purification by SAD, the SSL stage showed comparable performance even with varying percentages of poisoned data (0-75%), indicating robustness.

Limitations and Future Work

  • Ablation Study Insights: The ablation study revealed that SSL is most effective after SAD has already removed the majority of backdoor triggers. While SAD can be used independently, SSL enhances its performance.
  • Future Directions: The paper suggests that FTT's effectiveness is positively correlated with model size, hinting at potential for further improvements with larger, more complex architectures. The authors also imply that the approach could be extended to other domains beyond image recognition.

Summary updated

BibTeX
@inproceedings{zhang2024from,
  author = {Xianda Zhang and Baolin Zheng and Jianbao Hu and Chengyang Li and Xiaoying Bai},
  title = {{From Toxic to Trustworthy: Using Self-Distillation and Semi-supervised Methods to Refine Neural Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i15.29629},
}
Figure