Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

ConSA: Controllable Sparsity in Hybrid Attention via Learnable Allocation

About

Hybrid architectures combining full attention (FA) and sliding-window attention (SWA) are a promising paradigm for efficient LLM inference. However, existing methods typically rely on hand-crafted rules or simple post-hoc heuristics for FA/SWA allocation and offer limited analysis of the attention behaviors underlying these designs. We propose Controllable Sparsity in Hybrid Attention (ConSA), a framework that learns optimal FA/SWA assignment under a user-specified sparsity target. ConSA employs L0 regularization to learn binary masks selecting between FA and SWA for each attention unit, while an augmented Lagrangian constraint enforces the target sparsity at either layer or KV-head granularity. We evaluate ConSA on two LLMs at the 0.6B and 1.7B scales. Learned allocations consistently outperform rule-based baselines, with KV-head-wise allocation yielding clear gains over layer-wise allocation. The learned patterns place SWA in the bottom layers and concentrate FA into contiguous middle-layer blocks, diverging from evenly interleaved patterns in rule-based methods. This structure persists across model scales, sparsity levels, and allocation granularities, revealing a fine-grained spectrum of intrinsic attention behaviors that underlies the learned allocation.

Yao Chen, Yinqi Yang, Junyuan Shang, Xiangzhao Hao, Simeng Zhang, Yilong Chen, Tingwen Liu, Shuohuan Wang, Dianhai Yu• 2026

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningPIQA
Accuracy61.32
400
Commonsense ReasoningSocialIQA
Accuracy54.4
164
Scientific ReasoningARC Challenge
Accuracy52.05
121
Logical reasoningLogiQA
Accuracy36.92
106
Commonsense ReasoningCommonsenseQA (CSQA)
Accuracy52.99
62
General KnowledgeMMLU
MMLU Accuracy45.76
39
Scientific ReasoningARC Easy
Accuracy71.3
24
ReasoningHellaSwag
Accuracy37.93
10
Logical reasoningLogiQA CN
Accuracy (LogiQA CN)34.92
6
Open-domain Question AnsweringWebQA CN
Accuracy57.15
6
Showing 10 of 11 rows

Other info

Follow for update