2607.28069v1 Jul 30, 2026 cs.AI

SemPIC: 의미론적 위치 독립형 KV 캐시 학습

SemPIC: Learning Semantic Position-Independent KV Caches

Jinyang Guo
Jinyang Guo
Citations: 643
h-index: 15
Jian Yang
Jian Yang
Citations: 37
h-index: 3
Hui Xie
Hui Xie
Citations: 5
h-index: 1
Peng Xiao
Peng Xiao
Citations: 0
h-index: 0
Yutong Deng Shuoran Dou
Yutong Deng Shuoran Dou
Citations: 0
h-index: 0

장문 검색 및 지능형 작업은 동일한 문서를 다양한 지침, 이력 및 문서 순서에 따라 반복적으로 재사용합니다. 접두사 캐싱은 이러한 재사용을 활용할 수 없으며, 위치 독립적 캐싱(PIC)은 독립적으로 컴파일된 KV 상태가 소비될 미래 컨텍스트를 포함하지 않기 때문에 신뢰성이 떨어집니다. 우리의 분석 결과는 경계 조건 기반의 기본 모델이 재사용 가능한 블록 경계 근처에서 주의 분산을 크게 줄이지만, 내부 및 작업 수준에서의 잔류 문제가 남아 있음을 보여줍니다. 이는 문서 표현 자체의 적응을 촉발합니다. 우리는 extit{SemPIC}을 제안하며, 이는 사전 학습된 디코더를 변경하지 않고 Reader로 유지하면서, 행동 증류(behavioral distillation)를 통해 각 레이어별 네이티브 문서 KV를 컴파일하는 LoRA 기반 Writer를 훈련합니다. 이 적응은 표준 KV 인터페이스 및 캐시 히트 디코딩 경로를 보존하면서 오프라인 캐시 구축에만 적용됩니다. 또한, 우리는 KV 그래디언트 체크포인팅을 도입하여 캐시된 KV를 통해 그래디언트를 끊지 않고도 최대 학습 메모리를 줄입니다. 세 가지 모델과 네 가지 작업에서 SemPIC은 KV Packet의 평균 마이크로 F1 점수를 0.53에서 0.60으로 향상시켜, 전체 재계산(Full Recompute) 수준인 0.62에 근접했습니다.

Original Abstract

Long-context retrieval and agentic workloads repeatedly reuse the same documents under changing instructions, histories, and document orders. Prefix caching cannot exploit this reuse, while position-independent caching (PIC) remains unreliable because independently compiled KV states lack the future context in which they will be consumed. Our diagnostics show that a learned boundary-conditioned baseline sharply reduces attention deviation near reusable-block boundaries but leaves interior and task-level residuals, motivating adaptation of the document representation itself. We present \emph{SemPIC}, which trains a LoRA-enabled Writer to compile native per-layer document KVs through behavioral distillation while retaining the pretrained decoder as an unchanged Reader. Adaptation is confined to offline cache construction, preserving the standard KV interface and cache-hit decoding path. We further introduce KV Gradient Checkpointing, which reduces peak training memory without severing gradients through cached KVs. Across three models and four tasks, SemPIC raises mean micro-F1 over KV Packet from 0.53 to 0.60, approaching Full Recompute at 0.62. Code: https://github.com/jn12-29/SemPIC

0 Citations
0 Influential
7.5 Altmetric
37.5 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!