TL;DR
Representation Autoencoders (RAEs) unify vision understanding and generation by replacing traditional VAEs with pretrained vision encoders, but they typically suffer from slow training convergence and subpar image reconstruction. This paper introduces RAEv2, a highly optimized framework that aggregates multi-layer encoder features and repurposes representation alignment for "free" self-guidance. The result is a massive 10× speedup in training convergence, state-of-the-art generation metrics, and reconstruction quality that rivals proprietary VAEs.
What Problem Does This Paper Address?
Modern latent diffusion models (like Stable Diffusion or Flux) rely on Variational Autoencoders (VAEs) to compress images into a low-dimensional latent space before generating pixels. Recently, researchers introduced Representation Autoencoders (RAEs) to swap out standard VAEs for pretrained vision foundation models (like DINOv2). This moves the field closer to a unified tokenization scheme—using the exact same features for both understanding (classification, retrieval) and generation.
However, first-generation RAEs suffer from three major bottlenecks:
- Reconstruction Lag: Their ability to reconstruct fine details (like text or faces) falls short of specialized, proprietary VAEs.
- Guidance Incompatibility: They struggle with standard Classifier-Free Guidance (CFG), forcing practitioners to train complex, secondary "weak" diffusion models to guide the generation process.
- Under-utilized Features: Prior work blindly defaulted to using only the final layer of pretrained encoders, discarding rich structural information hidden in earlier layers.
Methods
The authors systematically audit RAE design choices and introduce three elegant, training-free modifications to create RAEv2:
- Generalized Representation Encoder: Instead of extracting features solely from the final encoder layer, RAEv2 defines the latent space using a Multi-Layer Sum (MLS). By simply summing the features of the last $K$ layers, the latent space retains both high-level global semantics (from later layers) and low-level spatial geometry/texture (from earlier layers).
- Synergizing RAE and REPA: Conventional wisdom assumed that using a pretrained encoder as the latent space (RAE) made distilling those same features into intermediate layers (Representation Alignment, or REPA) redundant. The authors prove they are actually complementary: RAE provides a semantically rich latent space, while REPA regularizes the token-to-token spatial structure of intermediate diffusion features.
- Free Self-Guidance via $x$-Prediction: The authors reformulate the REPA projection head to perform $x$-prediction (predicting the clean latent) in the RAE latent space. Because this head is a lightweight MLP accessing early layers, its predictions are inherently "weaker" than the full model. This allows it to act as the baseline for internal guidance within a single forward pass, completely eliminating the need for secondary models or the extra unconditional forward passes required by CFG.
Datasets
The authors validated RAEv2 across three distinct tasks using standard benchmarks:
- Class-Conditional Image Generation: Trained and evaluated on ImageNet-256.
- Text-to-Image (T2I) Generation: Pretrained on JourneyDB combined with long/short caption subsets of BLIP3o, and finetuned on BLIP3o-60k. Evaluated using GenEval, DPG-Bench, and GenAI-Bench.
- Navigation World Models: Trained on RECON at 4 FPS to stress-test long-context, action-conditioned future-frame prediction.
Key Insights and Ideas
- Pretrained Encoders are More Than Their Final Layer: Multi-layer feature aggregation acts as a Pareto-optimal knob. Increasing $K$ monotonically improves image reconstruction without adding any extra parameters or fine-tuning the encoder.
- The RAE + REPA Synergy: Linear probing and distance similarity scores reveal a clear division of labor. RAE excels at capturing global semantic quality, whereas REPA excels at structuring spatial layouts.
- Halving Inference Cost: Repurposing the REPA head for internal guidance provides high-quality sample guidance at zero extra computational cost, effectively halving the Number of Function Evaluations (NFEs) compared to traditional CFG.
Key Results
- 10× Faster Convergence: On ImageNet-256, RAEv2 achieves a state-of-the-art generative Fréchet Inception Distance (gFID) of 1.06 in just 80 epochs, outperforming original RAE models trained for 800 epochs.
- Training Efficiency ($EP_{FID}@2$): To measure practical training efficiency, the authors report the epochs needed to reach an unguided gFID $\le 2$. RAEv2 hits this milestone in just 35 epochs, compared to 177 epochs for the original RAE.
- Competitive Reconstruction: Despite being trained only on ImageNet, RAEv2's reconstruction performance is highly competitive with proprietary, closed-source VAEs like Flux VAE and SDXL-VAE.
- Robust Generalization: In text-to-image tasks, RAEv2 boosts GenEval scores from 41.7 (Flux-VAE) to 62.4 during pretraining. For navigation world models, it slashes the Future Video Distance (FVD) from 312.01 (original RAE) down to 105.61, drastically reducing frame flickering.
Limitations and Future Work
- Simple Aggregation Schemes: The authors only explored simple addition (MLS) and random projection (MLR) to combine encoder layers. More sophisticated, learned aggregation mechanics could unlock even better trade-offs.
- Discrete Encoder Search: Finding the best representation space currently requires an empirical search over a discrete set of existing pretrained models (e.g., DINOv2 vs. DINOv3). A promising future direction is directly optimizing the representation space end-to-end specifically tailored for generative tasks.
Summary updated