arXiv:2611.18024cs.CVNov 2026

Manuscript Offprint

arXiv:2611.18024

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

Saisuchith Mahajan, Aditey Nandan, Rohit Singh, Nishanth Shetty, Chandra Sekhar Seelamantula

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Saisuchith Mahajan, Aditey Nandan, Rohit Singh, Nishanth Shetty, Chandra Sekhar Seelamantula

Indian Institute of Science

Bengaluru, Karnataka, India

{saisuchithm, aditeyn, rohitl, nishanths, css}@iisc.ac.in

Figure

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.

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.

1. Introduction

Diffusion models [9, 28, 31, 32] have achieved remarkable success in image synthesis, yet they are known to memorize and replicate portions of their training data [4, 29]. While certain prompts cause text-to-image models to regenerate an entire training image almost verbatim, a far more common form of replication is local memorization: the model reproduces a specific region of a training image such as a foreground product, an interior layout, or a watermark—while synthesizing novel content in the rest of the image [30, 33]. Such partial copies raise significant copyright and privacy concerns. Because the memorized region is embedded within newly generated content, localizing the exact pixels that are copied tells us what the model has memorized and makes it possible to selectively remove the memorized region while preserving the surrounding generation.

Recently, Kim and Lee [15] showed that memorized regions can be localized directly from the local geometry of the denoiser. By Tweedie's formula [7, 19, 24], the Jacobian JJ of the denoiser with respect to its noisy input is proportional to the posterior covariance of the clean image, and is directly related to the Hessian of the log density of the noisy marginal distribution. When a diffusion model memorizes a region, its posterior distribution over that region collapses [12, 15]; the posterior variance and hence the Jacobian become small, so the denoiser largely ignores perturbations to its noisy input. Kim and Lee [15] measure this collapse by using randomized Hutchinson probes [1, 10] to estimate the diagonal entries of the denoiser Jacobian (equivalently, the diagonal of the negative Hessian of the log-density). As Kim and Lee [15] note, however, a small diagonal entry JiiJ_{ii} is ambiguous on its own. Even in a model that generalizes without memorizing, the self-weight JiiJ_{ii} is small whenever a pixel lies in a smooth region such as a uniform background where the denoiser estimates each pixel by averaging over a neighborhood of N pixels, assigning each pixel a weight of roughly 1/N. To remove this data-driven curvature [27], Kim and Lee [15] rely on a contrast: they subtract a reference diagonal map computed either with an unconditional null prompt ( Δh∅\Delta h_{\varnothing}) or with an earlier, less-trained checkpoint of the same model ( Δhθ^\Delta h_{\hat{\theta}}).

While contrast-based localization is effective on standard text-to-image models, requiring a second reference evaluation introduces fundamental limitation: A null prompt exists only for conditional models trained with classifier-free guidance [8], and is absent in unconditional models. Similarly, model developers rarely release intermediate training checkpoints alongside final weights. In this paper, we ask whether memorized regions can be separated from data-driven smoothing directly from the target model alone, without any reference prompt or secondary checkpoint. Our key insight is that while the diagonal entry JiiJ_{ii} cannot distinguish between a row whose weights are spread across N neighboring pixels and a row whose entries vanish altogether, the row sum ∑jJij\sum_{j} J_{ij} separates the two.

Building on this principle, we introduce JaRS (Jacobian Row Sums), a contrast-free localization map that measures how far the per-channel row sums of the denoiser Jacobian fall below 1. Because the row sum is a linear functional of the Jacobian, JaRS requires no randomized probes: for a latent space with CC channels, the map is obtained from CC deterministic Jacobian-vector products (JVPs). Furthermore, to handle mixed evaluation settings that include both memorized and unmemorized generations where a localizer must output an empty mask on unmemorized images we propose JaRS+, a two-stage procedure that first determines whether an image contains memorized content using an early-step summary statistic of the JaRS map, and then returns the pixel-level JaRS map if memorization is detected. Our main contributions are summarized as follows:

• We establish both theoretically via an analytical constant-region model and empirically that the row sums of the denoiser Jacobian concentrate near 1 on generated regions and drop sharply on memorized regions.

• We propose JaRS and its two stage extension JaRS+.

Evaluated under the balanced protocol of Kim and Lee [15] across Stable Diffusion v1.4, Stable Diffusion v2.1, Realistic Vision v5.1, and an unconditional DiT-B/2 model, JaRS+ achieves the best localization mIoU in seven of ten settings, improving mIoU by up to 10.2 points on Stable Diffusion and from 0.666 to 0.869 on unconditional DiT.

• We show that the early step detection score of JaRS+ identifies memorized prompts after just 5 of 50 sampling steps.

References (28)