Diffusion Transformers with Representation Autoencoders
- Publication
- ICLR 2026Conference
- First submitted to arXiv
- arXiv:2510.11690
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{imagegenerationrae2025,
title = {{Diffusion Transformers with Representation Autoencoders}},
author = {Boyang Zheng and Nanye Ma and Shengbang Tong and Saining Xie},
year = {2025},
eprint = {2510.11690},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2510.11690}
}
SD-VAE looks at a image and hands the diffusion model , 4,096 numbers in all.
DINOv2-B looks at the same image and outputs 256 tokens of 768 dimensions each, 196,608 numbers in all, 48 times as many.
Throughout this series, from the variational autoencoder (VAE) onward, every generation has worked at squeezing images into a small, easy-to-learn set of latent variables for a generative model to learn. The last two notes, VA-VAE and REPA-E, went one step further and tried to make those latents look like DINOv2's features.
RAE's question is more direct. If the goal is to look like DINOv2, why not just use DINOv2?
The authors take out the VAE, put in a frozen DINOv2 encoder, and train a ViT decoder to turn the features back into images, naming the result Representation Autoencoder (RAE). On ImageNet 256, without any guidance, it gets a gFID of 1.51. Before reaching that number, though, the diffusion Transformer first has to learn to generate in 768-dimensional tokens, and that takes up most of the paper.
Defining the problem
The paper lists three limitations of SD-VAE.
The first is that it's heavy. SD-VAE is convolutional with a lot of up- and downsampling; for one image, the encoder takes 135 GFLOPs and the decoder 310 GFLOPs. The diffusion models after it have all moved to Transformers, but the first and last stages are still old convolutional networks.
The second is low capacity. With only 4 numbers left per position, the detail of the reconstruction has a ceiling.
The third is weak representations. A VAE is trained only for reconstruction; the authors ran ImageNet linear probing on SD-VAE's latents, and the accuracy is only 8.0%. The alignment methods along the REPA, VA-VAE and REPA-E line are all patching over this weakness, at the cost of an extra training stage, an extra auxiliary loss and more hyperparameters to tune.
So why has nobody just used a representation encoder directly? The authors sum up two widespread beliefs:
- Encoders trained for semantics capture only high-level information and throw away pixel detail, so reconstructing from them can only recover an image "with high-level semantic similarities."
- Diffusion models perform badly in high-dimensional latent spaces, so the lower the latent dimension, the better.
If both hold, RAE can't work. The first half of the paper tests the first belief, and the second half deals with the second.
Solving the problem
Giving a representation encoder a decoder

On the left is the familiar SD-VAE, its red blocks shrinking all the way down to a latent with only 4 channels in the middle, after which the decoder grows it back out. On the right is RAE, whose encoder and decoder are both ViTs with every layer the same width and no compression anywhere in between.
Let's follow one image through:
- The image is first resized to . DINOv2 only comes with patch 14, and , giving tokens.
- The frozen DINOv2-B (the version with registers) outputs 256 patch tokens of 768 dimensions; the [CLS] and register tokens are discarded.
- Each token goes through LayerNorm without its learnable scale and shift, so every token has mean 0 and variance 1 across its 768 channels.
- A ViT-XL decoder with patch 16 restores the 256 tokens; , which tiles back exactly into a image.
The encoder is never trained; only the decoder is. The loss follows VQGAN's recipe:
and . is an adaptive weight that compares the sizes of the reconstruction loss's and the GAN loss's gradients with respect to the output, so the two end up on a comparable scale:
The discriminator is a frozen DINO-S/8; the authors say the patch-8 version is more stable than patch 16, and the decoder is less likely to learn texture artifacts that fool the discriminator. The decoder is trained on ImageNet for 16 epochs with batch 512.
Note that nothing "variational" is left here. No approximate posterior, no prior and no KL term; the encoder is a fixed function, and the latent space is simply DINOv2's own feature space.
The authors tried three encoders pretrained in different ways, the self-supervised, distillation-based DINOv2-B, the language-supervised SigLIP2-B and the masked-reconstruction MAE-B, all of them 768-dimensional.
| Encoder | rFID | Linear probe |
|---|---|---|
| DINOv2-B | 0.49 | 84.5% |
| SigLIP2-B | 0.53 | 79.1% |
| MAE-B | 0.16 | 68.0% |
| SD-VAE | 0.62 | 8.0% |
Compiled from Table 1 of the paper. ImageNet; every RAE uses a ViT-XL decoder.
All three RAEs have lower rFID than SD-VAE, and MAE-B even gets down to 0.16. A smaller decoder works fine too; the ViT-B decoder has rFID 0.58 at only 22.2 GFLOPs, a fourteenth of SD-VAE's decoder, while ViT-XL gets 0.49 at 106.7 GFLOPs. Switching among DINOv2's S, B and L sizes gives rFID 0.52, 0.49 and 0.52, essentially unchanged.
Measured by rFID, the first belief doesn't hold up on ImageNet. The semantic encoder's features are enough to restore the image while keeping strong representations; whether every pixel lines up is something we'll come back to in the discussion.
DiT isn't buying it
Next, put a diffusion model on top. The backbone is LightningDiT from the VA-VAE paper, with patch set to 1, so the 256 tokens go straight into the model; the sequence length is the same as DiT with SD-VAE and patch 2, and the compute is nearly the same too. The training objective is flow matching, , with the model predicting the velocity and being pure noise.
It breaks the moment it goes on. With the same 80 epochs of training:
| Model | RAE | SD-VAE |
|---|---|---|
| DiT-S | 215.76 | 51.74 |
| DiT-XL | 23.08 | 7.13 |
Compiled from Table 2 of the paper. gFID.
The small model can't learn at all, and the large one is still three times worse than SD-VAE. The authors raise three suspicions. DiT's architecture was designed for low-dimensional tokens; the noise schedule was tuned for pixels or low-dimensional VAEs; and the RAE decoder has only ever seen clean features, while features generated by a diffusion model always carry some error. The next three subsections take them one at a time.
Problem one, width
The authors start with a minimal experiment. Instead of training on all of ImageNet, take a single image, encode it with RAE, and see whether a diffusion model can memorize just this one.

