RaaS: Reasoning-Aware Attention Sparsity for Efficient LLM Reasoning

Large Language Models (LLMs) have demonstrated strong capabilities across various domains, with recent advancements in challenging reasoning tasks such as mathematics and programming.However, solving reasoning tasks often requires an LLM to generate long sequences, incurring O(N ) time and memory complexities per token, where N is the current sequence length.To reduce complexities, existing sparsity-based algorithms propose to retain Key-Value (KV) vectors, the intermediate representations of only the most critical tokens.However, these algorithms struggle with the "impossible trinity" of accuracy, time, and memory.For example, the state-of-the-art algorithm, Quest, achieves high accuracy with O(L) time but O(N ) memory (L is the cache budget, L N ).To address the "impossible trinity", in this paper, we identify a new attention pattern during the decode stage of reasoning tasks, where milestone tokens (analogous to lemmas in mathematical proofs) emerge, are utilized, and then become unimportant afterward.Based on this pattern, we propose a new algorithm RaaS that identifies milestone tokens and retains their KV vectors until they are no longer needed, achieving high accuracy with O(L) time and O(L) memory complexities.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.131
Primary Topic
Semantic Web and Ontologies
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

RaaS: Reasoning-Aware Attention Sparsity for Efficient LLM Reasoning

Junhao Hu, Tiancheng Hu, Tao Xie, Zhixia Liu et al.
Semantic Web and Ontologies
article

RaaS: Reasoning-Aware Attention Sparsity for Efficient LLM Reasoning

Junhao Hu, Tiancheng Hu, Tao Xie, Zhixia Liu, Zhenwen Li, Weidong Wang, Xusheng Chen, Wenrui Huang, Yizhou Shan
article en

Abstract

Large Language Models (LLMs) have demonstrated strong capabilities across various domains, with recent advancements in challenging reasoning tasks such as mathematics and programming.However, solving reasoning tasks often requires an LLM to generate long sequences, incurring O(N ) time and memory complexities per token, where N is the current sequence length.To reduce complexities, existing sparsity-based algorithms propose to retain Key-Value (KV) vectors, the intermediate representations of only the most critical tokens.However, these algorithms struggle with the "impossible trinity" of accuracy, time, and memory.For example, the state-of-the-art algorithm, Quest, achieves high accuracy with O(L) time but O(N ) memory (L is the cache budget, L N ).To address the "impossible trinity", in this paper, we identify a new attention pattern during the decode stage of reasoning tasks, where milestone tokens (analogous to lemmas in mathematical proofs) emerge, are utilized, and then become unimportant afterward.Based on this pattern, we propose a new algorithm RaaS that identifies milestone tokens and retains their KV vectors until they are no longer needed, achieving high accuracy with O(L) time and O(L) memory complexities.

National Natural Science Foundation of China
Openalex Percentile: Top 90%
Semantic Web and Ontologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.