Token Filtering: Online Attention Pruning via KV Similarity for Efficient LLM Inference
JUNGMIN LEE, Gwangeun Byeon, Yulhwa Kim, Seokin Hong
NeurIPS page · OpenReview · alphaXiv · Open on the map
Category: Efficient LLM Inference & Training › KV Cache Optimization · Type: new method · Keywords: online pruning, attention efficiency, LLM inference, key-value similarity, layer-wise pruning
Areas: Long Context › Long-context mechanisms › KV cache eviction
Summary
Token Filtering is an online attention pruning method that skips redundant tokens based on joint key-value similarity, reducing compute and KV cache without requiring calibration data or fine-tuning.
Explained to a 5-year-old
When you talk to a computer program that reads and writes words, it has to think about each word carefully. It compares each word to all other words to understand the meaning. This comparison is called attention, and it takes a lot of time. Sometimes the program looks at words that are not important, which wastes time. This paper finds a way to skip the extra work for unimportant words, helping the program answer faster without making mistakes.
Explained to a 5-year-old, longer
When you talk to a computer program that reads and writes words, it has to think about each word carefully. It compares each word to all other words to understand the meaning. This comparison is called attention, and it takes a lot of time. Sometimes the program looks at words that are not important, which wastes time. The researchers noticed this waste and wanted to stop it. They created a rule that checks how similar words are to each other. If a word is very similar to another word, they skip the extra work for it. This skipping happens only in the later parts of the program, where it is safer. By doing this, the program still understands the words correctly but runs faster. It also uses less memory because it doesn't store as many temporary results. The new method works on different kinds of language models and helps them answer questions quicker. It also saves energy because the computer doesn't have to work as hard. Overall, the idea is to make big language models more efficient without losing their ability to understand language.
For a technical reader
The paper addresses the high computational cost of attention in large language models during inference. It proposes an online pruning scheme that evaluates token redundancy using key-value similarity and skips attention for redundant tokens. Pruning is limited to later transformer layers and uses an adaptive threshold to meet a target reduction ratio. This reduces both compute and KV-cache memory while preserving model accuracy. Experiments on LLaMA-3.1 and Qwen-3 show superior accuracy-efficiency trade-offs.
Problem
Existing pruning methods for LLM inference rely on offline calibration data, which can be mismatched with inference inputs, leading to suboptimal efficiency and accuracy. This creates a need for pruning techniques that work online without calibration.
Method
The approach prunes attention computation by identifying redundant tokens through joint key-value similarity, skipping their attention updates. It restricts pruning to later layers and uses a layer-wise threshold to maintain a target pruning ratio while preserving accuracy.
Results
The approach achieves up to 1.5× higher accuracy than the best pruning baseline in long-context generation while reducing latency by up to 44% compared to dense inference.
Contributions
It introduces an online pruning technique that works without calibration data or fine-tuning, adaptively prunes later layers to meet target efficiency, and demonstrates superior accuracy-efficiency trade-offs on multiple LLM families.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction