arXiv:2611.07593cs.CVNov 2026

Manuscript Offprint

arXiv:2611.07593

TACT-KV: Tri-Axis Cosine Transform for Compressing Volumetric KV Caches in Medical VLMs

Chongyu Qu, Ritchie Zhao, Yufan He, Dong Yang, Zhengyi Lu, Junchao Zhu, Tianyuan Yao, Juming Xiong, Junlin Guo, Yanfan Zhu, Yuechen Yang, Daguang Xu, Bennett Allan Landman, Yucheng Tang, Yuankai Huo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Vision-language models (VLMs) applied to 3D medical scans face a structural memory wall. A single CT or MRI volume produces tens of thousands of vision tokens, and the resulting key-value (KV) cache scales linearly with both batch and context. Existing KV compression methods operate on the cache's feature or token statistics, or apply 1D and 2D transforms, leaving the three-axis spatial structure in the cache unexploited. We propose TACT-KV (Tri-Axis Cosine Transform), a calibration-free KV compression method that exploits strong spatial correlations in visual KV states along all three anatomical axes of 3D scans. This correlation concentrates the KV cache energy under a frequency-domain transform. TACT-KV applies a separable 3D discrete cosine transform to the KV cache, allocates a per-layer bit budget across frequency bins via reverse water-filling (more bits to high-energy components), and quantizes each bin with a fixed scalar codebook. We derive a closed-form relation: the distortion reduction from adaptive bit allocation is dominated by the spectral concentration of the transformed cache. Across six medical VLMs and two 3D CT benchmarks, TACT-KV achieves the lowest 1-bit prediction-flip rate on eleven of twelve model and dataset pairs in our main comparison. The same advantage reproduces on four general-purpose VLMs evaluated on video tasks, indicating that the benefit of exploiting three-axis structure generalizes beyond medical imaging. At equal high-bandwidth memory (HBM), TACT-KV scales the decoding batch size on a single GPU by up to 8×8\times.

1 Introduction

Vision-language models (VLMs) are increasingly used for 3D medical image analysis [31], with applications spanning computed tomography (CT) report generation, magnetic resonance imaging (MRI) anomaly detection, and multimodal diagnostic assistance [33, 20, 27]. Unlike 2D natural images, a 3D medical scan contains hundreds of slices that capture fine-grained anatomical detail such as small lesions, subtle nodules, and vascular structures driving clinical diagnosis [16, 5, 2]. The scan then produces tens of thousands of vision tokens after the vision encoder, and the resulting key-value (KV) cache scales linearly with both batch size and sequence length. Clinical sites typically operate on single-card or small-cluster GPUs [25], where this cache quickly dominates GPU memory and becomes the bottleneck during inference. Compressing the visual KV cache without sacrificing diagnostic fidelity is therefore a gating problem for clinical deployment.

∗^{*}Corresponding author: Yuankai Huo (yuankai.huo@vanderbilt.edu).

Preprint.

Figure

Figure 1: Motivation. Tokens at the same in-plane spatial position across adjacent slices in the visual KV cache exhibit high pairwise similarity, and within each slice neighboring tokens are also strongly correlated. The cache energy then concentrates in a small set of low-frequency components along every axis, a three-axis structure that previous work leaves unexploited.

KV cache compression directly addresses this bottleneck, and existing methods split into two categories by their target. (1) LLM-targeted methods, including KIVI [29], KVQuant [19], and TurboQuant [44], quantize the cache along its 1D token or channel axis. (2) VLM-targeted methods, including AKVQ-VL [35] and VL-Cache [38], exploit attention-derived saliency to allocate precision or evict cache entries. A separate line of work instead transforms the cache into the frequency domain before compression. FreqKV [21] applies a 1D discrete cosine transform (DCT) along the token sequence, FlashCache [43] extracts a low-frequency baseline and handles outliers via IDCT and uses the reconstruction residual to identify outlier KV pairs for retention, KVTC [34] performs feature-dimension PCA with adaptive bit allocation, and Fourier-VLM [41] applies a 2D DCT to vision encoder features before they enter the cache. None of these methods exploit the spatial continuity that 3D scans carry along all three axes.

