LeakyCLIP: Extracting Training Data from CLIP
summary
The gist
Understanding the memorization and privacy leakage risks in Contrastive Language–Image Pretraining (CLIP) is critical for ensuring the security of multimodal models.<ref:2508.00756#pg1…
In short
LeakyCLIP is a novel attack framework designed to reconstruct high-quality images from CLIP embeddings for data extraction. It uses three stages: adversarial fine-tuning for stable features, linear transformation to align text and image embeddings, and Stable Diffusion refinement. Results show over 258% SSIM improvement over baselines and reveal that training data membership can be inferred even from low-fidelity reconstructions.
Key concepts
- Adversarial Fine-tuning (AFT)
- This stage uses adversarial fine-tuning to smooth the optimization landscape of CLIP's image encoder. By forcing perturbed feature vectors to remain close to original features, it creates a more robust and stable feature space, which significantly reduces gradient noise during the inversion process.
- Linear Transformation Based Embedding Alignment (EA)
- This technique involves learning a linear matrix M that maps text embeddings into pseudo-image embeddings. This alignment learns how to project the robust text features into a space that better approximates true image representations, improving semantic matching between what is described in the text and the visual content.
- Stable Diffusion Based Refinement (DR)
- This final stage uses Stable Diffusion to refine initial reconstructions. It applies a reverse diffusion process using Gaussian noise to polish the images. This step enhances local visual fidelity while ensuring the final output remains highly similar to the image generated during the alignment phase.
Terminology used across episodes
This episode discusses
- LeakyCLIP: Extracting Training Data from CLIP · Paper Radio
- SIDE: Surrogate Conditional Data Extraction from Diffusion Models
- Privacy Leakage on DNNs: A Survey of Model Inversion Attacks and Defenses · Paper Radio
- On Memorization in Diffusion Models
- D'ej`a Vu Memorization in Vision-Language Models
- Challenges and Applications of Large Language Models
- What do we learn from inverting CLIP models?
- Safety at Scale: A Comprehensive Survey of Large Model and Agent Safety
- Towards Deep Learning Models Resistant to Adversarial Attacks
- SDEdit: Guided Image Synthesis and Editing with Stochastic Differential Equations
- GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models
- Captured by Captions: On Memorization and its Mitigation in CLIP Models
- Memorization in Self-Supervised Learning Improves Downstream Generalization
- Memorization in deep learning: A survey
- Demystifying CLIP Data
- TwinDiffusion: Enhancing Coherence and Efficiency in Panoramic Image Generation with Diffusion Models
The paper
LeakyCLIP: Extracting Training Data from CLIP · Read on arXiv
Fudan University · Chinese Academy of Sciences
Understanding the memorization and privacy leakage risks in Contrastive Language--Image Pretraining (CLIP) is critical for ensuring the security of multimodal models. Recent studies have demonstrated the feasibility of extracting sensitive training examples from diffusion models, with conditional diffusion models exhibiting a stronger tendency to memorize and leak information. In this work, we investigate data memorization and extraction risks in CLIP through the lens of CLIP inversion, a process that aims to reconstruct training images from text prompts. To this end, we introduce LeakyCLIP, a novel attack framework designed to achieve high-quality, semantically accurate image reconstruction from CLIP embeddings. We identify three key challenges in CLIP inversion: 1) non-robust features, 2) limited visual semantics in text embeddings, and 3) low reconstruction fidelity. To address these challenges, LeakyCLIP employs 1) adversarial fine-tuning to enhance optimization smoothness, 2) linear transformation-based embedding alignment, and 3) Stable Diffusion-based refinement to improve fidelity. Empirical results demonstrate the superiority of LeakyCLIP, achieving over 258% improvement in Structural Similarity Index Measure (SSIM) for ViT-B-16 compared to baseline methods on LAION-2B subset. Furthermore, we uncover a pervasive leakage risk, showing that training data membership can even be successfully inferred from the metrics of low-fidelity reconstructions. Our work introduces a practical method for CLIP inversion while offering novel insights into the nature and scope of privacy risks in multimodal models. The code is in the https://github.com/dongdongunique/LeakyCLIP
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: I'm Nadia.
Elias: And I'm Elias, here with Priya.
Nadia: We're looking at the paper: "LeakyCLIP: Extracting Training Data from CLIP".
Title and authors: Nadia: So we're talking about this paper called LeakyCLIP: Extracting Training Data from CLIP. It sounds pretty straightforward, but what does that mean for us when we're working with these multimodal models?
Elias: It means they’ve designed a framework to pull sensitive training data out of the CLIP model by trying to reconstruct the original image from just the text prompt. The authors are focused on the risks of memorization and privacy leakage in these systems.
Priya: What I find interesting is that they aren't just looking at perfect reconstructions, but they’re looking at how well we can infer if an image was even in the training set, even from a low-quality picture.
Nadia: Exactly. They identified three main hurdles in CLIP inversion: first, the features themselves aren't robust enough to be reliably used; second, the text embeddings don't capture enough visual detail; and third, they lack those necessary low-level features when you try to reconstruct the image.
Elias: To tackle that first problem of non-robust features, they use adversarial fine-tuning. They adversarially fine-tune the image encoder, which they call fI, using a duplicated image encoder called forg whose parameters are frozen during this part three <ref:2508.00756#pg1>.
Nadia: So what's the practical effect of that for someone trying to exploit this? It’s about making the inversion process much smoother so you don't get stuck in noisy optimization landscapes.
Priya: Smoother, sure. But then they move to the second challenge, which is limited visual semantics in text embeddings. They solve that by introducing an embedding space alignment technique that learns a linear transformation matrix M one <ref:2508.00756#pg1>.
Elias: That matrix M maps the text embedding UT to a pseudo-image embedding UT M, which they claim helps align the text and image representations better in practice, leading to higher quality reconstructions.
The paper's summary: Nadia: So, putting that together, LeakyCLIP is a three-stage attack framework for extracting training data from CLIP models. It starts with adversarial fine-tuning to smooth things out, then embedding alignment to get a better mapping between text and image embeddings, and finally diffusion refinement to polish the output.
Elias: The final step involves using Stable Diffusion to refine the reconstructed images by adding noise and running a reverse diffusion process three <ref:2508.00756#pg1>. They say this forces the model only to add low-level details like textures and sharp edges, without leaking sensitive content into that final reconstruction.
Priya: What I’m thinking is that this whole process isn't just about getting a high-fidelity picture. The paper shows that privacy leakage extends way beyond those high-fidelity results.
Nadia: Right? Even for low-quality reconstructions, the evaluation metrics can still reliably tell you whether an image was in the training set, which suggests a much more pervasive threat than just looking at perfect images.
Elias: That’s a crucial finding because it means we don't have to wait for perfect outputs to worry about leakage; poor results are still informative.
Priya: It really shifts the focus from just checking the final image quality to understanding the metrics themselves, which is what I spend most of my time looking at before I trust any claimed result.
The paper's improvements: Nadia: So, when we look at what they actually achieved empirically, they’re showing pretty strong results for ViT-B-sixteen. They claim over a two fifty eight percent improvement in the Structural Similarity Index Measure, or SSIM, compared to baseline methods on the LAION-2B subset one <ref:2508.00756#pg1>.
Elias: That improvement is significant because it shows their method gets reconstructions that are highly similar to the originals. And step three, using diffusion refinement, ensures that this refined image remains highly similar to the image generated in the alignment stage two <ref:2508.00756#pg1>.
Priya: I’m curious about how robust those results are. They claim this system can reliably infer training data membership even from poor reconstructions, which is a big claim given how much detail they are trying to extract.
Nadia: That's what makes it concerning for deployment scenarios, especially when we think about enterprise data or user uploads where these models get adapted further two <ref:2508.00756#pg1>. The paper notes that these risks become more consequential in those fine-tuning stages.
Elias: Theoretically, the analysis characterizes how the properties of both the image encoder and the caption length jointly influence whether an inversion is possible one <ref:2508.00756#pg1>. They prove that reconstruction quality depends on both a quantity called M, which is related to the upper Lipschitz constant, and a quantity called m, which is related to the lower Lipschitz constant.
Conclusion: Nadia: So, wrapping up this discussion on LeakyCLIP: it’s introduced as an effective attack for extracting training data from CLIP models using that three-part adversarial fine-tuning, embedding alignment, and diffusion refinement pipeline.
Elias: The core implication is that data leakage is a practical and widespread vulnerability in CLIP systems. They show that privacy leakage extends well beyond high-fidelity reconstructions two <ref:2508.00756#pg1>.
Priya: It highlights the need for more robust defenses in both the training and deployment of these models because this method shows data leakage can be inferred even from poor reconstructions.
Nadia: So, we’re looking at a system that can reliably infer training data membership even from low-quality reconstructions. The paper confirms this is a practical threat that demands urgent attention for those using CLIP models.
Elias: To summarize, LeakyCLIP provides a novel and effective attack for extracting training data from CLIP models one <ref:2508.00756#pg1,extracting training data from CLIP>. It shows how easily sensitive information can be extracted through this inversion process.
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04