LANTERN: Accelerating Visual Autoregressive Models with Relaxed Speculative Decoding

## Abstract

Abstract Auto-Regressive (AR) models have recently gained prominence in image generation, often matching or even surpassing the performance of diffusion models. However, one major limitation of AR models is their sequential nature, which processes tokens one at a time, slowing down generation compared to models like GANs or diffusion-based methods that operate more efficiently. While speculative decoding has proven effective for accelerating LLMs by generating multiple tokens in a single forward, its application in visual AR models remains largely unexplored. In this work, we identify a challenge in this setting, which we term token selection ambiguity , wherein visual AR models frequently assign uniformly low probabilities to tokens, hampering the performance of speculative decoding. To overcome this challenge, we propose a relaxed acceptance condition referred to as LANTERN that leverages the interchangeability of tokens in latent space. This relaxation restores the effectiveness of speculative decoding in visual AR models by enabling more flexible use of candidate tokens that would otherwise be prematurely rejected. Furthermore, by incorporating a total variation distance bound, we ensure that these speed gains are achieved without significantly compromising image quality or semantic coherence. Experimental results demonstrate the efficacy of our method in providing a substantial speed-up over speculative decoding. In specific, compared to a naïve application of the state-of-the-art speculative decoding, LANTERN increases speed-ups by 1.75 × \mathbf{1.75}\times bold_1.75 × and 1.76 × \mathbf{1.76}\times bold_1.76 × , as compared to greedy decoding and random sampling, respectively, when applied to LlamaGen, a contemporary visual AR model.

## 1 Introduction

Auto-Regressive (AR) models have recently gained significant traction in image generation (Ramesh et al., ; Chen et al., ; Tian et al., ; Sun et al., ) due to their competitive performance, often matching or even surpassing diffusion models (Ho et al., ; Rombach et al., ). Notable examples include iGPT (Chen et al., ), DALL-E (Ramesh et al., ), VAR (Tian et al., ), and LlamaGen (Sun et al., ), which showcase the potential of AR models in image generation. Moreover, recent studies like Team (); Lu et al. () have demonstrated that AR modeling can handle multi-modal data, including language and images, within a single unified framework. Given the remarkable success of AR models in language modeling, leading to the era of large language models (LLMs) (Brown et al., ; Touvron et al., ; Jiang et al., ), it is anticipated that AR modeling will emerge as a dominant paradigm for unifying multiple modalities into a single model in the near future.

Despite the promising potential of AR models, their sequential nature poses a significant bottleneck for both efficiency and scalability since they generate a single token per forward pass. In contrast, GANs (Goodfellow et al., ; Karras et al., ), which generate images in a single forward pass, naturally avoid this issue, and diffusion models have benefited from extensive research aimed at improving their speed  (Song et al., ; Sauer et al., ; Heek et al., ). However, transferring these acceleration techniques to visual AR models is far from straightforward due to fundamental differences in the underlying mechanisms of these models.

One notable acceleration technique for AR models is speculative decoding (Leviathan et al., ; Chen et al., ; Cai et al., ; Li et al., ), which has demonstrated its effectiveness in LLMs. Initially introduced by Leviathan et al. (), speculative decoding addresses the sequential bottleneck of AR models by introducing a draft and verify mechanism. In this framework, a smaller model (the drafter) predicts the next few tokens, which are then verified by the larger target model. If the drafter’s predictions are accurate, multiple tokens can be generated from a single forward pass, resulting in a substantial inference speed-up. This method has proven highly effective in accelerating LLM inference, making it a leading option for reducing the latency associated with AR models.

While speculative decoding shows great promise for accelerating AR models, its application to visual AR models remains largely unexplored. Therefore, in this paper, we take the first step toward addressing this gap by migrating speculative decoding to visual AR models. Interestingly, our findings reveal that the naïve application of existing speculative decoding methods falls short in visual AR models. Specifically, we identify a key problem, namely the token selection ambiguity, that hampers the effective migration of speculative decoding to visual AR models.

To mitigate such an obstacle in speculative decoding, we propose a solution dubbed as LANTERN (Latent Neighbor Token Acceptance Relaxation) that leverages the interchangeability of image tokens in latent space for the relaxation of acceptance condition. By relaxing the acceptance in speculative decoding, we allow for more effective utilization of draft (candidate) tokens that would otherwise be frequently rejected despite their potential usefulness. However, our relaxation introduces some distortion to the target model’s distribution, which may cause the generated images to deviate from the original target output. To mitigate this, we further incorporate a total variation distance bound which ensures that the deviation remains controlled.

Figure: Figure 1: Images generated by vanilla decoding (top) and lossy speculative decoding with our relaxed acceptance condition (with mean accepted length 2.40) (bottom) on the text-conditioned LlamaGen Stage II (Sun et al., ).
Refer to caption: x1.png

Our main contributions are summarized as below:

- •
To the best of our knowledge, we are the first to thoroughly investigate speculative decoding in visual AR models, identifying the token selection ambiguity problem, where near-uniform token probability distributions hinder token prioritization, causing existing methods to fail in improving speed.
- •
Based on our insights, we then propose LANTERN, a novel relaxation of acceptance condition for the speculative decoding that addresses the token selection ambiguity problem, successfully enabling the effective application of speculative decoding to visual AR models.
- •
Our experiments using LlamaGen (Sun et al., ) as the target and EAGLE-2 (Li et al., ) as the drafter demonstrate significant speed-ups, improving from $1.28\times$ to $\mathbf{2.25}\times$ in greedy decoding and from $0.93\times$ to $\mathbf{1.64}\times$ in random sampling, compared to the naive application of EAGLE-2, without substantial performance drop in terms of image quality.

## 2 Token Selection Ambiguity in Visual Autoregressive Models

