STAR-KV: Low-Rank KV Cache Compression via Soft Thresholding for Adaptive Rank Control

TL;DR

STAR-KV employs soft-thresholding for adaptive low-rank KV cache compression, achieving up to 75% compression, 6.9× speedup, and 20× overall reduction.

cs.LG 🔴 Advanced 2026-06-07 46 views
Priyansh Bhatnagar Ashkan Moradifirouzabadi Se-Hyun Yang SeungJae Lee Jungwook Choi Mingu Kang
deep learning model compression low-rank decomposition quantization GPU acceleration

Key Findings

Methodology

STAR-KV introduces a differentiable soft-thresholding mechanism that dynamically adjusts singular values for each decoder block and attention head, enabling fine-grained rank control. It combines hybrid low-rank decomposition strategies—head-wise for keys and joint for values—and integrates low-rank-aware mixed-precision quantization leveraging singular value distributions. The entire framework involves end-to-end training with a combined loss (compression and knowledge distillation), supported by custom Triton GPU kernels for acceleration. This approach allows aggressive compression (up to 75%) with minimal accuracy loss, verified across multiple large language models and benchmarks, resulting in significant speedups and memory savings.

Key Results

  • On LLaMA-2-7B, STAR-KV achieves 75% KV cache compression with negligible accuracy degradation, improving zero-shot accuracy by 2.7% and surpassing the Pareto frontier of previous methods like Palu. When combined with 3.2-bit mixed-precision quantization, the overall compression reaches 20×, with a 1.18% accuracy gain. GPU-accelerated kernels provide up to 6.9× speedup in attention modules and 3.1× in end-to-end throughput.
  • In LongChat-7B, the method maintains high performance at 60%-75% compression, with notable reductions in inference latency. Ablation studies show that hybrid decomposition (head-wise for keys, joint for values) balances accuracy and computational overhead effectively, while low-rank sensitivity analysis guides optimal rank selection.
  • Across diverse tasks and models, STAR-KV demonstrates robust long-context inference, reducing storage and bandwidth needs while boosting inference speed, confirming its practical deployment potential in real-world scenarios.

Significance

This work addresses the critical bottleneck of KV cache size in large-scale language models, offering a systematic, adaptive solution that maintains model fidelity at high compression rates. By integrating singular value-based rank control, hybrid decomposition, and low-rank-aware quantization, STAR-KV advances the state-of-the-art in model compression, enabling efficient long-context inference on resource-constrained hardware. Its ability to significantly reduce memory and computational demands while preserving accuracy paves the way for deploying massive models in edge devices and real-time applications, marking a substantial step forward in scalable AI infrastructure.

Technical Contribution

The key technical innovation lies in the differentiable soft-thresholding mechanism that enables learnable, fine-grained rank adjustment at the singular value level. Coupled with hybrid low-rank decomposition strategies—head-wise for keys and joint for values—and a low-rank-aware mixed-precision quantization scheme, the framework achieves a delicate balance between compression and fidelity. The end-to-end training process, reinforced by custom GPU kernels, ensures practical speedups and resource savings, setting new benchmarks for model compression techniques. The approach also introduces theoretical insights into the spectral properties of key/value matrices and their impact on approximation errors.

Novelty

This is the first comprehensive framework combining soft-thresholding-based adaptive rank control, hybrid low-rank decomposition, and low-rank-aware quantization for KV cache compression in large language models. Unlike prior fixed-rank or heuristic methods, STAR-KV dynamically learns optimal ranks at a fine granularity, significantly improving compression-performance trade-offs. Its integration of differentiable spectral thresholding with hardware-accelerated inference distinguishes it from existing approaches, marking a novel contribution to scalable AI model deployment.

Limitations

  • The method relies on training data and hyperparameter tuning for the soft-thresholding parameters, which may limit generalizability across diverse architectures or extreme compression scenarios.
  • GPU-specific kernels, while highly efficient, pose challenges for cross-platform deployment and hardware compatibility.
  • High compression ratios, although effective in experiments, may still lead to subtle accuracy degradation in certain tasks or under domain shifts, necessitating further robustness studies.

Future Work

Future directions include developing more adaptive, data-driven mechanisms for threshold learning, extending the framework to multi-modal models, and exploring integration with sparsity techniques. Enhancing hardware portability and optimizing for diverse deployment environments will be crucial. Additionally, investigating the theoretical bounds of spectral approximation errors and their impact on downstream tasks can further refine the approach. Combining this with continual learning and online adaptation strategies may unlock real-time, resource-efficient AI systems.

