HiSA: Sparsifying the Hidden Dimensions of RoPE Attention

HiSA sparsifies attention over hidden dimensions instead of tokens, computing ~1/3 of dot products while performance improves.
HiSA (Hidden Sparse Attention) proposes an attention optimization orthogonal to mainstream token sparsification: it keeps query and key projections unchanged but computes dot products only over a subset of hidden dimensions, with a static, parameter-free omission rule determined by token position and enabled by RoPE. Training LLMs from scratch showed this partial dot product improves performance over the full dot product while computing only ~1/3 of query-key products. HiSA speeds up decoding and reduces memory, and has been integrated into FlashAttention-3 with open-source code.
Large language models (LLMs) typically compute the full dot product between every query and every key in their attention mechanism. This full computation is effective but expensive. A new paper proposes HiSA (Hidden Sparse Attention), which takes a different angle on sparsification: instead of sparsifying tokens, it sparsifies the hidden (feature) dimensions.
Core Idea: Partial Dot Products Are Enough
The core observation of HiSA is that attention does not need the full dot product. It keeps the query and key projections unchanged but computes only a partial dot product. The rule for this partial dot product is static and parameter-free, determined by token position. In other words, attention becomes sparse along the hidden dimension—an axis that has been far less explored than token sparsity.
Building on the structure of Rotary Position Embedding (RoPE), HiSA decomposes keys and queries into segments that can be omitted when computing attention. The research team trained LLMs from scratch and found that this partial dot product not only did not hurt performance but actually improved it compared with the full dot product, while computing only about one-third of the query-key products.

Rotary Position Embedding (RoPE) is a method for injecting positional information into attention computation: instead of adding a separate position vector, it rotates pairs of dimensions of the query and key vectors using a position-dependent rotation matrix, then computes the dot product. This way, attention scores naturally vary periodically with relative position differences, without changing the model architecture. HiSA can "statically decide which hidden dimensions to omit based on position" precisely because RoPE encodes positional information into every pair of dimensions of the queries/keys: different positions correspond to different rotation angles, making partial dot products along certain dimensions less sensitive to position and therefore safe to omit. Without this RoPE structure, the static sparsity rule over hidden dimensions would lack a positional signal to rely on.
Dual Benefits in Performance and Efficiency
During inference, HiSA improves decoding speed and reduces memory footprint. This is especially meaningful for deploying large models, where decoding speed and memory are key bottlenecks in real-world applications.
The study also shows that dense attention learns to suppress the parts of attention scores that HiSA discards. This provides motivation for the method: the model itself already tends to suppress redundant information, and HiSA simply makes this tendency explicit and realizes it computationally.
Engineering Implementation: Integration with FlashAttention-3
To facilitate practical use, the team extended HiSA to the FlashAttention-3 kernel, supporting both training and inference. This means HiSA is not merely a theoretical sparsification scheme but also has an efficient engineering implementation foundation. The code is open-sourced on GitHub (ambroise-b/hisa).
FlashAttention-3 is an attention kernel optimized for Hopper-architecture GPUs (such as H100). Its core ideas are tiling and online softmax, fusing attention computation into on-chip SRAM to reduce memory reads and writes, and leveraging asynchronous pipelines and Tensor Cores for high throughput. Integrating HiSA into this kernel means the sparsity rule must be compatible with the tiling schedule: the omitted hidden dimensions need to be expressed at the granularity of tile loading and matrix multiplication so as not to break the kernel's pipeline efficiency. This is also the key to judging whether a sparse attention scheme can be deployed—if sparsity exists only at the algorithm level and cannot be mapped to an efficient kernel, the actual speedup is often greatly diminished.
Comparison with Token Sparsification
Almost all sparse attention methods focus on the token dimension—skipping interactions between certain tokens. HiSA instead chooses the hidden dimension, a less explored direction. This orthogonal sparsification approach may open up new possibilities for attention optimization, especially when combined with token sparsification methods.
Insights and Outlook
HiSA shows that in RoPE attention, partial computation over hidden dimensions can maintain or even improve performance while significantly reducing computation. This challenges the default assumption that "the full dot product is necessary" and offers a new perspective for designing efficient attention mechanisms. In the future, this static sparsity rule may complement other dynamic sparsity methods, further pushing the efficiency boundaries of LLMs.
One-line Summary
HiSA sparsifies attention along hidden dimensions rather than tokens, computing only about one-third of the dot products while performance improves rather than degrades.
Paragraph Summary
HiSA (Hidden Sparse Attention) proposes an attention optimization approach orthogonal to mainstream token sparsification: it keeps the query and key projections unchanged but computes dot products only over a subset of hidden dimensions. The omission rule is static, parameter-free, determined by token position, and enabled by the structure of Rotary Position Embedding (RoPE). After training LLMs from scratch, the research team found that this partial dot product not only did not hurt performance but actually improved it compared with the full dot product, while requiring only about one-third of the query-key products. During inference, HiSA improves decoding speed and reduces memory footprint; the team also extended it to the FlashAttention-3 kernel and open-sourced the code. The article notes that dense attention itself learns to suppress the score components that HiSA discards, indicating that models already tend to suppress redundant information—HiSA simply makes this explicit.
Related articles

Michael Nielsen Takes Down His Classic Neural Network Textbook, Sparking Community Discussion
Michael Nielsen's classic free textbook Neural Networks and Deep Learning has been taken offline, sparking discussion on Hacker News about the reasons and impact.

Inside the AI Training Data Market: The Trade-off Between Exclusivity and Discounts
G2i founder Gabe Greenberg reveals the dual-track pricing of the AI training data market: labs pay a premium for exclusive data or accept discounts that allow others to buy it.

SessionGraph: Unifying All Coding Agent Sessions in One Interactive Graph
SessionGraph aggregates coding agent sessions into an interactive graph, helping developers review, debug, and manage AI coding workflows across sessions. This article examines its positioning, value, and open questions.