Abstract
Medical foundation models (FMs) often rely on "unpaired" image-text training to overcome the scarcity of high-quality clinical reports. This study reveals a critical security vulnerability in this paradigm. We introduce BadFM, a two-pronged attack framework that exploits the semantic matching mechanisms of models like MedCLIP. Our findings show that an attacker can achieve a 99% attack success rate (ASR) with only 0.05% poisoned data, while keeping the model's performance on clean data indistinguishable from a healthy model. This pilot study highlights a significant "security-flexibility trade-off" and calls for urgent research into specialized defenses for medical AI.
Introduction: The Security-Flexibility Trade-off
High-quality, paired medical data—where an image is precisely matched to its specific clinical report—is rare and expensive. To address this, state-of-the-art models like MedCLIP utilize "unpaired" training. This approach allows an image of a specific disease to be matched with any semantically related text description, effectively augmenting the dataset.
However, this flexibility introduces a severe security risk. Because the model relies on many-to-many semantic matches, it becomes hypersensitive to label discrepancies. If an attacker introduces even a small number of mismatched labels, the error propagates through the model's "semantic matrix." This study demonstrates that this training paradigm is uniquely susceptible to backdoor attacks, where a specific trigger causes the AI to misdiagnose a patient while appearing normal on clean data.
Methods: The BadFM Framework
The researchers developed BadFM, a framework consisting of two primary components:
- BadMatch: This targets the unpaired training mechanism during the fine-tuning phase. By flipping the labels of a tiny subset of data, it creates a "domino effect." Since one label affects an entire row in the semantic matching matrix, a minimal amount of poison can corrupt the entire relationship between images and text descriptions in a batch.
- BadDist (Bad-Distance): A novel optimization loss function designed to amplify the attack. It forces the model to maintain stable embeddings for clean data (ensuring "utility" and stealth) while "stretching" the embeddings of poisoned data toward a target class. This ensures the model confidently misclassifies when it detects the trigger.
The study evaluated both patch-based triggers (visible squares) and Fourier-based triggers (subtle frequency modifications).
Datasets and Experimental Setup
The attack was evaluated using three prominent chest radiology datasets:
- MIMIC-CXR: Used for pre-training and fine-tuning.
- COVIDX: Used for zero-shot classification and evaluating attack success in identifying COVID-19.
- RSNA: A benchmark for pneumonia detection used to test generalizability.
Key Results
- High Potency: On the COVIDX dataset, the combination of BadMatch and BadDist achieved a 99% Attack Success Rate (ASR) with only 0.05% poisoned data.
- Stealth and Utility: The proposed method significantly outperformed previous state-of-the-art self-supervised attacks (like BadEncoder) in maintaining high accuracy on clean data, making the backdoor extremely difficult to detect.
- Robustness: The attack remained effective across different architectures (ResNet vs. Vision Transformers) and varied batch sizes.
- Untargeted Vulnerability: Even without a specific target class, the BadDist method could degrade a model's accuracy from 55% to 13% (near random guessing) simply by activating the trigger.
Discussion and Conclusion
This pilot study identifies a "domino effect" in unpaired training: one poisoned sample corrupts the relationship between an image and every possible text description in a batch, making the attack orders of magnitude more efficient than in standard supervised learning. Furthermore, medical images often contain natural "noise" (markers, equipment artifacts) that can mask malicious triggers.
Current defenses, such as Fine-Pruning and PatchGuard, proved ineffective against BadFM because they do not account for how unpaired training distributes poison across the model's internal semantic map. These findings suggest an urgent need for new data validation protocols and certified defense mechanisms tailored specifically for the medical AI supply chain. While focused on MedCLIP, this study serves as a warning for the broader trend toward multimodal foundation models in healthcare.
Summary updated