AdvLoRA: Adversarial Low-Rank Adaptation of Vision-Language Models

Yuheng Ji, Yue Liu, Zhicheng Zhang, Zhao Zhang, Yuting Zhao, Gang Zhou, Xingwei Zhang, Xinwang Liu, Xiaolong Zheng · OpenReview

Abstract

Vision-Language Models (VLMs) are a significant technique for Artificial General Intelligence (AGI). With the fast growth of AGI, the security problem become one of the most important challenges for VLMs. In this paper, through extensive experiments, we demonstrate the vulnerability of the conventional adaptation methods for VLMs, which may bring significant security risks. In addition, as the size of the VLMs increases, performing conventional adversarial adaptation techniques on VLMs results in high computational costs. To solve these problems, we propose a parameter-efficient Adversarial adaptation method named AdvLoRA by Low-Rank Adaptation. At first, we investigate and reveal the intrinsic low-rank property during the adversarial adaptation for VLMs. Different from LoRA, we improve the efficiency and robustness of adversarial adaptation by designing a novel reparameterizing method based on parameter clustering and parameter alignment. In addition, an adaptive parameter update strategy is proposed to further improve the robustness. By these settings, our proposed AdvLoRA alleviates the model security and high resource waste problems. Extensive experiments demonstrate the effectiveness and efficiency of the AdvLoRA.

Introduction: The Vulnerability of VLMs

Vision-Language Models (VLMs) like BLIP or CLIP serve as the backbone for diverse AI applications, ranging from medical diagnostics to autonomous navigation. Despite their power, these models are highly susceptible to adversarial attacks—subtle, human-imperceptible perturbations added to visual inputs that cause the model to fail.

The standard defense mechanism, Adversarial Training (AT), involves retraining the model on these adversarial examples. However, the sheer scale of modern VLMs makes Full Fine-Tuning (FFT) computationally prohibitive. While Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA offer a solution to the resource problem, they often fail to provide sufficient robustness against sophisticated attacks.

Vulnerability of existing adaptation methods: Conventional techniques like Full Fine-Tuning (FFT) and standard LoRA suffer significant performance degradation when exposed to attacked data.

Methodology: AdvLoRA

AdvLoRA addresses these challenges by building upon the Low-Rank Adaptation (LoRA) framework with three specific enhancements designed for adversarial robustness:

  1. Clustering-based Reparameterization: Unlike standard LoRA, which initializes low-rank matrices randomly, AdvLoRA uses K-means clustering on the pre-trained weight matrices ($W_0$). By treating the rank $k$ as the number of cluster centers, the adapters are initialized with a "warm-up" state that facilitates faster and more robust convergence.
  2. Parameter Alignment: To preserve the model's pre-trained knowledge, a constraint is introduced to align the product of the adapter matrices ($AB$) with the original parameter distribution of $W_0$.
  3. Adaptive Parameter Update: A tunable scalar, $\alpha$, is employed to dynamically balance the contribution of the new robust weights against the original pre-trained weights during the adaptation process.

Key Results and Discussion

The effectiveness of AdvLoRA was evaluated across major benchmarks, including MSCOCO and Flickr30K for image-text retrieval, and MSR-VTT and DiDeMo for video-text retrieval.

Performance vs. Efficiency: AdvLoRA achieves higher recall on both MSCOCO and MSR-VTT datasets compared to full fine-tuning and other PEFT methods, while maintaining a low parameter count (2.8M).

AdvLoRA consistently outperformed both FFT and existing PEFT baselines:

  • Superior Defense: On MSCOCO, AdvLoRA surpassed other PEFT methods by 12.17% and even exceeded Full Fine-Tuning performance by 2.47%, despite updating roughly 100x fewer parameters.
  • Video Robustness: On the MSR-VTT dataset, AdvLoRA achieved a 39.16% improvement in adversarial robustness over baseline methods.
  • Efficiency and Convergence: AdvLoRA maintains the low memory footprint of standard LoRA. Furthermore, the clustering-based initialization leads to significantly lower training loss and more stable convergence compared to random initialization.

Conclusion and Future Work

AdvLoRA demonstrates that adversarial adaptation in VLMs possesses an intrinsic low-rank property. By strategically updating a small subset of parameters, models can achieve high levels of robustness without the massive overhead of full retraining.

Future research directions include addressing the "offline" computational overhead of the clustering step and extending these defense mechanisms to language-based adversarial attacks, such as prompt injections. Additionally, testing the scalability of AdvLoRA on ultra-large-scale models remains a priority for ensuring the security of next-generation AGI.

Summary updated

BibTeX
@misc{ji2024advlora,
  author = {Yuheng Ji and Yue Liu and Zhicheng Zhang and Zhao Zhang and Yuting Zhao and Gang Zhou and Xingwei Zhang and Xinwang Liu and Xiaolong Zheng},
  title = {{AdvLoRA: Adversarial Low-Rank Adaptation of Vision-Language Models}},
  year = {2024},
  eprint = {2404.13425},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.13425},
}
Figure