The left plot fixes the depth and changes only the width . DINOv2-B's tokens are -dimensional. For , the model can't memorize even a single image; the loss sits right on the red dashed line, and the generated parrot is covered in color blotches. Once crosses 768, the loss drops to 0 and the image is almost identical to the original.
The right plot does the opposite, fixing the width at 384 and raising the depth from 4 layers to 24. The model gets several times bigger, and the loss stays at 0.5 without moving at all.
So the problem is width, and there's a very clear line. The authors write it up as a theorem; let's make sense of it first with a 2-dimensional example.
Suppose the latent has only dimensions, and the whole dataset is one image . DiT's input layer is a linear projection , and its final output layer an linear projection ; however many layers sit in between, they all compute in dimensions. Let . Whatever computes, the model's output can only be the single direction times some number, which means it lies on one fixed line in the plane.
The target the model has to predict is . is fixed and is 2-dimensional standard normal noise, so the target is a cloud of points centered at with variance 1 in every direction.
Knowing the answer doesn't help. In this single-image example the model sees and can recover completely; but it can only answer along that line, and the component perpendicular to the line can never be written down. At best the line points along , and what's left is the component of in the perpendicular direction, whose squared expectation is 1. Averaged over the two dimensions, the loss per dimension is at least 0.5.
Replace 2 with and 1 with , and you have the paper's Theorem 1:
are the eigenvalues of the covariance matrix of , sorted from largest to smallest. With its output trapped in a -dimensional subspace, the model can take care of at most the largest directions, and the variance in the remaining directions all turns into loss. With a single image, every , and the lower bound on the average loss per dimension is . Plug in and , and it comes out to exactly 0.5, the red dashed line in Figure 3.
The authors also cross-tested DINOv2's S, B and L (token dimensions 384, 768 and 1024) against DiT's S, B and L (widths 384, 768 and 1024), and only the combinations whose width is at least the token dimension converge.
This seems to contradict the intuition that "data actually lie on a low-dimensional manifold." The authors' explanation is that diffusion training adds Gaussian noise to every dimension of the data, so the noisy distribution fills the whole -dimensional space, and what the model has to handle is full rank. That's why the DINOv2-B RAE gets paired with the 1,152-wide DiT-XL from here on.
Problem two, the noise schedule
People working on image diffusion found early on that the higher the resolution, the less information the same noise level destroys. Neighboring pixels are highly correlated, so even after noise is added, the model can still guess the signal back from the neighbors. So high resolution calls for pushing training toward noisier time points.
Most of this experience comes from pixels or from VAEs with 4 to 16 channels. The authors' view is that noise is added across both space and channels, and with many channels, each token carries a lot of redundancy on its own, so more information survives at the same . What the schedule should be computed from is the "effective data dimension," that is, the number of tokens times the token dimension.
Concretely, they reuse SD3's time shift. A sampled time is replaced with:
The base dimension is . For RAE, , , and .
Plugging in a few time points:
| 0.1 | 0.2 | 0.5 | 0.8 | |
|---|---|---|---|---|
| 0.435 | 0.634 | 0.874 | 0.965 |
Computed for this note from the formula in Section 4.2 of the paper, .
, which sat in the middle, shifts to 0.874, so the training time points crowd heavily toward the noise end. Incidentally, SD-VAE's latent at 256 resolution is , so its comes out to exactly 1; choosing that base dimension amounts to treating SD-VAE as the reference point that needs no shift.
This one change alone takes DiT-XL's gFID from 23.08 to 4.81.
Problem three, the decoder needs to see noise
Anyone who read the first note in this series will remember what a VAE decoder sees during training. The encoder outputs a mean and a standard deviation , and the decoder gets , a freshly sampled point every time. It's used to handling latents that are "a cloud around the mean" from the start.
The RAE decoder has only ever seen DINOv2's outputs for the training images, one fixed point per image. Features generated by a diffusion model always carry a bit of error, and once they stray slightly from those points, the decoder is looking at input it has never seen.
The authors' fix is to add Gaussian noise to the features while training the decoder:
The noise strength is itself random, with by default. At this step the official code writes , with drawn uniformly from 0 to 1, which differs from the paper's half-normal distribution, and all three branches do it this way; anyone reproducing the paper's version should keep an eye on this.
| 0 | 0.5 | 0.8 | 1.0 | |
|---|---|---|---|---|
| gFID | 4.81 | 4.39 | 4.28 | 4.20 |
| rFID | 0.49 | 0.54 | 0.57 | 0.60 |
Compiled from Table 15 of the paper. DINOv2-B, DiT-XL, 80 epochs.
The more noise, the better the generation and the worse the reconstruction. That trade is expected; a decoder trained with noise learns a smoother mapping, and some of the detail gets smoothed away with it.
The same table also compares the three encoders. MAE-B gets gFID 16.14 without noise and 8.38 with it; DINOv2-B goes from 4.81 to 4.28; SigLIP2-B from 6.69 to 4.93. MAE's rFID of 0.16 is the best of the three, yet its generation is the worst. Good reconstruction doesn't guarantee a good tokenizer, which is also why the authors use DINOv2 for everything that follows.

