atlas

Research map / Architectures and efficiency / Attention and transformers

MatryoshkaKV: Adaptive KV Compression via Trainable Orthogonal Projection

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: KV cache eviction and compression · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes MatryoshkaKV, which compresses the KV cache along the feature dimension by distilling trainable orthogonal (Cayley-parameterized, PCA-initialized) projections with a Matryoshka rank-sampling objective and a greedy per-head search for adaptive compression rates.

Problem

KV cache size becomes a storage and memory-transfer bottleneck for LLM inference; feature-dimension compression via training-free PCA projections degrades sharply at moderate-to-high compression rates.

Approach

Directly fine-tune orthogonal projection matrices (Cayley parameterization, initialized from PCA) with a KL distillation loss under a Matryoshka strategy that samples truncation ranks per layer/head so that the first r columns form a usable low-rank projection, then greedily allocate per-head key/value ranks under a budget.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace PCA projections with trained MatryoshkaKV projectionsLLaMA2-7B-base · CPT zero-shot, 50.0% cacheaverage accuracy: 43.07 -> 59.11Helped
Replace PCA projections with trained MatryoshkaKV projectionsMistral-v0.3-7B-base · CPT zero-shot, 50.0% cacheaverage accuracy: 34.98 -> 63.75Helped
Use MatryoshkaKV instead of ASVDLLaMA2-7B-base · CPT, 90% cacheaverage accuracy: 60.06 -> 62.03Helped
Remove greedy search for adaptive compression levels (use uniform compression) (ablation)MatryoshkaKV · CPT zero-shot, 37.5% cacheaverage accuracy: 56.94 -> 55.02Hurt
Remove Matryoshka training and train projections at a fixed 50% cache budget (ablation)MatryoshkaKV · SFT on GSM8KaccuracyHurt
Remove the orthogonal constraint during projection training (ablation)MatryoshkaKV · SFT on GSM8K, full KV cacheaccuracyHurt
Replace PCA initialization with random orthogonal initialization (ablation)MatryoshkaKV projections · SFT on GSM8Kevaluation lossHurt
Change the Matryoshka schedule from {i/8 d} to {i/4 d} (ablation)MatryoshkaKV · CPT zero-shot, LLaMA2-7B-baseaverage accuracyMixed
Combine MatryoshkaKV with H₂O compressionMatryoshkaKV · LongBench, 10% overall cache budgetperplexity: +1.02Hurt
Combine MatryoshkaKV with 2-bit KIVI quantizationMatryoshkaKV · CPT zero-shot, 50.0% cacheaverage accuracy: 56.98 -> 56.35Hurt

Surprising findings

Limitations

Experimental setup

Datasets: RedPajama-Data-1T-Sample GSM8K PIQA HellaSwag OpenbookQA ARC-C ARC-E WinoGrande

Benchmarks: HellaSwag ARC-C ARC-E PIQA WinoGrande CommonSenseQA GSM8K OpenbookQA LongBench

Metrics: accuracy average accuracy perplexity tokens per second relative accuracy vs baseline

Baselines: PCA projection (Eigen-Attention) ASVD LoRA SFT baseline H2O KIVI

Builds on: Eigen-Attention Matryoshka representation learning LoRA H2O KIVI

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy