Introduction
When processing massive documents, Large Language Models (LLMs) face a significant bottleneck during the "prefill" stage—the phase where the model ingests the prompt before generating its first word. Because computational costs scale quadratically with the number of tokens, a 100k-token prompt is exponentially harder to process than a 10k-token one.
To mitigate this, researchers have developed CLAA (Cross-Layer Attention Aggregation), a novel method that accelerates LLM prefill by identifying and processing only the most critical 10% of prompt tokens. By aggregating importance signals across multiple model layers, CLAA achieves a ~39% reduction in Time-to-First-Token (TTFT) while maintaining near full-context accuracy.
The Problem: Flaws in Current Token-Ranking
Existing solutions attempt to use "token-ranking heuristics" to guess which words in a prompt are relevant to the user's query, discarding the rest to save compute. However, current research suffers from two major flaws:
- Evaluation Blindness: Performance is typically measured end-to-end (i.e., is the final answer correct?). This makes it difficult to isolate whether a heuristic is genuinely good at selecting tokens, or if the model simply got lucky with its generation.
- Layer Instability: Many heuristics rely on a single model layer to decide which tokens to keep. This approach is highly fragile; a method might work perfectly at layer 15 but completely collapse and lose all accuracy if applied at layer 12.
Evaluating Token Importance: The Answer-Informed Reference Framework
To address evaluation blindness, the authors introduce the Answer-Informed Reference Framework. This framework establishes a "gold standard" for token importance by analyzing the attention weights of the generated answer.
By observing which prompt tokens the model actually attended to while writing its response, the researchers created a Ground-Truth Reference (GT-Ref) using human reference answers, and a Model Reference (Model-Ref) using model-generated answers. This allows any heuristic to be scored based on how well its ranking correlates with the tokens the model genuinely needed to succeed.
The Solution: Cross-Layer Attention Aggregation (CLAA)
Motivated by the instability of single-layer heuristics, the authors propose CLAA. Instead of relying on a single, potentially noisy layer to rank tokens, CLAA employs two core mechanisms:
- Deferred Pruning: CLAA processes the earliest layers (e.g., layers 0-4) using the full context. This allows the model to build high-quality semantic representations before any information is discarded.
- Multi-Layer Aggregation: It averages token importance scores across a sliding window of consecutive layers. This smoothing effect prevents the severe "accuracy collapse" observed in single-layer methods like FastKV or GemFilter.
Experimental Setup
The researchers evaluated CLAA across three major long-context benchmarks:
- LongBench: 16 tasks covering single/multi-document QA, summarization, and code completion.
- Needle-in-a-Haystack: A retrieval test hiding a specific fact at various depths within a massive text.
- RULER: A complex benchmark for retrieval, multi-hop reasoning, and information aggregation.
Tests were conducted on state-of-the-art open-weights models: Llama-3.1-8B, Llama-3.2-3B, and Mistral-Nemo-12B.
Key Findings and Results
1. The 10% Threshold
Using the GT-Ref framework, the authors demonstrated a striking reality: for most tasks in LongBench, only 10% of prompt tokens are actually necessary to match the performance of the full 100% context.
2. Early Layers are "Blind"
The study revealed that early layers (0-4) are consistently poor at predicting which tokens will be important later in the network. Pruning too early fails because the model has not yet established the semantic relationship between the query and the document.
3. Performance and Speedup
- Speedup: On a 10k-token sequence using Llama-3.1-8B, CLAA reduced TTFT by 39% (from ~900ms to ~550ms).
- Accuracy: At a strict 10% "keep rate" (discarding 90% of the prompt), CLAA achieved 47.13% accuracy on LongBench. This nearly matches the Model-Reference upper bound of 47.83% and significantly outperforms competing methods like GemFilter (37.59%).
- Robustness: In the Needle-in-a-Haystack test, CLAA maintained consistent accuracy across all document depths. In contrast, previous methods like GemFilter failed completely when the "needle" was placed in the middle of the document.
Limitations and Future Directions
While CLAA represents a major step forward, the authors note several areas for future improvement:
- Static vs. Dynamic Pruning: CLAA performs "static" pruning, deciding which tokens to keep once during prefill. However, in tasks like summarization, the "important" tokens shift as the model writes. Future work may require dynamic re-ranking during the decoding process.
- Multi-turn Conversations: In back-and-forth chats, tokens deemed irrelevant in the first turn might become vital later. Permanent pruning poses a challenge for these dynamic contexts.
- Learning the Reference: Because the GT-Ref provides clear labels for token importance, there is an opportunity to use this data to train lightweight, specialized models capable of predicting token importance with even greater accuracy.
Ultimately, while CLAA significantly narrows the performance gap, a meaningful difference remains between the best heuristics and the GT-Ref upper bound, indicating exciting theoretical room for future token selection algorithms.
Summary updated