RefTok: Reference-Based Tokenization for Video Generation

Xiang Fan, Xiaohang Sun, Kushan Thakkar, Zhu Liu, Vimal Bhat, Ranjay Krishna, Xiang HaoarXiv 2025 · DOI

Introduction

REFTOK is a novel reference-based tokenization method that dramatically improves video reconstruction and generation by conditioning on unquantized "reference frames." By allowing these reference frames to bypass the traditional quantization bottleneck, REFTOK preserves fine details like legible text and facial features that current state-of-the-art models lose, all while being significantly faster and more memory-efficient.

The Problem: Visual Amnesia in Video Tokenization

In video generation, tokenization compresses raw pixels into a compact, discrete latent space. Current state-of-the-art tokenizers (e.g., MAGVIT, Cosmos) typically treat blocks of frames independently or use causal convolutions. To achieve high compression ratios, these models discard a massive amount of information, leading to "visual amnesia." This often results in garbled text or distorted facial features, as the model lacks a high-fidelity anchor to maintain temporal consistency.

Reference-less tokenizers often produce distorted facial features due to the lack of a high-fidelity reference frame.

Methods: Reference-Based Conditioning

REFTOK draws inspiration from traditional video codecs (like H.264) that use "I-frames" as references. Key technical components include:

  • Reference-Based Conditioning: Unlike standard tokenizers that quantize every frame, REFTOK designates specific frames as "reference frames" which bypass the quantization layer, providing the decoder with a high-quality, unquantized signal.
  • Conditional Encoding/Decoding: Target frames are encoded and decoded relative to the reference frame, allowing the model to focus on temporal dynamics rather than re-learning the entire scene's appearance.
  • ViTMAE Architecture: Built on a Vision Transformer Masked Autoencoder backbone, the model uses 3D patches and a pure transformer architecture to model long-range dependencies more effectively than traditional CNNs.
  • Causality and Stability: A one-way attention barrier ensures the reference frame only informs future target frames, while techniques like codebook splitting mitigate posterior collapse.
RefTok preserves natural facial features by conditioning the generation on an unquantized reference frame.

Key Results and Efficiency

REFTOK sets a new bar for video tokenization across several metrics:

  • Reconstruction Quality: It outperformed MAGVIT and Cosmos by an average of 36.7% across PSNR, SSIM, and LPIPS metrics.
  • Generation Superiority: A 128M parameter REFTOK model outperformed the much larger 464M parameter MAGVIT-L model by 27.9% on generation metrics.
  • Computational Efficiency: REFTOK is 2.29x faster and 2.38x more memory-efficient than baseline models at the same compression ratio.
  • Zero-Shot Video Editing: Swapping the original reference frame for an edited one at inference time allows the model to propagate changes through the entire sequence without additional training.

Limitations and Future Work

While powerful, REFTOK currently requires a reference frame to be present, which may become less relevant in very long videos as scenes change entirely. It also struggles with entirely new objects entering a scene later in the sequence. Future work will explore adaptive reference frame selection to dynamically choose the most relevant anchors based on video content.

Summary updated

BibTeX
@misc{fan2025reftok,
  author = {Xiang Fan and Xiaohang Sun and Kushan Thakkar and Zhu Liu and Vimal Bhat and Ranjay Krishna and Xiang Hao},
  title = {{RefTok: Reference-Based Tokenization for Video Generation}},
  year = {2025},
  eprint = {2507.02862},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.02862},
}
Figure