In this section, we introduce a novel problem, termed token selection ambiguity, which imposes a major challenge for applying speculative decoding into visual AR models. In Section 2.1, we provide empirical results on naïve application of existing speculative decoding methods into visual AR models. Section 2.2 presents the token selection ambiguity problem and how this problem causes the failure of speculative decoding in visual AR models.

### 2.1 Naïve Speculative Decoding Fails in Visual AR Models

**Table 1: Mean accepted length of naïve application of existing speculative decoding methods on the greedy decoding regime. LlamaGen-L is used as a drafter for Speculative Decoding (Leviathan et al., ). Numbers in parentheses present the mean accepted length on MT-Bench (Zheng et al., ) with Vicuna-7B (Zheng et al., ). Results on Vicuna-7B are taken from EAGLE-2 (Li et al., ).**
| Methods | Mean Accepted Length |  |
| --- | --- | --- |
| LlamaGen-3B | Vicuna-7B |  |
| (Sun et al., ) | (Zheng et al., ) |  |
| Speculative Decoding (Leviathan et al., ) | 1.40 (-40.6%) | 2.36 |
| Medusa (Cai et al., ) | 1.38 (-45.2%) | 2.52 |
| EAGLE-2 (Li et al., ) | 2.11 (-57.6%) | 4.98 |

While speculative decoding has been successful in LLMs (Leviathan et al., ; Cai et al., ; Li et al., ), we observe that its naïve application to visual AR models fails to provide noticeable speed-up. As shown in Table 1, the naïve application results in limited efficacy compared to its performance in LLMs, with a significant reduction in the mean accepted length, dropping between 41% to 58% across methods. To better understand this limitation, we conduct a comparative analysis of the next-token probability distributions in both LLMs and vision AR models, using Vicuna-7B (Zheng et al., ) on the MT-Bench dataset (Zheng et al., ) and LlamaGen models (Sun et al., ) on MS-COCO captions (Lin et al., ), respectively.

Our analysis reveals that the drafter in the visual AR models often struggles to accurately predict the target model’s output, leading to frequent misalignment between token predictions from the drafter and target model. Specifically, Figure 2(a) demonstrates that the drafter model fails to achieve high accuracy in predicting the target model’s output even in top-3 predictions, whereas its LLM counterpart shows considerably higher accuracy. Consequently, Figure 2(b) clearly illustrates the significant misalignment in token prediction distributions between the drafter and target model in visual AR models.

### 2.2 Token Selection Ambiguity Problem

Figure: (a) Drafter Test Accuracy
Refer to caption: x2.png

To understand the reason for the failure of speculative decoding in visual AR models, we identify a unique problem that we term as the token selection ambiguity. This problem stems from the fundamental differences between language and image data, as well as the distinct tokenization strategies employed in their respective AR models.

In language models, tokens represent discrete units such as words or subwords, which follow structured and predictable sequences governed by grammar and syntax (Zipf, ). This results in a concentrated next token probability distribution, where the model assigns high confidence to the most likely token. In contrast, visual AR models process pixels or patches as tokens, leading to spatially continuous and highly complex sequences. Consequently, these models often exhibit broad and dispersed next-token probability distributions, reflecting greater uncertainty and ambiguity in predicting the next token. We define this phenomenon as the token selection ambiguity problem.

To empirically validate this, we compare the next token probability distributions of Vicuna-7B, a language model, and text-conditioned LlamaGen, a visual AR model. Using 80 responses from Vicuna-7B on the MT-Bench dataset and 1,000 images from LlamaGen based on MS-COCO validation captions, we observe a stark contrast in how the models assign probabilities. As shown in Figure 2(c), LlamaGen has significantly lower top-1 and top-10 probabilities on average compared to Vicuna-7B. This highlights the greater ambiguity in selecting the next token in visual AR models, where the model struggles to confidently prioritize one token over others.

The implication of this problem is critical for speculative decoding since speculative decoding relies on concentrated next-token distributions which enables a simpler drafter to predict and align with the target model. Therefore, the dispersed token distributions in visual AR models make it difficult for the drafter to accurately approximate the target model’s token probabilities. This misalignment leads to a lower acceptance rate of drafter tokens during speculative decoding, ultimately reducing its effectiveness.

## 3 Detouring Token Selection Ambiguity Through Latent Space

In this section, we propose LANTERN, a simple yet effective method that permits detouring the failure of speculative decoding caused by the token selection ambiguity problem by relaxing acceptance condition in Speculative Decoding (Leviathan et al., ). In Section 3.1, we introduce a concept of latent proximity which asserts close image tokens in the latent space are interchangeable and examines its validity on the generated images. Section 3.2 describes how we relax the acceptance condition based on the interchangeability. In Section 3.3, we present another component to ensure that the distribution of generated images does not catastrophically deviate from the original distribution.

### 3.1 Latent Proximity Permits Token Interchangeability

We introduce latent proximity, a property in visual AR models that asserts tokens close to one another in latent space are interchangeable without significantly affecting the visual semantics or overall image quality. This means that replacing a token with another nearby token in latent space results in minimal changes to the generated image.

This property arises from the tokenization process unique to visual AR models. Unlike text tokenization, which is straightforward due to its discrete nature, images are spatially continuous, making tokenization more complex (Esser et al., ). To handle this, models like vector-quantized variational auto-encoders (VQVAE) (Van Den Oord et al., ) and vector-quantized generative adversarial networks (VQGAN) (Esser et al., ) are used to discretize the latent embeddings of images. These embeddings maintain a continuous mapping between changes in latent space and the visual semantics of the generated images (Kingma & Welling, ; Goodfellow et al., ; Karras et al., ). As a result, small shifts in latent space lead to minor shifts in the image, supporting the idea that tokens close in the latent space are effectively interchangeable.

