Kamera: 위치 불변적인 통합 멀티모달 KV 캐시 - 학습 없이 재사용 가능
Kamera: Unified Position-Invariant Multimodal KV Cache for Training-Free Reuse
멀티모달 에이전트는 문맥 창이 이동하고 추론이 반복됨에 따라 동일한 비디오 프레임, UI 스크린샷 및 렌더링된 아티팩트를 반복적으로 검토하지만, 기존 프리픽스 캐시는 고정된 위치에서만 재사용을 지원하기 때문에 매번 처음부터 다시 계산합니다. 본 논문에서는 이러한 불필요한 재계산이 가능하며, 단순한 KV 재사용의 문제점인 '청크 간 상호 의존성' 손실을 정확히 지적합니다. 이러한 손실은 비대칭적입니다. 표준 상태 병합(state-merge)을 통해 캐시된 청크를 직접 읽어올 때, 정보는 정확하게 복구되며 추가 비용이 들지 않습니다. 남아있는 것은 심층 레이어에 집중된 희미하고 저차원인 잔류 데이터로, 단일 단계 검색으로는 감지할 수 없지만 다중 단계 추론에서 중요한 역할을 합니다. 따라서 무조건적인 재사용은 단일 단계 회상을 유지하는 반면 다중 단계 정확도를 절반으로 줄입니다. 이는 기존의 단일 컨텍스트 또는 단일 이미지 재사용을 위한 위치 독립적 캐시가 해결하지 못했던 문제입니다. 우리는 각 위치 정보가 없는 청크와 함께 저장되는 작은 크기의 저차원 조건부 패치를 사용하여 이 문제를 해결합니다. 재사용은 MLA, GQA 및 MHA를 포함한 모든 아키텍처에서 하나의 연산으로 수행되며, 이는 정확한 RoPE 회전을 통해 원하는 위치로 데이터를 이동시키고, 청크 간의 상호 연결을 복원하는 패치를 적용하는 것으로 구성됩니다. 이 방식 덕분에 세 가지 중요한 기능(재정렬, 슬라이딩 윈도우 생존, 검색)이 저렴하게 구현될 수 있습니다. 제거된 청크는 해당 패치를 사용하여 다시 활성화되므로, 재계산이 필요하지 않습니다. 특정 차원(m)의 패치는 청크 간 상호 연결을 평가하는 벤치마크에서 완전한 작업 정확도를 회복하며, MM-NIAH 및 양 페이지 문서 질의 응답과 같은 다양한 멀티모달 작업에 적용 가능합니다. 또한 KV 메모리 공간을 크게 줄이고, 실제 SGLang 커널 환경에서 6가지 서로 다른 모델(backbone)에서 재계산된 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.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.