Manuscript Offprint

arXiv:2609.01925

CRISP: Cliff-awaRe Input-adaptive Sparse Prefilling with Structural-Mass-Motivated Routing

Huu Huy Nguyen, Chien Van Nguyen, Franck Dernoncourt, Ryan A. Rossi, Linh Ngo Van, Jieyang Chen, Thien Huu Nguyen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The attention prefilling phase of long-context LLM inference scales quadratically, making self-attention a severe computational bottleneck. Traditional sparse attention methods mitigate this through fixed patterns or offline profiling, but lack the flexibility to adapt to input-dependent attention structure. Recent dynamic methods address this by routing heads to sparse patterns in real-time, but rely on indirect routing proxies with overhead and budget allocation mechanisms that overlook the post-softmax mass hierarchy. We present CRISP (Cliff-awaRe Input-adaptive Sparse Prefilling), which identifies and addresses two structural challenges in this dynamic routing paradigm. First, we show that the routing decision can be read directly off the structure of the proxy attention map. We replace the Jensen-Shannon Divergence (JSD) routing with CstructC_{struct}, a structural proxy that measures mass at Vertical-Slash compatible positions and reproduces JSD's routing decisions while eliminating both the pooled matmul and subsequent KL divergence overhead. Second, we formalize the post-softmax mass cliff and demonstrate theoretically that strictly cumulative coverage thresholds accumulate O(n)O(n) background noise at long contexts. CRISP navigates this via a sink-aware threshold grounded in the noise floor. Empirically, across InfiniteBench, RULER and LongBench on two model families, CRISP is the strongest sparse method overall and matches or exceeds exact dense attention on retrieval-heavy benchmarks, recovering up to +28.0 pp on retrieval tasks over baselines and achieving up to a 5.30× attention speedup at 512k tokens, driven primarily by our O(n)O(n) noise elimination during selection while preserving structural integrity.

1 Introduction

The prefilling phase of long-context LLM inference scales quadratically, making self-attention a

severe bottleneck. Traditional sparse attention uses fixed patterns (Child et al., 2019; Zaheer et al., 2020) or offline profiling (Jiang et al., 2024), lacking the flexibility to adapt to input-dependent attention structures. To address this, state-of-the-art methods like FlexPrefill (Lai et al., 2025) introduce dynamic routing, categorizing heads in real-time to allocate compute budgets. Specifically, it uses Jensen-Shannon Divergence (JSD) for pattern routing and a cumulative coverage threshold γ\gamma for index selection. However, analyzing their theoretical foundations reveals principled limitations in both mechanisms.

JSD is an indirect routing signal. FlexPrefill sends each head down one of two paths: Vertical-Slash (VS) for heads whose attention is sharply concentrated, Pooled-Estimation (PE) for heads whose attention is spread out. What the router needs is therefore a cheap read on how concentrated a head is. JSD obtains one indirectly, by building a second, pooled estimate of the head's attention and measuring how far it diverges from the per-query one, routing to VS above a threshold τ\tau. That estimate exists only for the comparison, and costs a matmul and a softmax that nothing else in the method needs. We take a shortcut instead: in these models a concentrated head places its mass at structurally predictable positions—the attention sinks and the local recency window—so the mass sitting there is itself a read on concentration. CstructC_{struct} measures exactly that, costs nothing beyond what index selection already computes, and agrees with JSD's routing decision on 94.0% (Llama) and 88.1% (Qwen) of measured heads.

Cumulative thresholds cannot navigate the mass cliff. On VS heads, softmax amplification produces a rigid mass hierarchy: architectural sinks (might absorb up to > 90% mass), task-relevant signal blocks, and near-zero background noise (Deng et al., 2024). We term the sharp boundary be-

Same γ=0.95\gamma=0.95, two opposite failures across heads

Figure

Figure 1: Post-softmax attention mass distribution, illustrating the two opposite failure modes of cumulative thresholding (γ=0.95\gamma=0.95). Left (sink-only collapse): high sink mass causes γ=0.95\gamma=0.95 to terminate inside the sink, leaving important blocks unreached. Right (noise accumulation): when sink mass is distributed, γ=0.95\gamma=0.95 exhausts the important band and accumulates 13 noise blocks. The CRISP noise-floor (α=1.0\alpha=1.0, dotted purple) correctly separates signal from noise in both cases. Additional head examples are provided in Appendix D.

tween signal and noise the mass cliff. Cumulative γ\gamma-thresholding accumulates mass indiscriminately across this boundary, producing two inherent structural failure modes depending on where γ\gamma falls relative to the sink mass: sink-only collapse, in which selection terminates before reaching signal, and residual noise accumulation, in which O(n)O(n) near-zero background tokens are collected to satisfy the residual threshold. Tuning γ\gamma cannot resolve this: increasing coverage merely pushes selection deeper into noise. We replace γ\gamma on VS heads with a sink-aware threshold grounded in the noise floor, which explicitly separates signal from architectural noise without empirical calibration.

Contributions. (1) We give a structural account of VS/PE routing and show empirically that FlexPrefill's JSD signal tracks the same head-level distinction (§3). (2) We introduce CstructC_{\text{struct}}, a structural-mass proxy that removes the matmul and KL divergence required by JSD-based routing while reproducing its decisions (§3.2). (3) We identify the post-softmax mass cliff and provide an asymptotic analysis showing that coverage-based thresholds inherently accumulate O(n)O(n) noise at scale (§4). (4) We introduce CRISP, a method using sink-aware thresholding that achieves par-

ity with dense attention and provides up to 5.30×5.30\times speedups, driven entirely by resolving the O(n)O(n) noise accumulation bottleneck (§5).

References (23)