The Forgotten Shield: Safety Grafting in Parameter-Space for Medical MLLMs

Jiale Zhao, Xing Mou, Jinlin Wu, Hongyuan Yu, Mingrui Sun, Yang Shi, Xuanwu Yin, Zhen Chen, Zhen Lei, Yaohua WangarXiv 2025 · arXiv

TL;DR

Medical Multimodal Large Language Models (Medical MLLMs) frequently lose their safety guardrails during domain-specific fine-tuning, leaving them highly vulnerable to adversarial jailbreak attacks. This paper introduces a training-free "Parameter-Space Intervention" framework that extracts, orthogonalizes, and surgically grafts safety knowledge back into the model layer-by-layer. The resulting models achieve near-perfect safety restoration with negligible impact on clinical accuracy, all without requiring expensive new safety training data.

What Problem Does This Paper Address?

Medical MLLMs are advancing at a breakneck pace, expanding their capabilities from simple text diagnostics to processing 3D radiology scans and assisting in surgical skill assessments. However, their safety protocols have not kept up.

The authors identify a critical vulnerability: domain-specific fine-tuning induces catastrophic forgetting of the base model's original safety alignment. Even when trained on entirely benign medical data, the model's internal safety guardrails degrade. This leaves specialized medical models highly susceptible to both general harms (e.g., instructions on building explosives) and medical-specific ethical violations (e.g., fabricating clinical trial data or generating fake medical histories for insurance fraud).

Furthermore, these models are exceptionally fragile against cross-modality jailbreak attacks like FigStep, where malicious instructions are hidden inside images (such as typographic text) rather than written in the text prompt.

Figure 1. The safety dilemma in current Medical MLLMs. Despite achieving remarkable performance on specialized medical tasks (top-left), SOTA models exhibit severe vulnerabilities in both general (top-right) and medical-specific (bottom) safety dimensions. Our empirical analysis, visualized in the central radar chart, reveals that medical fine-tuning frequently induces catastrophic forget- ting of the base model’s original safety alignment, particularly against cross-modality jailbreak attacks.

Methods

To restore safety without the massive computational and financial cost of collecting human-annotated medical safety data, the authors propose a training-free Parameter-Space Intervention (PSI) framework:

  1. Vector Extraction: They isolate a Safety Vector by calculating the parameter difference between the safe base model (e.g., Qwen2.5-VL) and an intentionally "unaligned" unsafe version. Similarly, they extract a Medical Performance Vector by taking the difference between the fine-tuned medical model (e.g., Lingshu) and the base model.
  2. Orthogonal Disentanglement: Simply merging these vectors can cause destructive interference, where safety updates degrade clinical performance. The authors apply Gram-Schmidt Orthogonalization to strip out any components of the safety vector that conflict with medical capabilities, ensuring independent control over both traits.
  3. Fine-grained Optimization via CMA-ES: Safety and performance features are not distributed evenly across a model's layers. Instead of applying a blanket global scaling factor, the authors assign independent safety and performance coefficients to each individual transformer layer. They utilize a gradient-free evolutionary algorithm, Covariance Matrix Adaptation Evolution Strategy (CMA-ES), to search this high-dimensional parameter space and discover the optimal trade-off on the Pareto frontier.
Overview of the Parameter-Space Intervention framework, showing vector extraction, orthogonalization, and layer-wise optimization.

Datasets

The framework was rigorously evaluated across three distinct dimensions:

  • Medical Performance: Evaluated via the MedEvalKit framework across eight authoritative datasets: MedQA (MCMLE & USMLE), PubMedQA, SuperGPQA, VQA-RAD, CMExam, and Medbullets (op4 & op5).
  • General Safety: HarmBench, CATQA, and HEx-PHI.
  • Medical-Specific Safety: MedSafetyBench, CARES, MedSentry, and 3MAD-Tiny-1K.
  • Adversarial Attack Vectors: Standard text prompts alongside multimodal jailbreaks, including FigStep (typographic visual prompts) and QR (Query-Relevant text-to-image attacks).

