Abstract
Autoregressive models with continuous tokens form a promising paradigm for visual generation, especially for text-to-image (T2I) synthesis, but they suffer from high computational cost. We study how to design compute-efficient linear attention within this framework. Specifically, we conduct a systematic empirical analysis of scaling behavior with respect to parameter counts under different design choices, focusing on (1) normalization paradigms in linear attention (division-based vs. subtraction-based) and (2) depthwise convolution for locality augmentation. Our results show that although subtraction-based normalization is effective for image classification, division-based normalization scales better for linear generative transformers. In addition, incorporating convolution for locality modeling plays a crucial role in autoregressive generation, consistent with findings in diffusion models. We further extend gating mechanisms, commonly used in causal linear attention, to the bidirectional setting and propose a KV gate. By introducing data-independent learnable parameters to the key and value states, the KV gate assigns token-wise memory weights, enabling flexible memory management similar to forget gates in language models. Based on these findings, we present LINA, a simple and compute-efficient T2I model built entirely on linear attention, capable of generating high-fidelity 1024x1024 images from user instructions. LINA achieves competitive performance on both class-conditional and T2I benchmarks, obtaining 2.18 FID on ImageNet (about 1.4B parameters) and 0.74 on GenEval (about 1.5B parameters). A single linear attention module reduces FLOPs by about 61 percent compared to softmax attention.
Introduction
Autoregressive (AR) models utilizing continuous tokens have emerged as a powerful alternative to diffusion-based methods for high-quality image synthesis. By generating images progressively—often through a masked, step-by-step process—these models capture complex visual distributions with remarkable fidelity. However, their reliance on standard Transformer architectures introduces a significant computational bottleneck: softmax attention.
Softmax attention exhibits quadratic computational complexity ($O(N^2)$) relative to the sequence length $N$. As the demand for high-resolution generation (e.g., 1024x1024 pixels) grows, the resulting sequence lengths lead to explosive memory consumption and latency. While linear attention ($O(N)$ complexity) offers a theoretical solution, it has historically struggled with local pattern modeling and lacks established design principles for the bidirectional contexts required in AR image generation. This paper introduces LINA (Linear Autoregressive Image Generative Model), a framework designed to bridge this gap by optimizing linear attention for generative tasks.
Methodology: Optimizing Linear Attention for Generation
The LINA architecture is built upon the NOVA framework, systematically replacing softmax attention with a specialized linear attention variant. The authors identify three critical design choices that enable linear attention to scale effectively in a generative setting.
1. Division-based Normalization
A core component of linear attention is the normalization of the attention matrix. Previous research in vision perception (e.g., image classification) suggested that subtraction-based normalization often yields superior results. However, LINA's empirical analysis reveals a different trend for generative tasks: division-based normalization scales significantly better as parameter counts increase. The authors hypothesize that generative denoising avoids the "semantic confusion" bottleneck often encountered in perception models, allowing division-based methods to maintain better representational clarity.
2. Locality Augmentation via Depthwise Convolution
Linear attention typically lacks the sharp, localized focus inherent in softmax attention, which can lead to blurred details in generated images. To address this, LINA incorporates a lightweight 5x5 Depthwise Convolution (DWC) into the image features of the decoder. This addition injects a local inductive bias, which is crucial for masked AR models where predicting a new token depends heavily on the immediate context of its neighbors.
3. The KV Gate for Bidirectional Memory
In causal language models, "forget gates" are used to manage memory by discarding irrelevant past tokens. In the bidirectional context of 2D image generation, there is no strict chronological "past." LINA introduces the KV gate, a set of data-independent, learnable scalar parameters applied to the Key (K) and Value (V) states. This mechanism allows the model to assign token-wise importance weights, enabling flexible memory management without sacrificing the linear complexity of the attention mechanism.
Experimental Evaluation
LINA was evaluated across several benchmarks to assess its quality, alignment, and efficiency.
Performance Benchmarks
- ImageNet-1K (256x256): In class-conditional generation, LINA-H (1.4B parameters) achieved an FID of 2.18, placing it in direct competition with state-of-the-art diffusion models like DiT and standard AR models like MAR.
- GenEval: To evaluate text-to-image alignment (including counting, spatial positioning, and color attribution), LINA (1.5B parameters) was tested on a dataset of 16M high-resolution images. It achieved a score of 0.74, matching the performance of much larger full-attention models, such as the 10.5B parameter Fluid model.
Computational Efficiency
The primary advantage of LINA is its efficiency. For 1024px image generation, a single linear attention module in LINA requires approximately 50 GFLOPs, compared to 129 GFLOPs for standard softmax attention—a reduction of roughly 61%. Furthermore, LINA's raw linear implementation matches the wall-clock speed of highly optimized FlashAttention baselines, even without custom hardware kernels.
Conclusion and Future Work
LINA demonstrates that linear attention is not only viable but highly effective for autoregressive image generation when paired with the right architectural choices. By prioritizing division-based normalization, locality through convolution, and dynamic memory weighting via the KV gate, LINA achieves state-of-the-art results with significantly lower computational overhead.
Future work will focus on closing the theoretical gap regarding normalization performance and developing custom hardware kernels to fully realize the wall-clock speedups promised by the model's reduced FLOP count. Additionally, further exploration into the interaction between the KV gate and text-based tokens may yield even greater alignment in complex text-to-image scenarios.
Summary updated