arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.10476cs.CVcs.LG
收藏

近似零空间增强微调用于鲁棒视觉Transformer

Approximate Nullspace Augmented Finetuning for Robust Vision Transformers

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Sorted Technologies;University of California, San Diego(加利福尼亚大学圣迭戈分校)

Haoyang Liu, Aditya Singh, Yijiang Li, Haohan Wang

AI总结:

提出一种基于近似零空间噪声增强的微调方法,提升视觉Transformer对对抗和自然扰动的鲁棒性。

摘要:

增强深度学习模型的鲁棒性,特别是在视觉Transformer(ViTs)领域,对于其实际部署至关重要。在这项工作中,我们提出了一种微调方法,受线性代数中零空间概念的启发,以增强视觉Transformer的鲁棒性。我们的研究围绕视觉Transformer是否能表现出类似于线性映射中零空间属性的输入变化弹性,这意味着从该零空间采样的扰动添加到输入时不会影响模型的输出。我们从观察出发,许多现有的ViT满足这一属性,因为它们的补丁嵌入层具有非平凡的零空间。然后,我们将零空间的概念扩展到非线性设置,并证明通过优化可以合成ViT编码器块的近似零空间元素。最后,我们提出了一种ViT的微调策略,其中我们用合成的近似零空间噪声增强训练数据。我们发现,我们的微调方法显著提高了模型对对抗性和自然图像扰动的鲁棒性。代码可在:https://github.com/Liu-Hy/ns-vit 获取。

英文摘要:

Enhancing the robustness of deep learning models, particularly in the realm of vision transformers (ViTs), is crucial for their real-world deployment. In this work, we provide a finetuning approach to enhance the robustness of vision transformers inspired by the concept of nullspace from linear algebra. Our investigation centers on whether a vision transformer can exhibit resilience to input variations akin to the nullspace property in linear mappings, which would imply that perturbations sampled from this nullspace do not influence the model's output when added to the input. We start from the observation that many existing ViTs satisfy this property because their patch embedding layer has a non-trivial nullspace. Then, we extend the notion of nullspace to nonlinear settings and demonstrate that it is possible to synthesize approximate nullspace elements for ViT's encoder blocks through optimization. Finally, we propose a finetuning strategy for ViTs wherein we augment the training data with synthesized approximate nullspace noise. We find that our finetuning approach significantly improves the models' robustness to both adversarial and natural image perturbations.\footnote{Code is available at: https://github.com/Liu-Hy/ns-vit.

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

↑