Abstract
The rise of high-fidelity text-to-image diffusion models has introduced significant risks regarding the creation of synthetic medical images, or "medical deepfakes." While digital watermarking can track AI-generated content, traditional methods often introduce distortions that compromise diagnostic integrity. We present MedSign, a pathology-aware watermarking framework that adaptively embeds watermarks in non-essential regions of medical images. By leveraging internal cross-attention maps from the diffusion model, MedSign identifies critical pathological zones and protects them from watermark-induced noise. Experimental results on chest X-ray and fundus image datasets demonstrate that MedSign achieves superior image quality (PSNR of 39.71) and high robustness (95% bit accuracy) while maintaining clinical diagnostic accuracy, with a negligible 0.59% change in diagnostic confidence.
Introduction
As text-to-image diffusion models become capable of generating hyper-realistic medical images, such as chest X-rays and fundus photos, the potential for misuse—including insurance fraud and the falsification of medical records—grows. Digital watermarking is a standard safeguard for identifying AI-generated content; however, medical imaging presents a unique challenge: diagnostic integrity. Standard watermarking techniques apply signals uniformly across an image. In a clinical context, even minor distortions can obscure faint pathologies or mimic disease markers, leading to potential misdiagnosis. The challenge lies in embedding a robust, detectable signal without altering the pixels critical for clinical evaluation.
Methodology
MedSign integrates watermarking directly into the image synthesis process through a two-stage workflow.
1. Pre-training a Watermark Extractor
The framework first utilizes the HiDDeN architecture to train a neural network capable of detecting a $k$-bit message hidden within an image. This extractor is designed to be robust against common image augmentations, including cropping, rotation, and compression.
2. Pathology-Aware Fine-Tuning
Instead of a post-processing step, MedSign fine-tunes the Latent Diffusion Model’s (LDM) VAE decoder. The core innovation is the generation of a Pathology Localization Map, which identifies regions that must remain untouched by the watermark.
To create this map without manual labeling, the system employs:
- Cross-Attention Analysis: Extracting attention maps that indicate which pixels the model prioritizes when processing specific medical terms (e.g., "atelectasis") in the text prompt.
- Clustering-Driven Attention Selection (CAS): Using density-based clustering (DBSCAN) to filter noisy attention maps and select the most precise representations of pathology.
- Adaptive Attention Scaling (AAS): Refining map boundaries to ensure a sharp distinction between pathological and non-pathological regions.
A specialized loss function ($L_{pre}$) penalizes the model for modifying pixels within these identified zones, effectively forcing the watermark into medically irrelevant background areas.
Experimental Evaluation
The model was evaluated on two distinct medical imaging datasets: MIMIC-CXR-JPG (chest X-rays) and OIA-ODIR (fundus images for ocular disease detection). Evaluation metrics focused on visual quality (PSNR, SSIM), watermark robustness (bit accuracy), and diagnostic impact.
Key Results
MedSign demonstrates a significant improvement over existing baselines like Stable Signature:
- Superior Image Quality: MedSign achieved a PSNR of 39.71 on chest X-rays, compared to 33.24 for the baseline, indicating substantially lower visual distortion.
- High Robustness: Despite avoiding critical regions, the watermark remained highly detectable, achieving an average bit accuracy of 95% across various attacks, including 50% cropping and JPEG compression.
- Preserved Diagnostic Integrity: In tests across six pulmonary diseases, MedSign caused an average change in diagnostic confidence of only 0.59%. In contrast, non-medical watermarking methods caused diagnostic errors as high as 5.08%.
Conclusion
MedSign proves that diagnostic integrity and AI accountability are not mutually exclusive. By tapping into the internal attention mechanisms of diffusion models, the framework successfully protects critical pathological regions while maintaining robust watermark detection. Future work will focus on extending this approach to 3D modalities like CT or MRI scans and conducting human-in-the-loop validation with professional radiologists.
Summary updated