Taming Teacher Forcing for Masked Autoregressive Video Generation

Deyu Zhou, Quan Sun, Yuang Peng, Kun Yan, Runpei Dong, Duomin Wang, Zheng Ge, Nan Duan, Xiangyu Zhang, Lionel M. Ni, Heung-Yeung Shum · DOI

Abstract

Autoregressive (AR) video generation models often struggle with a significant training-inference discrepancy, commonly referred to as exposure bias. While masked image modeling offers efficiency, its application to temporal sequences frequently results in accumulated errors that lead to incoherence or static "freezing" during long-term generation. This paper introduces MAGI (Masked Autoregressive video GeneratIon), a hybrid framework that bridges this gap through Complete Teacher Forcing (CTF). By conditioning the prediction of masked frames on fully unmasked historical observations during training, MAGI aligns the training signal with inference-time operations. Our approach achieves a state-of-the-art FVD of 11.5 on Kinetics-600 and demonstrates the capability to generate over 100 coherent frames from sequences as short as 16 frames.

1. Introduction

Modern video generation typically bifurcates into two methodologies: patch-level autoregressive models and frame-level masked models. Patch-level models, which predict visual tokens in a raster-scan fashion, offer high precision but suffer from extreme computational costs. Conversely, frame-level masked models are faster but often neglect temporal causality, leading to a mismatch between how they are trained and how they generate sequences.

During standard training, these models utilize Masked Teacher Forcing (MTF), where a frame is predicted based on other partially masked frames. At inference, however, the model must rely on its own previously generated, fully unmasked frames. This discrepancy causes small errors to compound, eventually resulting in the collapse of video quality. MAGI addresses this by integrating the efficiency of masked modeling with the temporal consistency of causal autoregressive frameworks.

2. Methodology

MAGI utilizes a hybrid architecture designed to handle intra-frame details and inter-frame dependencies separately but cohesively.

2.1 Complete Teacher Forcing (CTF)

The primary innovation of MAGI is the transition from MTF to Complete Teacher Forcing (CTF). In CTF, the model is trained to predict the current masked frame by conditioning on complete historical frames. This setup mirrors the inference environment, where the model uses its previous outputs as the basis for the next step. By removing the "crutch" of masked history during training, the model learns to handle the full distribution of unmasked visual data, effectively mitigating exposure bias.

2.2 Spatial-Temporal Transformer Architecture

The framework employs a Spatial-Temporal Transformer that interleaves 2D spatial attention with 1D temporal attention.

  • Spatial Attention: Focuses on the structural details within a single frame.
  • Temporal Attention: Utilizes a causal mask to ensure that information only flows from past frames to the future.

This causal structure allows MAGI to implement KV Caching, a technique widely used in Large Language Models (LLMs). KV Caching enables the model to reuse previous computations, ensuring that inference time scales linearly with the number of frames rather than quadratically, making long-form video generation computationally feasible.

2.3 Robustness and Training Strategies

To further enhance stability, two additional strategies are employed:

  • Dynamic Interval Training: The model samples training frames at varying temporal intervals. This teaches the model to understand motion across different scales, from high-speed action to slow transitions.
  • Dynamic Noise Injection: By adding controlled corruption to historical frames during training, the model learns to be robust against its own past prediction errors, preventing minor artifacts from spiraling into total sequence failure.

3. Experiments and Results

MAGI was evaluated on the Kinetics-600 and UCF-101 benchmarks, focusing on both conditional and unconditional video generation.

3.1 Quantitative Performance

The implementation of CTF resulted in a 23% improvement in Frechet Video Distance (FVD) scores compared to the MTF baseline. On the Kinetics-600 benchmark, MAGI achieved an FVD of 11.5, significantly outperforming existing autoregressive models such as Omni (32.9). These results underscore the importance of training-inference alignment over mere architectural complexity.

3.2 Long-Range Scalability

One of the most striking capabilities of MAGI is its temporal consistency. Despite being trained on clips of only 16 frames, the model can generate over 100 coherent frames (approximately 4-6 seconds of video) from a single initial image. Throughout these extended sequences, the model maintains consistent background elements and preserves object identity, avoiding the common "drifting" effect seen in previous autoregressive attempts.

4. Discussion and Limitations

While MAGI represents a significant step forward in stable video generation, it faces challenges with complex, non-periodic actions. For instance, once a specific action (like a dive or a jump) is completed, the model may lack the high-level semantic guidance to initiate a new, logical sequence of events. This suggests that while the model has mastered temporal consistency, it still requires further development in temporal intent or long-term planning.

5. Conclusion

MAGI demonstrates that taming teacher forcing is essential for high-quality autoregressive video generation. By aligning the training and inference phases through Complete Teacher Forcing and leveraging efficient LLM-inspired architectures, MAGI provides a scalable and robust framework for long-term video synthesis. Future work will explore the integration of text-to-video conditioning and the application of this framework to interactive, real-time environments.

Summary updated

BibTeX
@inproceedings{zhou2025taming,
  author = {Deyu Zhou and Quan Sun and Yuang Peng and Kun Yan and Runpei Dong and Duomin Wang and Zheng Ge and Nan Duan and Xiangyu Zhang and Lionel M. Ni and Heung-Yeung Shum},
  title = {{Taming Teacher Forcing for Masked Autoregressive Video Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  url = {https://openreview.net/forum?id=YVWIOSFExI},
}
Figure