AI Executive Summary

The rapid growth of large language models (LLMs) has brought about unprecedented capabilities but also significant computational and storage challenges, particularly in managing the KV cache during inference. As context lengths extend into hundreds of thousands or even millions of tokens, the memory footprint and bandwidth requirements escalate dramatically, often surpassing the size of the model weights themselves. Traditional compression techniques, such as fixed-rank low-rank decomposition or heuristic importance-based pruning, struggle to balance compression rates with model accuracy, especially at aggressive compression levels.

To address these issues, STAR-KV introduces a novel, adaptive low-rank KV cache compression framework that leverages soft-thresholding of singular values. This mechanism allows the model to learn optimal ranks dynamically at a fine granularity—per decoder block and attention head—thus tailoring compression to the sensitivity of different layers and components. The core idea is to replace hard spectral truncation with a differentiable soft threshold, enabling end-to-end training that jointly optimizes compression and model fidelity.

Complementing this, STAR-KV employs a hybrid low-rank decomposition strategy—head-wise for key projections to minimize reconstruction overhead, and joint for value projections to preserve fidelity. This nuanced approach balances accuracy and efficiency, supported by a low-rank-aware mixed-precision quantization scheme that redistributes outlier channels based on spectral properties, further reducing storage without significant accuracy loss.

Extensive experiments across multiple models, including LLaMA-2-7B and LongChat-7B, demonstrate the effectiveness of STAR-KV. It achieves up to 75% KV cache compression with negligible accuracy degradation, surpassing previous methods like Palu by 20% in compression ratio. When combined with 3.2-bit quantization, the overall compression reaches 20×, with a 1.18% accuracy improvement. Hardware acceleration via custom Triton kernels yields a 6.9× speedup in attention modules and a 3.1× increase in end-to-end throughput, validating the practical benefits.

This work significantly advances the state-of-the-art in model compression, enabling scalable, efficient deployment of large models in resource-constrained environments. It opens avenues for further research into adaptive spectral techniques, hardware-aware optimization, and multi-modal compression, promising a future where massive AI models are both powerful and resource-efficient.

Deep Analysis

Background

随着大规模预训练模型的快速发展,长上下文支持成为核心研究方向。代表性工作如LLaMA系列和GPT-4,推动模型能力飞跃,但长上下文带来的存储和计算成本极大增加,KV缓存成为瓶颈。低秩分解技术已在部分研究中应用,能有效压缩存储,但在高压缩率下性能下降明显。传统方法多采用固定秩或启发式策略,难以适应不同层和头的敏感性。近年来,结合量化和剪枝的技术逐渐兴起,但仍未突破存储与速度的双重瓶颈。STAR-KV结合低秩分解、软阈值调节和感知量化,提出系统性解决方案,推动模型压缩技术发展。

Core Problem

在大规模LLMs中,KV缓存存储需求随生成长度线性增长,成为推理瓶颈。现有低秩压缩方法受限于固定秩或启发式策略,难以在保证性能的同时实现高压缩。高压缩带来的信息损失在不同层和头中差异显著,导致模型准确率下降。如何设计一种自适应、细粒度的秩调节机制,兼顾压缩率和模型性能,成为核心难题。此外,重建过程中的计算开销也限制了实际应用。解决这些问题需要创新算法和硬件优化。

Innovation

STAR-KV的创新点包括:1)引入可微分的软阈值机制,实现奇异值的动态调节,支持细粒度自适应秩选择;2)结合不同的低秩分解策略(头内和联合分解),优化重建误差与计算开销的平衡;3)设计低秩感知的混合精度量化方案,利用奇异值排序特性,有效处理偏离的奇异值,确保高压缩比下的模型鲁棒性;4)通过端到端训练和GPU定制核,实现压缩与加速的结合。这些创新突破了传统低秩压缩在高压缩率下性能退化的瓶颈。

Methodology

  • �� 利用奇异值分解(SVD)对键值投影矩阵进行低秩分解,保留前r个奇异值及向量。
  • �� 引入可微分软阈值操作(T_hs),对奇异值进行动态调节,实现自适应秩控制。
  • �� 在训练中优化阈值参数α,通过联合损失(压缩与知识蒸馏)平衡性能与压缩。
  • �� 采用混合分解策略:键投影采用头内分解(HD),值投影采用联合分解(JD),以兼顾重建误差和计算效率。
  • �� 设计低秩感知的混合精度量化方案,结合奇异值排序信息,处理偏离奇异值的通道。
  • �� 利用定制GPU核实现高效推理,加速注意力模块,提升整体吞吐。

