arXiv:2603.11664cs.CV2026-03

无需训练即可检测预训练视觉模型中的后门攻击。

BackdoorIDS: Zero-shot Backdoor Detection for Pretrained Vision Encoder

  • 通过逐步遮蔽输入图像,捕捉注意力转移的异常变化。
  • 在多个数据集和模型上均优于现有防御方法,准确率超90%。
  • 即插即用,适合部署在CNN、ViT、CLIP等各类视觉模型中。

自监督与多模态视觉编码器学习到的强大视觉表征被广泛用于下游视觉任务及大型视觉语言模型(LVLMs)。然而,下游用户常依赖来源不明的第三方预训练编码器,面临后门攻击风险。本文提出BackdoorIDS,一种简单有效的零样本、推理时后门样本检测方法。该方法基于两个观察:注意力劫持与恢复。在逐步遮蔽输入过程中,受污染图像初始将注意力集中在恶意触发器特征上;当遮蔽比例超过触发器鲁棒性阈值后,触发器失效,注意力迅速转向正常内容。此转变导致图像嵌入发生显著变化,而干净图像的嵌入则平稳演进。BackdoorIDS通过沿遮蔽轨迹提取嵌入序列并应用密度聚类(如DBSCAN)来识别异常。若某输入的嵌入序列形成超过一个簇,则判定为后门样本。大量实验表明,BackdoorIDS在多种攻击类型、数据集与模型家族中持续优于现有防御方案。其为即插即用设计,无需重训练,在推理时完全零样本运行,兼容包括CNN、ViT、CLIP和LLaVA-1.5在内的多种编码器架构。

原文摘要 · Abstract (English)

Self-supervised and multimodal vision encoders learn strong visual representations that are widely adopted in downstream vision tasks and large vision-language models (LVLMs). However, downstream users often rely on third-party pretrained encoders with uncertain provenance, exposing them to backdoor attacks. In this work, we propose BackdoorIDS, a simple yet effective zero-shot, inference-time backdoor samples detection method for pretrained vision encoders. BackdoorIDS is motivated by two observations: Attention Hijacking and Restoration. Under progressive input masking, a backdoored image initially concentrates attention on malicious trigger features. Once the masking ratio exceeds the trigger's robustness threshold, the trigger is deactivated, and attention rapidly shifts to benign content. This transition induces a pronounced change in the image embedding, whereas embeddings of clean images evolve more smoothly across masking progress. BackdoorIDS operationalizes this signal by extracting an embedding sequence along the masking trajectory and applying density-based clustering such as DBSCAN. An input is flagged as backdoored if its embedding sequence forms more than one cluster. Extensive experiments show that BackdoorIDS consistently outperforms existing defenses across diverse attack types, datasets, and model families. Notably, it is a plug-and-play approach that requires no retraining and operates fully zero-shot at inference time, making it compatible with a wide range of encoder architectures, including CNNs, ViTs, CLIP, and LLaVA-1.5.

后门检测零样本视觉编码器安全

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。