SmoothGuard: Defending Multimodal Large Language Models with Noise Perturbation and Clustering Aggregation

Guangzhi Su, Shuchang Huang, Yutong Ke, Zhuohang Liu, Long Qian, Kaizhu HuangarXiv 2025 · DOI

Introduction

Multimodal Large Language Models (MLLMs) like LLaVA and Qwen-VL have demonstrated remarkable capabilities in processing visual and auditory information alongside text. However, these models remain vulnerable to adversarial attacks—specifically, carefully crafted "adversarial images" that bypass safety guardrails. SmoothGuard is a model-agnostic, "plug-and-play" defense framework designed to neutralize these threats during inference without requiring costly retraining.

The Adversarial Challenge

Adversarial actors can exploit the fragility of MLLMs by injecting subtle noise patterns into images. These patterns are imperceptible to humans but can trick a model into generating harmful content or ignoring its internal safety protocols. Existing defenses often rely on adversarial training, which is computationally expensive and difficult to scale across different model architectures. SmoothGuard addresses this by providing a lightweight defense that can be applied to any MLLM at the inference stage.

The SmoothGuard Framework

SmoothGuard operates on the principle of "defense-through-aggregation." The workflow is divided into three primary stages:

  1. Randomized Noise Injection: Upon receiving a continuous input (image or audio), the system generates $N$ perturbed versions by adding varying levels of Gaussian noise. This disrupts the brittle logic of adversarial signals while preserving the overall semantic content of the original input.
  2. Parallel Generation: The MLLM processes the original input and the $N$ noisy variants in parallel, producing a set of candidate text responses.
  3. Clustering-based Aggregation: To determine the final output, SmoothGuard employs a semantic clustering approach rather than simple token-level voting.
Overview of the SmoothGuard defense pipeline, illustrating noise injection, parallel LLM processing, and clustering-based aggregation.

Semantic Clustering Mechanism

The aggregation step is critical for handling complex, free-form sentences. Each generated response is converted into a high-dimensional vector using a RoBERTa-base encoder. SmoothGuard then applies $k$-means clustering (with $k=2$) to these vectors. This process separates the responses into a "majority cluster" (semantically consistent, benign outputs) and a "minority cluster" (adversarial outliers). The final answer is selected as the response closest to the centroid of the majority cluster.

Detailed view of the clustering-based aggregation using RoBERTa and k-means to isolate the correct semantic cluster.

Experimental Evaluation

The framework was evaluated using three key benchmarks: MM-SafetyBench (safety), POPE (object identification/hallucination), and LLaVA-Bench (conversational quality).

Key Results

  • Attack Mitigation: SmoothGuard significantly reduced the Average Attack Success Rate (ASR). For LLaVA-1.5-7B, the ASR dropped from 41.38% to 23.50%. For Qwen2.5-VL-7B, it fell from 3.45% to just 1.83%.
  • Utility Preservation: The defense maintains, and in some cases improves, model performance. On the POPE benchmark, Qwen saw a relative F1 score increase to approximately 104% compared to the baseline, suggesting that aggregation helps mitigate internal hallucinations.
  • Optimal Noise Parameters: Ablation studies indicate that a noise variance ($\sigma$) between 0.1 and 0.2 effectively disrupts attacks without compromising image recognizability.

Insights and Limitations

SmoothGuard leverages the observation that benign inputs produce semantically "tight" clusters, whereas adversarial perturbations result in scattered outliers. By using noise as a "low-pass filter," the framework breaks the mathematical logic of the attack.

However, the approach introduces computational overhead, as it requires $N$ parallel generations (typically $N=10$). Future work will focus on optimizing this inference cost and extending the framework to handle discrete text perturbations and broader audio-focused benchmarks.

Summary updated

BibTeX
@misc{su2025smoothguard,
  author = {Guangzhi Su and Shuchang Huang and Yutong Ke and Zhuohang Liu and Long Qian and Kaizhu Huang},
  title = {{SmoothGuard: Defending Multimodal Large Language Models with Noise Perturbation and Clustering Aggregation}},
  year = {2025},
  eprint = {2510.26830},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.26830},
}
Figure