视觉自回归模型推理需至少Ω(n²d)内存,无法避免
Visual Autoregressive Transformers Must Use $Ω(n^2 d)$ Memory
- 证明视觉生成模型必须用Ω(n²d)内存
- 当d≥log n时,无法实现亚二次内存消耗
- 适合研究高效视觉生成与模型压缩的学者
视觉自回归模型在推理过程中需存储大量已生成表示,导致显著内存开销。尽管已有压缩技术尝试缓解此问题,但此前未明确定义该场景下的键值缓存(KV-cache)压缩问题。本文首次形式化定义了视觉自回归变压器中的KV-cache压缩问题,并建立基本负结果:在注意力架构下进行序列视觉标记生成时,当嵌入维度d = Ω(log n),生成n个标记所需内存至少为Ω(n²d)。该结果表明,不引入额外结构约束,无法实现真正亚二次内存使用。证明基于从计算下界问题的归约,采用受维度缩减启发的随机嵌入技术。最后讨论了视觉表征稀疏性对内存效率的影响,给出不可能性结果及潜在缓解方向。
原文摘要 · Abstract (English)
A fundamental challenge in Visual Autoregressive models is the substantial memory overhead required during inference to store previously generated representations. Despite various attempts to mitigate this issue through compression techniques, prior works have not explicitly formalized the problem of KV-cache compression in this context. In this work, we take the first step in formally defining the KV-cache compression problem for Visual Autoregressive transformers. We then establish a fundamental negative result, proving that any mechanism for sequential visual token generation under attention-based architectures must use at least $Ω(n^2 d)$ memory, when $d = Ω(\log n)$, where $n$ is the number of tokens generated and $d$ is the embedding dimensionality. This result demonstrates that achieving truly sub-quadratic memory usage is impossible without additional structural constraints. Our proof is constructed via a reduction from a computational lower bound problem, leveraging randomized embedding techniques inspired by dimensionality reduction principles. Finally, we discuss how sparsity priors on visual representations can influence memory efficiency, presenting both impossibility results and potential directions for mitigating memory overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。