arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.05862cs.LGcs.AIcs.CRcs.CV
收藏

安全总比后悔好:针对定向数据投毒与后门攻击的 CLIP 预训练防御

Better Safe than Sorry: Pre-training CLIP against Targeted Data Poisoning and Backdoor Attacks

University of California, Los Angeles(加利福尼亚大学洛杉矶分校)

Wenhan Yang, Jingdong Gao, Baharan Mirzasoleiman

AI总结:

本文提出 SAFECLIP,通过单模态对比学习预热、基于高斯混合模型划分安全与风险数据,并在预训练中逐步扩大安全集合,从而在不损害 CLIP 性能的前提下将定向数据投毒和后门攻击成功率降至 0%。

摘要:

在大规模图像-文本描述数据集上进行的对比语言-图像预训练(CLIP)已在零样本分类中取得显著成功,并具备向新领域迁移的能力。然而,与监督学习相比,CLIP 对定向数据投毒和后门攻击的脆弱性要大得多。令人惊讶的是,仅投毒 CLIP 预训练数据的 0.0001% 就足以使定向数据投毒攻击成功,这比投毒监督模型所需的数据量小四个数量级。尽管存在这一脆弱性,现有方法在预训练阶段防御 CLIP 模型的能力仍然非常有限。在本工作中,我们提出一种强防御方法 SAFECLIP,用于安全地预训练 CLIP 以抵御定向数据投毒和后门攻击。SAFECLIP 首先分别对图像模态和文本模态应用单模态对比学习(CL)来预热模型。然后,它通过对图像-文本描述对表示的余弦相似度应用高斯混合模型,将数据划分为安全集合和风险集合。SAFECLIP 通过对安全集合应用 CLIP 损失,并分别对风险集合中的图像和文本模态应用单模态 CL 来预训练模型。通过在预训练过程中逐步增大安全集合的规模,SAFECLIP 能够有效破坏定向数据投毒和后门攻击,同时不损害 CLIP 的性能。我们在 CC3M、Visual Genome 和 MSCOCO 上的大量实验表明,SAFECLIP 将定向数据投毒攻击的成功率从 93.75% 显著降低至 0%,并将各种后门攻击的成功率从最高 100% 降低至 0%,同时不损害 CLIP 的性能。

英文摘要:

Contrastive Language-Image Pre-training (CLIP) on large image-caption datasets has achieved remarkable success in zero-shot classification and enabled transferability to new domains. However, CLIP is extremely more vulnerable to targeted data poisoning and backdoor attacks, compared to supervised learning. Perhaps surprisingly, poisoning 0.0001% of CLIP pre-training data is enough to make targeted data poisoning attacks successful. This is four orders of magnitude smaller than what is required to poison supervised models. Despite this vulnerability, existing methods are very limited in defending CLIP models during pre-training. In this work, we propose a strong defense, SAFECLIP, to safely pre-train CLIP against targeted data poisoning and backdoor attacks. SAFECLIP warms up the model by applying unimodal contrastive learning (CL) on image and text modalities separately. Then, it divides the data into safe and risky sets, by applying a Gaussian Mixture Model to the cosine similarity of image-caption pair representations. SAFECLIP pre-trains the model by applying the CLIP loss to the safe set and applying unimodal CL to image and text modalities of the risky set separately. By gradually increasing the size of the safe set during pre-training, SAFECLIP effectively breaks targeted data poisoning and backdoor attacks without harming the CLIP performance. Our extensive experiments on CC3M, Visual Genome, and MSCOCO demonstrate that SAFECLIP significantly reduces the success rate of targeted data poisoning attacks from 93.75% to 0% and that of various backdoor attacks from up to 100% to 0%, without harming CLIP's performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