Manuscript Offprint

arXiv:2608.23864

AffineTok: Semantic Affine Consistency for Diffusion-Friendly Visual Tokenizer

Junqiu Yu, Pandeng Li, Yikai Wang, Jiaxing Zhao, Yujie Wei, Kaixun Jiang, Quanhao Li, Hongtao Yu, Zhihang Liu, Zhaohe Liao, Junjie Zhou, Yun Zheng, Yu Liu, Yanwei Fu

Junqiu Yu1,2∗^{1,2*} Pandeng Li2†,‡^{2\dagger,\ddagger} Yikai Wang1†^{1\dagger} Jiaxing Zhao2^{2} Yujie Wei2^{2} Kaixun Jiang2^{2} Quanhao Li2^{2} Hongtao Yu2^{2} Zhihang Liu2^{2} Zhaohe Liao2^{2} Junjie Zhou2^{2} Yun Zheng2^{2} Yu Liu2^{2} Yanwei Fu1†^{1\dagger}

1^{1}Fudan University 2^{2}Alibaba Token Hub, Alibaba Group

†^{\dagger}Corresponding author, ‡^{\ddagger}Project leader

yujq24@m.fudan.edu.cn yanweifu@fudan.edu.cn

Project page: https://michaelyu781.github.io/AffineTok-site/

(a) Semantic Affine Consistency (SAC)

Figure

(b) SAC predicts gFID

(c) Better Diffusability

Figure 1: Semantic Affine Consistency for diffusion-friendly visual tokenizers. (a) Existing methods predict semantics directly from a noisy latent, which are the average of clean-image semantics. Diffusion instead predicts the posterior-mean clean latent and then decodes its semantics, which are the semantics of the averaged clean latent. SAC requires these two predictions to agree, a condition absent from prior supervision. (b) Our tokenizer-side metric MSACM_{SAC} strongly correlates with SiT-XL gFID across 14 visual tokenizers, reaching a Pearson correlation of 0.960. (c) SAC-guided training improves diffusability, reaching 1.21 gFID at 600 epochs without CFG.

ABSTRACT

Visual tokenizers increasingly inject semantic supervision into latent spaces to make downstream diffusion easier. Yet how these semantics should be organized to facilitate denoising remains underexplored. In this paper, we define the semantic recovery objective: the denoising process should recover the semantic content of the ground-truth image from noisy latent, and a good tokenizer should make it easier. Existing approaches train a projector to predict the semantics directly from the noisy latent. We argue that this predicts the average of clean-image semantics, whereas what really needs to be aligned is the semantic of averaged clean latents. More importantly, we demonstrate that the semantic recovery error orthogonally decomposes into the error of the optimal semantic prediction directly from the noisy latent and the error between these two semantic predictions. We therefore identify their consistency as the missing requirement and call it Semantic Affine Consistency (SAC). To examine whether this overlooked requirement is closely related to downstream generation, we introduce MSACM_{SAC}, a tokenizer-side

∗^{*}Work done during an internship at WanTeam, ATH, Alibaba Group.

proxy for SAC. Across the evaluated tokenizers and diffusion model scales, MSACM_{SAC} closely tracks generation quality, reaching a Pearson correlation of 0.960 with SiT-XL gFID, thereby establishing SAC as a practical diagnostic and motivating SAC-guided tokenizer training. We then introduce AffineTok, which promotes SAC through two complementary, training-only components. Global Semantic Coordination Token (GSCT) coordinates the semantic organization of clean latents, keeping semantic averaging meaningful, while Posterior-Mean Semantic Alignment (PMSA) predicts posterior-mean latents from noisy inputs and supervises their semantics. On ImageNet 256, compared with the baseline, AffineTok reduces gFID by 26% at 20 epochs and, with continued training, achieves a new state-of-the-art gFID of 1.21 without classifier-free guidance and 1.10 with guidance.

1 INTRODUCTION

In latent diffusion models, a visual tokenizer is more than a compressor: it determines the geometry of the denoising problem that the model must learn. This realization has driven a recent shift from tokenizers optimized primarily for reconstruction toward latent spaces explicitly shaped for generation. In particular, modern approaches inject features from visual foundation models (VFMs) into clean latents (Yao et al., 2025), regularize their structure (Kouzelis et al., 2025; Liu et al., 2025), or extend semantic supervision to noisy latent states (Shi et al., 2025; Page et al., 2026). These methods share an appealing premise: if semantics are more accessible in the latent space, diffusion should be easier. Yet in diffusion, the semantic outcome is determined by decoding the predicted clean latent, rather than by directly reading the noisy state. This distinction raises a central question: how should a tokenizer organize semantics in the latent space to make diffusion easier to learn?

