TL;DR
LANTERN (Latent Neighbor Token Acceptance Relaxation) is a novel framework that significantly accelerates visual autoregressive (AR) models by relaxing the strict acceptance criteria of speculative decoding. By leveraging the fact that visually similar tokens are interchangeable in latent space, LANTERN achieves up to a 2.26× speedup over vanilla decoding with minimal impact on image quality.
What Problem Does This Paper Address?
Autoregressive (AR) models like LlamaGen and DALL-E have become powerful competitors to diffusion models for image generation. However, they suffer from a major bottleneck: they generate images one token at a time. While "speculative decoding"—using a tiny, fast "drafter" model to guess multiple tokens that a large "target" model then verifies—has revolutionized speed in Large Language Models (LLMs), it performs poorly for images.
The authors identify the culprit as token selection ambiguity. Unlike language, where the next word is often highly predictable (high top-1 probability), visual models often assign low, near-uniform probabilities to many different tokens that could represent the same image patch. This "flat" distribution causes standard speculative decoding to frequently reject the drafter's guesses, even when those guesses are visually sensible, leading to negligible speed gains.
Methods
The core innovation of LANTERN is moving from "exact match" verification to "visually similar" verification.
- Latent Proximity: The authors observe that in the latent space of image quantizers (like VQ-VAE), tokens that are close to each other represent visually similar patches. They demonstrate that replacing a token with one of its $k$-nearest neighbors results in almost no perceptible change to the final image.
- Relaxed Acceptance Condition: Instead of checking if the target model likes the exact token the drafter guessed, LANTERN checks if the target model assigns a high cumulative probability to the neighborhood of that token.
- Total Variation Distance (TVD) Bound: To ensure the generated images don't drift too far from the target model's original distribution, the authors incorporate a TVD bound ($\delta$). This mathematically constrains the "relaxation" so that speed gains don't come at the cost of semantic coherence or image quality.
This approach allows the system to accept "good enough" candidate tokens that standard speculative decoding would have rejected, thereby increasing the number of tokens generated per forward pass.
Datasets
The authors evaluated LANTERN using several prominent benchmarks and models:
- Models: LlamaGen (Stage I and II) and Anole served as the target models. EAGLE-2 was used as the baseline speculative decoding method.
- Training: Drafter models were trained on 100k images from LAION-COCO and ImageNet.
- Evaluation: Performance was measured using 1,000 captions from the MS-COCO validation set. Image quality metrics (FID, CLIP score, etc.) were calculated using 30,000 samples.
Key Insights and Ideas
- The Ambiguity Gap: A key insight is the fundamental difference in data distribution between LLMs and visual AR models. While an LLM might have an 80% confidence in the top token, a visual model might only have 20%. This is why LLM-native acceleration techniques fail for vision.
- Interchangeability: The paper proves that visual tokens are "soft." In language, replacing "cat" with "dog" changes the meaning entirely. In images, replacing one "grass texture" token with a slightly different "grass texture" token is often invisible to the human eye.
- Dynamic Neighborhoods: By using a TVD bound, LANTERN doesn't just use a fixed number of neighbors; it dynamically adjusts how much "relaxation" it allows based on the model's confidence at each step.
Key Results
LANTERN provides a substantial boost over both vanilla decoding and naive speculative decoding:
- Speedup: When applied to LlamaGen-XL, LANTERN achieved a 2.26× speedup in greedy decoding and 1.69× in random sampling. This is a significant improvement over the baseline EAGLE-2, which actually slowed down generation in some sampling settings (0.93×).
- Efficiency: Compared to a naive application of state-of-the-art speculative decoding, LANTERN increased speed-ups by roughly 1.75× to 1.82×.
- Quality Preservation: Qualitative results show that images generated with LANTERN are virtually indistinguishable from vanilla AR generation, even while achieving speedups well over 2×. Quantitative metrics like FID and CLIP scores showed only marginal degradation, which is a highly favorable trade-off for the massive speed increase.
Limitations and Future Work
- Diversity vs. Speed: The authors noted a slight decline in the "Recall" metric, suggesting a minor reduction in image diversity when the relaxation is very high.
- Drafter Dependency: Like all speculative decoding methods, LANTERN still requires a well-trained drafter model. The authors suggest that future work could involve designing drafter architectures specifically optimized for the unique characteristics of visual data.
- Hardware Specifics: While effective on NVIDIA GPUs, the speedup was less pronounced on Intel Gaudi 2 accelerators due to current implementation details, suggesting room for low-level kernel optimization.
Summary updated