TL;DR
UniCache is a training-free framework designed to compress the KV cache of unified multimodal models by recognizing that not all cache entries are created equal. By tailoring compression policies (eviction vs. quantization) to specific tasks and data types, it achieves up to $5\times$ compression and a $1.78\times$ throughput boost with negligible quality loss across understanding, generation, and editing tasks.
What Problem Does This Paper Address?
Unified multimodal models—like BAGEL or SenseNova-U1—are the "Swiss Army Knives" of AI, handling everything from image captioning to complex image editing within a single architecture. However, as context lengths grow, the Key-Value (KV) cache becomes a massive memory bottleneck.
Existing compression techniques usually treat the KV cache as a monolithic block, applying either token eviction (dropping "unimportant" tokens) or quantization (reducing numerical precision) uniformly. The authors argue this is a mistake for unified models because these models manage a heterogeneous mix of cache types (e.g., text instructions, ViT visual features, VAE latent features).
As shown in Figure 1, a uniform policy leads to distinct failure modes: eviction-based methods often discard fine-grained visual details, while quantization can scramble the semantic meaning of instructions, causing the model to ignore user prompts.
Methods
UniCache introduces a training-free, four-stage pipeline to handle this complexity:
- Task-Aware Segmentation: The system identifies which KV cache segments are active for a given task (e.g., "Understanding" uses Instruction and Source-ViT KVs). It also separates "protected" segments (like attention sinks or current latents) that should never be compressed from "candidate" segments.
- Offline Policy Assignment: Through a quick calibration phase, UniCache determines whether a specific cache type prefers eviction or quantization. The insight here is that types with sparse attention (like text instructions) favor eviction, while types with dense, distributed attention (like VAE features) favor quantization.
- Attention-Guided Budget Allocation: Instead of giving every segment the same $80\%$ compression target, UniCache allocates memory based on "attention mass." If a specific cache segment is being heavily attended to by the model, it receives a larger share of the total memory budget.
- Task-Aware Temporal Scheduling: The importance of conditioning information often changes over time. For instance, during the iterative denoising process of image generation, the model relies less on the initial prompt as the image takes shape. UniCache dynamically reduces the total budget across timesteps to maximize efficiency.
Datasets
The authors evaluated UniCache across three primary task categories using several established benchmarks:
- Understanding: MME, MMBench, and MMMU.
- Generation: GenEval (for text-to-image alignment).
- Editing: PIE-Bench and GEdit-Bench (using Qwen2.5-VL-72B-Instruct as a judge).
Testing was performed on two representative Mixture-of-Transformers (MoT) models: BAGEL and SenseNova-U1.
Key Insights and Ideas
- Heterogeneity is a Feature, Not a Bug: The core "aha moment" is that multimodal caches are not uniform. Visual features and text instructions have fundamentally different attention patterns (see Figure 4), and forcing them into the same compression bucket is what causes quality degradation.
- Sparsity Dictates Strategy: The authors found a strong correlation between attention concentration and policy preference. If $10\%$ of tokens capture most of the attention mass, eviction works best. If the attention is spread out, quantization is the safer bet to avoid losing "long-tail" information.
- Dynamic Budgeting: The total memory budget shouldn't be static. By tracking attention mass across denoising steps (Figure 6), UniCache can aggressively prune the cache in later stages of generation without hurting the final output.
Key Results
UniCache consistently outperformed state-of-the-art uniform compression methods like H2O and KIVI:
- Compression Ratios: It achieved $5\times$ compression ($80\%$ reduction) for understanding and editing tasks and $2.5\times$ ($60\%$ reduction) for generation with almost no loss in benchmark scores.
- Throughput: In long-context scenarios (up to 20K tokens), UniCache improved inference throughput by up to $1.78\times$ on an NVIDIA A100 GPU.
- Qualitative Superiority: Unlike baseline methods, UniCache successfully preserved both source-image details and instruction-following capabilities in complex editing tasks.
Limitations and Future Work
While UniCache is training-free and highly effective, it relies on offline calibration to set initial policies. While this calibration is fast (only 10 samples), a fully online, adaptive policy assignment could potentially handle even more dynamic shifts in model behavior. Additionally, the current implementation focuses on MoT-based unified models; extending these principles to other multimodal architectures (like early-fusion models) remains an open area for exploration.
Summary updated