提升CLIP文本编码器抗干扰能力,让多模态模型更稳定
Robustness in Both Domains: CLIP Needs a Robust Text Encoder
- 提出LEAF方法,高效训练鲁棒文本编码器
- 文本域零样本攻击准确率显著提升,图像性能不受影响
- 适合需对抗噪声的生成与检索任务,代码模型已开源
对抗性输入攻击会导致CLIP嵌入发生显著偏移,影响集成CLIP的下游模型(如文生图生成模型或大视觉语言模型)的鲁棒性。尽管已有研究关注图像编码器的鲁棒性,但文本编码器的鲁棒性仍未被探索。本文填补这一空白,提出LEAF:一种可扩展至大型CLIP模型的高效文本领域对抗微调方法。实验显示,该方法显著提升了文本域的零样本对抗准确率,同时保持了由鲁棒图像编码器提供的视觉性能。结合文生图扩散模型后,可在对抗噪声下提升生成质量;在多模态检索任务中,优于标准CLIP模型的召回率。此外,鲁棒文本编码器能更好通过直接优化重构输入文本。代码与模型已在GitHub(https://github.com/LIONS-EPFL/LEAF)和Hugging Face(https://huggingface.co/LEAF-CLIP)开源。
原文摘要 · Abstract (English)
Adversarial input attacks can cause a significant shift of CLIP embeddings. This can affect the downstream robustness of models incorporating CLIP in the pipeline, such as text-to-image generative models or large vision language models. While some efforts have been done towards making the CLIP image encoders robust, the robustness of text encoders remains unexplored. In this work, we cover this gap in the literature. We propose LEAF: an efficient adversarial finetuning method for the text domain, with the ability to scale to large CLIP models. Our models significantly improve the zero-shot adversarial accuracy in the text domain, while maintaining the vision performance provided by robust image encoders. When combined with text-to-image diffusion models, we can improve the generation quality under adversarial noise. In multimodal retrieval tasks, LEAF improves the recall under adversarial noise over standard CLIP models. Finally, we show that robust text encoders facilitate better reconstruction of input text from its embedding via direct optimization. We open-source our code ( https://github.com/LIONS-EPFL/LEAF ) and models ( https://huggingface.co/LEAF-CLIP ).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。