VLMShield: Efficient and Robust Defense of Vision-Language Models against Malicious Prompts

arXiv cs.LG / 4/9/2026

📰 NewsIdeas & Deep AnalysisTools & Practical UsageModels & Research

Key Points

  • The paper announces VLMShield, a lightweight defense mechanism aimed at protecting vision-language models (VLMs) from malicious prompt attacks that exploit weakened alignment during visual-text integration.
  • It introduces the Multimodal Aggregated Feature Extraction (MAFE) framework to enable CLIP to process long text and produce unified multimodal representations for downstream safety detection.
  • The authors analyze MAFE features and find distinct distributional patterns that differentiate benign prompts from malicious multimodal attacks.
  • VLMShield is designed as a plug-and-play safety detector, with experiments reporting improved robustness, efficiency, and maintained utility across multiple evaluation dimensions.
  • The work provides an implementation via a public GitHub repository, supporting adoption and replication for more secure multimodal AI deployment.

Abstract

Vision-Language Models (VLMs) face significant safety vulnerabilities from malicious prompt attacks due to weakened alignment during visual integration. Existing defenses suffer from efficiency and robustness. To address these challenges, we first propose the Multimodal Aggregated Feature Extraction (MAFE) framework that enables CLIP to handle long text and fuse multimodal information into unified representations. Through empirical analysis of MAFE-extracted features, we discover distinct distributional patterns between benign and malicious prompts. Building upon this finding, we develop VLMShield, a lightweight safety detector that efficiently identifies multimodal malicious attacks as a plug-and-play solution. Extensive experiments demonstrate superior performance across multiple dimensions, including robustness, efficiency, and utility. Through our work, we hope to pave the way for more secure multimodal AI deployment. Code is available at [this https URL](https://github.com/pgqihere/VLMShield).