Can Distillation Mitigate Backdoor Attacks in Pre-trained Encoders?

📄 arXiv: 2403.03846v2 📥 PDF

作者: TIngxu Han, Wei Song, Weisong Sun, Ziqi Ding, Yebo Feng, Chunrong Fang, Jun Li, Hanwei Qian, Zhenyu Chen, Yang Liu

分类: cs.LG

发布日期: 2024-03-06 (更新: 2026-01-29)


💡 一句话要点

提出蒸馏方法以缓解自监督学习中的后门攻击问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 自监督学习 后门攻击 蒸馏训练 模型安全 知识转移 深度学习

📋 核心要点

  1. 自监督学习在预训练编码器中广泛应用,但其易受后门攻击,影响下游任务的安全性和可靠性。
  2. 本文提出通过蒸馏技术提取良性知识,去除被污染的预训练编码器中的后门,从而生成可靠的模型。
  3. 实验结果显示,蒸馏显著降低了后门攻击的成功率,同时保持了较高的模型准确性,验证了方法的有效性。

📝 摘要(中文)

自监督学习(SSL)已成为从未标记数据中学习通用表示的主要范式,但其易受到后门攻击的威胁。攻击者可能会训练并分发被污染的预训练编码器,从而影响下游模型的性能。本文提出了一种基于蒸馏的防御机制,旨在从被污染的预训练编码器中提取良性知识并去除后门,生成干净可靠的预训练模型。通过对两种先进的后门攻击和四个广泛采用的图像分类数据集进行实验,结果表明,蒸馏将攻击成功率从80.87%降低至27.51%,模型准确率仅下降6.35%。

🔬 方法详解

问题定义:本文解决自监督学习中预训练编码器易受后门攻击的问题。现有方法未能有效防御被污染的编码器,导致下游模型受到影响。

核心思路:通过蒸馏技术,从被污染的预训练编码器中提取良性知识,去除后门,生成一个干净的预训练模型。蒸馏的设计旨在保留有用的表示,同时消除恶意影响。

技术框架:整体流程包括三个主要阶段:首先,使用被污染的预训练编码器作为教师模型;其次,通过蒸馏过程将知识转移到学生模型;最后,评估学生模型的性能和安全性。

关键创新:最重要的创新在于将蒸馏技术重新定义为去除后门的手段,而不仅仅是知识转移。这一方法在本质上与传统蒸馏方法不同,强调了安全性与可靠性的结合。

关键设计:在实验中,采用了微调的教师网络、基于热身的学生训练和基于注意力的蒸馏损失函数,这些设计显著提升了模型的防御性能和准确性。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,采用蒸馏方法后,后门攻击的成功率从80.87%降低至27.51%,而模型的准确率仅下降6.35%。这一显著的性能提升验证了蒸馏在防御后门攻击中的有效性,尤其是在不同教师架构和损失函数的比较中,表现尤为突出。

🎯 应用场景

该研究的潜在应用领域包括安全敏感的深度学习任务,如金融、医疗和自动驾驶等领域。通过提高模型的安全性,能够有效防止后门攻击带来的风险,增强系统的可靠性和信任度。未来,该方法可能会推动更广泛的安全防护技术在自监督学习中的应用。

📄 摘要(原文)

Self-Supervised Learning (SSL) has become a prominent paradigm for pre-training encoders to learning general-purpose representations from unlabeled data and releasing them on third-party platforms for broad downstream deep learning tasks. However, SSL is vulnerable to backdoor attacks, where an adversary may train and distribute poisoned pre-training encoders to contaminate the downstream models. In this paper, we study a defense mechanism based on distillation against poisoned encoders in SSL. Traditionally, distillation transfers knowledge from a pre-trained teacher model to a student model, enabling the student to replicate or refine the teacher's learned representations. We repurpose distillation to extract benign knowledge and remove backdoors from a poisoned pre-trained encoder to produce a clean and reliable pre-trained model. We conduct extensive experiments to evaluate the effectiveness of distillation in mitigating backdoor attacks on pre-trained encoders. Based on two state-of-the-art backdoor attacks and four widely adopted image classification datasets, our results demonstrate that distillation reduces the attack success rate from 80.87% to 27.51%, with only a 6.35% drop in model accuracy. Furthermore, by comparing four teacher architectures, three student models, and six loss functions, we find that the distillation with fine-tuned teacher networks, warm-up-based student training, and attention-based distillation losses yield the best performance.