With all three fixes in, the light-blue line is DiT-XL's training curve on RAE, 4.28 at 80 epochs and 2.39 at 720 epochs. The level the orange SiT-XL reaches only after 1400 epochs, the light-blue line gets to in about 30; the green REPA's 5.90 after 800 epochs, it catches in about 50. The two arrows are the 47× and 16× the authors cite.
This curve uses no alignment loss at all. The extra term REPA and REPA-E have to add is supplied here directly by the encoder itself.
A wide, shallow head
The width requirement leaves one more headache. The higher the token dimension, the wider the whole DiT has to become, and Transformer compute grows roughly with the square of the width. DINOv2-L's tokens are 1,024-dimensional; with an even bigger encoder, the whole backbone would have to widen.
The authors borrow DDT's idea and add a "head" after an ordinary DiT:
is the original DiT-XL, 28 layers at width 1,152; has only 2 layers but is 2,048 wide. Going by the official code, the head reads the noisy input a second time and embeds the 768-dimensional tokens into 2,048 dimensions; the backbone's output , plus the time embedding, is projected to 2,048 dimensions and used token by token as the AdaLN condition. The last part, the one that actually emits the 768-dimensional velocity, is wide enough, while the 28 layers before it keep their original width. The authors call this combination DiTDH.
The effect is visible already at 80 epochs:
| Encoder | DiT-XL | DiTDH-XL |
|---|---|---|
| DINOv2-S | 3.50 | 2.42 |
| DINOv2-B | 4.28 | 2.16 |
| DINOv2-L | 6.09 | 2.73 |
Compiled from Table 6 of the paper. gFID, 80 epochs.
The bigger the encoder, the bigger DiTDH's advantage; DINOv2-L goes from 6.09 to 2.73. The head's shape was tested too. 2 layers at width 2,048 give 2.16; 6 layers at width 1,152, for about the same compute, give 2.36; 4 layers at width 2,048, for double the compute, actually give 2.31. It needs to be wide, not deep.
On model size, DiTDH-S gets 6.07, B gets 3.38 and XL gets 2.16. DiTDH-B uses only about 40% of DiT-XL's training compute and already leads it by a wide FID margin.
Does this head only help RAE? The authors put DiTDH-XL back on SD-VAE's latent space, and gFID got worse, going from DiT-XL's 7.13 to 11.70. On pixels (patch 16, so each token also happens to be 768-dimensional), DiTDH-XL gets 30.56 and DiT-XL 51.09, both far behind their 2.16 and 4.28 on RAE. High dimension by itself doesn't help; it takes a structured representation like DINOv2's.
Discussion
Against the whole line

