JaRS: Contrast-Free Localization of Memorized Regions in Diffusion Models via Jacobian Row Sums

Saisuchith Mahajan, Aditey Nandan, Rohit Singh, Nishanth Shetty, Chandra Sekhar SeelamantulaarXiv 2026

TL;DR

Researchers have developed JaRS (Jacobian Row Sums), a new method to pinpoint exactly which pixels a diffusion model has "memorized" from its training data. Unlike previous methods that required comparing a generated image to a "null" version, JaRS works directly on the target model by analyzing the row sums of the denoiser's Jacobian, effectively distinguishing between genuine image smoothing and verbatim data replication.

What Problem Does This Paper Address?

Diffusion models like Stable Diffusion are incredibly creative, but they have a "memory" problem. Sometimes, they don't just learn concepts; they memorize specific regions of training images—like a particular watermark, a unique product, or a specific interior layout—and reproduce them verbatim. This raises significant copyright and privacy red flags.

To fix this, we first need to find the "copied" pixels. Previous state-of-the-art methods looked at the diagonal of the denoiser Jacobian, which essentially measures how much a pixel's output changes when you nudge its input. If the value is small, the model is ignoring the input, which suggests memorization.

However, there’s a catch: the diagonal is also small in smooth, predictable regions (like a clear blue sky) because the model "averages" over many neighboring pixels. To tell the difference, previous methods used "contrast"—they had to run the model twice (once with a null prompt) and subtract the results. This is impossible for unconditional models (which have no prompts) or when you don't have access to early training checkpoints.

Methods

The authors introduce JaRS (Jacobian Row Sums). Their key insight is that while the diagonal of the Jacobian is small for both memorized and smooth regions, the row sum behaves differently:

  • In smooth regions: The model acts as a mean-preserving filter. It averages nearby pixels, so the weights in a row sum up to approximately 1.
  • In memorized regions: The model's output is "locked" to a training sample. It ignores input perturbations entirely, causing the row sum to drop toward 0.
Figure 1. Qualitative comparison of localization maps on Stable Diffusion v1.4 for randomly sampled test instances, two per row: four template verbatims from distinct templates (rows 1–2), one global whole-image copy (bottom left), and one non-memorized prompt (bottom right), which has no copied region and hence an empty expected mask. All maps are displayed after the log(1 + ·) transformation.

The researchers further refined this into JaRS+, a two-stage pipeline:

  1. Image-level Detection: At an early denoising step (high noise), they use a summary statistic of the JaRS map to decide if the image contains any memorized content.
  2. Pixel-level Localization: If memorization is detected, they compute the full JaRS map at an intermediate denoising step to produce a precise mask.

Computationally, JaRS is efficient. It uses Jacobian-vector products (JVPs), requiring only a few extra forward passes of the model rather than expensive backpropagation or randomized probes.

Datasets

The study evaluated JaRS+ across several models and benchmarks:

  • Stable Diffusion (v1.4 and v2.1) & Realistic Vision v5.1: Evaluated using the Webster benchmark, which contains prompts known to trigger "verbatim" copies (Template, Matching, and Retrieved verbatims).
  • Unconditional Diffusion Transformer (DiT-B/2): The authors created a new benchmark by training a DiT on FFHQ face images with injected "memorization" (watermarks and duplicated images). This allowed them to test localization in a setting where "null prompts" simply don't exist.

Key Insights and Ideas

  • The "Aha!" Moment: The row sum is a "contrast-free" metric. By replacing the need for a second "null" evaluation with the constant value of 1 (the expected sum for a standard filter), they made localization possible for any diffusion model.
  • Two-Timescale Separation: Memorization "locks in" early. The authors found they could detect if a prompt would result in a copy after just 5 out of 50 sampling steps, long before the image is actually recognizable.
  • Posterior Collapse: The paper provides a theoretical bridge, showing that memorization is essentially a "collapse" of the model's posterior distribution. The Jacobian row sum is a direct mathematical probe into this collapse.
Empirical distributions showing that row sums for non-memorized regions (grey) concentrate at 1.0, while memorized regions (colored) shift significantly toward 0.

Key Results

JaRS+ consistently outperformed existing contrast-based methods, even though it requires less information:

  • Unconditional Models: On the DiT benchmark, JaRS+ improved the Mean Intersection-over-Union (mIoU) from 0.666 to 0.869, a massive jump for a setting where previous methods struggled.
  • Stable Diffusion: In the "Template Verbatim" setting (where a specific region is copied), JaRS+ achieved an mIoU of 0.969 on SD v1.4, beating the best contrast-based baseline.
  • Mitigation: The authors showed that by using the JaRS+ mask to "resample" only the memorized pixels, they could remove the copied content (reducing the copy rate from 20.5% to 9.0%) while leaving the rest of the generated image virtually untouched.
Quantitative results showing JaRS+ achieving the best mIoU in most categories across different models.

Limitations and Future Work

  • Hyperparameter Tuning: JaRS+ currently requires a small labeled "development set" to choose the best denoising steps ($l$ and $d$) and the detection threshold ($\tau$). While $\tau$ can be calibrated using only non-memorized images, finding the optimal steps still benefits from known examples of memorization.
  • Single-Step Models: The current theory relies on the dynamics of multi-step denoising. Extending this to "distilled" or single-step generators is an open challenge.
  • Refinement: While the localization is excellent, the authors note that the image-level detector can sometimes be overly conservative on models like Realistic Vision, occasionally rejecting global copies that a human might still consider "memorized."

Summary updated

Abstract

Diffusion models sometimes memorize and reproduce regions of their training images, raising privacy and copyright concerns. We aim to localize these regions. Existing contrast-based methods use the diagonal of the denoiser Jacobian, which reflects the posterior variance of each pixel. However, a small diagonal entry is ambiguous: it signals either memorization or averaging over many neighboring pixels in smooth or predictable regions. To resolve this ambiguity, these methods subtract a reference map, which requires a second evaluation with a null prompt or an earlier checkpoint. Unconditional models have no null prompt, and earlier checkpoints are unavailable in general. We show that Jacobian row sums (JaRS), unlike the diagonal, separate memorization from local averaging without a reference map. Pairing JaRS with an image-level detection score that uses the same statistic at an early denoising step yields JaRS+. Across Stable Diffusion v1.4 and v2.1, Realistic Vision v5.1, and an unconditional diffusion Transformer (DiT), JaRS+ outperforms contrast-based localization methods.
BibTeX
@misc{mahajan2026jars,
  author = {Saisuchith Mahajan and Aditey Nandan and Rohit Singh and Nishanth Shetty and Chandra Sekhar Seelamantula},
  title = {{JaRS: Contrast-Free Localization of Memorized Regions in Diffusion Models via Jacobian Row Sums}},
  year = {2026},
  eprint = {2611.18024},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18024},
}
Figure