Sparsely Supervised Diffusion NeurIPS 2026

Supervise less.
Generate consistently.

Mask the training loss, not the input. A few lines of code for diffusion and flow-matching models.

Wenshuai Zhao, Zhiyuan Li, Yi Zhao, Mohammad Hassan Vali, Martin Trapp, Joni Pajarinen, Juho Kannala, Arno Solin

Figure 2 of the paper. Flow matching and SSD take the same full noise input and the same U-Net. Flow matching supervises every pixel of the target; SSD supervises a stack of sparse, randomly masked views of the target.

Up to 98% of pixels masked. Competitive FID.No change to the architecture or the sampler.

Paper

Get the highlights.

Get the code

98% of pixels masked.
FID 13.72 → 5.10 on CelebA‑10K.

FID against training epochs on CelebA-10K. Without masking and at a masking ratio of 0.5, FID climbs from about 5 to above 13 with prolonged training. At masking ratios of 0.95 and 0.98 it stays near 5.

Scattered shapes in 3,899 of 5,000 images.
With SSD, in 792.

Rows of black images with white triangles and squares: training data on top, baseline samples in the middle with many scattered fragments, SSD samples at the bottom with mostly whole shapes.

The same noise, the same seed.
Finger-count errors 35 → 22.

BaselineBaseline hand 1, wrong number of fingersBaseline hand 2, wrong number of fingersBaseline hand 3, wrong number of fingersBaseline hand 7, wrong number of fingersBaseline hand 8, wrong number of fingers
SSDSSD hand 1 from the same noiseSSD hand 2 from the same noiseSSD hand 3 from the same noiseSSD hand 7 from the same noiseSSD hand 8 from the same noise

The problem

Locally plausible.
Globally inconsistent.

Diffusion models learn correlations from a finite training set, and some of them are accidental. The result: samples whose parts look right but do not fit together. Extra fingers. Shapes in fragments.

Read the abstract

Diffusion models have shown remarkable success across a wide range of generative tasks. However, they often suffer from spatially inconsistent generation, arguably due to excessive correlations learned by the model. This can produce samples that are locally plausible but globally inconsistent. We propose a principled method to mitigate this issue. Our method, sparsely supervised diffusion (SSD), is a simple yet effective masking framework that can be implemented with only a few lines of code. We analytically show that SSD fundamentally alters diffusion model training by modifying the spectrum of the data covariance and that it suppresses correlations in the data covariance matrix. Experiments show that our method more accurately approximates the underlying population score function, reduces memorization on small datasets, and promotes the use of essential contextual information during generation. Moreover, even when up to 98% of pixels are masked, it achieves competitive FID scores across a range of datasets and avoids the training instability commonly observed on small datasets.

How it works

Keep the input.
Sparsify the supervision.

The model still sees the whole noisy image. Only the regression loss is masked, with a fresh random mask at every step.

Three lines.

Replace the mean of the squared error with a masked mean. Everything else, from the data pipeline to the sampler, stays as it is.

# prediction, target: model output and regression target
error = (prediction - target).square()
mask  = (torch.rand_like(error) > eta).float()
loss  = (error * mask).sum() / mask.sum().clamp(min=1)

Take a closer look.

η = 0, no masking. Standard flow matching on CelebA-50K.

20% of loss entries masked. Same network, same initial noise.

Half of the loss entries masked. Same network, same initial noise.

80% of loss entries masked. The model learns from one pixel in five, and still generates whole faces.

CelebA-50K · 64 × 64 · η = 0.8

Spatial consistency

3,899. 792.

A controlled dataset of whole triangles and squares. The baseline breaks shapes into fragments in 3,899 of 5,000 samples. SSD does so in 792.2

Training shapes on top, baseline samples with scattered fragments in the middle, SSD samples with mostly whole shapes at the bottom.
RatioSSD, η = 0.5Baseline

4.9×fewer images with scattered clusters

SSD792

Baseline3,899

11×fewer scattered clusters in total

SSD1,014

Baseline11,208

11kHands

Five fingers,
more often.

1,000 hands per model, from the same seed. The baseline draws a wrong number of fingers 35 times. SSD, 22 times, and six-fingered hands drop from 26 to 8.3

One noise. Two models.

Baseline SSD η = 0.8

Selected pairs: each column shares its initial noise, and at least one hand in it has a finger-count error. Click a hand to enlarge.

Finger-count errors in 1,000 samples per model
ErrorBaselineSSD, η = 0.8
Six fingers268
Four fingers914
Total3522

The count covers four- and six-finger hands only. Four-fingered hands become more frequent with SSD; the total falls.

Small datasets

Train longer.
Without falling apart.

On 10,000 faces, the baseline's FID climbs from about 5 to 13.72 with prolonged training. Masking 98% of the loss keeps it at 5.10, and samples move further from their nearest training image.

FID during training on CelebA-10K

Lower is better · one curve per masking ratio η

FID against epochs on CelebA-10K. Curves for eta 0 and 0.5 rise to about 13 after 3,000 epochs; curves for 0.95 and 0.98 stay near 5.
RatioSSD, η = 0.98Baseline

2.7×lower FID on CelebA-10K

SSD5.10

Baseline13.72

+3.7ℓ₂ distance to the nearest training image4

SSD46.02

Baseline42.32

−10.4FID with DiT-XL/2 on a 100K-image ImageNet subset1

SSD15.58

Baseline25.99

Why it works.

