TL;DR
TACT-KV introduces a calibration-free compression method for the visual Key-Value (KV) cache in 3D medical Vision-Language Models (VLMs). By exploiting the spatial correlation across all three anatomical axes using a 3D Discrete Cosine Transform and adaptive bit allocation, it achieves state-of-the-art 1-bit quantization performance and enables up to an 8× increase in decoding batch size on a single GPU.
What Problem Does This Paper Address?
Large-scale 3D medical imaging, such as CT or MRI scans, presents a unique "memory wall" for modern AI. Unlike a single 2D image, a 3D scan consists of hundreds of slices, which a vision encoder turns into tens of thousands of tokens. When these tokens enter a transformer-based VLM, they generate a massive Key-Value (KV) cache that must be stored in GPU memory during inference.
This cache scales linearly with both batch size and sequence length. In clinical settings, where researchers often rely on single-card GPUs, this memory footprint becomes the primary bottleneck, limiting the number of patients a model can process simultaneously. While many KV compression techniques exist, they typically treat tokens as 1D sequences or 2D images, completely ignoring the rich, three-dimensional anatomical continuity inherent in medical scans.
Methods
The authors propose TACT-KV (Tri-Axis Cosine Transform), a four-stage, calibration-free pipeline designed to squeeze redundancy out of the volumetric KV cache:
- Volumetric KV Layout: The visual KV cache is reshaped from a flat sequence back into its original 3D grid dimensions (Slice, Height, Width).
- 3-D DCT-II: The method applies a separable 3D Discrete Cosine Transform. Because anatomical structures are continuous across slices and within planes, this transform concentrates the "energy" (information) into a small number of low-frequency components.
- Reverse Water-Filling: Instead of giving every frequency bin the same number of bits, TACT-KV uses a "reverse water-filling" strategy. It adaptively allocates more bits to high-energy (low-frequency) components and fewer (or zero) bits to high-frequency noise.
- Codebook Encoding: The surviving components are quantized using a gain-shape scalar codebook (Lloyd-Max).
Crucially, the method is calibration-free, meaning it doesn't require a representative dataset to "learn" quantization parameters beforehand; it estimates spectral statistics on the fly for every sequence.
Datasets
The researchers evaluated TACT-KV across ten different VLMs (six medical, four general-purpose) using three major benchmarks:
- RSNA-ICH: A head CT dataset focused on intracranial hemorrhage detection.
- CT-RATE: A large-scale chest CT benchmark with 18 different abnormality labels.
- Video-MME: A general-purpose video analysis benchmark used to test if the 3D spatial logic of TACT-KV generalizes to the temporal axis of videos.
Key Insights and Ideas
- The 3D Advantage: Medical scans have high "inter-slice" similarity (often higher than "intra-slice" similarity). Exploiting this third axis is the "secret sauce" that allows TACT-KV to outperform 1D and 2D compression methods.
- Spectral Concentration: As shown in Figure 1, tokens at the same spatial position across adjacent slices are highly correlated (Cosine Similarity $\approx$ 0.85). This correlation means that in the frequency domain, the lowest-frequency bin alone can hold 58–63% of the total axis energy.
- Theoretical Grounding: The authors provide a closed-form proof (Theorem 1) showing that the distortion reduction from their adaptive bit allocation is directly tied to the "spectral flatness" of the cache. The more concentrated the energy, the higher the compression gain.
- Heavy-Tailed Distributions: The authors found that post-DCT coefficients are heavy-tailed. Standard uniform quantization fails at low bitrates (like 1-bit) because it can't handle these outliers. TACT-KV’s gain-shape quantization effectively factors out magnitude before quantizing, preserving signal fidelity.
Key Results
- Superior Fidelity at 1-bit: In a head-to-head comparison across 12 model/dataset pairs, TACT-KV achieved the lowest "prediction-flip rate" (how often the model changes its mind due to compression) in 11 out of 12 cases. At 1-bit, it performed nearly as well as the uncompressed (bf16) baseline.
- Massive Throughput Gains: By reducing the per-request KV cache size by ~7×, TACT-KV allowed the decoding batch size on a single NVIDIA RTX 6000 GPU to scale from 8 to 64 for a 32B model—an 8× increase.
- Cross-Domain Generalization: Even though it was designed for medical 3D scans, the method proved highly effective for video tasks on Video-MME, suggesting that "time" in video acts similarly enough to "depth" in medical scans for the 3D DCT to work its magic.
Limitations and Future Work
- Modality Scope: While validated on head and chest CTs, the authors note that other 3D modalities like MRI, PET, and ultrasound—which likely share similar spatial properties—have not yet been tested.
- Visual-Only Compression: The current pipeline only compresses the visual portion of the cache. Text tokens are kept at full precision (bf16). Integrating TACT-KV with attention-aware eviction for text tokens is a logical next step.
- Compute vs. Memory Trade-off: The 3D DCT and gain-shape codebook add some computational overhead (FLOPs) per token. While this is a winning trade-off for memory-bound deployments (the current norm), it might be less attractive for systems that are already compute-bound.
Summary updated