wikillm

Paper · 2026-11-01 · cs.LG

Spectral Signatures of Memorization Basins in Diffusion Trajectories

Memorised diffusion samples show one dominant singular mode in the local Jacobian, then a recovery. GeoReg-DM penalises that mode during training, JER flags memorised outputs from one low-noise Jacobian query, and GeoSteer-DM reflects denoising steps along it. Author-reported: CelebA32 memorisation 8.80 to 1.56 (Table 1); Stable Diffusion v1.4 copy rate 30.30% to 9.60%.

Diffusion modelsTraining data extractionClassifier-free guidanceJacobian regularizationmemorizationdiffusion-modelsjacobianspectral-methodssteering

arXivPDFMarkdown16 min read

AI-compiled by claude-haiku-5-5 on 2026-11-21, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Image generators sometimes copy a training picture almost exactly instead of making something new. This paper asks when, during the generation process, a sample stops being free and gets locked onto one copy. Its answer is a local signature: the model's response to tiny nudges is suddenly dominated by one direction, and then that dominance fades again as the picture gets clearer.

The authors use this signature in three ways. During training they push against the dominant direction to make copying less likely. After generation they check a cheap measurement to flag copied outputs. During generation they bend the path away from that dominant direction while it runs. The experiments cover small image models trained on a face dataset and one large text-to-image model. All numbers are the authors' own.

TL;DR

Memorised diffusion samples show a spectral collapse-and-recovery in the local Jacobian of the denoiser, with one dominant singular mode near the point where the trajectory commits to a copy §3.2. The paper proposes three uses of this geometry: a training regulariser on the top singular value (GeoReg-DM) §4.1, an efficient single-query detector (JER) §4.2, and a norm-preserving reflection of denoising steps along the top singular direction (GeoSteer-DM) §4.3. The authors report large drops in memorisation on small models and on Stable Diffusion v1.4, with no official code released at compile time.

Problem

Diffusion models can reproduce individual training examples, which matters for privacy, copyright and generalisation §1. Earlier mitigations for text-to-image models mostly act on conditioning, attention, predictions or the initial noise, and detection work relies on conditional responses §2 [app. F.7]. The paper frames memorisation as a commitment: once a denoising trajectory enters a memorisation basin, bounded per-step perturbations cannot make it escape §3.1. Checking the basin condition directly needs exhaustive perturbations and re-denoising, so the paper looks for a cheaper observable signature §3.2. Full-Jacobian computations are called prohibitively expensive for training at every step §4.1 and for inference at scale §4.2 §5.2.

Method

Basins §3.1. For a fixed deterministic sampler with steps t_N > \dots > t_0 = 0, a basin \mathcal B_t(\delta) is the set of states from which every admissible continuation, with per-step perturbation at most \delta in the L2 norm, still ends in the memorised set. Basins are absorbing: if a state is in the basin at time t, any state reached from it at a later sampling time is in the basin at that time §3.1 app. A.1. The paper treats basin entry as the reference point for commitment.

Spectral signature §3.2. For an epsilon-parameterised denoiser, the input Jacobian J_t = \partial \epsilon_\theta / \partial x_t is approximately -b_t H_t, where H_t is the Hessian of the log-density and b_t is the noise scale, with equality for the optimal model §3.2. The paper takes its SVD J_t = U_t \Sigma_t V_t^\top and follows the top-pair gap \Delta_{12} alongside two rank summaries, stable rank and effective rank §3.2 app. A.4. Along DDIM trajectories on CelebA, \Delta_{12} rises sharply in a phase transition fig. 1. The leading singular value overshoots the rest, then the spectrum relaxes toward isotropy at low noise. Memorised trajectories show a stronger overshoot and a sharper recovery §3.2.

Transition point t^{\ast} §3.2. t^{\ast} is the state just before the steepest increase in \Delta_{12}. Trajectories are aligned by \tau = t - t^{\ast}. After t^{\ast}, memorised trajectories respond much less to small nudges, and their predicted clean images settle onto the final output early fig. 1. The paper's adversarial optimisation finds that bounded interventions lose the ability to redirect a trajectory around t^{\ast} app. F.1 fig. 1.