Figure: Figure 3: Image generated by text-conditioned LlamaGen Stage II model (Sun et al., ) with five captions from MS-COCO (Lin et al., ) validation set. The images are generated by either standard sampling method (top) or sampling with random replacement within 100-closest tokens in the latent space (bottom).
Refer to caption: x5.png

To demonstrate this concept empirically, we perform an experiment in which, after each token is sampled, it is re-sampled uniformly from the 100 closest tokens in latent space. Figure 3 reveals that the images generated by this procedure closely resemble those produced using the original sampling method. This confirms that tokens close in latent space can be treated as interchangeable, allowing for flexible token replacement without significantly compromising the visual semantics or overall image quality.

### 3.2 LANTERN: Relaxation of Acceptance Condition

Building on our findings about latent proximity, we introduce LANTERN, a simple yet effective solution that leverages the interchangeability of proximate tokens in latent space. By treating neighboring tokens as commutable, LANTERN effectively resolves the token selection ambiguity problem, significantly boosting the acceptance probability of candidate tokens and enabling the successful application of speculative decoding.

We start with revisiting the original acceptance condition from Leviathan et al. (). The drafter model with distribution $p(x)$ samples a candidate token $\widetilde{x}\sim p(x|s)$ given a preceding sequence $s=(x_{1},\ldots,x_{n})$. The candidate is accepted with probability

$$ $\displaystyle\min\left(1,\frac{q(\widetilde{x}|s)}{p(\widetilde{x}|s)}\right)$ (1) $$

where $q(x)$ is the target model’s distribution. If rejected, the next token is re-sampled from $[q(\cdot|s)-p(\cdot|s)]_{+}$ where $[\cdot]_{+}$ denotes normalization. Acceptance depends on the alignment of probabilities between the drafter and target models.

However, this acceptance condition results in a sharp decline in accept probability when encountering the token selection ambiguity problem. As mentioned in Table 2, the EAGLE-2 drafter exhibits an average accept probability of 0.0402, meaning only 4% of drafts are accepted when applied to visual AR models. This issue arises because the target model assigns low probabilities to individual tokens and frequently misaligns with the drafter’s distribution, leading to frequent rejections of candidate tokens and reducing the overall effectiveness of speculative decoding.

To alleviate this problem, we exploit the latent proximity by aggregating the probabilities of a candidate token’s nearest neighbors, treating them as proxies. This approach effectively increases the acceptance probability by utilizing the combined likelihood of similar tokens, mitigating the impact of the token selection ambiguity problem and reducing unnecessary rejections.

Specifically, we define the neighborhood $B_{k}(\widetilde{x})$ as the set of $k$-nearest tokens to $\widetilde{x}$ in latent space, including $\widetilde{x}$ itself. The accept probability is then adjusted to

$$ $\displaystyle\min\left(1,\frac{\sum_{x\in B_{k}(\widetilde{x})}q(x|s)}{p( \widetilde{x}|s)}\right).$ (2) $$

Because $\widetilde{x}$ is always included in $B_{k}(\widetilde{x})$, this new accept probability is guaranteed to be equal to or higher than the original acceptance condition (1). As demonstrated in Table 2, applying LANTERN significantly increases the average acceptance probability, reaching values as high as 0.37. This improvement allows us to recover candidate tokens that would have otherwise been unjustifiably rejected.

### 3.3 With Limited Distributional Divergence

**Table 2: Average accept probabilities of LANTERN. The accept probabilities are averaged on 100 image generations using text-conditioned LlamaGen Stage I model (Sun et al., ) and MS-COCO validation captions (Lin et al., ). We only use accept probability of the first draft token. An average accept probability of EAGLE-2 (Li et al., ) is 0.0402.**
| Average Accept Probability |  |  |  |  |
| --- | --- | --- | --- | --- |
| $k$ | $\delta=0.05$ | $\delta=0.1$ | $\delta=0.2$ | $\delta=0.4$ |
| 100 | 0.0725 | 0.1096 | 0.1703 | 0.2595 |
| 300 | 0.0759 | 0.1166 | 0.1892 | 0.3267 |
| 1000 | 0.0786 | 0.1186 | 0.2000 | 0.3657 |

Although the relaxed acceptance condition (2) effectively permits speculative decoding in visual AR models by significantly raising the accept probability, it inevitably distorts the target distribution. In particular, when we condition the target distribution on the candidate token $\widetilde{x}$, it becomes:

$$ $\displaystyle q_{k}(x|s,D=\widetilde{x})=\begin{cases}\sum_{x\in B_{k}( \widetilde{x})}q(x|s)&\text{if $x=\widetilde{x}$}\\ 0&\text{if $x\in B_{k}(\widetilde{x}),x\neq\widetilde{x}$}\\ q(x|s)&\text{otherwise}\end{cases}$ $$

where $D$ is a random variable representing the candidate token and $q_{k}$ denotes the distorted target distribution. In contrast, under the original acceptance condition, the target distribution remains unchanged regardless of the candidate token. For this reason, (2) may excessively distort the target distribution, leading to generating images that diverge significantly from those generated by the target model.

To mitigate this distortion, we impose an upper bound on the distributional divergence using total variation distance (TVD). Since the distortion results from redistributing probability mass, TVD effectively measures the extent of this shift, allowing us to control the magnitude of the divergence. This can be achieved by adjusting the neighborhood $B_{k}(\widetilde{x})$ used in the relaxation as follows.

Since the relaxation can be analogously derived using any neighborhood of $\widetilde{x}$, we can find a neighborhood that ensures the TVD between the target distribution and the distorted target distribution induced by the neighborhood is below a specific threshold. To formulate this approach, we define the neighborhood $A_{k,\delta}(\widetilde{x})$ of $\widetilde{x}$ for a given TVD bound $\delta>0$ and $k\in\mathbb{Z}^{+}$ as $A_{k,\delta}(\widetilde{x})$ is the largest subset of $B_{k}(\widetilde{x})$ such that for the total variation distance $D_{TV}$,

