Stanford's RePR Trains Image Encoders 8x Cheaper Than DINOv2
A new self-supervised tokenizer called RePR scales predictably with compute, hits FID-50K of 2.18 on ImageNet, and beats raw diffusion.
Takeaways
- RePR is a new self-supervised tokenizer training recipe for generative image models from Stanford.
- It estimates pointwise mutual information between masked views using a jointly trained generative model instead of contrastive negatives.
- Hits FID-50K of 2.18 on ImageNet with JiT-L, improving over 2.36 baseline.
- Scaling-law extrapolation suggests 7x less compute than DINOv2 and 8x less than WebSSL.
- Avoids feature suppression that collapses DINO and LeJEPA on watermarked data.
- Code available at github.com/AlanBaade/repr.
Most latent image generators first use an encoder, often called an image tokenizer, to compress pixels into a smaller grid of latent vectors. A diffusion model then learns to generate those vectors, reducing training and inference costs. Tokenizer quality has improved less predictably with added compute than downstream diffusion models, leaving the encoder as a bottleneck. Stanford researchers address that constraint in the RePR paper, Generative Representation Learning for Scalable Latent Tokenization, which treats representation training as its own scaling axis.
Alan Baade, Kyle Sargent, Vincent Sitzmann, Eric Ryan Chan, Justin Johnson, Li Fei-Fei, and Gordon Wetzstein report an FID-50K of 2.18 on ImageNet class-conditional generation with a large JiT diffusion backbone. Their scaling-law analysis also projects that RePR can match DINOv2 and WebSSL representation quality with one-seventh to one-eighth as much tokenizer-training compute.
Measured gains, modeled savings
| Claim | Reported result | Evidence |
|---|---|---|
| Generation quality | 2.18 FID-50K on ImageNet with JiT-L. FID compares 50,000 generated samples with real images; lower scores indicate closer distributional similarity. | Reported experiment |
| Tokenizer efficiency | One-seventh to one-eighth as much tokenizer-training compute as DINOv2 and WebSSL at matched representation quality. | Scaling-law extrapolation |
| Compute allocation | Roughly 20% to 35% of total training FLOPs assigned to the tokenizer in the fitted compute-optimal regime. | Scaling-law analysis |
| PMI estimator cost | About 1.3% of total training FLOPs using roughly 32 integration steps. | Training measurement |
Why tokenizers stop improving
Two common tokenizer approaches lose useful information in different ways. Variational autoencoders impose a stochastic bottleneck, while VQ-VAEs quantize features into a finite codebook. Both optimize reconstruction through a constrained latent channel, which can discard semantic information needed by the downstream generator. Self-supervised encoders such as DINOv2 scale reliably with compute, but their representations were designed for discriminative tasks and require additional mechanisms to prevent collapse.
Self-supervised objectives can also suppress features when a simple shortcut separates training examples. To expose this failure mode, the authors add a batch-identifying watermark seed to every ImageNet patch. DINO and LeJEPA focus on the shortcut and collapse on the benchmark, while RePR continues to learn features useful for generation.
RePR turns likelihood into supervision
Pointwise mutual information, or PMI, measures how much more likely two observations are to occur together than their separate probabilities would suggest. Contrastive learning can be interpreted as factorizing the PMI between two views of an example into a dot product between their embeddings.
RePR preserves that objective and changes how PMI is estimated. A masked generative model is trained alongside the encoder, and differences between its conditional log-likelihoods provide a PMI target for two masked or noised views, x and y. The encoder learns to make R(x) 路 R(y) match that target. This construction removes dependence on negative examples and large-batch statistics, while a stronger generative scorer provides a more accurate training signal as compute increases.
RePR controls the estimator鈥檚 cost and its tendency to favor low-level pixel details through two mechanisms:
- Timestep weighting: Diffusion noise levels receive different weights so that high-frequency pixel bits do not dominate the PMI target, preserving more semantic content.
- Bootstrapped Monte Carlo integration: Conditional likelihoods are estimated with roughly 32 integration steps and shared noise, limiting the estimator to about 1.3% of total training FLOPs.
Encoder scale predicts generator quality
The experiments hold the downstream Latent Forcing diffusion recipe fixed while varying RePR encoder size and encoder-training FLOPs. Each point uses a separately trained encoder, with no GAN loss, LPIPS perceptual loss, or external pretrained features. Generation quality changes smoothly with encoder capacity and compute, allowing the authors to fit a scaling law that isolates the tokenizer鈥檚 contribution.
Under a fixed total-FLOPs budget, the fitted compute-optimal curves allocate roughly 20% to 35% of training compute to the RePR tokenizer. Those configurations outperform a JiT model trained directly on pixels at matched total training FLOPs. The reported architectures, datasets, and objectives determine that range, so other stacks need their own allocation sweep.
Where RePR fits
RePR targets latent image generation, including class-conditional ImageNet generation and text-to-image training on GPIC. For stacks that currently use frozen DINOv2 or WebSSL features as an encoder, RePR provides a direct comparison point and supplies an encoder trained end to end under a generative representation objective.
A useful implementation study would track the full system rather than the downstream diffusion model alone:
- Count tokenizer and generator training FLOPs in the same compute budget.
- Compare representation quality and downstream FID across several encoder sizes.
- Measure wall-clock time, memory use, and training stability alongside FLOPs.
- Test the proposed 20% to 35% allocation range against stack-specific baselines.
Claims bounded by the experiments
- Domain: The experiments cover image generation. Transfer to video, audio, and language tokenizers remains untested.
- Complexity: Jointly training a masked generative scorer and an encoder adds implementation and orchestration work to the tokenizer pipeline.
- Extrapolation: The largest projected efficiency gains come from fitted scaling laws rather than a flagship-scale encoder run.
- Metric coverage: FID measures distributional similarity. The reported results leave inference latency, serving memory, prompt alignment, and output diversity for separate evaluation.
Code and paper
The authors released the source code, and the paper and appendices provide the full experimental setup. For teams building latent diffusion systems, RePR offers a concrete way to test tokenizer training as an explicit compute allocation, with measured generation gains and clearly identified extrapolated claims.