atlas

Research map / Architectures and efficiency / Attention and transformers

$\text{D}_{2}\text{O}$: Dynamic Discriminative Operations for Efficient Long-Context Inference of Large Language Models

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: KV cache eviction and compression

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 D2O, a training-free KV cache compression method combining layer-wise dynamic budget allocation (inverse-variance softmax of attention density) with token eviction plus EMA-thresholded similarity-based merging of evicted tokens.

Problem

KV cache memory grows linearly with context length in LLM generative inference, and existing eviction methods discard tokens irreversibly and use uniform per-layer budgets, causing context loss and hallucinations on long contexts.

Approach

Allocates per-layer KV cache budgets via an inverse-variance softmax over prompt attention density, and instead of discarding evicted tokens, merges those whose key similarity to retained tokens exceeds an EMA-smoothed threshold into their nearest retained token using similarity-weighted fusion; no fine-tuning required.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use D₂O rather than eviction-based compressionLlama-2-7B-80k · Needle-in-a-Haystack, L=100k and budget 8192accuracy: 80.42 -> 91.88Helped
use D₂O rather than full KV cacheLlama-3-8B · Throughput, 2048+8192throughput speedup: 3.04×Helped
use inverse-variance softmax rather than uniform layer allocation (ablation)D₂O · CoQAscore: 55.30 -> 59.25Helped
use inverse-variance softmax rather than reciprocal-of-variance allocation (ablation)D₂O · CoQAscore: 58.10 -> 59.25Helped
add the layer-level operation (ablation)D₂O · MF-enscore: 18.89 -> 19.93Helped
add the EMA threshold (ablation)D₂O · MF-enscore: 19.23 -> 19.93Helped
use key-based rather than value-based token similarity (ablation)D₂O · CoQAscore: 53.88 -> 59.25Helped
use weighted rather than average merging (ablation)D₂O · CoQAscore: 56.58 -> 59.25Helped
set important-to-recent token ratio to 3:1 rather than 1:3 (ablation)D₂O · CoQAscore: 54.58 -> 57.92Helped
set EMA beta to 0.7 rather than 0.5 (ablation)D₂O · CoQAscore: 56.35 -> 57.92Helped
use D₂O rather than H₂OLlama-3-8B · LongBench HotpotQA, 20% cachescore: 10.38 -> 11.92Helped
use D₂O rather than the full cacheLlama-3.1-8B-Instruct (128K) · longbook_sum_engRouge_Lsum (f1): 36.87 -> 35.48Hurt

Surprising findings

Limitations

Experimental setup

Datasets: GSM8K CoQA TruthfulQA LongBench Needle In A Haystack PG-19 MT-bench InfiniteBench longbook_sum_eng

Benchmarks: GSM8K CoQA TruthfulQA LongBench Needle In A Haystack PG-19 InfiniteBench

Metrics: exact match accuracy BLEU F1 / task score perplexity (NLL) throughput (tokens/s) Rouge-Lsum

Baselines: StreamingLLM H2O RoCo PyramidKV CaM SnapKV Local Window

Builds on: H2O StreamingLLM CaM

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