This figure puts this line of evolution on a single set of axes. In the upper left are VQ-VAE-2 and VQGAN, with FID around 30 and 17; LDM brought the VAE into diffusion models and got down to about 10; the progress of the following years came mostly from the diffusion models themselves, until alignment methods like REPA-E pushed unguided FID below 2. To the right of the dashed line is RAE.
| Method | Epochs | Unguided | Guided |
|---|---|---|---|
| MAR | 800 | 2.35 | 1.55 |
| SiT | 1400 | 8.61 | 2.06 |
| REPA | 800 | 5.78 | 1.29 |
| VA-VAE | 800 | 2.17 | 1.35 |
| REPA-E | 800 | 1.70 | 1.15 |
| DiTDH-XL (RAE) | 80 | 2.16 | – |
| DiTDH-XL (RAE) | 800 | 1.51 | 1.13 |
Compiled from Table 8 of the paper. ImageNet 256, gFID; the VA-VAE row is LightningDiT.
Without guidance, RAE's 1.51 is the lowest in the table; even the 2.16 after only 80 epochs is far below REPA's 5.78 after 800. At , DiTDH-XL trained for 400 epochs gets 1.13 with guidance, where the previous best, EDM2, has 1.25.
For the guided column, the authors use AutoGuidance rather than the usual classifier-free guidance (CFG). CFG amplifies by taking the difference between a model's "conditional" and "unconditional" predictions; AutoGuidance instead uses a weaker model as the reference and pushes the strong model away from the weak one. The weak model behind 1.13 is a DiTDH-S trained for only 14 epochs, with guidance scale 1.42, and training it costs only about 0.05% of the main model. The authors tried CFG as well; guiding from the very first step actually made FID worse, and it only caught up once guidance was restricted to part of the time interval and the parameters were carefully searched, and even then it still lost to AutoGuidance.

