NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SGM: Safety Glasses for Multimodal Large Language Models via Neuron-Level Detoxification

Hongbo Wang, MaungMaung AprilPyone, Isao EchizenarXiv 2025 · DOI

Introduction: The Need for Surgical Detoxification

Multimodal Large Language Models (MLLMs), such as LLaVA, have demonstrated remarkable capabilities in integrating visual and textual information. However, these models often inherit toxic, biased, and unsafe behaviors from the massive, weakly curated datasets used during pretraining. Traditional "detoxification" methods typically operate as black-box filters at the interface level—either by modifying system prompts or filtering final outputs.

These interface-level defenses face two critical challenges. First, they are vulnerable to jailbreaks, where adversarial triggers embedded in images can activate toxic concepts deep within the model's internal layers. Second, existing internal interventions often target entire layers or global directions, which can "lobotomize" the model, significantly degrading its reasoning and fluency.

The SGM framework acts as a 'Safety Glass' intervention, suppressing toxic neurons to transform harmful outputs into safe, reframed descriptions.

The authors of "SGM: Safety Glasses for MLLMs" propose a "scalpel" approach: a training-free, white-box defense that identifies and neutralizes specific "toxic expert neurons" without retraining the model or sacrificing its core intelligence.

The SGM Framework: A Three-Step Pipeline

SGM (Safety Glasses for MLLMs) functions as a "hot-pluggable" safety layer that can be applied during inference. The framework follows a systematic three-step process:

  1. Toxicity Activation Collection: The model is exposed to paired toxic and non-toxic samples. Peak activations are recorded in the post-fusion MLP layers, where visual and textual data are integrated.
  2. Toxic Neuron Identification: Using the AUROC (Area Under the Receiver Operating Characteristic) metric, the system identifies "toxic expert neurons"—those that fire significantly more for harmful content than for safe content. Research indicates these neurons are highly localized, primarily residing in the middle layers (Layers 10–25) of the model.
  3. Expertise-Weighted Suppression: Rather than binary deactivation, SGM applies a soft suppression coefficient ($\lambda$). Neurons with high "toxicity expertise" are dampened aggressively, while benign neurons remain largely unaffected.
The three-step SGM pipeline: (A) collecting activations from paired content, (B) identifying toxic expert neurons, and (C) applying expertise-weighted suppression during inference.

This "white-box" intervention requires access to internal weights but is "training-free," making it highly efficient and easily extensible to existing architectures.

Benchmarking Toxicity: MM-TOXIC-QA

To facilitate this neuron-level analysis, the researchers established MM-TOXIC-QA, a comprehensive framework containing 4,326 image-text samples. By consolidating images from MM-SafetyBench and BeaverTails-V, this dataset provides high-quality, paired toxic/non-toxic response annotations. This allows for precise identification of the neurons responsible for harmful outputs across 13 different safety scenarios, including illegal activity, hate speech, and physical harm.

Performance and Utility Preservation

The quantitative results demonstrate that SGM provides a robust defense without compromising model utility. On LLaVA-1.5-7B, SGM reduced the average harmful rate from 48.2% to 2.5%. Even under sophisticated adversarial attacks (e.g., "SD+OCR" where toxic text is hidden in images), SGM maintained high effectiveness, especially when combined with existing prompt-based defenses in a hybrid approach called $SGM^\star$.

Crucially, scores on the MM-VET benchmark remained nearly identical to the base model. This confirms that SGM successfully suppresses toxicity while preserving the model's multimodal reasoning and general intelligence. Unlike simple refusal filters that cause "over-refusal," SGM often enables the model to reframe its response, providing a safe but semantically relevant answer.

Conclusion and Future Directions

SGM represents a significant step toward more precise and robust safety mechanisms for MLLMs. By moving from global layer-wise interventions to targeted neuron-level suppression, it achieves a superior balance between safety and utility. Future work will explore extending this approach to different architectures, such as attention-based fusion modules, and testing its effectiveness against multi-lingual adversarial attacks.

Summary updated

BibTeX
@misc{wang2025sgm,
  author = {Hongbo Wang and MaungMaung AprilPyone and Isao Echizen},
  title = {{SGM: Safety Glasses for Multimodal Large Language Models via Neuron-Level Detoxification}},
  year = {2025},
  eprint = {2512.15052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.15052},
}
Figure