DPAR: Dynamic Patchification for Efficient Autoregressive Visual Generation

Divyansh Srivastava, Akshay Mehra, Pranav Maneriker, Debopam Sanyal, Vishnu Raj, Vijay Kamarshi, Fan Du, Joshua Kimball

TL;DR

DPAR (Dynamic Patchification for Autoregressive models) introduces a method to dynamically group image tokens into variable-length patches based on visual information density. By leveraging next-token prediction entropy from a lightweight model, DPAR reduces token counts by up to $2\times$ and training FLOPs by up to 40.4% while simultaneously improving image generation quality (FID) by up to 29.6%.

What Problem Does This Paper Address?

Autoregressive (AR) decoder-only models have shown immense promise in image generation, offering a seamless path toward unified multimodal AI. However, they face a fundamental scalability bottleneck: they typically flatten 2D images into a 1D sequence of fixed-length tokens. This causes the token count to grow quadratically with image resolution. For example, moving from a $256\times256$ image to a $1024\times1024$ image results in a $16\times$ increase in token sequence length, severely straining the computational and memory limits of standard self-attention mechanisms.

While previous works have attempted token compression, they often rely on fixed-size merging. This static approach blindly compresses high-information regions, leading to severe detail loss and degraded image quality. DPAR aims to solve this by dynamically merging tokens based on local information content while preserving the essential 2D spatial structure.

Methods

DPAR introduces a novel framework that dynamically aggregates discrete 1D token sequences into variable-length patches. The architecture consists of four main components:

  1. Entropy Model: A lightweight, unsupervised, unconditional GPT-style AR model that computes the next-token prediction entropy for each token. Low entropy indicates predictable, homogeneous regions (like sky or flat walls), while high entropy indicates complex, high-information details.
  2. Patchification & Patch Encoder: Tokens are sequentially grouped into a patch as long as their entropy remains below a threshold ($H_{Th}$) and the patch doesn't exceed a maximum length ($P_{max}$). A lightweight encoder then compresses the tokens within each patch into a single patch representation using causal self-attention and cross-attention.
  3. Patch Transformer: A standard decoder-only transformer (based on the LLaMA architecture) that operates on the reduced sequence of variable-length patches. It utilizes a custom Dynamic RoPE mechanism to handle positional encodings for patches of varying lengths.
  4. Patch Decoder: A lightweight module that maps the predicted patch states back into individual token probabilities for final image reconstruction.
Figure 3. Overview of DPAR. (a) Conventional AR image generation employs decoder-only transformers that operate on a fixed number of tokens per image, where the token count scales quadratically with image resolution. (b) DPAR dynamically aggregates image tokens based on information content, producing a variable number of patches per image. Decoder-only transformers then operate on this reduced set of patches, lowering both computational and memory overhead of attention. DPAR requires minimal modifications to the standard decoder architecture, preserving compatibility with multimodal generation frameworks.

Datasets

The models were trained and evaluated on the standard ImageNet class-conditional image generation benchmark at two resolutions:

  • ImageNet-256 ($256 \times 256$ pixels)
  • ImageNet-384 ($384 \times 384$ pixels)

Key Insights and Ideas

  • Entropy as an Information Proxy: The authors demonstrate for the first time that next-token prediction entropy from a tiny, unsupervised model serves as a highly reliable metric for visual complexity. This allows the model to automatically allocate more compute to high-detail regions and save compute on background elements.
Figure 2. Entropy-guided Token Aggregation. (Top) Input im- ages with increasing information content. (Bottom) Corresponding entropy heatmaps, where warmer colors indicate higher next-token prediction entropy. Low-information regions yield low-entropy to- kens that are merged into patches, while high-information regions retain fine-grained token-level granularity. Black outlines denote final patch boundaries for 256×256 images.
  • Stronger Global Representations: Interestingly, forcing the transformer to process variable-length patches acts as a powerful regularizer. Because a single patch must keep track of future tokens across shifting sequence lengths, the model learns superior global context. Linear probing of DPAR's hidden layers showed a $\sim5$ percentage point improvement in top-1 and top-5 image classification accuracy over standard token-based baselines.
  • Inference-Time Flexibility: Training with dynamically sized patches makes the learned representations highly robust to patch boundaries. As a result, DPAR can scale to larger patch sizes during inference to achieve further efficiency gains without severe quality degradation.

Key Results

  • Token & FLOP Reduction: DPAR achieves a $1.81\times$ reduction in token count for $256\times256$ images and a $2.06\times$ reduction for $384\times384$ images. This translates to a reduction of up to 40.4% in training FLOPs (for the DPAR-XL model).
  • Quality Improvement: Despite using significantly fewer tokens, DPAR consistently outperforms the baseline LlamaGen model in image quality, improving the Frechet Inception Distance (FID) score by up to 29.6% on the Base model variant.
  • Faster Convergence: DPAR exhibits faster convergence throughout the training process across all model sizes (Base, Large, XL).
Figure 1. Autoregressive image generation with DPAR. (a) Selected samples from our class-conditional DPAR-384-XL model trained on ImageNet. (b) FID vs. FLOPs for DPAR variants at 256 × 256 and 384 × 384 resolution. DPAR reduces training FLOPs by up to 40.4% while improving FID by up to 29.6% over baseline models.

Limitations and Future Work

  • Raster-Order Constraint: The current implementation of DPAR is optimized for standard raster-order (left-to-right, top-to-bottom) token generation. While the authors note that the strategy is theoretically compatible with random-order generation methods, they leave this integration to future work.
  • Inference Speedups: Although training costs are significantly reduced, maximizing inference-time speedups requires developing specialized KV-Cache strategies tailored to this unique variable-length patch encoder-decoder architecture.

Summary updated

BibTeX
@inproceedings{srivastava2026dpar,
  author = {Divyansh Srivastava and Akshay Mehra and Pranav Maneriker and Debopam Sanyal and Vishnu Raj and Vijay Kamarshi and Fan Du and Joshua Kimball},
  title = {{DPAR: Dynamic Patchification for Efficient Autoregressive Visual Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=CK2lS99DlQ},
}
Figure