$$ $D_{TV}\left(q_{k,\delta}(x|s,D=\widetilde{x}\right),q(x|s,D=\widetilde{x}))=D_ {TV}(q_{k,\delta}(x|s,D=\widetilde{x}),q(x|s))<\delta$ $$

where $q_{k,\delta}$ denotes the distorted target distribution induced by $A_{k,\delta}(\widetilde{x})$.

We construct $A_{k,\delta}(\widetilde{x})$ by incrementally adding tokens from $B_{k}(\widetilde{x})$ to $A_{k,\delta}(\widetilde{x})$, starting with the closest ones to $\widetilde{x}$, and stopping when adding another token would exceed the TVD threshold $\delta$. This procedure allows us to relax the acceptance condition by incorporating probabilities of similar tokens while keeping the divergence within a predefined boundary.

By integrating the TVD constraint into the acceptance condition (2), we arrive at the final relaxed acceptance condition of LANTERN:

$$ Accept $\displaystyle\widetilde{x}\text{ with probability }\min\left(1,\frac{\sum_{x \in A_{k,\delta}(\widetilde{x})}q(x|s)}{p(\widetilde{x}|s)}\right)$ Else $\displaystyle\text{re-sample }x\sim[q_{k,\delta}(x|s,D=\widetilde{x})-p(x|s)]_ {+}$ $$

For greedy decoding, LANTERN can be simply reduced to accept $\widetilde{x}$ if $\widetilde{x}=\operatorname*{arg\,max}_{x}q_{k,\delta}(x|s,D=\widetilde{x})$. Full algorithm can be found in Appendix B.

## 4 Experiments

In this section, we evaluate the performance of our method, LANTERN. In section 4.1, we report the experimental setup for our experiments. Section 4.2 evaluates LANTERN with other baselines in perspective of image quality and acceleration. In Section 4.3, we conduct an ablation study to clarify the effectiveness of each component in our method.

### 4.1 Experimental Setup

To validate our method LANTERN,
we conduct experiments on LlamaGen-XL (Sun et al., ) for the text-conditional image generation as target model that demonstrate the best performance among autoregressive models without vision-specific modifications. We utilize the MS-COCO validation captions (Lin et al., ) to generate images and evaluate the image quality with the ground-truth images. For the drafter model, we employ EAGLE-2 (Li et al., ), which has demonstrated state-of-the-art performance in speculative decoding in the language domain. We employ the $\ell_{2}$ distance to quantify latent proximity, and utilize the TVD as a metric for divergence bound.

To assess the improvement of speed, we use $100$ MS-COCO validation captions to evaluate actual speedup and mean accepted length. Since measuring speedup with more than $100$ samples shows no significant difference, we use $100$ captions for efficiency. Actual speedup is measured by the inference time ratio between each method and vanilla auto-regressive decoding. Mean accepted length is determined by the average number of tokens accepted in each forward step of the target model. We evaluate each method in both the greedy decoding setting with $\tau=0$ and the sampling with $\tau=1$.

Since LANTERN can impact the quality of generated images, we evaluate image quality with FID (Heusel et al., ) and CLIP score (Hessel et al., ) with 30k samples. For each evaluation, Note that existing speculative decoding theoretically guarantees exact distribution matching with the target model, we do not evaluate image quality on EAGLE-2. Further details can be found in Appendix C.

### 4.2 Main Results

In this section, we demonstrate qualitative and quantitative results of speculative decoding with our relaxed acceptance condition. First of all, Section 4.2.1 demonstrates how much speed-up can be achieved through our method. Next, Section 4.2.2 showcases that our method retains image quality within a similar level by showing qualitative samples. Afterward, Section 4.2.3 presents the trade-off between performance and efficiency in our method.

**Table 3: Actual speed-up, mean accepted length, FID, and CLIP score for each method. $\tau$ refers to the temperature for a generation. The actual speed-up is measured on a single A100 80GB SXM.**
| Method | $\tau=0$ |  |  |  |
| --- | --- | --- | --- | --- |
| Speedup | Mean Accepted Length | FID | CLIP score |  |
| Vanilla AR (Sun et al., ) | 1.00$\times$ | 1.00 | 28.63 | 0.3169 |
| EAGLE-2 (Li et al., ) | 1.28$\times$ | 1.60 | - | - |
| LANTERN ($\delta=0.05$, $k=1000$) | 1.68$\times$ | 2.02 | 29.77 | 0.3164 |
| LANTERN ($\delta=0.20$, $k=1000$) | 2.25$\times$ | 2.89 | 30.78 | 0.3154 |
| Method | $\tau=1$ |  |  |  |
| Speedup | Mean Accepted Length | FID | CLIP score |  |
| Vanilla AR (Sun et al., ) | 1.00$\times$ | 1.00 | 15.22 | 0.3203 |
| EAGLE-2 (Li et al., ) | 0.93$\times$ | 1.20 | - | - |
| LANTERN ($\delta=0.10$, $k=1000$) | 1.17$\times$ | 1.75 | 16.17 | 0.3208 |
| LANTERN ($\delta=0.40$, $k=1000$) | 1.65$\times$ | 2.40 | 18.76 | 0.3206 |

Figure: Figure 4: Qualitative samples for LANTERN and vanilla autoregressive decoding. From top to bottom, the images are generated by vanilla, LANTERN ($\delta=0.05$, $\delta=0.1$, $\delta=0.2$, $\delta=0.4$) where $k$ is fixed at 1000, and images in the same column are generated using the same text prompt.
Refer to caption: x6.png