Key Insights and Ideas

  • Domain Adaptation is Not Safety-Neutral: Fine-tuning a model on specialized, benign domain knowledge inherently compromises its safety alignment. Safety must be actively maintained during downstream adaptation.
  • The Multimodal Blindspot: Text-based safety filters are easily bypassed when malicious instructions are presented visually. Medical MLLMs natively processing images require robust multimodal defense mechanisms.
  • Layer-Wise Granularity Matters: Coarse, model-wide parameter merging fails to patch specific vulnerabilities. Because safety representations are non-uniformly distributed across network depths, layer-specific scaling enables precise suppression of vulnerability patterns.
  • Orthogonalization Eliminates Interference: Forcing the safety vector to be mathematically orthogonal to the medical performance vector allows safety guardrails to be dialed up significantly without dragging down clinical accuracy.

Key Results

The proposed method achieves an optimal balance, vastly outperforming baseline merging techniques like RESTA (which severely degrades medical accuracy) and standard ModelMerge (which fails to secure the model):

  • Robust Safety Restoration: For the Lingshu-7B model, the safety score under the challenging HarmBench-FigStep visual jailbreak attack plummeted originally to 0.2375. The authors' method successfully restored it to 0.9675. Similarly, HuatuoGPT-Vision-7B's safety score on HarmBench-Direct jumped from 0.2950 to 0.8950 (a 203% relative increase).
  • Preservation of Clinical Competency: This massive safety injection occurred with negligible impact on core medical tasks. For instance, Lingshu-7B's accuracy on MedQA USMLE only saw a minor relative drop of 2.0% (from 0.6347 to 0.6218), while actually maintaining or slightly improving performance on benchmarks like PubMedQA.
Table 1. Comprehensive quantitative comparison of our parameter-space re-alignment framework (Ours) against the original Med- ical MLLMs (Original) and two baseline re-alignment methods, ModelMerge and Resta . The evaluation spans three categories: General Safety, Medical-Specific Safety, and Medical Performance. Safety metrics are reported as Safety Score (1-ASR) , and medical performance is reported as Accuracy (ACC). Higher scores are better for all metrics.

Limitations and Future Work

  • Scalability: The experiments were restricted to 7B-parameter models. The computational cost of running a CMA-ES search on significantly larger foundation models (e.g., 70B+) remains to be validated.
  • Dependency on Un-alignment: Deriving the safety vector currently relies on an explicit "un-alignment" step to create an unsafe model variant. Future work should explore more efficient ways to isolate safety-critical subspaces directly.
  • Broader Evaluation Scope: The study focused narrowly on the safety-vs-performance trade-off. The impact of this parameter intervention on other vital model properties—such as demographic fairness, calibration, or general-purpose reasoning outside of medicine—remains an open question.

Summary updated

Abstract

Medical Multimodal Large Language Models (Medical MLLMs) have achieved remarkable progress in specialized medical tasks; however, research into their safety has lagged, posing potential risks for real-world deployment. In this paper, we first establish a multidimensional evaluation framework to systematically benchmark the safety of current SOTA Medical MLLMs. Our empirical analysis reveals pervasive vulnerabilities across both general and medical-specific safety dimensions in existing models, particularly highlighting their fragility against cross-modality jailbreak attacks. Furthermore, we find that the medical fine-tuning process frequently induces catastrophic forgetting of the model's original safety alignment. To address this challenge, we propose a novel "Parameter-Space Intervention" approach for efficient safety re-alignment. This method extracts intrinsic safety knowledge representations from original base models and concurrently injects them into the target model during the construction of medical capabilities. Additionally, we design a fine-grained parameter search algorithm to achieve an optimal trade-off between safety and medical performance. Experimental results demonstrate that our approach significantly bolsters the safety guardrails of Medical MLLMs without relying on additional domain-specific safety data, while minimizing degradation to core medical performance.
BibTeX
@misc{zhao2025forgotten,
  author = {Jiale Zhao and Xing Mou and Jinlin Wu and Hongyuan Yu and Mingrui Sun and Yang Shi and Xuanwu Yin and Zhen Chen and Zhen Lei and Yaohua Wang},
  title = {{The Forgotten Shield: Safety Grafting in Parameter-Space for Medical MLLMs}},
  year = {2025},
  eprint = {2601.04199},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.04199},
}
Figure