Mutual Information Guided Backdoor Mitigation for Pre-Trained Encoders

Tingxu Han, Weisong Sun, Ziqi Ding, Chunrong Fang, Hanwei Qian, Jiaxun Li, Zhenyu Chen, Xiangyu Zhang

TL;DR

MIMIC is a novel backdoor mitigation framework for self-supervised learning (SSL) encoders that uses mutual information to "sift" benign knowledge from a poisoned model. By distilling only clean features into a randomly initialized student network, it reduces attack success rates by over 80% while maintaining high downstream accuracy, all while requiring less than 5% of clean pre-training data.

What Problem Does This Paper Address?

Self-supervised learning (SSL) has become the standard for pre-training powerful image encoders (like those used in CLIP or GPT-4V) on massive, uncurated datasets. However, this convenience comes with a security cost: backdoor attacks. An attacker can poison the pre-training data or the model itself so that any downstream classifier built on the encoder will misclassify images containing a specific "trigger" (e.g., a small white square) into a target class.

Mitigating these backdoors is notoriously difficult in SSL because:

  1. No Labels: Traditional defenses rely on label information, which isn't available during SSL pre-training.
  2. Task Agnosticism: Encoders are used for many different downstream tasks; a defender doesn't know which task a user might eventually perform.
  3. Catastrophic Forgetting: Simply fine-tuning a poisoned encoder on a small clean dataset often causes the model to lose the general features it learned, tanking its performance.
A typical backdoor attack scenario against SSL encoders.

Methods

The authors propose MIMIC (Mutual Information guided backdoor MItigation for pre-trained enCoders), which treats the poisoned encoder as a "dirty" teacher and distills its knowledge into a "clean" student.

The process involves two main steps:

  1. MI-Guided Benign Knowledge Localization: The researchers discovered that benign features (useful information) and malicious features (backdoor triggers) behave differently across network layers. They use a Mutual Information (MI) estimator to measure how much information each layer contributes to the final features. They found that benign knowledge progressively accumulates and peaks at the final layers, whereas backdoor features remain sparse and localized.
  2. Distillation Training: Instead of fine-tuning the poisoned model, MIMIC initializes a student network with random weights. This ensures the student starts with no inherited backdoors. The student is then trained to mimic the teacher's benign features using a specialized loss function:
  3. Clone Loss: Forces the student to produce similar feature embeddings to the teacher for clean inputs.
  4. Attention Loss: Aligns the "attention maps" (what the model looks at) between the teacher and student, weighted by the MI values calculated in Step 1. This compels the student to prioritize the layers where clean knowledge is most concentrated.

Datasets

The authors evaluated MIMIC using ResNet-18 as the backbone across four standard computer vision benchmarks:

  • CIFAR-10: 60,000 32x32 images across 10 classes.
  • STL-10: 105,000 images (mostly unlabeled) at 96x96 resolution.
  • GTSRB: A traffic sign recognition dataset with 43 categories.
  • SVHN: Street View House Numbers, containing over 90,000 digit images.

Key Insights and Ideas

  • The Markovian Property of Benign Features: The paper theoretically and empirically proves that for clean data, mutual information between the input and the layer outputs increases as you go deeper into the network. In contrast, poisoned data activates sparse neurons that don't show this progressive flow.
  • The "Empty Student" Advantage: Most defenses try to "fix" a poisoned model. MIMIC argues it's better to start with a blank slate (random weights) and only copy over the parts of the teacher that behave "normally" on clean data.
  • MI as a Weighting Factor: Rather than treating all layers equally, MIMIC uses MI to dynamically assign "distillation potency." Layers that show high MI for clean features are given more weight during the distillation process.
Mutual information trends for benign vs. malevolent knowledge across layers.

Key Results

MIMIC was tested against state-of-the-art attacks like BadEncoder and BASSL, outperforming seven baseline defense methods (including Fine-Pruning and Neural Attention Distillation).

  • Security: On the BadEncoder attack, MIMIC reduced the Attack Success Rate (ASR) from 97.67% to 8.14% on average. In the best case (GTSRB), ASR dropped to a negligible 1.36%.
  • Efficiency: MIMIC is significantly faster than top baselines. It takes roughly 3,879 seconds to complete, compared to 6,248 seconds for NAD, because it avoids the need for repeated, expensive fine-tuning cycles.
  • Data Efficiency: The defense remains highly effective even when the defender only has access to 2,000 clean images (approx. 4% of the pre-training set).

Limitations and Future Work

  • Accuracy Trade-offs: While MIMIC maintains high accuracy, there is a slight "accuracy tax" (around 1-2% drop) on complex datasets like GTSRB, where suppressing backdoor behaviors might inadvertently prune some fine-grained benign features.
  • Supervised Learning Extension: When adapted to supervised learning, the accuracy drop was more pronounced (~7%). The authors suggest that the "empty student" approach might need further refinement for models that aren't task-agnostic.
  • Adaptive Attacks: While MIMIC showed resilience against a basic adaptive attack (where the attacker tries to make poisoned features look like benign ones via MI), more sophisticated "defense-aware" attackers remain a potential threat for future study.

Summary updated

BibTeX
@article{han2025mutual,
  author = {Tingxu Han and Weisong Sun and Ziqi Ding and Chunrong Fang and Hanwei Qian and Jiaxun Li and Zhenyu Chen and Xiangyu Zhang},
  title = {{Mutual Information Guided Backdoor Mitigation for Pre-Trained Encoders}},
  journal = {IEEE Transactions on Information Forensics and Security},
  year = {2025},
  url = {https://openreview.net/forum?id=eCsOmt35I1},
}
Figure