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

SolidMark: Evaluating Image Memorization in Generative Models

Nicky Kriplani, Minh Pham, Gowthami Somepalli, Chinmay Hegde, Niv Cohen

TL;DR

SolidMark is a novel, per-image evaluation framework designed to precisely quantify pixel-level memorization in generative diffusion models. By augmenting training images with a unique, randomized grayscale border that acts as a scalar "key," researchers can later query the model to outpaint the border and measure its recall accuracy. The framework reveals that existing inference-time mitigation techniques are far less effective at preventing pixel-level memorization than previously assumed.

What Problem Does This Paper Address?

Diffusion models are incredibly powerful, but they suffer from a major vulnerability: they can memorize and regurgitate exact training images at inference time, raising severe copyright and privacy concerns.

To solve this, the community needs reliable metrics to quantify memorization. However, current evaluation methods fall short:

  1. Monochromatic Bias: Standard pixel-wise distance metrics (like $\ell_2$ distance) frequently flag simple, monochromatic images (e.g., a bird in a blue sky) as "memorized" false positives simply because they are easy to match.
  2. Dataset Dependency: Perceptual embedding metrics (like SSCD) are tailored toward semantic or reconstructive similarity rather than exact pixel replication, and their effectiveness varies wildly across different datasets.
  3. Lack of Per-Image Resolution: Standard metrics rely on aggregate scoring functions (like the 95th percentile of similarities across thousands of generations), making it nearly impossible to determine if a specific, individual image has been memorized.

Methods

The authors introduce SolidMark, a framework that treats memorization tracking similarly to a "needle-in-a-haystack" text evaluation but adapted for images.

Figure 1: An overview of SOLIDMARK. We begin by augmenting training images with random scalar keys in the form of grayscale borders. Next, we inject these keys into the model by training it on these augmented images. To query for a key, we ask the model to outpaint a training image’s border using the training caption as the text prompt. We retrieve its prediction at the key by averaging the outpainted border. Finally, we report the distance between the predicted key and the true value.
  • Key Injection: During training or finetuning, every image is augmented with a thin grayscale border. The intensity of this border is a completely random scalar value between 0 and 1, acting as a unique "key" unrelated to the image content.
  • Querying via Outpainting: At evaluation time, the model is given the inner training image and its caption, and prompted to perform an outpainting task—specifically filling in only the missing border.
  • Evaluation: The average intensity of the generated border (the predicted key) is compared against the true key. If the absolute distance ($\ell_{SM}$) is below a strict threshold ($\delta$), the image is classified as eidetically memorized. Because Latent Diffusion Models (LDMs) operate in a latent space, the authors also adapted the standard RePaint inpainting algorithm to decode, re-mask, and re-encode latents efficiently.

Datasets

The authors validated SolidMark across several distinct setups:

  • CIFAR-10: Used to demonstrate the flaws and monochromatic biases of traditional $\ell_2$ metrics.
  • STL-10: Utilized for ablation studies comparing border patterns against centered patterns.
  • CelebA: Used to validate SolidMark's effectiveness in unconditional generative models.
  • LAION-5K & LAION-200K: Subsets of the massive LAION datasets used to finetune Stable Diffusion 2.1, evaluate data duplication effects, and pretrain a foundation model injected with SolidMark.

Key Insights and Ideas

  • Percentile Blindness: The paper highlights how standard aggregate metrics like the 95th percentile can completely mask fine-grained changes in a model's memorization behavior. If a mitigation technique successfully reduces extreme memorization in the very far tail (e.g., the 96th percentile and beyond), a 95th percentile metric will falsely report zero improvement.
Figure 3: 95th percentile scoring fails to capture fine-grained reductions in memorization. The above graphs demonstrate how a 95th percentile metric can fail to report successful memorization reduction. (Top) A distribution showing the density (vertical axis) of different similarity values (horizontal axis) in a model’s baseline results. (Bottom) The memorization-reduced evaluation, where the 95th percentile did not change at all despite clear memorization reductions shown in the 96th percentile.
  • Pixel-Exact Sensitivity: SolidMark truly measures pixel-level rather than semantic memorization. When the authors applied tiny, non-semantic perturbations to the query images—such as a 1-degree rotation, a minor crop, or a slight Gaussian blur—the model's ability to recall the exact border intensity plummeted.
  • The Illusion of Mitigation: When re-evaluating popular inference-time mitigation techniques (like adding Gaussian noise to text embeddings), SolidMark showed virtually no reduction in pixel-level memorization. This strongly implies that reconstructive memorization relies heavily on text prompts, whereas exact pixel-level memorization is driven predominantly by visual cues within the image itself.

Key Results

  • Traditional Metric Flaws: The authors proved that unpatched $\ell_2$ metrics consistently select blurry, monochromatic images as top memorization candidates, even when they contain no unique features from the training set.
Figure 2: ¯ℓ2 distance reports monochromatic images as memorizations. Despite not being mem- orizations of their nearest neighbors in the training set, monochromatic images generate a low ¯ℓ2 distance. (Top) Out of 5,000 generations, the 10 generations with smallest patched ¯ℓ2 distance from CIFAR-10 train. (Bottom) The corresponding nearest neighbors in CIFAR-10 train to the top row of generations.
  • Mitigation Re-evaluation: Under SolidMark's strict eidetic thresholds ($\delta = 0.01$), inference-time interventions like Gaussian Noise at Inference (GNI) or Random Token Replacement (RT) yielded a 0% to 2.81% reduction in memorization. This sharply contrasts with the massive ~14-16% reductions previously reported by embedding-based metrics like SSCD.
  • Data Duplication: SolidMark successfully tracked a linear increase in memorization as data duplication increased, even when identical duplicate images were intentionally assigned entirely different random border keys.

Limitations and Future Work

  • Training-Time Requirement: SolidMark is not a post-hoc metric; it can only evaluate images that were modified with a border before the model was trained or finetuned.
  • Architecture Constraints: It is strictly limited to generative models capable of being prompted for outpainting or inpainting tasks.
  • False Positives & Weak Memorization: There is an inherent, minor false-positive rate due to the random chance of an unmemorized color matching the key. Conversely, it may fail to detect very weak, partial memorization where the model retains semantic features but fails to recall the exact border key.

The authors suggest that future work should focus on utilizing SolidMark in tandem with reconstructive metrics to form a more holistic defense against data leakage.

Summary updated

BibTeX
@inproceedings{kriplani2024solidmark,
  author = {Nicky Kriplani and Minh Pham and Gowthami Somepalli and Chinmay Hegde and Niv Cohen},
  title = {{SolidMark: Evaluating Image Memorization in Generative Models}},
  booktitle = {SafeGenAi @ NeurIPS},
  year = {2024},
  url = {https://openreview.net/forum?id=59zTxNtI80},
}
Figure