#### 4.2.1 Speed Up Comparison

To confirm that LANTERN provides notable speed improvements over the baseline while maintaining image quality, we compare our method with baselines under both greedy decoding and random sampling situations.
Table 3 demonstrates the speedup and image quality across different methods. LANTERN shows a significant acceleration, even with some degradation in image quality, when compared to vanilla autoregressive decoding and EAGLE-2 (Li et al., ).

For $\tau=0$, LANTERN achieves a $2.25\times$ actual speedup with a slight quality cost, as reflected in a 2.16 increase in FID. In contrast, EAGLE-2 only achieves $1.28\times$ speedup, which is far less than ours. LANTERN demonstrates that by slightly relaxing the (i.e. $\delta=0.2$), we can achieve higher speedup compared to other baselines while maintaining the acceptable quality loss, with an FID of 30.78, which is close to the vanilla AR decoding.

For $\tau=1$, while EAGLE-2 fails to achieve actual speedup, our approach accomplishes $1.65\times$ speedup by relaxing the acceptance condition, with a cost of a 3.53 increase in FID. Nevertheless, a more conservative setting of $\delta=0.1$ yields a balanced compromise, which obtains $1.17\times$ speedup with only a 6% increase in FID compared to the vanilla AR, making it a suitable choice when quality preservation is critical. CLIP score is maintained within a similar level, regardless of $k$ and $\delta$, which indicates that LANTERN does not alter alignment between input text and generated images.

Similar to the other speculative decoding methods in LLMs, we can achieve greater speedup with greedy decoding compared to the sampling. However, vision autoregressive models often fail to generate high quality images with greedy decoding, which leads to the inferior FID score. As a result, by allowing a degree of flexibility in token selection, our method strikes a favorable balance between speed and quality, outperforming both vanilla AR and EAGLE-2 in terms of practical efficiency.

#### 4.2.2 Qualitative Results

To confirm that image quality is preserved with LANTERN, as indicated by the FID score, we conduct qualitative analysis.
Figure 4 demonstrates that, despite the modification of the target model’s probability distribution to achieve acceleration, our method effectively preserves image quality.
Notably, even under the setting of $\delta=0.4$ and $k=1000$, which achieve about $1.6\times$ speedup compared to the vanilla decoding, generated images retain both content and style at a level comparable to standard autoregressive decoding. These qualitative results, along with the fact that LANTERN avoids significant degradation in FID score as shown in the previous section, demonstrate that it effectively preserves image quality while increasing efficiency.
More qualitative examples can be found in Appendix D.

#### 4.2.3 Trade-off Between Performance and Efficiency

Figure: (a) Trade-off curve with $\tau=1$ (sampling)
Refer to caption: x7.png

LANTERN provides various options between quality and efficiency to the end users. Therefore, we explore this trade-off by adjusting $k$ and $\delta$ across different settings.
Figure 5 illustrates the relationship between image quality, which is measured by FID, and speedup, which is assessed with mean accepted length for various settings of $\delta$ and $k$, under both sampling ($\tau=1$) and greedy decoding ($\tau=0$). The trade-off curves highlight that increasing $\delta$ and $k$ generally improves speedup, but at the expense of image quality.

In the case of greedy decoding, we observe that while larger $\delta$ tends to increase the speedup, it may not always result in substantial acceleration when $k$ is small. This could be attributed to the inherent nature of greedy decoding, which only accepts the token with the top-1 probability. If $k$ is not large enough, the increase in acceptance probability is insufficient to surpass the top-1 threshold, thus limiting the speedup gains.

For sampling, note that we observe different behaviors. When $\delta$ is small such as 0.05 and 0.1, increasing $k$ maintains image quality while still achieving better acceleration. This suggests that by tuning $\delta$ and selecting an appropriate $k$, we can find an optimal trade-off where the speedup is improved without significantly compromising image quality. Specifically, larger $k$ values allow for faster generation without disproportionately degrading FID, particularly at lower $\delta$ values.

These findings confirm that LANTERN allows flexible tuning of performance versus efficiency, where careful adjustment of $\delta$ and $k$ can yield substantial acceleration with minimal quality loss. By setting appropriate hyperparameters, particularly under sampling, we can achieve significant speedups while preserving the quality of images, offering a better balance compared to the original speculative decoding method.

### 4.3 Ablation Study

In this section, we conduct ablation studies for LANTERN. In Section 4.3.1, we assess the impact of the metric used to measure latent proximity on performance. Then, in Section 4.3.2, we provide an ablation study on the effect of the metric for measuring distance from the modified probability distribution.

#### 4.3.1 Nearest Latent Selection

**Table 4: Ablation study for latent proximity measure and probability distribution distance metrics. Best performing method annotated with bold, and second best is marked with underline.**
| Distance Metric | Latent Proximity Measure |  |  |
| --- | --- | --- | --- |
| Mean Accepted Length | FID | CLIP score |  |
| $\ell_{2}$ distance ($\delta=0.2$) | 2.09 | 17.43 | 0.3208 |
| $\ell_{2}$ distance ($\delta=0.05$) | 1.50 | 15.71 | 0.3203 |
| Cosine similarity ($\delta=0.2$) | 2.09 | 17.46 | 0.3206 |
| Random ($\delta=0.2$) | 1.26 | 15.62 | 0.3203 |
| Distance Metric | Probability Distribution Distance |  |  |
| Mean Accepted Length | FID | CLIP score |  |
| JSD ($\delta=0.2$) | 2.29 | 18.21 | 0.3206 |
| TVD ($\delta=0.2$) | 2.09 | 17.43 | 0.3208 |
| TVD ($\delta=0.4$) | 2.40 | 18.76 | 0.3206 |

