Source-linked AI summary

Memorization and Malign Generalization in Conditional Diffusion Models with Random Features

Gwangho Kim, Sungyoon Lee

arXiv:2610.11288v1cs.LG

TL;DR

Memorization and generalization in conditional diffusion remain less understood than in unconditional settings. This paper analyzes a random-feature conditional score model in the proportional high-dimensional limit. Wider overparameterized models improve conditional-mean prediction while reducing within-condition prediction variance, and informative conditions lead to memorization at smaller widths.

  • Problem

    Memorization and generalization in conditional diffusion remain largely unexplored, and unconditional analyses do not cover the setting where training conditions are unique and test conditions are unseen.

    Source: §1 · pp. 1–2
  • Method

    The paper derives proportional-limit training and test loss expressions for a random-feature conditional score model and decomposes test loss into conditional-mean and residual errors.

    Source: §1 · p. 3, §6 · p. 13
  • Results

    Wider overparameterized models improve conditional-mean prediction while reducing prediction variance, and more informative conditions induce memorization at smaller widths.

    Source: §6 · p. 13
  • Takeaways & Limitations

    The results identify width-dependent malign generalization in the analyzed conditional setting and motivate further investigation of conditional-diffusion memorization and generalization mechanisms.

    Source: §6 · p. 13

    The theory assumes an isotropic marginal and residual covariance with two distinct eigenvalues; extensions to anisotropic marginals and non-Gaussian data remain open.

    Source: §6 · p. 13

Abstract

from arXiv · show

Conditional diffusion models generate diverse, novel, and high-quality samples under prescribed conditions. However, theoretical understanding of their memorization and generalization remains limited, while recent works have characterized these behaviors primarily in unconditional settings. In this work, we analyze a random-feature conditional score model in the high-dimensional proportional limit, deriving asymptotic expressions for training and test losses. By decomposing the test loss, we show that in the overparameterized regime, increasing model width improves prediction of the condition-dependent mean while reducing within-condition prediction variance, a phenomenon we term "malign generalization." Furthermore, analyzing the training loss reveals that more informative conditions lead to memorization of training samples at smaller widths. These theoretical findings are supported by experiments with U-Net architectures on realistic data.

1 Introduction

The introduction frames conditional diffusion as a distinct setting for studying memorization and generalization because training conditions are unique and test conditions are unseen. It presents a tractable random-feature analysis and experiments that reveal width- and condition-dependent behavior.

1 Introduction

  • The introduction identifies a gap in understanding memorization and generalization in conditional diffusion and asks how test-condition learning and condition information affect them.Source: §1 · p. 2
  • The setting pairs each training condition with one sample and evaluates generalization at unseen test conditions, unlike standard class-conditional models.The authors note that prior unconditional and class-conditional results may not directly apply.Source: §1 · p. 2
  • The analysis introduces a tractable data model and derives asymptotically precise random-feature test-loss expressions, decomposed into conditional-mean and residual errors.Source: §1 · pp. 2–3
  • In the overparameterized regime, wider models improve conditional-mean prediction while reducing prediction variance below that of the true denoiser, a pattern termed malign generalization.More informative conditions also lower training loss at every width, so memorization sets in at smaller widths.Source: §1 · p. 3
  • The paper reports both behaviors in full reverse-process generation with random-feature models and U-Nets on CelebA.Source: §1 · p. 3

1.1 Related work

  • Prior conditional distribution-estimation results use fixed-dimensional bounds or rates, while the cited memorization and generalization analyses are unconditional; this work extends random-feature analysis to the conditional setting.Source: §1.1 · p. 3

2 Preliminaries

The preliminaries define conditional diffusion and score learning at a fixed noise level. They connect the training loss to the empirical conditional score and use it as a measure of memorization at training conditions.

2 Preliminaries

  • The forward process noises x while keeping y fixed, and the reverse process uses a learned conditional score in place of the unknown score.Source: §2 · p. 4
  • The paper studies conditional score matching at a fixed diffusion time and excludes unconditional-score learning with a null condition used in classifier-free guidance.Source: §2 · p. 4
  • At training conditions, the conditional training loss is, up to a factor, mean-squared error against the conditional empirical score.Source: §2 · p. 4
  • The training loss serves as a memorization measure because a small loss along the reverse chain pushes generated samples for training conditions toward their paired samples.The paper illustrates this using loss at a fixed small time, where the bound's weight makes small times dominate.Source: §2 · p. 4