Training-time signature §3.2 fig. 2. During training, the intermediate noise regime develops a dominant mode: \Delta_{12} rises around raw timesteps 200 to 400, and the rise grows with the memorisation rate. At timesteps of 200 and below the gap closes and an entropy effective rank recovers at later checkpoints §3.2 fig. 2.

GeoReg-DM §4.1 alg. 2 app. D. The training loss is the base diffusion or rectified-flow loss plus a penalty on the squared top singular value of a low-dimensional sketch \hat J = W J, where W has k orthonormal rows eq. 1 app. D.2. Sketches are built with vector-Jacobian products, and \sigma_1^2 is the largest eigenvalue of the k \times k Gram matrix app. D.1. The penalty is applied only to a small subset of each minibatch. Candidates are ranked by the input-gradient norm of the base loss, which reuses the base backward pass §4.1 app. D.1. The CelebA runs add a fast-slow parameter copy scheme, with a periodic merge every 500 updates app. D.3 tab. 3.

JER §4.2 app. B. JER is a proxy for the Rényi-2 effective rank \mathrm{ER}_2(J) = \|J\|_*^2 / \|J\|_F^2 eq. 2 app. B. The nuclear norm is replaced by an oriented trace, which relies on the curvature being sign-coherent near the data end §4.2 app. A.3. Both the trace and the Frobenius energy are estimated with Rademacher probes and reused vector-Jacobian products eq. 3 app. B.2. JER is computed once, on a low-noise query built from the finished sample, and thresholded with a calibrated cut-off app. B.2 app. B.3.

GeoSteer-DM §4.3 alg. 1 app. C. At each steered step the model displacement is \delta_n = x^{\mathrm{base}}_{n+1} - x^{0}_{n+1}, where x^{0} comes from a zero or unconditional anchor eq. 4 app. C.1. Let v_1 be the leading right singular vector of the local Jacobian and P = v_1 v_1^\top. The canonical intervention reflects the displacement, \delta^{\mathrm{geo}} = (I - 2P)\delta, and adds it to the anchor update eq. 5. This keeps the displacement norm unchanged §4.3 app. C.3. The general operator has gains for the subspace and the displacement app. C.3. For DDIM and rectified flow the reflection can be written directly on the noise or velocity prediction app. C.4. For classifier-free guidance it acts on the guidance residual g = \epsilon_c - \epsilon_u app. C.4.

Pseudocode
# JER score at one low-noise query  [§4.2] [eq. 3] [app. B.2]
# Inputs:  x (d,) query state; m probes; a in {-1, +1}
# Output:  scalar score

def jer_score(jacobian_vjp, x, m, a):
    # Draw m Rademacher probes z_l in {-1, +1}^d  [app. B.2]
    probes = sample_rademacher(m, dim(x))                 # (m, d)
    # q_l = J^T z_l via batched vector-Jacobian products  [app. B.2]
    queries = jacobian_vjp(x, probes)                     # (m, d)
    # Trace estimate: mean of z_l . q_l  [app. B.2]
    trace_hat = mean(sum(probes * queries, axis=1))
    # Frobenius energy estimate: mean of ||q_l||^2  [app. B.2]
    energy_hat = mean(sum(queries * queries, axis=1))
    # Squared positive part of the oriented trace  [eq. 3]
    numerator = relu(a * trace_hat) ** 2
    # Small floor scaled by energy  [app. B.2]
    eps = 1e-8 * max(1.0, energy_hat)
    return numerator / (energy_hat + eps)
Pseudocode
# GeoReg training step  [alg. 2] [app. D.1]
# Inputs:  batch of B noised states; fixed sketch W (k, d); m; lambda_geo
# Output:  total loss for one optimizer step

