arXiv:2610.36593cs.CVOct 2026

Manuscript Offprint

arXiv:2610.36593

WithinVAE: Compact Visual Autoencoding with Self-Distilled Semantics

Yuzhou Ji, Jiepeng Wang, Tianyu Jin, Lizhuang Ma, Haibin Huang, Chi Zhang, Xuelong Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

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 256×256256 \times 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.

1 INTRODUCTION

Latent generative models replace pixels with a lower-dimensional model-facing representation. The tokenizer that defines this interface determines reconstruction fidelity, latent dimensionality, and the geometry seen by every downstream generator. Ideally, its latents preserve visual detail, expose semantic structure, and remain compact. These requirements are not automatically compatible: stronger compression removes information, pixel losses favor local appearance, and recognition-oriented invariance can suppress precisely the variation needed for reversible generation (Shannon, 1959; Blau & Michaeli, 2019; Xi et al., 2026b; Li, 2024; Zhang et al., 2025a).

Recent semantic tokenizers address this tension by transferring representations from pretrained vision encoders. Some align autoencoding or diffusion features to DINO- or CLIP-like targets (Yu et al., 2024b; Xu et al., 2025; Yao et al., 2025; Zhang et al., 2025b); others decode, compress, or adapt the representation encoder itself (Zheng et al., 2025; Singh et al., 2026; Gong et al., 2026; Gao et al., 2025; Chen et al., 2026a; Shi et al., 2026). These methods demonstrate the value of semantics, but they also couple the tokenizer to an understanding model whose invariances were learned for a different objective. Freezing the encoder restricts reconstruction adaptation, whereas unconstrained fine-tuning can erase the inherited geometry. RPiAE addresses this compromise with a frozen pivot and a variational bridge (Gong et al., 2026). We study the complementary question: must the semantic target come from an external representation model at all?

∗^{*}Work done during an internship at TeleAI

Our hypothesis is that view consistency and masked prediction can organize semantics within the reconstructive representation itself. One-dimensional tokenizers provide a sequence axis on which nonuniform corruption can order information (Yu et al., 2024a; Miwa et al., 2025), while EMA teacher-student objectives organize global and patch representations without labels (Caron et al., 2021; Zhou et al., 2022). Their combination need not make compression lossless or guarantee semantic ordering. It instead creates two coupled pressures: early tokens are more reliable for reconstruction, and the latent space must remain consistent across appearance-changing views.

We instantiate this idea in WithinVAE, a compact image-to-image variational autoencoder initialized from the generative One-D-Piece architecture (Miwa et al., 2025). It maps an image to a one-dimensional latent token sequence, applies a token-wise variational bottleneck, and reconstructs pixels. During training, token masking probability increases with sequence position. A separate EMA copy supplies global DINO-style targets from pooled compact tokens and local iBOT-style targets on masked image patches. “Self-distilled semantics” refers specifically to the origin of these targets: no DINO, DINOv2, or CLIP weights supervise training. It does not mean training every generative component from scratch.

The experiments establish three results. First, at half of RPiAE's latent scalar capacity, WithinVAE improves all four reported reconstruction metrics simultaneously (rFID, PSNR, LPIPS, SSIM), and its 128-token prefix remains stronger than RPiAE in PSNR and SSIM at one quarter of that capacity. Second, frozen linear-probe and nearest-neighbor evaluations attribute the semantic gains to the self-distillation objective itself: it improves linear probing by 5.072 points over our reconstruction-only baseline and by 6.482 points over RPiAE, with simultaneous nearest-neighbor gains ruling out collapse. Third, the representation is directly modelable by a latent diffusion transformer—a 675M LightningDiT trained on WithinVAE latents already exceeds RPiAE on recall without guidance—although the remaining generation metrics trail RPiAE, which we analyze as a generator-autoencoder compatibility question rather than a failure of the representation. Our claims are accordingly improved reconstruction at lower capacity, capacity-efficient prefix decoding, and frozen semantic quality independent of external recognition features; state-of-the-art generation is not among them.

Our contributions are:

• We formulate self-distilled semantic autoencoding, in which semantic supervision is produced online by the autoencoder’s own EMA copy rather than transferred from a pretrained recognition encoder.

A Self-distilled semantic attention

Reference

Last-layer attention

Figure

Input

WithinVAE (self-distilled)

RPIAE (DINOv2 pivot)

Attention rollout

WithinVAE (self-distilled)

RPIAE (DINOv2 pivot)

After the variational bridge

Figure

RPIAE VB (actual latent)

WithinVAE remains shape-aligned without a pretrained visual encoder; RPIAE attention becomes diffuse in its actual bottleneck.

B Ordered prefix compression

full prefix: 26.2 dB

Figure

K = 128 (25%): 25.6 dB within 0.6 dB of full reconstruction

Number of prefix tokens kept (K)

RPIAE: 21.3 dB

512

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×96512 \times 96 latent-to-latent variant front-loads reliability: K=128K = 128 retains 25.6 dB PSNR, within 0.6 dB of the full sequence, and K=64K = 64 (6,144 scalars, under half of RPiAE's budget) already exceeds RPiAE's 21.3 dB.

• We instantiate it as a compact variational autoencoder coupling position-dependent token masking with global–local EMA self-distillation, and show it improves all four reconstruction metrics over RPiAE at half the scalar capacity (+1.36 dB PSNR on 256×32256 \times 32 model), while its 128-token prefix still exceeds RPiAE in PSNR and SSIM at one quarter.

• We attribute the semantic gains through controlled component ablations (+5.1 linear-probe points over the reconstruction-only baseline, with reconstruction improving at the same time), and verify that the objective transfers across pixel and pretrained generative-latent interfaces, including prefix decoding that retains 25.6 dB PSNR at 4× fewer tokens without retraining.

References (40)