TL;DR
When painters paint, they don't grab a fresh blank canvas every time they want to add finer details; they refine what’s already there. Yet, most multi-scale image tokenizers decode every resolution independently from scratch, wasting precious memory re-describing global shapes over and over. RefineTok fixes this by carrying a continuous visual state forward across scales, turning latent tokens into purely incremental refinement instructions—yielding sharper reconstructions, faster decoding, and better downstream image generation with remarkably tiny token budgets.
What Problem Does This Paper Address?
Modern image generators (like diffusion models or autoregressive transformers) rarely work on raw pixels—there are simply too many of them. Instead, they rely on image tokenizers to compress an image into a compact sequence of "latent tokens."
Recently, researchers realized that organizing these tokens from coarse-to-fine (scale-wise) mirrors the natural hierarchy of images: establish the global layout first, then fill in the textures. However, existing scale-wise tokenizers have a subtle flaw in how they decode. Typically, to get a medium-resolution image, the decoder takes the first batch of tokens (a prefix) and maps them from a blank initial state to that target resolution. To get the high-resolution image, it takes a longer prefix and maps it from a blank initial state again.
Because every prefix has to build an image from scratch, later tokens are forced to redundantly re-encode global structure rather than focusing purely on missing details. Furthermore, most scale-wise tokenizers force tokens into discrete " dictionary words," which caps how accurately they can reconstruct fine details.
Methods
RefineTok introduces a continuous, 1D scale-wise tokenizer built around progressive visual refinement. While it uses standard Vision Transformer (ViT) blocks and standard reconstruction losses, it wires them together with four clever innovations:
- Causal ViT Encoder: Compresses the image into 9 groups of continuous 1D tokens. A causal attention mask ensures early token groups cannot "peek" at finer-scale tokens, forcing them to capture coarse, global info.
- Progressive Refinement Decoder: Instead of resetting at each scale, the decoder maintains a spatial hidden state. At each of the 9 stages, it upsamples the previous state, concatenates the current token prefix, runs it through just 2 ViT blocks to refine it, and passes the updated state forward. All 9 resolutions can be read out in a single forward pass.
- Coarse-Centric Trajectory: Because later stages can only refine what earlier stages built, getting the foundation right is critical. RefineTok packs more steps into the lower resolutions (
16, 24, 32, 48, 64, 96, 128, 192, 256) so global geometry is rock-solid before high-res texturing begins. - Training-Time Semantic Anchor: During training, a single extra token is prepended to the sequence and forced to align with a pretrained DINOv2 global feature. It acts like a tuning fork—anchoring the start of the sequence in high-level semantics—and is simply discarded during downstream generation.
- Stochastic Prefix Truncation: Supervising all 9 scales at once causes token groups to fight over competing objectives. Instead, RefineTok randomly picks one target scale per training step (80% chance of full 256×256 resolution, 20% split across smaller scales) and only computes loss there, ensuring every prefix forms a clean, valid intermediate image.
For generation, the authors pair RefineTok’s continuous latents with a standard Diffusion Transformer (DiT-XL).
Datasets
The authors train and evaluate RefineTok on ImageNet-1K at 256×256 resolution, measuring reconstruction quality on the validation split and class-conditional generation across 50,000 sampled images. No new benchmark datasets are introduced.
Key Insights and Ideas
- Scale-wise structure helps diffusion, not just autoregression: You might assume ordering tokens coarse-to-fine only matters for step-by-step autoregressive models. Surprisingly, when the authors trained a flat, single-scale baseline, it reconstructed images slightly better than RefineTok—yet its downstream diffusion generation was significantly worse (gFID jumped from 6.59 to 7.96 in ablations). A structured, progressive latent space is simply easier for a diffusion model to learn.
- Semantics crystallize immediately: By running a linear classifier on frozen token prefixes, the authors found that the first 12 tokens already capture nearly all class-level information (9.44% Top-1 accuracy vs. 10.02% for all 108 tokens). Later tokens genuinely act as pure high-frequency detailers.
- Progressive decoding is ~4x cheaper—even for full-res: Because most of RefineTok's decoder blocks operate on tiny spatial grids early in the trajectory, decoding a 256×256 image takes 50.6 GFLOPs, compared to 202.7 GFLOPs for a standard monolithic decoder of the same capacity (and 441.6 GFLOPs to get all scales from a non-progressive decoder).
Key Results
RefineTok punches well above its weight class on ImageNet 256×256 under very tight token budgets (36, 72, and 108 tokens):
- Strong Scale-Wise Reconstruction: RefineTok-108 achieves a PSNR of 22.85 and reconstruction FID (rFID) of 0.76, substantially outperforming discrete 1D scale-wise baselines like FlexTok (15.90 PSNR / 1.20 rFID at 128 tokens) and DetailFlow (19.46 PSNR / 1.22 rFID at 128 tokens).
- Competitive Generation: Paired with DiT-XL, RefineTok-72 hits a generation FID (gFID) of 2.03, beating the classic SDXL-VAE + DiT-XL/2 baseline (2.27 gFID, which requires 256 patchified tokens). RefineTok-108 pushes gFID down to 1.74 (with an Inception Score of 267.2), rivaling top single-scale 1D tokenizers like MAETok (1.73 gFID at 128 tokens) while uniquely offering progressive multi-scale outputs.
- Coherent Trajectories: Visually, RefineTok produces smooth, stable coarse-to-fine reconstructions in one pass, whereas prior 1D scale-wise methods shift object shapes awkwardly across separate forward passes.
Limitations and Future Work
Due to compute limits, the authors haven't exhaustively swept model sizes, scale counts, or uneven token allocations across scales. Additionally, RefineTok trains all stages jointly; freezing early stages and modularly appending finer ones later will require rethinking the encoder. Finally, RefineTok is strictly continuous right now—building a discrete version paired with an autoregressive generator is left for future work, which could unlock instant, low-latency "preview" images that sharpen on the fly as tokens stream in.
Summary updated