3 Problem setup

The setup models samples as a condition-dependent mean plus residual noise, then studies a random-feature score model and denoiser-based quantities of interest. Its measures capture conditional-mean accuracy, residual behavior, and within-condition prediction variance.

3.1 Data model

  • The data model writes x as a linear condition-dependent mean plus Gaussian residual noise, with condition strength and observed-direction fraction controlling how informative y is.The marginal distribution of x remains standard Gaussian as those condition parameters vary.Source: §3.1 · p. 5
  • Special cases of the data model include Gaussian denoising and an idealized super-resolution setting with noiseless observations of orthonormal directions.Source: §3.1 · p. 5

3.2 Random-feature model

  • The score is approximated by a two-layer random-feature model in the proportional high-dimensional limit, with fixed random hidden weights and a trained output matrix.Source: §3.2 · p. 5
  • The analysis uses Gaussian equivalence and linear pencils to evaluate the conditional model's asymptotic quantities.Source: §3.2 · p. 6

3.3 Quantities of interest

  • The test loss is expressed through an induced denoiser and decomposed into conditional-mean error and residual error; the former measures mean accuracy and the latter sample-wise residual fidelity.Source: §3.3 · p. 6
  • Prediction variance measures variability of denoiser outputs across samples at test conditions, while conditional-mean error and prediction variance are fixed-time denoising quantities rather than full-trajectory measures.Their width trends also appear in full reverse-process samples.Source: §3.3 · p. 6

4 Main results

Section 4 derives proportional-limit training and test losses for a random-feature conditional score model. It shows that width changes test mean and variance behavior, while condition strength shapes training loss and memorization.

4.1 Test loss and malign generalization

  • At test conditions, wider overparameterized models improve conditional-mean prediction but increasingly miss within-condition variation, with prediction variance falling below the true denoiser’s.The paper terms this pattern malign generalization.Source: Figure 2 · p. 7, §4.1 · pp. 8–9
  • Near ψp≈ψn, nonlinear ME exceeds linear ME by more than an order of magnitude, and both nonlinear ME and PV peak with the weight norm.Figure 3 separates the linear and nonlinear components at SNR = 16.Source: §4.1 · p. 9, Figure 3 · p. 9
  • Falling training loss drives Gx toward zero and lowers linear PV; beyond interpolation, the shrinking weight norm removes nonlinear ME and PV contributions.For ψp→∞ at fixed ψn, PV tends to zero and nonlinear ME vanishes.Source: §4.1 · pp. 9–10

4.2 Training loss and memorization

  • More informative conditions lower training loss at every width; increasing c or ψy also lowers residual variance and Rtrain at every r.The Figure 2 training-loss comparisons cover Gaussian denoising and super-resolution.Source: Figure 2 · p. 7, §4.2 · p. 10
  • As r→0+, Rtrain matches the population-score training loss, which vanishes as SNR→∞.The low-ratio regime has ψn≫ψp≫1.Source: §4.2 · p. 10
  • As r→∞, Rtrain vanishes; 1−ρ⋆ is the fraction of training samples fit, and ρ⋆ does not depend on c or ψy.This limit corresponds to ψp≫ψn≫1.Source: §4.2 · p. 10

5 Experiments

Full reverse-process samples from random-feature models on Gaussian data and U-Nets on CelebA reproduce the reported width and condition-strength trends. Stronger conditions bring memorization at smaller widths, while increasing width reduces sample variance.

5 Experiments

  • Experiments measure training-condition memorization, test-condition sample variance, and conditional-mean error; on CelebA, the test image substitutes for the unknown conditional mean.The conditional-mean error is computed from the mean of samples generated for a test condition.Source: §5 · p. 11

5.1 Random features on Gaussian data

  • In random-feature samples, higher SNR shifts memorization to smaller widths; variance keeps falling below true conditional variance, while conditional error peaks near ψp = ψn then declines.At test conditions, none of the samples is a copy of a training image.Source: §5.1 · p. 12