To explore the impact of various metrics for measuring latent proximity, we conduct an ablation study using representative distance metrics commonly used to measure latent proximity. Table 4 summarizes the comparisons among different strategies for selecting the nearest latent tokens, including $\ell_{2}$ distance, cosine similarity, and random selection. This experiment aims to assess the role of proximity-based selection in token aggregation, with $k=1000$ used across all methods.

As shown in Table 4, the random selection significantly underperforms in terms of acceleration, achieving only a $1.26$ mean accepted length, which is notably lower than both $\ell_{2}$ distance and cosine similarity. Additionally, the random selection shows inferior acceleration compared to the $\ell_{2}$ distance with $\delta=0.05$, while maintaining a similar FID, which highlights the importance of token selection based on latent proximity.

Comparing $\ell_{2}$ distance and cosine similarity, both methods demonstrate comparable performance, suggesting robustness in our approach to proximity measurement. Mean accepted length is almost identical between these two, and FID/CLIP score also have a marginal gap. This suggests that our method is effective regardless of the specific proximity metric considered, offering flexibility without significant trade-offs in performance. These results confirm that selecting tokens based on latent proximity plays a crucial role in both acceleration and image quality, with proximity-based metrics like $\ell_{2}$ distance and cosine similarity, providing a clear advantage over random selection.

#### 4.3.2 Distance Between Probability Distribution

To ensure that the modified target distribution remains within an acceptable range of divergence from the original, we introduce $\delta$ as an upper bound for distributional divergence. To validate the impact of the divergence metric, we evaluate two different metrics to measure this divergence: Total Variation Distance (TVD) and Jensen-Shannon Divergence (JSD). Kullback-Leibler Divergence (KLD) is not used as it is asymmetric and not a valid metric for a distance in mathematical sense.

To compare the effectiveness of these distance metrics, we fix $k$ as 1000 and adjust $\delta$ to achieve similar mean accepted lengths across the different methods. The results, shown in Table 4, demonstrate that JSD with $\delta=0.2$ results in a performance that achieves between TVD with $\delta=0.2$ and with $\delta=0.4$. Specifically, JSD yields 2.29 mean accepted length with 18.21 FID, positioning it between two TVD configurations in terms of both speed and image quality.

These results confirm that our method consistently functions as a robust trade-off controller regardless of the chosen distance metric. Since the difference in performance between two metrics is marginal, we opt to use TVD, as it is computationally lighter and thus more efficient for large-scale implementations.

## 5 Conclusions

In this paper, we explored the application of speculative decoding to visual AR models for the first time. We revealed that the naïve application of existing methods fails due to the token selection ambiguity problem. To address this, we proposed LANTERN, a novel relaxed acceptance condition that effectively resolves this problem. Our experiments using the state-of-the-art visual AR model and speculative decoding method demonstrated that LANTERN successfully enables speculative decoding in visual AR models, achieving substantial speed-ups with minimal compromise in image generation performance. For future work, we plan to design a drafter specifically tailored to visual AR models, aiming to achieve acceleration without sacrificing the generation performance.

## Appendix

## Appendix A Related Works

##### Visual Autoregressive Models

Based on the advancements of autoregressive (AR) learning in natural language processing (Brown et al., ; Touvron et al., ; Jiang et al., ), autoregressive models have been extended to generative vision tasks by tokenizing images into discrete tokens arranged on a 2D grid and defining a unidirectional token sequence. Early studies (Esser et al., ; Yu et al., ; Lee et al., ) employ row-major raster scan, spiral, or z-curve orders to generate sequences, but these approaches are computationally inefficient and demonstrated inferior performance compared to diffusion models. In response, recent visual AR models (Sun et al., ; Tian et al., ) introduce a novel tokenizer and multi-scale, coarse-to-fine ordering strategy, establishing a scalable paradigm that surpasses diffusion models. More recently, Chameleon (Team, ) propose a multi-modal AR model capable of generating both images and text within a unified framework, demonstrating strong versatility across diverse tasks.

##### Speculative Decoding for LLMs

LLM inference is known to be memory-bounded, which means that the computation (or processing) is blocked by the slow transfer of data (e.g., model parameters) (Leviathan et al., ). To address the issue, the speculative decoding (Leviathan et al., ) has been proposed to make more computations at a single decoding step by attaching the draft sequences after the usual input tokens. Speculative decoding theoretically guarantee that prediction results with speculative decoding exactly match with target models distribution. Speculative decoding uses a smaller model which is trained on the same dataset as a drafter, thus it involves significant extra latency by running another model (drafter) and it hinders the actual acceleration.

Medusa (Cai et al., ) proposed a light-weighted drafter where the size is similar to the lm_head of the target model and suggested to use somewhat lenient acceptance condition called typical acceptance rather than speculative sampling. Although the typical acceptance does not provide any fundamental guarantee about the resulting distribution, they show that the results’ quality is maintained compared to the target model. EAGLE (Li et al., ) proposes to make the drafter slightly heavier than Medusa by utilizing single autoregressive layers, but it dramatically improves the acceleration.

In this work, we mainly follow the EAGLE as a base method since it exhibits the best performance in LLM literature. Based on its its drafter architecture and training settings, we trained drafter on image data and adapt it for speculative decoding.

##### Multi-modal speculative decoding

Recently, Gagrani et al. () proposes a speculative decoding method for the multi-modal large language models (MLLMs). They mainly focus on the model, which processes both images and texts as input and generates texts such as LLaVA. Note that we focus on the visual autoregressive models regarding image generation in this work, which is a totally different model with the scope of Gagrani et al. ().

## Appendix B Algorithm

Figure: Algorithm 1 LANTERN

## Appendix C Experimental Details

