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

检测对比语言图像预训练中的后门样本

Detecting Backdoor Samples in Contrastive Language Image Pretraining

The University of Melbourne(墨尔本大学);Singapore Management University(新加坡管理大学);Fudan University(复旦大学)

Hanxun Huang, Sarah Erfani, Yige Li, Xingjun Ma, James Bailey

AI总结:

本文发现CLIP后门样本在局部子空间中邻域稀疏,据此提出基于密度比的检测方法,可高效检测并清理大规模网络数据集中的后门样本,并揭示CC3M数据集已存在非故意后门。

摘要:

对比语言图像预训练(CLIP)已被发现容易受到投毒后门攻击的影响,攻击者仅需投毒训练数据集的0.01%即可在CLIP模型上实现几乎完美的攻击成功率。这引发了人们对当前使用CLIP在未经审查的网络数据上预训练大规模模型的做法产生安全担忧。在本工作中,我们分析了CLIP模型学习到的后门投毒样本的表征,发现它们在局部子空间中表现出独特的特征,即它们的局部邻域远比干净样本的局部邻域稀疏。基于这一发现,我们对检测CLIP后门攻击进行了系统性研究,并表明这些攻击可以通过传统的基于密度比的局部离群点检测器轻松且高效地被检测到,而现有的后门样本检测方法则无法做到。我们的实验还揭示,原始的CC3M数据集中已经存在一个非故意的后门,并且该后门已被训练进OpenCLIP发布的一个流行的开源模型中。基于我们的检测器,人们可以在15分钟内使用4块Nvidia A100 GPU高效地清理一个百万规模的网络数据集(例如CC3M)。代码已在我们https://github.com/HanxunH/Detect-CLIP-Backdoor-Samples的GitHub仓库中公开。

英文摘要:

Contrastive language-image pretraining (CLIP) has been found to be vulnerable to poisoning backdoor attacks where the adversary can achieve an almost perfect attack success rate on CLIP models by poisoning only 0.01\% of the training dataset. This raises security concerns on the current practice of pretraining large-scale models on unscrutinized web data using CLIP. In this work, we analyze the representations of backdoor-poisoned samples learned by CLIP models and find that they exhibit unique characteristics in their local subspace, i.e., their local neighborhoods are far more sparse than that of clean samples. Based on this finding, we conduct a systematic study on detecting CLIP backdoor attacks and show that these attacks can be easily and efficiently detected by traditional density ratio-based local outlier detectors, whereas existing backdoor sample detection methods fail. Our experiments also reveal that an unintentional backdoor already exists in the original CC3M dataset and has been trained into a popular open-source model released by OpenCLIP. Based on our detector, one can clean up a million-scale web dataset (e.g., CC3M) efficiently within 15 minutes using 4 Nvidia A100 GPUs. The code is publicly available in our \href{https://github.com/HanxunH/Detect-CLIP-Backdoor-Samples}{GitHub repository}.

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

↑