5.2 Denoising and super-resolution on CelebA

  • In U-Nets, stronger conditions trigger training-sample memorization at smaller widths, while variance falls and conditional error declines after a mild onset peak.The 2 × 2 condition is barely memorized through W = 128.Source: §5.2 · p. 12, Figure 5 · p. 12
  • For CelebA test conditions, the memorized fraction stays below 0.2% on average except for the 2 × 2 condition at W = 128.The results are averaged over seeds.Source: §5.2 · pp. 12–13

6 Conclusion

This section summarizes the proportional-limit analysis of a conditional random-feature diffusion model, including its training and test-loss results and the derivation of the quantities used to obtain them. It also identifies modeling assumptions and limitations that motivate extensions.

6 Conclusion

  • Wider overparameterized models lower conditional error while prediction variance decreases, and more informative conditions induce memorization at smaller widths.Full reverse-process generation with random features and U-Nets shows the same trends; the authors call for further study of conditional-diffusion memorization and generalization.Source: §6 · p. 13
  • The analysis assumes an isotropic marginal, residual covariance with two distinct eigenvalues, and Gaussian data; extending it to anisotropic marginals and non-Gaussian data remains open.The authors expect extension to residual covariances with finitely many distinct eigenvalues, with M given by the normalized trace in (B.52).Source: §6 · p. 13
  • The models concatenate the condition with x_t, unlike practical cross-attention or adaptive-normalization conditioning, whose effects on memorization and generalization remain unexamined.The passage names Rombach et al. (2022) and Dhariwal and Nichol (2021) as examples of practical conditioning mechanisms.Source: §6 · p. 13
  • The fixed-first-layer random-feature model is trained separately at each time using a ridge-loss minimizer, so the analysis excludes feature learning and parameter sharing across times.The authors leave both as directions for future work.Source: §6 · p. 13
  • The analysis assumes i.i.d. training pairs, does not address sampling biases such as duplicated images or templated captions, and leaves multiple samples per condition for future work.The passage notes links between replication and duplication in Carlini et al. (2023) and Webster (2023).Source: §6 · p. 13

B.1 Exact finite-dimensional identities

  • The appendix establishes exact finite-dimensional ridge-minimizer and training-loss identities, then derives test-loss identities including conditional-mean error, prediction variance, residual error, and residual alignment.The appendix also decomposes the residual error into residual alignment and prediction variance.Source: §B.1 · p. 22, Also define · p. 24

B.2 Proportional-limit reductions of the feature moments

  • The proportional-limit feature-moment reductions use Gaussian equivalence, Mehler’s formula, and leading-order terms, under stated assumptions on deterministic-equivalent limits and differentiation.The appendix applies these reductions to both test moments and training moments entering the proportional-limit results.Source: B Proofs of the decomposition and the… · p. 22, §B.2 · p. 25
  • Following George et al. (2026), Gaussian equivalence replaces the nonlinearity ϱ0(L) with G = µ1L + v0Ω to obtain the feature-moment reduction.Source: §B.2 · p. 31

B.3 Decomposition of the test errors and the training loss

  • The test-error decomposition writes Γ as the sum of conditional-mean and residual covariances, then derives equivalences for ME, PV, RA, and the training loss.Both covariance matrices are positive semidefinite.Source: §B.3 · pp. 31–32

B.4 Reduction to resolvent traces

  • Normalized resolvent traces represent the error and weight quantities, while derivatives of K recover E3, Em, and Er.The stated identities are E1 = K, E3 = ∂zK, Em = −∂qmK, Er = −∂qrK, and EΣ = KΣ.Source: §B.4 · p. 33

B.5 Linearization and the perturbed resolvent

  • A six-block linear pencil reduces the perturbed-resolvent calculation to four scalar equations, with block splitting yielding data and covariance-weighted traces.The derivation assumes the relevant normalized inverse-block trace limits exist.Source: §B.5 · pp. 33, 36, 37

B.6 Spectral reduction and the two-scalar fixed-point equations

This appendix reduces spectral trace calculations to the covariance spectrum and uses fixed-point equations to obtain proportional-limit quantities. Those limits yield test-loss components and the training loss for the ridge minimizer.

