NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Finding DoRI: Discovery of Retained Images in Diffusion Models

Antoni Kowalczuk, Dominik Hintersdorf, Lukas Struppek, Kristian Kersting, Adam Dziedzic, Franziska Boenisch

TL;DR

State-of-the-art methods for preventing text-to-image diffusion models from replicating copyrighted or private training images rely on localized weight pruning, but this paper reveals that such defenses merely hide the data rather than deleting it. By introducing DoRI (Discovery of Retained Images), the authors demonstrate that adversarial text embeddings can easily bypass pruning defenses to reconstruct memorized images. To address this vulnerability, they propose a global adversarial fine-tuning method that permanently removes memorized content while preserving overall model utility.

What Problem Does This Paper Address?

When text-to-image diffusion models (DMs) are trained on massive datasets, they occasionally memorize training samples verbatim. This creates significant risks for privacy leaks and copyright infringement during inference.

To fix this without expensive retraining, recent techniques (like NeMo and Wanda) attempt to locate and prune the specific weights or neurons responsible for triggering data replication. However, these methods operate under a fundamental assumption: that memorization is localized to specific prompt-to-weight pathways. This paper challenges that assumption, asking whether pruning actually erases the data or simply conceals it behind a broken doorway.

Pruning-based methods successfully block the original prompt (2), but DoRI's adversarial embeddings find alternative denoising paths to recover the memorized image (3).

Methods

The authors introduce two core contributions:

  1. DoRI (Discovery of Retained Images): An evaluation framework that bypasses natural-language prompt constraints. Instead of typing text prompts, DoRI uses unconstrained continuous optimization directly in the text embedding space. It iteratively perturbs text embeddings to minimize standard diffusion loss against a target memorized image. If an image can be recovered in just a few optimization steps, it proves the model still retains the data internally.
  2. Adversarial Fine-Tuning: To permanently erase distributed memorization, the authors abandon the locality assumption and apply a global defense. During fine-tuning, the model is exposed to a mix of clean data and dynamically generated DoRI adversarial embeddings. Crucially, they use surrogate images (stylistically similar images generated by a mitigated model that lack exact pixel-level replication) to guide the model away from verbatim copying while preserving its ability to understand the underlying concepts.

Datasets

The experiments were conducted using:

  • Stable Diffusion v1.4 & v2.0: The primary open-weight text-to-image models evaluated.
  • LAION-5B: The source dataset from which a benchmark of 500 verified memorized prompts (representing both verbatim and template memorization) was extracted based on prior literature.
  • COCO2014: Used to sample non-memorized control prompts to validate that DoRI specifically exploits memorization rather than forcing the model to generate arbitrary images.

Key Insights and Ideas

  • The Illusion of Locality: Weight pruning doesn't delete images; it just breaks the direct highway from the original prompt to the image. DoRI proves that alternative "backroads" in the embedding space still lead to the exact same memorized content.
  • Triggers are Ubiquitous: Adversarial triggers are widely and uniformly scattered across the text embedding space. Even when initialized from random Gaussian noise, optimization quickly converges on an embedding that extracts the memorized image.
  • Divergent Internal Activations: Different adversarial embeddings that yield the exact same replicated image produce completely different internal model activations. This explains why activation-based pruning fails—it only catches one specific pattern of network activity.
  • Inconsistent Weight Selection: Different pruning algorithms select entirely different subsets of weights to prune for the same image, further confirming that memorization is a distributed property of the entire network.
Figure 3. Data replication triggers are widely and uniformly scattered in the text embedding space.

Key Results

  • Pruning is Fragile: While NeMo and Wanda pruning drop the replication rate to near zero for standard prompts, they fail against DoRI. With just 50 optimization steps, DoRI achieves a Memorization Rate (MR) of 0.99 against NeMo and 0.72 against Wanda.
  • Robust Mitigation: The proposed adversarial fine-tuning method successfully resists DoRI attacks, dropping the Memorization Rate down to 0.02 for Stable Diffusion v1.4 and 0.06 for Stable Diffusion v2.0.
  • Utility Preservation: Aggressive pruning to force data removal severely degrades the DM's generation capabilities (e.g., Wanda with 10% sparsity spikes the FID score to 37.34). In contrast, the authors' adversarial fine-tuning method maintains model utility, even slightly improving the baseline FID score from 14.44 to 13.61.

Limitations and Future Work

  • Model Scope: The study focuses primarily on Stable Diffusion v1.4 and v2.0 because they are currently the only models with a publicly available, comprehensively documented set of verified memorized prompts.
  • Computational Overhead: Generating adversarial inputs and surrogate samples dynamically during fine-tuning is computationally heavier than simple one-shot weight pruning.
  • Future Directions: The authors emphasize that future memorization defenses must be evaluated against diverse, optimized replication triggers rather than just the original training captions. A key next step is developing more computationally efficient global mitigation strategies that retain this robustness.

Summary updated

BibTeX
@inproceedings{kowalczuk2026finding,
  author = {Antoni Kowalczuk and Dominik Hintersdorf and Lukas Struppek and Kristian Kersting and Adam Dziedzic and Franziska Boenisch},
  title = {{Finding DoRI: Discovery of Retained Images in Diffusion Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=F3uCTULtDZ},
}
Figure