def georeg_loss(model, batch, sketch, m, lambda_geo):
    # Base diffusion or flow loss, averaged over the batch  [app. D.1]
    base_losses = per_example_loss(model, batch)          # (B,)
    base_loss = mean(base_losses)
    # Backward pass that also keeps gradients w.r.t. the input states  [alg. 2]
    input_grads = input_gradients(base_loss, batch.states)  # (B, d)
    # Priority = input-gradient norm; a constant factor keeps the ranking
    # [app. D.1]
    priority = norm(input_grads, axis=1)                  # (B,)
    # Keep the top m among states with an eligible timestep  [alg. 2] [app. D.3]
    chosen = top_m(priority, eligible=batch.in_window, m=m)
    # Detach the selected realised states  [alg. 2]
    states = detach(batch.states[chosen])                 # (m, d)
    # Sketch each Jacobian: W J, with k rows  [app. D.2]
    sketches = sketch_jacobians(model, states, sketch)    # (m, k, d)
    # sigma_1^2 = largest eigenvalue of the k x k Gram matrix  [app. D.1]
    penalties = max_eig(sketches @ transpose(sketches))   # (m,)
    # Mean over the selected states  [eq. 1] [app. D.1]
    geo_loss = mean(penalties)
    # lambda_geo is not stated for the CelebA runs  [app. D]
    return base_loss + lambda_geo * geo_loss
Pseudocode
# GeoSteer-DM: one sampler step  [alg. 1] [app. C.1] [app. C.3]
# Inputs:  sampler step n; current state x; set of steered steps
# Output:  next state

def geosteer_step(sampler, model, x, n, steered_steps):
    # Ordinary model output at the current state  [alg. 1]
    u_base = model_output(model, x, n)
    if n not in steered_steps:
        return sampler.step(x, u_base, n)
    # Anchor input: zero, or unconditional prediction under guidance  [app. C.1]
    u_anchor = anchor_input(model, x, n)
    x_base = sampler.step(x, u_base, n)                   # (d,)
    x_anchor = sampler.step(x, u_anchor, n)               # (d,)
    # Model-controlled displacement  [eq. 4]
    delta = x_base - x_anchor
    # Leading right singular vector of the local Jacobian  [app. C.2]
    v1 = top_right_singular_vector(local_jacobian(model, x, n))
    # Projector onto the dominant direction  [§4.3]
    proj = outer(v1, v1)                                  # (d, d)
    # Canonical reflection: reverse the dominant part, keep the rest  [eq. 5]
    delta_geo = delta - 2.0 * (proj @ delta)
    return x_anchor + delta_geo

Hyperparameters

NameValueWhereNotes
Synthetic MLPwidth 128, noise-predictionapp. E.2exact input Jacobian
Synthetic optimiserAdam, lr 1e-3, batch 512app. E.230k updates, shared 5k unregularised prefix
Synthetic geometryup to 32 states per batch, t in {5..100}app. E.2DDIM 100 steps
Synthetic regulariser weightcalibrated: aux-gradient norm ~10% of baseapp. E.1only for synthetic runs
Gaussian80N=80, 2-D standard Gaussianapp. E.2no standardisation
Mixture328 components, means at radius 1.8, covariance 0.2^2 I, 4 points eachapp. E.2N=32
SwissRoll8D128noise 0.03, orthogonal Q from seed 601, N=128app. E.2not whitened
CelebA data4,096 images, 32x32 grayscale, mean-subtracted, scaled to [0,1]app. E.3no variance normalisation
CelebA U-Netbase width 64, multipliers (1,2,4), 2 residual blocksapp. E.34 heads, GroupNorm, SiLU, dropout 0.1
Diffusion scheduleT=1000, linear beta 1e-4 to 2e-2app. E.3DDIM eta=0, 100 points (99 transitions)
Rectified flowlinear interpolation, Euler over 100 pointsapp. E.3velocity target x_data - x_noise
GeoReg batch size512tab. 3
GeoReg Adam lr1e-4tab. 3reduced-LR control uses 5e-5 after 10k app. E.1
GeoReg timestep windowraw t in {90..500}tab. 3
States per update, m32tab. 3selected by input-gradient priority
Sketch rank, k8tab. 3fixed W, orthonormal rows
Initial interpolation alpha_00.25tab. 3formula not given (see Pitfalls)
Sync interval H500 updatestab. 3fast-slow copies
Periodic interpolation alpha_s0.5tab. 3merge: slow <- (1-a) slow + a fast
Geometry precisionFP32tab. 3
Regulariser weight lambda_geonot statedapp. D.1the core training hyperparameter is missing
JER probes m2 (DDIM), 1 (RF)app. B.2batched in one autodiff call
JER orientation a+1 (DDIM), -1 (RF)app. B.2RF operator is s dv/dx - I
JER query timet_0 = 0.1 (nominal)app. B.2time units not stated
JER floor1e-8 max(1, energy)app. B.2
JER calibration1,000 trajectories, 10 seeds x 100app. B.3held-out set of 1,000
JER threshold rulemax F1 s.t. pooled spec >= 0.90, per-seed spec >= 0.85app. B.3
Memorisation labelnearest-neighbour gap ratio r < 1/3app. E.4r = d1 / (d2 + 1e-10)
GeoSteer gain (CelebA)a=1, rho=-1, K=1 (reflection)app. C.5full 1024x1024 Jacobian, exact SVD
DDIM steering windowfrom state 60, transitions 60-98app. E.5"rewind" not defined
RF steering windowfrom state 20, Euler updates 20-89app. E.5
Steering checkpoints30k, 60k, 100k, 160k, 200k, 300kapp. E.5500 pairs per checkpoint and sampler
SD model and samplerStable Diffusion v1.4, 512x512, DDIM 50 steps, eta=0app. E.6
SD guidance scale7.5app. E.6
SD guidance-residual Jacobianpower iteration on J_g^T J_gapp. C.55 iterations first step, 2 warm-started after
SD finite-difference steph = 0.3 on a unit directionapp. C.5central difference
SD steering gaina=0.7, rho=-1, K=1app. C.5not norm-preserving
SD steering windowdenoising indices 0-17 of DDIM-50app. C.5no JER gating, no rewind
SD cohorts500 memorised prompts x 4 seeds; 100 non-memorised x 1app. E.6
SD copy thresholdSSCD >= 0.50app. E.6max over 500 references

