Grouped Speculative Decoding for Autoregressive Image Generation

Junhyuk So, Juncheol Shin, Hyunho Kook, Eunhyeok Park

TL;DR

Autoregressive (AR) image models are powerful but slow due to their sequential generation. This paper introduces Grouped Speculative Decoding (GSD), a training-free method that accelerates AR image generation by up to 3.8x. GSD achieves this by evaluating groups of visually similar tokens instead of single tokens, addressing a key limitation of prior speculative decoding methods in the image domain.

What Problem Does This Paper Address?

Autoregressive (AR) models have shown great promise for image generation, rivaling diffusion models. However, their core mechanism of generating images token-by-token sequentially leads to very long inference times, making them impractical for many applications. While Speculative Decoding (SD) offers a way to speed this up by having a draft model predict multiple tokens ahead, existing SD methods provide only modest speedups for AR image generation or require additional training. The authors identify that a fundamental difference between language and image tokens—namely, the inherent redundancy and diversity in visual tokens—causes traditional SD to be less effective, leading to many "false negative" rejections and limiting acceleration.

Methods

The paper proposes Grouped Speculative Decoding (GSD), a novel, training-free acceleration technique. Unlike traditional Speculative Decoding (SD) that focuses on a single "most likely" token, GSD operates at the level of semantically valid token groups.

Here's how it works:

  1. Clustering Tokens: The core idea is to partition the vast vocabulary of image tokens into meaningful clusters. Instead of verifying individual tokens, GSD verifies entire groups.
  2. Grouped Probability: GSD calculates the aggregated probability mass for each cluster, both from the expert model ($p'$) and the draft model ($q'$).
  3. Modified Acceptance Criterion: The acceptance decision is then made based on these grouped probabilities. A token is accepted if its cluster's grouped probability meets a certain criterion, effectively smoothing out subtle differences between the expert and draft models.
  4. Dynamic Clustering: The authors found that static clustering (e.g., based on embedding distance) is suboptimal. They introduce Dynamic GSD, where token grouping is adjusted dynamically at each decoding step based on contextual information and token probabilities. This context-aware approach is crucial for maintaining image quality.

GSD builds upon the idea of Speculative Jacobi Decoding (SJD) but introduces the novel grouping mechanism.

Datasets

The paper uses the following datasets for evaluation:

  • Parti-Prompt: Used for evaluating generation quality (CLIP Score) and speed (NFE).
  • MS-COCO 2017: Used for evaluating generation quality (CLIP Score, FID Score) and speed (NFE).

The authors do not introduce new benchmarks but evaluate their method on established datasets for text-to-image generation.

Key Insights and Ideas

  • Image Tokens are Redundant and Diverse: Unlike text tokens, visual tokens often have multiple plausible alternatives that convey similar semantic meaning. Traditional SD, which expects a single "correct" token, struggles with this inherent ambiguity, leading to frequent rejections.
  • Total Variation is Key: The paper demonstrates that the acceptance rate in SD is inversely related to the Total Variation (TV) distance between the expert and draft model distributions. High TV, even with low top-1 probabilities, hinders acceleration.
  • Grouping Smooths Probabilities: By grouping tokens, GSD effectively smooths the probability distributions, reducing the TV distance between the expert and draft models at the group level. This leads to higher acceptance rates.
  • Context Matters for Clustering: Static clustering methods based on embedding distance or draft probabilities are insufficient. Dynamic, context-aware clustering that leverages the expert model's probabilities is essential for both speed and quality.

Key Results

  • Significant Speedup: GSD achieves an average speedup of 3.7x (ranging up to 4.88x in specific configurations) compared to standard AR decoding.
  • Preserves Image Quality: The method maintains high image quality, with CLIP scores comparable to or even slightly better than baselines, especially when using expert-driven dynamic clustering.
  • Training-Free: GSD is a training-free method, making it easily applicable to existing AR image models.
  • Comparison to Baselines: GSD outperforms naive lossy SD methods (which degrade quality) and lossless methods like SJD by offering a better trade-off between speed and quality. For instance, on Parti-Prompt, GSD with G=100 achieves 4.88x acceleration with a comparable CLIP score to the baseline.

Limitations and Future Work

  • Clustering Strategy: While dynamic clustering based on the expert model's probabilities is effective, the paper notes that finding the optimal clustering strategy remains an area for further exploration. The current method involves some heuristics (e.g., grouping G nearest tokens, excluding tokens beyond thresholds).
  • Generalizability: While tested on Lumina-mGPT, further evaluation on a wider range of AR image models and resolutions would be beneficial.
  • Theoretical Bounds: The paper provides a lower bound for GSD's acceptance rate, showing it's at least as good as standard SD. Further theoretical analysis on the exact speedup and quality trade-offs under different clustering strategies could be explored.

Summary updated

BibTeX
@inproceedings{so2025grouped,
  author = {Junhyuk So and Juncheol Shin and Hyunho Kook and Eunhyeok Park},
  title = {{Grouped Speculative Decoding for Autoregressive Image Generation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
  url = {https://openreview.net/forum?id=Hs9h4NwMz1},
}
Figure