用线性注意力提升图像生成效率,实现1024×1024高清图快速生成。
LINA: Linear Autoregressive Image Generative Models with Continuous Tokens
- 全用线性注意力设计,通过除法归一化与卷积增强局部性。
- 生成1024×1024图像仅需约1.5B参数,FID达0.74(GenEval)。
- 引入KV门控机制,类似语言模型遗忘门,灵活管理记忆。
连续令牌的自回归模型在视觉生成中具有潜力,尤其在文本到图像合成方面,但计算成本高。本文研究如何在此框架下设计高效的线性注意力。系统分析了不同设计选择下的参数量扩展行为,重点关注(1)线性注意力中的归一化方式(基于除法与基于减法),(2)深度可分离卷积对局部性建模的作用。结果表明,虽然减法归一化在图像分类中表现良好,但除法归一化更适用于线性生成变压器。此外,引入卷积增强局部性对自回归生成至关重要,与扩散模型发现一致。进一步将门控机制从单向扩展至双向,提出KV门控。通过引入数据无关的可学习参数于键值状态,实现逐标记记忆权重,类比语言模型中的遗忘门。基于上述发现,提出LINA:一个完全基于线性注意力的简单高效文本到图像模型,可从指令生成高质量1024×1024图像。在类别条件与文本到图像基准上均表现优异,ImageNet上取得2.18 FID(约1.4B参数),GenEval上达0.74(约1.5B参数)。单个线性注意力模块相比softmax注意力降低约61%计算量。代码与模型已开源。
原文摘要 · Abstract (English)
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. Code and models are available at: https://github.com/techmonsterwang/LINA.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。