Research
NextFlow: Unified Sequential Modeling Activates Multimodal Understanding and Generation
NextFlow: Unified Sequential Modeling Activates Multimodal Understanding and Generation Overview Research area: Computer Vision / multimodal foundation models — unified autoregressive architectures th
- arXiv
- 2601.02204
- Published
- 2026-01-05
- Authors
- Huichao Zhang, Liao Qu, Yiheng Liu, Hang Chen, Yangyang Song, Yongsheng Dong, Shikun Sun, Xian Li, Xu Wang, Yi Jiang, Hu Ye, Bo Chen, Yiming Gao, Peng Liu, Akide Liu, Zhipeng Yang, Qili Deng, Linjie Xing, Jiyang Liu, Zhao Wang, Yang Zhou, Mingcong Liu, Yi Zhang, Qian He, Xiwei Hu, Zhongqi Qi, Jie Shao, Zhiye Fu, Shuai Wang, Fangmin Chen, Xuezhi Chai, Zhihua Wu, Yitong Wang, Zehuan Yuan, Daniel K. Du, Xinglong Wu
AI summary
NextFlow: Unified Sequential Modeling Activates Multimodal Understanding and GenerationOverview
- Research area: Computer Vision / multimodal foundation models — unified autoregressive architectures that handle both visual understanding and image generation in a single model.
- Technical level: Advanced. The paper assumes familiarity with autoregressive transformers, vector-quantized tokenizers, reinforcement learning from human feedback, and distributed training infrastructure.
- Scope: NextFlow is a 7B-parameter decoder-only autoregressive transformer, trained on 6 trillion interleaved text-image discrete tokens, that uses next-token prediction for text and next-scale prediction for images to generate 1024×1024 images in about 5 seconds.
What This Paper Is About
Most AI systems split the work: diffusion models generate images but cannot reason in language, while multimodal LLMs understand images but cannot create them well. Unified autoregressive models exist, but raster-scan versions are impractically slow at high resolution (over 10 minutes for a single 1024×1024 image) and rely on tokenizers whose discrete codes are optimized for pixel fidelity rather than high-level semantics. NextFlow's goal is to remove both bottlenecks within one decoder-only transformer, so that understanding, generation, editing, interleaved content, and video generation all emerge from a single sequential modeling framework.
Key Contributions
- A unified decoder-only Transformer. NextFlow activates multimodal understanding, generation, and editing, using next-scale prediction for efficient visual generation and a dual-codebook tokenizer to preserve high semantic density.
- A robust training recipe validated at scale. The authors scale to 6 trillion tokens, introduce a scale-aware loss reweighting scheme and a self-correction mechanism with residual features to stabilize multi-scale generation, and describe a chronological training pipeline from tokenizer to RL.
- A prefix-tuning strategy for RL. A Group Reward Policy Optimization (GRPO) variant that optimizes only the coarse-scale "prefix" policies (for example the first m = 8 scales) while freezing finer scales, stabilizing reinforcement learning on a multi-scale generation process.
- An optional diffusion decoder. A refinement module (1B UNet, or 12B/18B Transformer variants) that improves high-frequency detail for photo-realistic outputs, disabled in all reported quantitative experiments unless stated otherwise.
Main Findings
- Generation speed. NextFlow produces 1024×1024 images in just 5 seconds, described as orders of magnitude faster than raster-scan autoregressive counterparts such as EMU3 and EMU3.5, which can take over 10 minutes per image.
- Compute efficiency. The model requires 6× fewer FLOPs during inference than MMDiT-based diffusion models at 1024² resolution.
- Benchmark standing. The paper states NextFlow achieves state-of-the-art performance among unified models, outperforms specialized image editing models, and rivals top-tier diffusion models in visual quality. Specific numbers for text-to-image and editing benchmarks are not included in the provided text beyond the GenEval ablations reported below.
- Tokenizer ablation. Under identical protocols (40k steps, approximately 40M samples), a single-branch VQGAN baseline achieves marginally higher raw reconstruction fidelity (+0.5 PSNR at 256²), but the dual-branch tokenizer achieves significantly lower vision loss and consistently superior GenEval scores.
- Scale reweighting fixes a resolution regression. Moving from 256-level to 512-level pre-training dropped the GenEval score from 0.67 to 0.57, with lower VAR scales showing rising loss. Applying scale reweighting with α = 0.9 restored stable loss reduction on all scales and removed localized artifacts.
- Self-correction only works with residual features. Applying self-correction to accumulated VAR features at p = 1.0 with 30% of tokens degraded performance below the non-corrected baseline; switching to residual features from the codebook produced substantial gains, with optimum at 100% of training samples and 60% of tokens per scale (0.56 at 50k steps).
- Shared output head wins. In a lightweight ablation with 5M alignment and 5M SFT samples, a single shared head for text and vision achieved lower total loss and vision loss than separate modality-specific heads, with comparable text loss.
- Text data does not hurt image generation. Mixing 25% text-only data produced GenEval scores of 0.265 / 0.404 / 0.454 / 0.499 at 12M / 24M / 36M / 48M tokens, versus 0.266 / 0.384 / 0.441 / 0.505 for the t2i-only baseline.
- Training throughput. Fixed computation budget packing reached 2517.4 tokens/s per GPU, a 4.1× speedup over batch padding (620.3 tokens/s); fixed length packing reached 2109.5 tokens/s (3.4×).
- Memory savings. A fused linear cross-entropy kernel reduced peak memory usage by roughly 20GB per GPU.
Methodology in Plain English
The authors start with a tokenizer that converts images into discrete codes using two codebooks — one capturing semantic meaning, one capturing pixel detail — aligned through a shared mapping. This lets the model treat image codes and text tokens as a single shared vocabulary. The semantic branch is built from a SigLIP2 model so it can handle variable resolutions and aspect ratios.
Instead of writing image tokens left-to-right, top-to-bottom like a raster scan, the model generates a hierarchy of grids: a tiny layout first, then progressively finer grids, each conditioned on the previous ones. Text keeps standard next-token prediction. A multiscale 3D positional encoding lets text positions and spatial/scale positions coexist, with normalized coordinates so different grid sizes share a coordinate space.
Two training problems arise from this hierarchy. Early coarse scales contain very few tokens, so uniform loss weighting lets the abundant fine-scale tokens dominate — solved by reweighting each scale inversely to its resolution (α = 0.9). And because each scale is sampled independently at inference, errors compound — solved by training the model to recover from suboptimal sampled codebook indices, feeding residual (non-accumulated) codebook features so the visual input space stays simple.
After pre-training through 256-, 512-, and 1024-level resolutions, the model goes through continued training and supervised fine-tuning on conversational data, then GRPO reinforcement learning where only the first m scales' policies are updated. Everything is trained on 1024 GPUs using DeepSpeed ZeRO with gradient checkpointing, with offline pre-extraction of image indices and workload-balanced data packing.
Why This Matters
- Research impact. The paper argues a unified autoregressive architecture can be both computationally efficient and structurally simple, positioning it as an alternative to hybrid AR-Diffusion designs like Transfusion and Bagel that maintain two separate representations. It also demonstrates that reinforcement learning, hard to apply in hybrid pipelines, can be used directly on a pure autoregressive multimodal model.
- Real-world applications:
- Interactive image editing and subject-driven generation, where the model preserves an input identity while producing new content.
- Content creation and design workflows, including prompt refinement through Chain-of-Thought reasoning before generation.
- Interleaved document creation that mixes text and images natively, useful for reports, manuals, and educational material.
- Zero-shot in-context editing, where a user provides examples rather than explicit instructions.
- Industry relevance. The 6× FLOP reduction and 5-second generation time at 1024² directly affect serving cost for image generation products, and the training infrastructure findings (packing strategy, fused kernels, offline index pre-extraction) are reusable for any large multimodal training run.
Future Directions
- Precise control versus visual fidelity. The optional diffusion decoder reduces detail degradation in small faces and text, but its stochastic nature can alter fine structures, hurting local editing and identity preservation. Finding a refinement method that keeps both properties is an open problem. The paper does not report evaluations of the diffusion decoder enabled.
- Scaling reinforcement learning across the scale hierarchy. Prefix-tuning freezes finer scales because RL signals from them are noisy. Whether later scales can be optimized safely with better credit assignment is not answered here.
- Extending to video generation. The abstract names video generation as an unlocked ability, but no experimental results for video appear in the provided content.
- Higher resolutions and broader benchmarks. The 1024-level stage used a curated subset of only 40 million high-quality samples. Whether the recipe extends beyond 1024², and how NextFlow compares on standard text-to-image and editing leaderboards in full detail, is not reported in the available text.
Target Audience
Researchers and engineers working on multimodal foundation models, unified understanding-and-generation systems, or efficient autoregressive image synthesis. It is also valuable for practitioners responsible for large-scale training infrastructure, given the packing, kernel fusion, and memory-reduction results. Readers without a background in quantization, autoregressive modeling, or reinforcement learning will find the architecture and training-recipe sections demanding.
Authors’ abstract
We present NextFlow, a unified decoder-only autoregressive transformer trained on 6 trillion interleaved text-image discrete tokens. By leveraging a unified vision representation within a unified autoregressive architecture, NextFlow natively activates multimodal understanding and generation capabilities, unlocking abilities of image editing, interleaved content and video generation. Motivated by the distinct nature of modalities - where text is strictly sequential and images are inherently hierarchical - we retain next-token prediction for text but adopt next-scale prediction for visual generation. This departs from traditional raster-scan methods, enabling the generation of 1024x1024 images in just 5 seconds - orders of magnitude faster than comparable AR models. We address the instabilities of multi-scale generation through a robust training recipe. Furthermore, we introduce a prefix-tuning strategy for reinforcement learning. Experiments demonstrate that NextFlow achieves state-of-the-art performance among unified models and rivals specialized diffusion baselines in visual quality.