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

Kamera: 统一的位置无关多模态KV缓存,用于免训练复用

Kamera: Unified Position-Invariant Multimodal KV Cache for Training-Free Reuse

Bole Ma, Jan Eitzinger, Harald Koestler, Gerhard Wellein

AI总结:

提出Kamera,一种免训练的位置无关KV缓存复用方法,通过低秩条件补丁修复跨块绑定丢失,在MM-NIAH和文档QA上恢复完整精度,显著降低多模态代理的重计算开销。

摘要:

多模态代理在上下文窗口滑动和推理迭代时,反复重新检查相同的视频帧、UI截图和渲染工件,但每次回看都从头重新编码,因为前缀缓存仅在固定的前导位置提供复用。我们证明这种重计算是可以避免的,并精确识别了朴素KV复用丢失的内容:一个块从其邻居吸收的跨块条件。这种丢失是不对称的。缓存块的直接读出通过标准状态合并精确且免费地恢复。剩下的是集中在深层的一个扩散的低秩残差,单跳检索不可见,但正是多跳推理所依赖的。因此,盲目复用保持单跳召回完整,但将多跳精度减半;这是先前位置无关缓存(设计用于单上下文或单图像复用)未能解决的失败模式。我们通过一个小的、免训练的低秩条件补丁来修复它,该补丁与每个位置无关块一起存储。复用简化为MLA、GQA和MHA上的一个算子:精确的RoPE重旋转到任何目标位置,加上恢复跨块绑定的补丁。这使得三种窗口操作变得廉价:重排序(一个补丁服务于缓存集的任何排序)、滑动窗口存活(存活的块仅通过旋转重新定位,零重新编码)和召回(被驱逐的块通过其补丁重新激活,从不重新编码)。秩为m的补丁在跨块绑定基准(两个注意力家族上的MM-NIAH和两页文档QA)上恢复完整任务精度,且KV占用极小,并在生产SGLang内核中跨六个骨干将重新预填充KV重建到bf16舍入精度。条件信号在冗余视觉和视频流中最强,使我们的解决方案在多模态代理花费重计算预算的地方影响最大。

英文摘要:

Multimodal agents repeatedly re-examine the same video frames, UI screenshots, and rendered artifacts as their context window slides and reasoning iterates, yet every look-back re-encodes from scratch, because prefix caches serve reuse only at a fixed leading position. We show this recompute is avoidable, and identify exactly what naive KV reuse loses: the cross-chunk conditioning a chunk absorbs from its neighbours. This loss is asymmetric. The direct readout of a cached chunk is recovered exactly and for free by the standard state-merge. What remains is a diffuse, low-rank residue concentrated in deep layers, invisible to single-hop retrieval but precisely what multi-hop reasoning binds on. Blind reuse therefore leaves single-hop recall intact while halving multi-hop accuracy; this is the failure mode prior position-independent caches, designed for single-context or single-image reuse, do not address. We repair it with a small, training-free low-rank conditioning patch stored alongside each position-free chunk. Reuse reduces to one operator across MLA, GQA, and MHA: exact RoPE re-rotation to any target position, plus the patch that restores cross-chunk binding. This makes three window operations cheap: reorder (one patch serves every ordering of a cached set), sliding-window survival (surviving chunks relocate via rotation only, zero re-encode), and recall (an evicted chunk is rehydrated by its patch, never re-encoded). A rank-m patch recovers full task accuracy on cross-chunk-binding benchmarks, MM-NIAH across two attention families and two-page doc-QA, at a fraction of the KV footprint, and reconstructs re-prefill KV to within bf16 rounding in a production SGLang kernel across six backbones. The conditioning signal is strongest in redundant vision and video streams, making our solution most impactful where multimodal agents spend their recompute budget.

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

↑