A closer analog is video KV cache compression, which exploits redundancy between adjacent 2D frames [32, 40, 36]. Medical VLMs commonly treat a 3D scan as a sequence of 2D slices [33, 20], but the slice axis differs from the temporal axis. The temporal axis is motion-induced, with attention concentrated on a few salient frames, while the slice axis is anatomically continuous, with diagnostic signal spread across many slices rather than localized in a sparse subset. Directly applying video-domain compression to medical scans is therefore questionable.

3D medical scans carry a distinctive structural property. Nearby slices are highly similar, just like neighboring pixels within a single image. We observe that this structure also appears in the visual KV cache of the language model decoder: tokens at the same spatial location across adjacent slices have high similarity (Fig. 1), and the cache shows strong autocorrelation along all three spatial axes. This spatial correlation concentrates the cache energy in a small set of low-frequency components, which a frequency-domain transform can compress.

Motivated by this observation, we propose TACT-KV (Tri-Axis Cosine Transform for KV Cache). TACT-KV reshapes the visual KV cache into a 3D tensor with dimensions (slice, height, width), then applies a separable 3D DCT across these three spatial axes. After transforming the cache into the frequency domain, TACT-KV allocates bits to different frequency components using a reverse water-filling strategy and compresses them with standard scalar quantization. The method requires no calibration data and introduces no additional learnable parameters.

We further prove that the gain of water-filling over uniform bit allocation grows as the cache energy concentrates in fewer frequency components, and verify this empirically. We evaluate TACT-KV on six medical VLMs using two 3D CT benchmarks, RSNA-ICH [11] and CT-RATE [17]. Even at 1-bit quantization, TACT-KV performs close to the uncompressed cache, while existing LLM and VLM compression methods often fail. We also test TACT-KV on Video-MME [13, 20] using four general-purpose VLMs and observe similar improvements, suggesting that the method generalizes beyond medical imaging. At the same GPU memory budget, TACT-KV can increase the maximum decoding batch size by up to 8×. Our contributions are:

  • We propose TACT-KV, to our knowledge the first method to treat the visual KV cache as a volumetric tensor and exploit the three-axis spatial correlation from 3D scans.

Figure

Figure 2: TACT-KV pipeline. A medical VLM encodes a volumetric CT scan and a clinical prompt into visual and text embeddings eve_v, ete_t. Inside each decoder block, visual keys/values KvK_v, VvV_v enter the four-stage pipeline below, while text KtK_t, VtV_t bypass at bf16. Volumetric KV Layout: the visual cache is reshaped into a (S,H,W)(S, H, W) grid inherited from the vision encoder. 3-D DCT-II: a separable transform along the three axes concentrates energy at the DC corner (magma colormap, log⁡2σ2\log_2 \sigma^2). Reverse Water-Filling: a per-layer bit budget is allocated above water level λ\lambda, with bins below dropped (bar color = bit width 4/2/1/0). Codebook Encoding: surviving bins are gain-shape encoded against the corresponding Lloyd–Max codebook (1/2/4-bit tiles shown). All spectral statistics are estimated on the fly, requiring no calibration data.

  • We prove a closed-form expression for the distortion gain of water-filling over uniform bit allocation in terms of the spectral concentration of the cache, which we verify empirically.

  • We evaluate TACT-KV across six medical VLMs (4B-32B), two 3D CT benchmarks, and four general-purpose VLMs on Video-MME. TACT-KV achieves the lowest 1-bit flip rate on eleven of twelve medical VLM and dataset pairs in our main comparison, while delivering up to 8×8\times larger decoding batch at equal HBM.

References (41)