To train text-conditional model’s drafter, we sampled 100k images in LAION-COCO dataset (Chuhmann et al., ), which is used to train stage-1 target model. We used same amount of image sampled in ImageNet (Deng et al., ) dataset to train class-conditional model’s drafter. Since EAGLE (Li et al., ) reports that benefits of using target model generated sequence as a training data is marginal, we do not use target model generated sequence as a training data to reduce overhead. We used a single-layer decoder with the same structure as the target model, in the same manner of EAGLE. During training, 5% of data is set to be hold out validation dataset.

Since LlamaGen (Sun et al., ) use classifier-free guidance (Ho & Salimans, ) to generate image, we trained our drafter to both learn conditioned input and null-conditioned input. To do so, we dropped 10% of conditional embedding during trainig, as same as target model training. Batch size is 16 and base learning rate is $10^{-4}$. AdamW (Loshchilov & Hutter, ) optimizer with $\beta_{1}=0.9$ and $\beta_{2}=0.95$ is used and Linear learning rate scheduling with warm up is used with 2000 warm up steps. We select best performing model in terms of top-3 accuracy in hold out validation set for 20 epochs. In addition, Flan-T5 XL (Chung et al., ) is used to encode input text for text-conditional generation.

All text-conditional images are generated using a classifier-free guidance scale of 7.5, with top-p set to 0 and top-k set to 1000, which is the default generation configuration of LlamaGen (Sun et al., ) official implementation for text-conditional image generation. For class-conditional generation, the classifier-free guidance scale is set to 4.0, with the top-k sampling covering the entire vocabulary and top-p sampling set to 1.0. For EAGLE-2 and our method, 60 candidate tokens are passed into target model for each verification process.

## Appendix D Qualitative Results

Figure: Figure 6: Qualitative sample for the changes in the generated images according to various $\delta\in\{0.05,0.1,0.2,0.4\}$ and $k\in\{100,300,1000\}$ at $\tau=1$. Input prompt is ’A kitchen with a refrigerator, stove and oven with cabinets’. Target model is LlamaGen-XL stage I.
Refer to caption: x9.png

Figure: Figure 7: Qualitative sample for the changes in the generated images according to various $\delta\in\{0.05,0.1,0.2,0.4\}$ and $k\in\{100,300,1000\}$ at $\tau=0$. Input prompt is ’A motorcycle parked in a parking space next to another motorcycle.’. Target model is LlamaGen-XL stage I.
Refer to caption: x10.png

Figure: Figure 8: Additional qualitative samples with various $k$ and $\delta$ at $\tau=1$. Target model is LlamaGen-XL stage I and MS-COCO validation captions are used. Images within the same column are generated using the same text prompt.
Refer to caption: x11.png

Figure: Figure 9: Additional qualitative samples with various $k$ and $\delta$ at $\tau=0$. Target model is LlamaGen-XL stage I and MS-COCO validation captions are used. Images within the same column are generated using the same text prompt.
Refer to caption: x12.png

Figure: Figure 10: Qualitative sample for the changes in the generated images according to various $\delta\in\{0.05,0.1,0.2,0.4\}$ and $k\in\{100,300,1000\}$ at $\tau=1$. Input prompt is ’A pile of oranges in crates topped with yellow bannanas.’ Target model is LlamaGen-XL stage II.
Refer to caption: x13.png

Figure: Figure 11: Additional qualitative samples with various $k$ and $\delta$ at $\tau=1$. Target model is LlamaGen-XL stage II and MS-COCO validation captions are used. Images within the same column are generated using the same text prompt.
Refer to caption: x14.png

## Peer Reviews

confidence: 2
contribution: 2
initial_rating: 5
presentation: 2
questions: - See the weakness.
- The claim of interchangeability in Section 3.1 is only empirically explored via a few examples. Are there some theoretical insights or statistics supporting this claim?
soundness: 2
strengths: - The proposed method is intuitive and easy to follow.

- Experimental results seem to verify the proposed method in terms of speeding up image generation without significant quality loss.
summary: In this paper, the authors propose LANTERN, a sampling strategy to speed up the image generation without losing too much quality. The method is implemented by accumulating probabilities from nearby tokens of the current sampling token. The authors further propose a thresholding technique to prevent the accumulated distribution deviating too much from the original one. Experiment results seem to be effective, however, the analysis is intuitive and empirical without deep insights.
weaknesses: - There is a gap between the introduction and methodologies in writing. The related works are deferred to the appendix and problem definition and preliminaries such as Speculative Decoding are missing, resulting in difficulties in understanding the problem and challenge for readers who are not exactly working on this domain. On the other hand, Section 2.1 and 2.2 have some overlaps about the experiments and observation, which can be more concise.

- The evaluation seems to be insufficient. For the testing data, it is ideal to use the same setting as the vanilla baseline (i.e., LlamaGen) rather than just 100 captions from MSCOCO. The statement “Since measuring speedup with more than 100 samples shows no significant difference, we use 100 captions for efficiency” is not very convincing to me. In addition, other models are suggested for evaluation as well including other variations of LlamaGen.

- Some analyses in experiments are not sufficient. In sampling, the authors only mentioned that when $\delta$ is small, using larger k results in speeding up without significant degradation in performance, yet the reason for it is less explored. Section 4.3.2 also lacks further analysis why using TVD is better than JSD except some empirical results.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: Please see the weaknesses.
soundness: 3
strengths: The methodology of this paper is clear and comprehensible, and the research question it addresses is interesting. Although the overall approach is relatively straightforward, I believe the findings are still valuable.
summary: The work presents a novel approach to enhance the efficiency of image generation using Auto-Regressive (AR) models, which traditionally suffer from slow sequential processing. The authors introduce LANTERN, a method that leverages speculative decoding with a relaxed acceptance condition to significantly speed up inference while maintaining image quality. By utilizing a smaller drafter model to predict multiple tokens simultaneously, LANTERN addresses the challenges of token selection ambiguity inherent in visual AR models. The results demonstrate notable improvements in speed and efficiency compared to baseline methods, highlighting the potential of LANTERN to advance the capabilities of AR models in generating high-quality images.
weaknesses: 1. My primary concern is that the paper lacks an evaluation of the image generation quality. The authors present several generated images, but these images are stylistically very similar and exhibit poor consistency with the accompanying generated text. Some images even contain clear visual errors. I recommend that the authors conduct a more comprehensive assessment of image generation quality to better demonstrate the effectiveness of the proposed method.

