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

Image-level Memorization Detection via Inversion-based Inference Perturbation

Yue Jiang, Haokun Lin, Yang Bai, Bo Peng, Zhili Liu, Yueming Lyu, Yong Yang, Xingzheng, Jing Dong

TL;DR

Researchers have developed a new framework called Inversion-based Inference Perturbation (IIP) to detect if a specific image was "memorized" by a text-to-image diffusion model. Unlike previous methods that require knowing the original text prompt, IIP works using only the image itself, identifying memorization by "stress-testing" the model's reconstruction process with optimized noise and random prompts.

What Problem Does This Paper Address?

Text-to-image diffusion models like Stable Diffusion are trained on billions of images, and sometimes they do more than just "learn concepts"—they memorize specific training samples. This poses significant copyright and privacy risks.

Comparison of prompt-level and image-level memorization detection.

Until now, most detection methods were prompt-level: they checked if a specific text string (like "a photo of a wooden cabin in a swamp") consistently produced a near-exact replica of a training image. However, in the real world, an artist or photographer might find a suspicious image and want to know, "Is my specific photo in this model's memory?" without knowing which of the millions of possible prompts might have triggered it. This paper tackles image-level memorization detection, a much harder "black-box" problem where the original metadata is missing.

Methods

The authors introduce the IIP (Inversion-based Inference Perturbation) framework. The core idea is that memorized images behave differently than "normal" images when you try to reconstruct them under pressure.

The Inversion-based Inference Perturbation (IIP) framework pipeline.
  1. Semantic Inversion: First, the researchers use unconditional DDIM inversion to turn the query image back into a "latent code" (a mathematical representation of the image's core features). They do this at smaller timesteps to capture the most essential semantic information while minimizing reconstruction errors.
  2. Optimized Perturbation: Standard reconstruction (sampling) usually uses a "null" prompt. IIP instead optimizes a random prompt embedding to be as "un-memorized" as possible. It does this by minimizing a metric called TCNP (Text-Conditional Noise Prediction), which measures how much a prompt influences the model's output.
  3. The "Stress Test": The model then tries to generate an image starting from the latent code using this optimized, "noisy" prompt.
  4. Detection Metrics: The framework looks for two specific "red flags" that appear only in memorized images:
  5. Lower Similarity: Memorized images are "brittle" under this specific type of perturbation; the reconstructed version looks significantly different from the original.
  6. Higher TCNP Magnitude: Even when the prompt is meaningless, the model’s internal noise predictions remain unusually high for memorized content, as if the model is "struggling" to reconcile the memorized data with the new, random prompt.

Datasets

The authors curated a comprehensive evaluation setup to simulate real-world scenarios:

  • Memorized Training Images: 152 images from the Stable Diffusion v1.4 training set known to be memorized (SSCD similarity > 0.7).
  • Non-memorized Training/Non-training Images: 1,200 images from LAION-mi used as a control group.
  • Generated Images: A massive set of 2K, 4K, and 8K images generated from both memorized and non-memorized prompts to test the detector's performance on model outputs.
  • Sources: Data was pulled from the SDv1.4 training set, LAION, COCO, and Lexica.art.

Key Insights and Ideas

  • The "Memorization Manifold": The most striking insight is that memorized images aren't just "stored" better; they occupy a different space in the model's logic. When you perturb the inference process, a normal image's reconstruction stays relatively stable, but a memorized image "breaks" because the model is trying to force it back into a specific, rigid memorized state that conflicts with the perturbation.
  • Prompt-Free Detection: The discovery that TCNP (originally a prompt-based metric) remains a powerful signal even when the prompt is replaced with optimized "meaningless" embeddings is a major step forward for privacy auditing.
  • Robustness to "Attacks": The authors found that even if an image is slightly altered (flipped, rotated, or color-shifted) before being checked, the IIP framework can still detect the underlying memorization.

Key Results

The IIP framework achieved state-of-the-art results across the board:

  • Near-Perfect Detection: On the task of distinguishing memorized training images from non-memorized ones, IIP achieved an AUC of 0.999 and a True Positive Rate of 98.7% at a very low (1%) False Positive Rate.
  • Superior to Baselines: It significantly outperformed existing membership inference attacks (like SecMI and PIA) and standard reconstruction methods (like DDIM Inversion or Inpainting), which often struggled to tell the difference between a well-learned concept and a memorized image.
  • Generalization: The method proved effective across different versions of Stable Diffusion (v1.4, v1.5, and v2.1), showing that the "signals" of memorization are consistent across model architectures.

Limitations and Future Work

  • Data Augmentation on Generated Images: While the system is very robust for training images, its performance drops slightly when detecting memorization in images that have been heavily augmented after being generated by the model.
  • Computational Cost: The process involves an optimization step for the prompt embedding, which is more computationally intensive than a simple forward pass.
  • Dememorization: The authors note that while they can detect memorization, the next logical step is "dememorization"—finding ways to mitigate or "unlearn" these specific images during or after training to protect user privacy.

Summary updated

BibTeX
@inproceedings{jiang2025image,
  author = {Yue Jiang and Haokun Lin and Yang Bai and Bo Peng and Zhili Liu and Yueming Lyu and Yong Yang and Xingzheng and Jing Dong},
  title = {{Image-level Memorization Detection via Inversion-based Inference Perturbation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=vwOq7twk7L},
}
Figure