Consider zero-mean Gaussian data with covariance Σ, and keep each coordinate independently with probability p = 1 − η. Masking leaves the variances on the diagonal of the covariance less affected than the correlations off it.

Masking attenuates correlations

Σ~=p2Σ+p(1−p)D

D = diag(Σ). Variances scale by p. Covariances scale by p². Every correlation therefore shrinks by a factor p.

Each bar shows the masked quantity as a fraction of its unmasked value: variance p, covariance p squared, correlation p.

Diagonal entries

p Σᵢᵢ

Coordinate variances are scaled by the retention probability.

Off-diagonal entries

p² Σᵢⱼ

Cross-coordinate covariance is attenuated more strongly, for i ≠ j.

The spectrum changes

λ~i=p2λi+p(1−p)uiTDui

Variance along each eigenvector uᵢ of Σ. The spectrum governs diffusion training dynamics, so masking changes how the model learns.

Side by side.

FID ↓ on every benchmark in the paper. Large datasets stay competitive; small ones improve most.1

Baseline

no masking

SSD

masked loss

CIFAR-10 · FID

2.28± 0.04
2.24± 0.05

LSUN Bedroom · FID

1.40± 0.04
1.39± 0.01

CelebA-50K · FID

2.23± 0.23
1.85± 0.14

CelebA-10K · FID

13.72η = 0
5.10η = 0.98

ImageNet 256 · DiT-XL/2 · FID

4.98180K steps, CFG 1.5
4.83η = 0.98

ImageNet-100K subset · DiT-XL/2 · FID

25.99200K steps, CFG 1.5
15.58η = 0.98

Images with scattered shapes, of 5,000

3,899
792η = 0.5

Finger-count errors, of 1,000

35
22η = 0.8

Questions? Answers.

Does SSD mask the model's input?

No. The network always receives the full noisy image. The random mask applies only to the entries of the regression loss, so the model must predict every pixel but is graded on a random subset of them.

Does it change the architecture or sampling?

No. SSD is a change to the training loss only and is model-agnostic. We use it with a convolutional U-Net under flow matching on CIFAR-10, CelebA and LSUN Bedroom, and with DiT-XL/2 on ImageNet. Sampling is unchanged.

Isn't this the same as lowering the learning rate?

No. A smaller learning rate shrinks every update by the same factor: the model fits the same target, in smaller steps. SSD changes the target statistics themselves. In our Gaussian analysis, masking scales each pixel's variance by (1 − η) but each covariance between two pixels by (1 − η)², so every pixel-to-pixel correlation shrinks by a factor of 1 − η. Changing the learning rate leaves those correlations untouched. SSD also trains with the same learning rate as the baseline.

Which masking ratio should I use?

We did not tune it. The paper reports a range of ratios: η = 0.8 on the large flow-matching benchmarks, and η = 0.98 on CelebA-10K and ImageNet. High ratios help most when data are scarce or training runs long. Finding the optimal ratio is left for future work.

Why not just report FID?

FID does not adequately reflect spatial consistency. We therefore designed targeted tests: scattered clusters in a shapes dataset, finger counts on 11kHands, and the error against a known population score in a synthetic 2D Gaussian study.

Do the masks have to be per pixel?

No. On CelebA-10K at 3,500 epochs, element-wise masking with η = 0.98 reaches FID 5.10, and 8 × 8 patch masks with η = 0.9 reach 5.14, against 13.38 without masking. The ratios differ, so this comparison does not isolate granularity alone.

Does SSD reduce memorization?

On CelebA-10K, the average ℓ₂ distance from 10,000 samples to their nearest training images rises from 42.32 to 46.02 at η = 0.98, while FID also improves. This distance is a proxy for memorization, not a privacy guarantee.

  1. FID over 50,000 samples. CIFAR-10, CelebA and LSUN Bedroom: flow matching with a U-Net, Heun's method, 50 function evaluations; the first three rows report mean ± standard deviation. ImageNet: DiT-XL/2 at 256 × 256 with the Stable Diffusion VAE, classifier-free guidance 1.5; full ImageNet for 180K steps, the 100K-image subset for 200K steps.
  2. 5,000 generated images per model on a controlled dataset of triangles and squares; SSD with η = 0.5. The training set has 500 binary images; a scattered cluster is a pixel cluster smaller than both the triangle and the square.
  3. 11kHands at 64 × 64, 400-epoch checkpoints, 1,000 samples per model from seed 0. Only four- and six-finger hands are counted. The pairs shown were selected because at least one hand had a finger-count error.
  4. Average ℓ₂ distance between 10,000 generated CelebA-10K images and their nearest training images. Larger means less memorization.

NeurIPS 2026

Sparsely Supervised Diffusion

Wenshuai Zhao1,4 Zhiyuan Li1 Yi Zhao2 Mohammad Hassan Vali1 Martin Trapp3 Joni Pajarinen1 Juho Kannala1,5 Arno Solin1,4

1Aalto University · 2Imperial College London · 3KTH Royal Institute of Technology
4ELLIS Institute Finland · 5University of Oulu

BibTeXDownload
@inproceedings{zhao2026sparsely,
  title     = {Sparsely Supervised Diffusion},
  author    = {Zhao, Wenshuai and Li, Zhiyuan and Zhao, Yi and Vali, Mohammad Hassan and Trapp, Martin and Pajarinen, Joni and Kannala, Juho and Solin, Arno},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026}
}
Selected generated image