Experiments

  • �� 在LLaMA-2-7B、LongChat-7B、LLaMA-3-8B-Instruct模型上验证,使用WikiText-2、Hella等任务。
  • �� 比较不同压缩策略(固定秩、启发式、STAR-KV)在压缩率和准确率上的表现。
  • �� 多任务、多模型验证,测试最高75%的压缩率和速度提升(最高6.9倍)。
  • �� 消融实验分析软阈值调节、分解策略、量化方案对性能影响。
  • �� 评估GPU定制核的加速效果,验证推理速度提升。

Results

  • �� STAR-KV在LLaMA-2-7B模型中实现75%的KV缓存压缩,几乎无性能损失,准确率提升2.7%,优于Palu的20%压缩比。
  • �� 结合3.2比特混合量化,整体压缩达20倍,准确率提升1.18%,优于现有方案。
  • �� GPU定制核带来6.9倍注意力加速,端到端吞吐提升3.1倍,验证硬件优化效果。
  • �� 不同分解策略结合优化,确保重建误差与计算开销平衡,适应不同场景。

Applications

  • �� 适用于长上下文推理场景,显著降低存储和带宽需求,提升推理速度。
  • �� 适合边缘设备和云端部署,优化成本和响应时间。
  • �� 未来结合稀疏化、剪枝技术,进一步压缩模型,推动实时AI应用。

Limitations & Outlook

  • �� 软阈值调节依赖训练数据和超参数,可能在极端压缩或特殊架构中表现不足。
  • �� GPU定制核虽高效,但硬件迁移和兼容性仍需优化。
  • �� 高压缩比下模型鲁棒性和泛化能力仍需验证,未来需增强自适应机制。

Plain Language Accessible to non-experts

想象你在整理一个超级大的图书馆。每本书代表模型中的信息,存储这些书需要很多空间。传统方法就像用大箱子装书,虽然能装很多,但很重很难搬。STAR-KV像是用一种聪明的折叠技术,把书的内容压缩成更小的尺寸,只保留最重要的部分。它还能根据每本书的重要程度,自动决定折叠的紧密程度,有时用一种特别的魔法,把书的内容变得更小,但又不丢失关键内容。这样一来,图书馆变得更小更快,借书还书也更方便。这种智能压缩让大模型在长时间运行时,既能保持效果,又能节省资源,就像用魔法让图书馆变得又大又轻巧。

ELI14 Explained like you're 14

想象你有一个超级大的书包,里面装满了很多书。每次去学校,你都要带很多书,但书太多让书包变得又重又难背。STAR-KV就像给你的书包设计了一种神奇的折叠方法,只折叠那些不太重要的书,把重要的书保持得很完整。它还会根据每本书的重要程度,自动调整折叠的紧密程度。有时候,它会用一种特别的魔法,把书的内容变得更小,但又不丢失关键内容。这样一来,你的书包变得更轻,但你还能找到所有重要的书。这个方法让大模型可以在处理很多信息时,既快又省资源,就像你用魔法让书包变得又轻又大一样!

Abstract

Low-rank projection has emerged as a promising approach for compressing the KV cache by exploiting hidden-dimension redundancy. However, prior methods rely on fixed or heuristic rank selection and struggle to achieve aggressive compression with minimal accuracy degradation. We propose STAR-KV, an adaptive low-rank KV cache compression framework with fine-grained rank control. STAR-KV encompasses 1) a differentiable thresholding mechanism that enables optimal rank selection at both attention-head and block levels, 2) a hybrid decomposition strategy that applies different low-rank factorizations according to the sensitivity of key and value projections, and 3) a low-rank-aware mixed precision quantization that leverages data statistics for near lossless low-bit quantization. Evaluated across multiple LLMs and benchmarks, STAR-KV achieves up to 75% KV cache compression and up to 20x overall KV cache reduction when combined with quantization. Enabled by custom Triton-based GPU kernels, STAR-KV delivers up to 6.9x speedup for the attention module and 3.1x end-to-end generation throughput. Our code is publicly available at: https://github.com/PriyanshBhatnagar/STAR-KV.

cs.LG cs.AI