To answer this question, our starting point is the goal of denoising: to recover the clean image from a noisy observation, which involves recovering not only its latent representation but also its semantic content. Achieving this goal requires aligning clean-image semantics with those decoded from the predicted clean latent, with the latter corresponding to the semantics of the averaged clean latent. As shown in Fig. 1(a), existing methods instead apply semantic supervision through a different path, training a semantic projector to predict the clean-image semantics directly from the noisy latent. Under squared loss, the optimal projector predicts the average of clean-image semantics. As semantic mapping is nonlinear, averaging and semantic mapping need not commute, so current supervision does not ensure the required alignment of the decoded semantics. In fact, it can be exactly proven the semantic error of the image decoded from diffusion's clean-latent prediction decomposes orthogonally into two terms: the error of predicting semantics directly from the noisy latent and the gap between the average of semantics and the semantics of the averaged latent. Closing this gap requires the two semantic predictions to be consistent. We call this agreement Semantic Affine Consistency (SAC).

After identifying SAC as a requirement overlooked by existing tokenizer methods, we next ask whether tokenizers that better satisfy SAC support stronger downstream generation. Directly evaluating SAC would require training a downstream diffusion model for each tokenizer. Inspired by iFID (Xu et al., 2026), we instead construct probe points by interpolating between neighboring clean latents, using them as local proxies for posterior averaging. The resulting tokenizer-side probe metric, MSACM_{SAC}, measures SAC violations at these points. Across the 14 visual tokenizers and diffusion model scales, MSACM_{SAC} closely tracks downstream generation quality (Fig. 1(b)), reaching a Pearson correlation of 0.960 with SiT-XL gFID.

SAC also guides tokenizer learning. Rather than enforcing SAC only at these probe points, which provide limited coverage of the latent space, we bring posterior-mean semantics under supervision through two complementary, training-only components. The Global Semantic Coordination Token (GSCT) uses a VFM-supervised global token to coordinate the organization of clean patch latents across images, keeping cross-image semantic averaging meaningful. The Posterior-Mean Semantic Alignment (PMSA) uses a lightweight predictor to estimate posterior-mean latents from noisy inputs and a semantic projector calibrated on clean latents to supervise their semantics. Both components are removed after tokenizer training, leaving the downstream diffusion training unchanged. As shown in Fig. 1(c), on ImageNet 256×256256 \times 256, the resulting tokenizer improves gFID throughout diffusion training and ultimately reaches 1.21 without classifier-free guidance (cfg) and 1.10 with cfg.

Our contributions are as follows:

Figure

Figure 2: Overall framework of AffineTok. The input image is processed in parallel by a frozen VFM and a trainable tokenizer. Its encoder jointly maps patch embeddings and a prepended learnable GSCT to a global output and clean patch latents z0z_0. After z0z_0 is noised into ztz_t, the resulting global and noisy patch representations receive semantic supervision; the global output is then discarded, while ztz_t is decoded for reconstruction. Along the PMSA path, GpostG_{\text{post}} maps ztz_t to a posterior-mean estimate, and SpostS_{\text{post}} maps the estimate to semantics. Only clean patch latents are retained downstream.

• We identify a previously overlooked mismatch between the semantics directly predicted from a noisy latent and those decoded from its posterior-mean clean-latent prediction. We formalize their agreement as SAC and derive an exact orthogonal decomposition showing their disagreement corresponds to a previously unaddressed term of semantic recovery error.

• We introduce the tokenizer-side metric MSACM_{SAC}, a proxy for SAC based on interpolation between neighboring clean latents. By measuring both the coefficient and direction of decoded semantic transitions, it closely tracks generation quality across tokenizers and diffusion model scales without training downstream diffusion models.

• We develop a SAC-guided tokenizer-training method with GSCT and PMSA. GSCT coordinates the organization of clean patch latents across images, keeping cross-image semantic averaging meaningful, while PMSA predicts posterior-mean latents from noisy inputs and supervises their semantics. Both components are tokenizer training-only, preserving the downstream diffusion training unchanged.

References (33)