B.6 Spectral reduction and the two-scalar fixed-point equations

  • The covariance matrix has eigenvalues 1 − c^2 and 1 on two subspaces, reducing normalized-trace evaluation to spectral calculations.The two eigenspaces have multiplicities dy and dx − dy, respectively.Source: §B.6 · pp. 37–38
  • Theorem B.11 gives proportional-limit quantities for the denoiser decomposition and the training loss of the ridge minimizer under the stated data model and scaling assumptions.The result is obtained for fixed t > 0 and λ > 0.Source: §B.6 · pp. 39–40
  • The proof substitutes spectral trace limits into the relevant identities to establish Theorem B.11 and hence Theorem 4.2.The derivation uses the fixed-point equations and assumes interchange of limits and derivatives in q and z.Source: §B.6 · p. 40
  • The fixed-point solution (m, ρ) is continued from a large ridge parameter λ, with derivatives in q and z computed by implicit differentiation.These evaluated functions and derivatives supply the limiting quantities used in Section 4.1.Source: §B.6 · pp. 39–40

C.1 Training loss in the joint large-aspect-ratio limit

The appendix reduces training-loss analysis to a high-dimensional fixed-point quantity and interprets ρ as the fraction of training samples left unfitted. It also relates training loss to the linear prediction-variance term.

C.1 Training loss in the joint large-aspect-ratio limit

  • The joint-limit proof reduces the fixed-point relation to a quadratic for ρ, with a unique leading-order root ρ⋆∈(0,1) and |ρ−ρ⋆|=O(ω+λ).The error bound is uniform in r>0.Source: §C.1 · p. 41

C.2 The scalar ρ

  • The scalar ρ is the effective fraction of training samples left unfitted; for v0>0, the feature component v0Ω gives each sample its own direction and allows 1−ρ→1.For linear activation, 1−ρ is bounded by the feature-rank ratio; the leading root ρ⋆ depends on r, s², and v₀².Source: §C.2 · p. 42

D Training loss and the large-width limit at a fixed sample ratio

  • At a fixed sample ratio, the section relates training loss to Gx and establishes large-width limits.The setup fixes t, s², and v₀² under the stated high-dimensional equivalence conventions.Source: D Training loss and the large-width… · p. 43

D.1 Training loss and Gx

  • The D.1 analysis relates training loss to Gx and bounds the linear part of prediction variance using that relation.The subsection also states an exact finite-dimensional identity for the denoised estimate.Source: §D.1 · p. 43

D.2 Large width at a fixed sample ratio

At fixed sample ratio, increasing width drives prediction variance and the nonlinear part of conditional-mean error to zero. Finite simulations track the theory closely overall, while the random-feature sampler and CelebA experiments use specified generation and evaluation settings.

D.2 Large width at a fixed sample ratio

  • As width tends to infinity at fixed sample ratio, prediction variance and the nonlinear part of conditional-mean error vanish.The ridge term also tends to zero; the proposition states these limits in the fixed-sample-ratio setting.Source: §D.2 · pp. 44–45

E.1 Theory curves and finite simulations

  • Median relative deviation from Theorem 4.2 is below 3% for ME, RE, PV, and ME + RE in both simulation rows, while simulated PV exceeds theory by up to 17% at ψp=256.The largest deviations occur at the widest models, where PV is smallest.Source: §E.1 · p. 47

E.2 Random-feature sampler

  • The random-feature sampler uses 200 ancestral steps from a Gaussian initial state and evaluates 512 test conditions and all 2048 training conditions, with 128 generations per condition.The sampler uses the ordinary ancestral chain and starts from the exact marginal distribution of xt.Source: §E.2 · p. 47

E.3 CelebA training and evaluation

The CelebA evaluation compares generated-image errors and memorization across U-Net settings. Conditional and debiased errors nearly coincide and peak near the onset of memorization for memorized conditions.

