WithinVAE: Compact Visual Autoencoding with Self-Distilled Semantics
Organizations: Shanghai Jiao Tong University · Institute of Artificial Intelligence, China Telecom
Abstract
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 , 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
| Model | Ext. RM | Latent | Scalars | rFID | PSNR | LPIPS | SSIM |
|---|---|---|---|---|---|---|---|
| SD-VAE ( Rombach et al., 2022 ) | No | 4,096 | 0.61 | 26.9 | 0.130 | 0.736 | |
| VA-VAE ( Yao et al., 2025 ) | Yes | 8,192 | 0.27 | 27.7 | 0.097 | 0.779 | |
| RAE-S ( Zheng et al., 2025 ) | Yes | 98,304 | 0.64 | 18.9 | 0.252 | 0.489 | |
| RAE-B ( Zheng et al., 2025 ) | Yes | 196,608 | 0.57 | 18.8 | 0.256 | 0.483 | |
| FAE-d32 ( Gao et al., 2025 ) | Yes | 8,192 | 0.68 | – | – | – | |
| RPiAE ( Gong et al., 2026 ) | Yes | 16,384 | 0.50 | 21.3 | 0.216 | 0.525 |
| Variant | PSNR | LPIPS | LP | 20-NN | View | |
|---|---|---|---|---|---|---|
| ① | RPiAE | 21.30 | 0.216 | 65.404 | 66.856 | |
| ② | WithinVAE reconstruction only | 21.90 | 0.175 | 66.814 | – | – |
| ③ | progressive mask | 21.69 | 0.180 | 67.812 | 69.435 | |
| ④ | 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 |
| 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 |
| Interface | Bottleneck | Scalars | rFID | PSNR | LPIPS | SSIM |
|---|---|---|---|---|---|---|
| Pixel pixel | 8,192 | 0.46 | 22.66 | 0.159 | 0.593 | |
| Pixel pixel, prefix | 4,096 | 0.47 | 22.33 | 0.163 | 0.581 | |
| Pixel Qwen latent | 49,152 | 0.43 | 23.91 | 0.144 | 0.614 | |
| Qwen latent Qwen latent | 49,152 | 0.40 | 26.27 | 0.131 | 0.714 | |
| prefix | 12,288 | 0.42 | 25.63 | 0.136 | 0.698 | |
| prefix | 6,144 | 0.48 | 22.23 | 0.160 | 0.579 |
Variational Autoencoders
Variational autoencoders are probabilistic encoder–decoder models for learning latent representations, generating data, and estimating uncertainty.
See all 210 papers