Results

Author-reported. Setups: synthetic populations and CelebA32 (unconditional DDIM and rectified flow, 4,096 training images) §5.1; Stable Diffusion v1.4 on 500 memorised prompts §5.2. Table 1 averages five seeds and reports no confidence intervals.

GeoReg, memorisation across training methods tab. 1.

MethodGaussian80 MemMixture32 MemSwissRoll8D128 MemCelebA32 MemCelebA32 mean rCelebA32 FID
Standard31.8546.8516.108.800.76654.89
Tikhonov25.1543.2513.906.500.78049.03
Reduced LR21.1541.3510.306.800.78552.21
Ambient-style24.3547.0017.304.900.80852.15
GeoReg15.8519.2510.201.560.84659.77

Source: tab. 1 (Mem column units as printed in the table; lower is better). GeoReg has the lowest memorisation in every column but has the highest FID. Precision and recall for the synthetic sets are in the same table.

Detection, DDIM and rectified flow at checkpoint 160k tab. 2.

SettingDetectorROC areaPR areaHit rateSpecificityMatthews corr.Runtime
DDIMFLIPD0.8450.7220.4370.9320.44342.05 ms
DDIMNormal bundle0.9020.7730.4520.9520.493922.19 ms
DDIMScore magnitude0.8600.7850.5420.9340.53712.05 ms
DDIMTemporal recovery0.8230.6980.3050.9560.36640.88 s
DDIMJER0.9560.8950.8980.8860.76371.26 ms
RFFLIPD0.7200.7330.3100.8940.24842.48 ms
RFNormal bundle0.7600.7460.3380.8970.278922.12 ms
RFScore magnitude0.7830.8000.3750.9290.35811.98 ms
RFTemporal recovery0.9120.9310.7890.8790.66738.31 s
RFJER0.8700.8440.4030.9350.39257.41 ms

Source: tab. 2. Temporal recovery is an expensive full-trajectory baseline that the authors use as a check, not a practical detector §5.1. Across DDIM checkpoints 60k to 260k, JER's AUROC stays between 0.940 and 0.957 app. F.6.

GeoSteer on CelebA32 at 300k app. F.8. Copy rate (%) and mean gap ratio r, unmodified to steered, from 500 paired generations:

SamplerCopy rateMean rMedian rFID
DDIM51.6 to 7.60.45 to 0.820.31 to 0.9047.2 to 61.3
RF60.2 to 8.00.40 to 0.780.26 to 0.8533.5 to 42.5

Source: app. F.8 (checkpoint series 30k to 300k is in the same subsection). Steering raises FID at every checkpoint; the authors attribute this to the finite reference set, and treat FID as secondary app. F.8 app. E.4. Steering with sketch rank k gives, for DDIM and RF respectively, 18.0% and 32.7% (k=8), 19.7% and 24.7% (k=16), 19.0% and 18.0% (k=32), and 10.0% and 14.0% (k=64); full Jacobian 3.0% and 6.3% app. F.8 (this table's source is the resolution table in the appendix).

Random-direction control, 300k app. F.10. DDIM copy rate: unmodified 51.6%, matched random rotation 50.8%, GeoSteer 7.6%. RF: 60.2%, 58.6%, 8.0%. Median deflection angle is about 4 degrees, so the edits are small.

Stable Diffusion v1.4, memorised cohort app. F.11 fig. 4. With the J_g operator, mean SSCD falls from 0.362 to 0.229, the share with SSCD at or above 0.50 from 30.30% to 9.60%, CLIP from 0.279 to 0.262, and FID from 119.42 to 102.74 app. F.11. The J_F (feature Jacobian) variant reaches 0.259 and 14.15% with CLIP 0.270 and FID 109.15 in the same table. The gain used for each row is not restated there.

Reflection versus attenuation, memorised families app. F.13. Baseline mean SSCD 0.847 and copy rate 93.3%; attenuation only 0.870 and 93.3%; reflection only 0.593 and 60.0%; reflection plus attenuation 0.649 and 66.7%. CLIP moves from 0.325 to 0.302 under reflection only app. F.13. This is a different prompt collection from the main SD cohort.

Paper vs code

No official code.

The paper's footnote states that code will be released upon acceptance §5. Searches made at compile time: the GitHub repository search for "GeoSteer", "GeoReg", "memorization basins diffusion" and "spectral memorization diffusion", plus a user search for "Jaziri". None of the results is owned by an author. One result, RaghavAgarwal08/Spectral-Signatures-of-Memorization-in-Diffusion- Models-A-Multi-Scale-Diagnostic-Study, describes itself as an implementation of a similarly titled paper, but its owner is not an author and its title differs, so it was not used. The paper's own code is therefore unverified: every value above is from the paper text.

Pitfalls

  • The main training hyperparameter is missing. The regulariser weight \lambda_{\mathrm{geo}} appears in the objective eq. 1 app. D.1 but no value is given for the CelebA runs. The only calibration rule is for the synthetic runs: scale the weight so the auxiliary gradient is about 10% of the base gradient at the fork app. E.1. Reproducing Table 1 therefore needs a guess, so tune it against the stated memorisation numbers and say so.
  • The fast-slow scheme is only half specified. The periodic merge is given app. D.3. The initial coefficient \alpha_0 = 0.25 is given in tab. 3, but no equation shows how it is applied to the initial checkpoint. The length of the warm-up before the regulariser starts is not stated. The authors also say the scheme exists to prevent quality loss under continued regularisation app. D.3.
  • The sketch is not the Jacobian. GeoReg uses \sigma_1 of WJ, not of J, and the authors say the spectral quantities of the sketch are not estimates of the full Jacobian app. D.2. The sketch seed is not given. The algorithm says "fixed W" alg. 2.
  • Priority scale. The main text ranks by the plain input-gradient norm §4.1. The appendix uses a constant Bd/2 factor app. D.1. The ranking is unchanged, but the two formulas differ on paper.
  • GeoReg costs about 3.8 times a plain training step at batch 512 with m=32 and k=8 on an A100: 272 ms versus 1046 ms, and 16.95 to 19.63 GiB peak memory tab. 4. Most of the extra time is the sketch and its backward pass.
  • GeoReg worsens FID. Table 1 shows FID rising from 54.89 to 59.77 while memorisation falls. The authors attribute the rise to removing exact copies and note that FID is computed against the 4,096 training images app. E.4, which rewards copying. Tikhonov has the best FID (49.03) in the same table.
  • JER uses a squared positive part of a stochastic trace. The authors call it a proxy, not an unbiased estimator, and say variance adds bias app. B.2. The threshold therefore depends on calibration. Changing the probe count, seeds or calibration set moves the operating point.
  • JER labels are a proxy. Ground truth is the nearest-neighbour ratio r < 1/3 against the training set, not a human or a copy measure app. E.4.
  • JER query time units are not stated. The query time t_0 = 0.1 is called nominal, and the appendix does not say whether it is a fraction of the schedule or an index app. B.2.
  • Rectified-flow operator depends on the time convention. The operator is s\,\partial v/\partial x - I, with s the physical flow time app. C.2. The paper's interpolation runs from noise at t=0 to data at t=1 app. E.3. An implementation must use the same direction, or the identity term has the wrong sign.
  • "Rewind" and "JER gating" are undefined for the controlled steering runs. The appendix refers to a sampler-specific rewind and to JER gating app. C.5 app. E.5, and says the SD runs use neither app. C.5. It does not say whether the CelebA runs steer every trajectory or only flagged ones. The window "resumes from state 60" does not say what precedes state 60 for the same noise.
  • The SD steering is not norm-preserving. The canonical operator keeps the displacement norm §4.3 eq. 5. The SD configuration uses a gain of 0.7 app. C.5, which shrinks the displacement. The authors' own ablation separates reflection from attenuation app. F.13, so read the SD results as reflection plus attenuation.
  • Resolution claims are not monotone. The text says performance improves with the geometric resolution k §5.1. The DDIM copy rates in app. F.8 go 18.0%, 19.7%, 19.0%, 10.0% for k=8,16,32,64. The trend is clear only from k=32 to 64 and for RF.
  • The SD power iteration is numerically sensitive. It uses a central difference with absolute step h=0.3 on a unit vector, five iterations at the first active step and two warm-started iterations after that, in FP32 with TF32 disabled app. C.5. The step is not scaled to the latent norm, and the Jacobian is of the guidance residual, not of the full network.
  • Small samples on the CelebA steering. Each checkpoint uses 500 pairs from five seeds, and the main Table 1 uses five seeds without intervals app. E.5 tab. 1. The SD cohorts are 500 prompts, and the non-memorised control is 100 prompts with one sample each app. E.6.
  • The detection and steering results come from different checkpoints. JER is reported at 160k tab. 2, while steering is reported over six checkpoints app. F.8. Compare them with care.
  • The "basin" claim is empirical. A search over finitely many perturbations cannot prove that a trajectory sits in a basin. The authors therefore read t^{\ast} as a measured sign that escaping gets harder, not as proof app. F.1.

Lineage

  • Builds on: the manifold memorisation hypothesis and FLIPD (bib key ross2025geometric) §3.1 app. B.3; the normal-bundle estimator (bib key stanczuk2024diffusion) app. B.3; Jacobian eigenstructure of denoisers (bib key kadkhodaie2024generalization) §3.2; the collapse transition (bib key achilli2024losing) §3.1; Tikhonov score regularisation (bib key baptista2025memorization) app. E.1; Ambient diffusion (bib key daras2023ambient) app. E.1; Lookahead fast-slow weights (bib key zhang2019lookahead) app. D.3; Hutchinson trace estimation (bib key hutchinson1989stochastic) app. B.2; randomised sketching (bib keys halko2011finding, woodruff2014sketching) §4.1.
  • Compared against: inference-time Stable Diffusion mitigations by Ren et al. (bib key ren2024unveiling), RTA (bib key somepalli2023understanding), Wen et al. (bib key wen2024detecting) and Han et al. (bib key han2026adjusting) app. E.6; training-time controls (Tikhonov, reduced learning rate, Ambient-style) app. E.1; a trace-of-Hessian detector (bib key jeon2024understanding) §3.2.
  • Superseded by: not stated.

Source and license

Adapted from “Spectral Signatures of Memorization Basins in Diffusion Trajectories” by Achref Jaziri, Martin Mundt, Ahmed Imtiaz Humayun, Visvanthan Ramesh (arXiv:2611.01775), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.