Visual autoencoders must balance reconstruction fidelity, compactness, and semantic structure. Existing semantic tokenizers typically inherit semantics from pretrained recognition encoders, whose invariances can discard the appearance detail required for inversion. We show that this inheritance is unnecessary: semantic structure can be learned inside an autoencoder's own reconstructive representation. We introduce WithinVAE, a compact variational visual autoencoder with a sequential bottleneck, DINO/iBOT-style self-distillation from an exponential-moving-average copy of the autoencoder itself, and position-dependent token masking to achieve a 4-fold compression ratio, which is free of pretrained representation encoder or external semantic target. On ImageNet-1K at 256×256, WithinVAE improves all four reported reconstruction metrics over RPiAE including PSNR by 1.36 dB, while using half its latent scalar capacity. Under frozen evaluation, the same latents improve linear probing by 6.5 points over RPiAE and 5.1 points over our reconstruction-only baseline, attributing the semantic gains to self-distillation rather than architecture or external supervision. An auxiliary latent-to-latent model reproduces the ordered-compression trend, and a pixel-to-latent model transfers the objective to a pretrained generative space. These results separate the origin of semantic supervision from its use: a compact visual autoencoder can organize semantic structure without borrowing a recognition representation.
Figures & tables
Figure 1: Two diagnostics of self-distilled semantic autoencoding. A: Under matched display settings, WithinVAE attends to object extent without any pretrained recognition encoder, while RPiAE totally fails in providing reasonable attention after borrowed DINOv2 (rollout and actual latent after variational-bridge). B: Prefix decoding of the 512×96 latent-to-latent variant front-loads reliability: K=128 retains 25.6 dB PSNR, within 0.6 dB of the full sequence, and K=64 (6,144 scalars, under half of RPiAE’s budget) already exceeds RPiAE’s 21.3 dB.
Figure 2: WithinVAE training. The reconstruction path maps an image xs through a query encoder (ViT-L patches and 256 latent queries) and a token-wise VAE to a 256×32 ordered token sequence; position-dependent masking keeps a reliable prefix z1:k and corrupts the masked tail before the ViT-L pixel decoder produces x^s , supervised by a reconstruction loss Lrec+Lperc+Ladv . The semantic branches below match mean-pooled compact tokens via global DINO ( Lglobal ) and student masked patches via local iBOT ( Llocal ) against targets produced by an EMA copy of the encoder and VAE that observes a clean view xt .
Model
Ext. RM
Latent
Scalars
rFID ↓
PSNR ↑
LPIPS ↓
SSIM ↑
SD-VAE ( Rombach et al., 2022 )
No
32×32×4
4,096
0.61
26.9
0.130
0.736
VA-VAE ( Yao et al., 2025 )
Yes
16×16×32
8,192
0.27
27.7
0.097
0.779
RAE-S ( Zheng et al., 2025 )
Yes
256×384
98,304
0.64
18.9
0.252
0.489
RAE-B ( Zheng et al., 2025 )
Yes
256×768
196,608
0.57
18.8
0.256
0.483
FAE-d32 ( Gao et al., 2025 )
Yes
16×16×32
8,192
0.68
–
–
–
RPiAE ( Gong et al., 2026 )
Yes
256×64
16,384
0.50
21.3
0.216
0.525
Table 1: ImageNet-1K reconstruction at 256×256 . WithinVAE improves all four metrics over RPiAE at half its scalar count, without any external representation model. Baselines are reported values from their source papers (consolidated in RPiAE Table 3); WithinVAE uses our 50K-image evaluation. Ext. RM indicates an external pretrained representation model used for semantic initialization or supervision. Scalar count is an interface-capacity proxy, not a bitrate.
Variant
PSNR ↑
LPIPS ↓
LP ↑
20-NN ↑
View ↑
①
RPiAE
21.30
0.216
65.404
66.856
98.339±1.466
②
WithinVAE reconstruction only
21.90
0.175
66.814
–
–
③
+ progressive mask
21.69
0.180
67.812
69.435
98.029±1.441
④
+ mask + global
21.47
0.186
69.794
–
–
⑤
+ mask + local
22.13
0.162
70.312
–
–
⑥
WithinVAE full
22.66
0.159
71.886
72.394
99.125±0.732
Table 2: Reconstruction and frozen-latent semantics on ImageNet-1K. The full objective improves both fidelity and linear-probe accuracy over every partial variant. Circled indices ①–⑥ label rows for reference in the text. RPiAE reconstruction values are published; its semantic columns use our frozen-latent protocol. LP and 20-NN are top-1 accuracy (%). View is same-image cross-view cosine multiplied by 100. Dashes denote evaluations not run for intermediate ablations.
Model
Guidance
gFID ↓
IS ↑
Prec. ↑
Rec. ↑
RPiAE
Off
2.25
208.7
0.81
0.60
RPiAE
On
1.51
225.9
0.79
0.65
WithinVAE
Off
9.12
124.3
0.69
0.66
WithinVAE
On
3.67
169.2
0.76
0.58
Table 3: Class-conditional ImageNet generation with a 675M LightningDiT trained for 80 epochs. RPiAE values are reported by Gong et al. (2026) ; WithinVAE uses a 50K-sample evaluation. Guidance settings follow each implementation and are not asserted to be identical beyond the reported on/off condition.
Figure 3: Qualitative results. Up: Matched validation examples showing WithinVAE reconstruction, WithinVAE head-averaged attention, and RPiAE variational-bridge attention averaged over heads and bridge queries. The displays share the input crop, per-map normalization, and color map, but the attention operators are architecture-specific. Down: Class-conditional generation samples from the 80-epoch LightningDiT. Table 3 provides the distribution-level comparison.
Interface
Bottleneck
Scalars
rFID ↓
PSNR ↑
LPIPS ↓
SSIM ↑
Pixel → pixel
256×32
8,192
0.46
22.66
0.159
0.593
Pixel → pixel, prefix
128×32
4,096
0.47
22.33
0.163
0.581
Pixel → Qwen latent
512×96
49,152
0.43
23.91
0.144
0.614
Qwen latent → Qwen latent
512×96
49,152
0.40
26.27
0.131
0.714
prefix
128×96
12,288
0.42
25.63
0.136
0.698
prefix
64×96
6,144
0.48
22.23
0.160
0.579
Table 4: End-to-end reconstruction across interfaces at 256×256 . Qwen rows use a pretrained generative autoencoder; metrics are computed in RGB after decoding. Scalars expose the unequal model-facing capacities.
We propose TC-AE, a ViT-based architecture for deep compression autoencoders. Existing methods commonly increase the channel number of latent representations to maintain reconstruction quality under high compression ratios. However, this strategy often leads to latent representation collapse, which degrades generative performance. Instead of relying on increasingly complex architectures or multi-stage training schemes, TC-AE addresses this challenge from the perspective of the token space, the key bridge between pixels and image latents, through two complementary innovations: Firstly, we study token number scaling by adjusting the patch size in ViT under a fixed latent budget, and identify aggressive token-to-latent compression as the key factor that limits effective scaling. To address this issue, we decompose token-to-latent compression into two stages, reducing structural information loss and enabling effective token number scaling for generation. Secondly, to further mitigate latent representation collapse, we enhance the semantic structure of image tokens via joint self-supervised training, leading to more generative-friendly latents. With these designs, TC-AE achieves substantially improved reconstruction and generative performance under deep compression. We hope our research will advance ViT-based tokenizer for visual generation.
Variational Autoencoder (VAE) encoders play a critical role in modern generative models, yet their computational cost often motivates the use of knowledge distillation or quantification to obtain compact alternatives. Existing studies typically believe that the model work better on the samples closed to their training data distribution than unseen data distribution. In this work, we report a counter-intuitive phenomenon in VAE encoder distillation: a compact encoder distilled only at low resolutions exhibits poor reconstruction performance at its native resolution, but achieves dramatically improved results when evaluated at higher, unseen input resolutions. Despite never being trained beyond 2562 resolution, the distilled encoder generalizes effectively to 5122 resolution inputs, partially inheriting the teacher model's resolution preference.We further analyze latent distributions across resolutions and find that higher-resolution inputs produce latent representations more closely aligned with the teacher's manifold. Through extensive experiments on ImageNet-256, we show that simple resolution remapping-upsampling inputs before encoding and downsampling reconstructions for evaluation-leads to substantial gains across PSNR, MSE, SSIM, LPIPS, and rFID metrics. These findings suggest that VAE encoder distillation learns resolution-consistent latent manifolds rather than resolution-specific pixel mappings. This also means that the high training cost on memory, time and high-resolution datasets are not necessary conditions for distilling a VAE with high-resolution image reconstruction capabilities. On low resolution datasets, the distillation model still could learn the detailed knowledge of the teacher model in high-resolution image reconstruction.
Jiaming Chu, Tao Wang, Lei Jin
School of Electronic Engineering, Beijing University of Posts and Telecommunications, Beijing, China
Despite their ubiquity, variational autoencoders (VAEs) inherently suffer from posterior collapse, a failure mode in which latent variables are effectively ignored. This failure arises because explicit prior imposition drives optimization toward loss landscape regions corresponding to uninformative latent representations. Here, we introduce Entropic Autoencoders (EAEs), a framework in which reconstruction loss is the only explicit objective, and entropy generates the latent variables' prior implicitly through a free energy-minimizing ensemble of encoders. This ensemble biases learning toward high-volume regions of near-optimal solutions, while decoder updates direct the search trajectories toward informative latent representations. We demonstrate that EAEs mitigate posterior collapse by learning non-Gaussian, multimodal latent distributions that yield diverse, data-consistent generations and preserve different forms of underlying structure in the data. As a proof-of-concept, we show that an EAE captures a superposition of the known low-dimensional dynamics of a reaction-diffusion process. Then, we show that an EAE identifies implicit categorical distinctions in MNIST latent representations, and displays a hierarchical understanding of facial structure on the CelebA dataset, from an "all-human" face to individual-dependent features.
Hazhir Aliahmadi, Irina Babayan, Greg van Anders
Department of Physics, Engineering Physics & Astronomy, Queen’s University, Kingston, ON, Canada