E.3 CelebA training and evaluation

  • The grayscale 32×32 CelebA experiments use conditional ε-prediction U-Nets whose parameter count grows as W², with 200k training steps and three seeds per setting.The condition enters as a second input channel; evaluation uses 4096 generations for training-condition memorization and 16 draws for each of 128 test conditions.Source: §E.3 · pp. 47–48
  • The conditional-error comparison substitutes the original image for the unknown conditional mean; its decomposition includes conditional-mean error, data-dependent variance, and finite-sample variance.The estimate averages K=64 draws over 128 test conditions.Source: §E.3 · p. 48
  • Per-sample error includes the full generated variance rather than variance divided by K, so it falls with width as samples for a test condition collapse.Figure 6 also reports conditional, debiased, and super-resolution pooled errors.Source: §E.3 · p. 48, Figure 6 · p. 49
  • For memorized conditions, conditional and debiased errors nearly coincide and both peak near the onset of memorization.The conditional error uses the mean of K=64 generated samples.Source: §E.3 · p. 48

F.1 Smaller training set

With one quarter as many training images, memorization transitions move to smaller widths while the ordering by condition strength stays the same. Within-condition variance generally falls as width increases, with exceptions for the weakest conditions.

F.1 Smaller training set

  • Within-condition variance falls by one to two orders of magnitude from W=16 to W=128, except for σ=2, which levels off after W=64, and the 2×2 condition, which falls about threefold.For σ=2, the 2×2 condition, and other settings, memorization transitions occur at smaller widths than with n=32768.Source: §F.1 · p. 49
  • For the 2×2 condition, memorization completes only at W=128 and conditional error is still rising at the largest width, consistent with a peak near memorization onset.Source: §F.1 · p. 49
  • With n=8192, every transition moves to a smaller width, while the ordering by condition strength remains unchanged.The figure compares U-Net widths W∈{16,32,64,128} and includes error metrics in its last four columns.Source: §F.1 · p. 49, Figure 7 · p. 50

F.2 Test and training losses over width and condition strength

Across the tested settings, stronger conditions shift training-loss level sets to smaller widths, while changing t alters the test-error peak near ψp=ψn. Jointly increasing the two specialization SNRs lowers training loss, which becomes small only when both are large.

F.2 Test and training losses over width and condition strength

  • As SNR rises, training-loss level sets move to smaller widths around ψp=ψn.Figures 8–11 show test loss and its ME and RE components, ME, RE, PV, and training loss at ψn=8, 32, 64, and 256.Source: §F.2 · p. 50, Figure 8 · p. 50, Figure 9 · p. 51
  • At t=0.001, 0.1, and 1, smaller t sharpens the test-error peak near ψp=ψn, larger t smooths it, and at t=1 errors no longer peak there.Source: Figure 12 · p. 52, §F.2 · p. 52, Figure 13 · p. 53
  • At every width, training loss decreases with both c and ψy but becomes small only when both are large, matching Rtrain(ψp/ψn) within 2 × 10−3.Figure 15 varies the two specialization SNRs at ψn=256 and ψp/ψn ∈ {2, 8, 32, 64}.Source: §F.2 · pp. 53–54

F.3 Additional CelebA samples

The additional CelebA samples vary the condition and model width, reporting memorized fractions for training conditions. The paper also discloses how generative AI tools were used and how the authors reviewed that work.

F.3 Additional CelebA samples

  • With n=32768 and W=32, training-condition samples were memorized at 91%, 19%, and 0% for 8 × 8, 4 × 4, and 2 × 2 super-resolution, versus 97%, 45%, and 3% at σ=0.1, 0.4, and 2 for denoising.Source: §F.3 · p. 54
  • For the strongest conditions, memorized fractions at W=16, 32, and 64 are 12%, 91%, and 99% for 8 × 8 super-resolution, and 52%, 97%, and 99% for σ=0.1 denoising.Source: §F.3 · p. 54, Figure 18 · p. 57, Figure 19 · p. 58
  • Each Figure 16 row shows a source image, its nearest-upsampled condition, five generated samples, and the nearest training image; left and right distinguish training and test conditions.Source: Figure 16 · p. 55, §F.3 · p. 55

G AI use statement

  • The authors report using generative AI for proofs, experiments, implementation, translation, dataset work, result interpretation, figures, code, and editing, and reviewing all AI-assisted work.Source: G AI use statement · pp. 58–59
Loading 2610.11288v1…