2. The problem the paper aims to address is the low Mean Accepted Length that occurs when applying speculative decoding to AR image generation models. Specifically, although speculative decoding is used, a large number of predictions generated by the lightweight model are rejected, forcing the larger model to regenerate many tokens. As a result, the expected efficiency gains from speculative decoding are not realized. While the authors present a complete exploration from two perspectives, I still feel that, given the inherent ambiguity in token selection, improving the acceptance rate alone might suffice. A large set of tokens could be considered acceptable. This raises the question: Is speculative decoding still necessary in such a case? What would the quality and efficiency be if tokens were instead randomly generated within certain constraints?

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: see weakness. 

In summary, the author presents a promising sampling scheme for AR models, which improves sampling speed at the cost of some image quality.

The primary concern is that the author’s experiments lack sufficient evidence to demonstrate that the loss in image quality is within an acceptable range. Given this limitation in quality, I believe the impact of the work may be constrained. Therefore, I am inclined to recommend rejection.
soundness: 3
strengths: 1. The motivation behind the author’s proposed approach is straightforward: in standard sampling processes, an excessively high token rejection rate can significantly slow down generation. The author suggests a more relaxed policy to mitigate this issue, thereby improving generation speed.

2. To mitigate the distributional shift introduced by the lenient sampling approach, the author proposes a constraint rule for sampling based on total variation.

3. Through extensive ablation experiments, the author demonstrates how the lenient sampling scheme influences sampling speed and elucidates the specific roles of various hyperparameters within this scheme.
summary: This paper proposed speculative decoding for AR Image generation, AR models tend to assign uniformly low probabilities across a wide range of tokens, making it difficult to select the most appropriate token during decoding.

To solve this problem, the author introduce LANETERN (Latent Neighbor Token Acceptance Relaxation), leveraging the interchangeability of the tokens and relaxing the acceptance for decoding. 

The benefits of LANETREN can be found at generating speed with comparable quality.
weaknesses: My main concern lies in whether the metrics employed in the experimental section sufficiently capture the effectiveness of the proposed approach, particularly in Table 3 and Section 4.2.3. For evaluating basic generation quality, would it be possible to provide precision and recall (P/R) instead of FID? This change could allow for a clearer view of how LANTERN and limited distribution divergence affect and restore distribution. Additionally, since LlamaGen is used as the base model, could the authors include some modern image quality scores, such as PickScore or HPS, to better quantify aesthetic quality loss?

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1.There's a suggestion that the authors could provide the details of "Find the neighborhood" in Appendix A.

2.A suggestion is (since the experimental section of the current paper is already sufficient, this is just a gentle suggestion) that the authors could discuss more about the differences in token ambiguity between text generation and image generation. For example, in LLaMAGen, what common properties do tokens within the same set have? What are the patterns in the sizes of sets A and B corresponding to different image tokens? These discussions could help in designing further algorithms.

3.Could validation experiments be conducted on other AR models? This is also a optional suggestion aimed at enhancing the generalization and robustness of the method.
soundness: 3
strengths: The paper's structure and presentation are well-crafted. It identifies the phenomenon of "token ambiguity" and provides a viable solution. Extensive experiments, particularly the ablation studies, demonstrate the effectiveness and scalability of the method. It offers valuable insights for research on inference acceleration in AR text-to-image generation. Although the idea of using a set to proxy a single point has been extensively researched, the authors have elegantly applied it to the sampling decision process and achieved excellent results. 
 Simplicity yet effectiveness is crucial.
summary: This paper tackles the challenge of transferring speculative decoding from LLMs to autoregressive image generation models. The authors observe that the nature of image data causes image tokens to exhibit selection ambiguity, resulting in high rejection rates and poor acceleration effects in speculative decoding. Hence  they propose using the proximity set of image tokens as proxies to speculate on accepting a predicted image token, and introduce a combinatorial optimization strategy for selecting the set to ensure image quality remains intact.  Extensive experiments confirm significant acceleration with minimal quality loss.
weaknesses: 1.For a specific image token, the algorithm for finding its proximity set , specifically "Find the neighborhood (i.e., Appendix B, Line 9)," lacks detailed discussion on efficiency. For example, for each quantized image token, are the corresponding sets A and B precomputed or dynamically calculated during inference? How much time does this part take? I recommend the authors supplement this section with analysis and discussion.

2.In Line 105, there might be a misstatement. EAGLE-2 is an acceleration decoding method, not a drafter.

3.To demonstrate the generalizability of the observation of "token ambiguity," i.e., that this phenomenon is present in most AR image generation models, the paper should include experiments on a broader range of AR image generation models beyond just LLaMAGen. This would enhance the experimental completeness and provide stronger evidence for the generality of the observed issue.

Meta-review: The paper introduces LANTERN, a method that accelerates visual autoregressive models by adapting speculative decoding -- a mechanism originally proposed for large language models -- to the domain of visual autoregressive generation. The proposed approach demonstrates the ability to achieve speed gains while maintaining image quality. This work opens up new possibilities in enhancing the efficiency of autoregressive visual generative models and highlights how mechanisms from large language models can be effectively tailored for visual-specific applications. Considering the positive feedback from all reviewers, I recommend the acceptance of this paper.

Decision: Accept (Poster)