Reconstructing Training Images from Foundation Model Parameters in the Healthcare Domain: Privacy Risks and Defences

Athanasios Panagiotis Glykos, Yannis Kaltampanidis, Mykola Pechenizkiy, Hannah PinsonMemFM @ ICML 2026

TL;DR

Researchers investigated whether the parameters of fine-tuned medical foundation models could "leak" sensitive patient images. While they found that internal data representations (embeddings) can often be reconstructed from model weights—especially for X-rays—current techniques struggle to turn those representations back into recognizable medical images, and a simple switch to linear classification heads provides a robust defense.

What Problem Does This Paper Address?

In the era of "Foundation Models," healthcare institutions often take a massive pre-trained model (like a medical version of CLIP or ViT) and fine-tune it on their own private, sensitive datasets. A growing body of research in general computer vision has shown a startling privacy risk: an adversary with access only to the final model's parameters can sometimes reconstruct the exact images used during training.

However, medical images are fundamentally different from the "natural" images (like cats or cars) used in previous studies. Medical images are often less diverse in color and structure, and the critical information—like a tiny lesion or a specific tissue pattern—is highly localized. This paper asks: Is the privacy of patient data actually at risk when we share fine-tuned medical models, or does the unique nature of healthcare data protect it?

Methods

The authors evaluate a two-stage "white-box" attack:

  1. Embedding Reconstruction: Using the mathematical relationship between a model's gradients and its training data, the researchers attempt to recover the feature embeddings (the high-level numerical summaries) of the original training images from the weights of the classification head.
  2. Model Inversion: They then attempt to "invert" these reconstructed embeddings back into the pixel domain using optimization techniques (like Deep Image Prior) to see if they can produce a recognizable image.

The study is comprehensive, testing 16 different foundation models (including 12 medically specialized ones like BiomedCLIP and Rad-DINO) across seven datasets and three clinical domains.

Datasets

The study utilized seven datasets across three distinct medical imaging domains:

  • X-Ray: RSNA Pneumonia and Pneumonia MNIST.
  • Pathology: NCT-CRC-HE-100K, BreaKHis, and Path MNIST.
  • Ophthalmology: APTOS 2019 and Retina MNIST.

Importantly, these datasets were chosen to ensure they did not overlap with the original pre-training data of the foundation models.

Key Insights and Ideas

  • Vulnerability is Domain-Dependent: X-ray models were significantly more susceptible to embedding reconstruction than pathology or ophthalmology models. The authors suggest this might be due to the structural consistency of X-rays compared to the more complex, varied textures of pathology slides.
  • The "Inversion Bottleneck": Even when the researchers successfully reconstructed high-fidelity embeddings (with cosine similarities > 0.9), current inversion algorithms failed to turn them into recognizable medical images. While natural image reconstruction is often successful, medical images seem more resistant to current "un-projecting" techniques.
  • Non-linearity is the Leak: The attack relies on the complexity of the classification head. The study found that the more neurons in the hidden layer, the more "memorization" occurred, making the model more vulnerable.
  • Linear Probing as a "Future-Proof" Defense: Perhaps the most practical finding is that linear probing (using a simple linear layer without non-linear activations like ReLU) completely neutralized the embedding reconstruction attack. Crucially, this defense didn't significantly hurt classification accuracy.

Key Results

  • Reconstruction Success: For certain X-ray models (like BioViL-T and CheXzero), the attack could recover a significant number of embeddings with high cosine similarity (> 0.75).
  • Defense Efficacy: Switching from a non-linear MLP head to a linear head reduced the number of successful reconstructions to zero across all tested scenarios.
  • Image Quality: Quantitatively, the reconstructed medical images were poor. While the RETFound model (Ophthalmology) showed some visual similarity, most models yielded reconstructions with low Structural Similarity Index (SSIM) and Peak Signal-to-Noise Ratio (PSNR), suggesting the current privacy risk to actual patient pixels is low.

Limitations and Future Work

The authors are careful to note that "low risk" does not mean "no risk." The primary bottleneck is currently the inversion stage. As generative AI and model inversion techniques specifically tailored for medical imaging improve, the high-fidelity embeddings that can currently be leaked might eventually be decodable into clear images.

Additionally, this study focused on "head-only" fine-tuning where the backbone remains frozen. Future work is needed to determine if "full" fine-tuning—where every weight in a massive foundation model is updated—creates even larger privacy "holes" that are harder to plug with simple linear heads.

Summary updated

BibTeX
@inproceedings{glykos2026reconstructing,
  author = {Athanasios Panagiotis Glykos and Yannis Kaltampanidis and Mykola Pechenizkiy and Hannah Pinson},
  title = {{Reconstructing Training Images from Foundation Model Parameters in the Healthcare Domain: Privacy Risks and Defences}},
  booktitle = {MemFM @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=GadNmjrI9r},
}
Figure