arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.08302cs.CV
收藏

HACK++:面向高效视觉自回归建模的更有效的头部感知键值压缩

HACK++: Towards More Effective Head-Aware Key-Value Compression for Efficient Visual Autoregressive Modeling

Shanghai Jiao Tong University(上海交通大学);Rakuten(乐天);Tsinghua University(清华大学)

Ziran Qin, Yuchen Jiang, Mingbao Lin, Youru Lv, Hang Guo, Wen Fei, Weiyao Lin

AI总结:

针对VAR模型跨尺度KV缓存导致的高计算和内存开销,提出无训练头部感知压缩框架HACK++,通过离线分类头部类型和自适应预算分配,在极低缓存预算下保持近无损生成。

摘要:

视觉自回归(VAR)模型采用下一尺度预测范式,以显著更少的解码步骤实现高质量生成。然而,现有VAR模型由于跨尺度键值(KV)缓存的累积,面临严重的注意力复杂度和内存开销。本文通过将KV缓存压缩引入下一尺度范式来应对这一挑战。我们首先深入分析VAR注意力,观察到注意力头可以稳定地分为两个功能不同的类别:上下文头关注保持语义一致性,而结构头保持空间连贯性。它们的功能差异使得现有的一刀切压缩方法在VAR模型上表现不佳。我们进一步发现,两种头部类型对历史尺度的依赖程度不同,且这种依赖在不同层和生成步骤中发生变化,这要求自适应的缓存预算分配。为解决这些问题,我们提出HACK++,一种针对VAR模型的无训练头部感知键值压缩框架。通过一次性离线校准,HACK++分类头部类型并推导头部特定先验。在推理时,它将注意力与缓存压缩在独立预算下解耦,在压缩累积缓存时采用更激进的策略,通过模式特定策略和依赖感知预算分配来限制当前尺度的注意力成本。在多个VAR模型上进行的广泛实验,涵盖文本到图像、类别条件和统一理解与生成任务,验证了HACK++的有效性和泛化能力。例如,在Infinity-2B/8B上,HACK++在仅30%注意力预算和10%缓存预算下保持近无损生成,即使在1%缓存预算下也保持稳健。

英文摘要:

Visual Autoregressive (VAR) models adopt a next-scale prediction paradigm, offering high-quality generation with substantially fewer decoding steps. However, existing VAR models suffer from significant attention complexity and severe memory overhead due to the accumulation of key-value (KV) caches across scales. In this paper, we tackle this challenge by introducing KV cache compression into the next-scale paradigm. We begin with an in-depth analysis of VAR attention and observe that attention heads can be stably divided into two functionally distinct categories: Contextual Heads focus on maintaining semantic consistency, while Structural Heads preserve spatial coherence. Their functional divergence makes existing one-size-fits-all compression methods perform poorly on VAR models. We further find that the two head types differ markedly in their reliance on historical scales, and that this reliance shifts across layers and generation steps, arguing for an adaptive cache budget allocation. To address these challenges, we propose HACK++, a training-free Head-Aware key-value Compression frameworK for VAR models. From a one-time offline calibration, HACK++ classifies head types and derives head-specific priors. At inference, it decouples attention from cache compression under independent budgets, bounding the current-scale attention cost while compressing the accumulated cache far more aggressively, via pattern-specific strategies and a reliance-aware budget allocation. Extensive experiments on multiple VAR models across text-to-image, class-conditional, and unified understanding-and-generation tasks validate the effectiveness and generalizability of HACK++. For example, on Infinity-2B/8B, HACK++ maintains near-lossless generation with only a 30% attention budget and a 10% cache budget, and remains robust even under a 1% cache budget.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