The second decimal place of FID
The sampling issue we already met in REPA-E shows up again here.
Conditional ImageNet generation produces 50,000 images; some people generate a fixed 50 per class, others draw a class at random 50,000 times. The authors found that the former gives a consistently lower FID, by about 0.1, so they recomputed SiT, REPA and REPA-E, every model whose checkpoint they could get, with 50 per class. REPA-E's official numbers are 1.83 and 1.26; recomputed, they are 1.70 and 1.15.
A little over a week later, REPA-E updated its paper, switched to the same sampling, and reported 1.69 and 1.12. Saining Xie is on both papers, and in the guided column, whether RAE's 1.13 or REPA-E's 1.12 is lower comes down to who pressed the evaluate button (the authors of these two papers could probably find a time to sync up). The unguided column has no such problem; it's 1.51 vs 1.70, and RAE's lead is bigger than the gap the sampling method creates.
The cost of reconstruction
rFID compares the feature distributions of two piles of images; whether each pixel lines up is a question for PSNR.
Two days after the paper went public, someone reported in issue #13 that the DINOv2 RAE's PSNR on the ImageNet validation set is only around 18.9 dB, and that faces and text can barely be reconstructed. For comparison, SD-VAE as measured in the REPA-E paper gets 25.67 dB. Another researcher tested the SigLIP2 version and got a PSNR of about 19.2 on 300 images (issue #6).
The authors' reply made two points. First, the decoder was trained only on ImageNet, which has few faces and even less dense text; the authors said SD-VAE was trained on about 17 million images and shouldn't be compared directly. Second, the design gives up PSNR on purpose; training the decoder with noise and resizing the input to 224 both make pixel-level metrics worse, in exchange for generation. The person asking also posted results from VA-VAE, likewise trained only on ImageNet, with clearly better reconstruction, so training data alone isn't a very convincing explanation.
Later work is also trying to patch this hole. DecQ, from May 2026, measured the frozen-DINOv2 RAE at 19.13 dB PSNR; pulling 8 extra queries from DINOv2's middle layers for the decoder raises it to 22.76 dB, and generation converges faster too. The frozen encoder's output really is short on pixel detail.
What you'll run into following along
All of the paper's training ran on TPUs, and the GPU version was written separately; it shows all over the issues.
When decoder training was first released, several people who followed the official setup only got decoders with rFID around 1.1 to 3.0, against the paper's 0.57 (issue #17). The authors' first reply was "Due to limited GPU availability, we're still actively reproducing the stage-1 results ourselves"; two days later they said they had found several misalignments between the GPU code and their internal TPU implementation. At the end of December 2025 the whole codebase was refactored, the authors confirmed "There are indeed some bugs in the prev. codebase," and the new version trains to 0.54. The GPU code released with the paper took its own authors more than two months to reproduce (plenty of open-source goodwill, just no GPUs).
On the diffusion side, the default setup hits NaN at 60-odd thousand steps (issue #26); the authors said gradient clipping takes care of it on TPU, but it's harder on GPU, and only after the refactor did they run fp32 for about 200 epochs without problems. The training script calls zero_grad on every micro-batch, so gradient accumulation doesn't actually accumulate anything (issue #67, February 2026); the authors replied "We don't currently have access to a good enough machine to debug this issue" and invited a PR. In April someone submitted a fix (PR #78), and it still hasn't been merged. The default accumulation step count is 1, so anyone running the defaults is unaffected.
The latest one is issue #80, from July 2026. The user trained a DINOv2-B decoder from scratch and got rFID 0.535, better than the official one; but decoding the same set of features generated by the official DiTDH-XL gave gFID 1.70, against 1.55 with the official decoder, and 1.22 vs 1.155 with guidance. The asker confirmed that switching back to the official decoder reproduces the paper's numbers, so the problem lies in the details of decoder training. This one has no reply.
Two more implementation details the paper doesn't spell out, noted here as well. Beyond LayerNorm, the official code normalizes once more with a per-position, per-channel mean and variance computed over the whole training set; the authors explained in an issue that LayerNorm only guarantees unit variance for each individual vector, and the data distribution itself still needs standardizing separately. For time sampling during training, the official config uses a logit-normal distribution, while the paper only says it follows LightningDiT.
After text-to-image
Three months later, the same team, joined by Rob Fergus, Yann LeCun and others, published a text-to-image version of RAE, Scaling Text-to-Image Diffusion Transformers with Representation Autoencoders. The encoder becomes SigLIP-2 So400M (1,152-dimensional tokens), the text side uses the Qwen-2.5 language model, the DiT goes from 0.5B up to 9.8B, and it goes head to head with FLUX's VAE.
The results put this paper's three fixes through the sieve again:
- The noise schedule shift is still crucial. Without it, GenEval drops from 49.6 to 23.6.
- DiTDH stops mattering on large models. At 0.5B the head adds 11.2 GenEval points, and from 2.4B up the advantage all but disappears. Large DiTs are already wider than 1,152, so the width bottleneck goes away on its own. The authors themselves call DiTDH a patch for models without enough capacity.
- The noisy decoder only helps early in training. The difference shows before about 15,000 steps and is negligible by 120,000.
The decoder has to be retrained too. A decoder trained only on ImageNet gets rFID 2.640 on text images; adding web images, synthetic images and text-rendering data, 73 million images in all, brings it down to 1.621, still short of FLUX VAE's 0.638. On the generation side, with a 1.5B language model and a 2.4B DiT, RAE converges 4.0× faster on GenEval and 4.6× faster on DPG-Bench; when fine-tuning on high-quality data, the VAE version starts overfitting badly after 64 epochs, while RAE stays stable all the way to 256 epochs.
Conclusion
RAE replaces the VAE with a frozen DINOv2 plus a ViT decoder, then gives the diffusion Transformer three fixes, a width at least equal to the token dimension, a noise schedule shifted by the effective dimension, and noise added while training the decoder. Add the wide, shallow DiTDH head on top, and it reaches gFID 1.51 on ImageNet 256 without guidance, with no alignment loss anywhere in training.
If you want to try it on your own data, look at the latent dimension first. The time shift's is the number of tokens times the token dimension, divided by 4096, then square-rooted; for the text-to-image paper's SigLIP-2 So400M, with 256 tokens of 1,152 dimensions, , and the DiT has to be at least 1,152 wide. If your data has faces or text in it, the decoder can't be trained on ImageNet alone.
This series began with Kingma and Welling's VAE; nearly twelve years later, RAE has removed the "variational" part entirely, with no prior and no KL term. All that's left of anything "variational" is the single line in decoder training.