SAS Optimizes Transformer Attention End-to-End
A new method called Simple Attention Sparsification optimizes context ranking end-to-end, allowing AI models to handle long-context tasks more efficiently under tight computational budgets.

A new post-training attention sparsification method called Simple Attention Sparsification (SAS) addresses the high computational costs of processing long sequences in Transformer models. Published on arXiv under identifier 2609.13141, the technique optimizes how models select which tokens or blocks of context to focus on. Standard Transformers suffer from quadratic computational scaling as context windows grow, and while existing sparsification methods attempt to prune less important context, they typically rely on hard selections that block gradient flow during training.
SAS overcomes this limitation by training its context selector end-to-end alongside the primary language modeling loss. Instead of using a hard threshold that disrupts backpropagation, SAS injects continuous gating scores directly into the attention logits during training. The system places these gates inside the attention softmax in log form and uses normalized softmax gates to calibrate older historical context against the current block, which is always retained. By preserving these continuous scores, the model learns relative priorities rather than making binary, hard-coded selections.
To make this approach practical for real-world training, the researchers implemented a custom, memory-efficient Triton kernel that integrates SAS directly into FlashAttention-style computations. This integration ensures that the end-to-end training remains highly efficient even when handling very long sequences. In evaluations spanning reasoning, long-context understanding, and agentic tasks, SAS consistently outperformed existing trainable sparse attention baselines, showing particularly strong performance gains when operating under highly restricted attention budgets.
For machine learning practitioners, SAS offers a more effective way to deploy large language models on hardware with strict memory or compute constraints. By aligning context selection directly with downstream task performance rather than relying on distilled approximations, developers can achieve better accuracy with fewer active tokens. This makes it easier to run sophisticated agentic workflows and long-document analysis without incurring prohibitive hardware costs.
This is our own summary of reporting by HF Papers



