SOCKET: SOft Collision Kernel EsTimator for Sparse Attention
cs.LG
Submitted: 2026-02-06
Updated: 2026-09-25
Comments: 8 figures, 19 tables
Code: https://github.com/amarka8/SOCKET
License: http://creativecommons.org/licenses/by/4.0/
The gist: Exploiting sparsity is key to efficient long-context inference, as attention dominates the cost of autoregressive decoding.
Terminology
Abstract
Exploiting sparsity is key to efficient long-context inference, as attention dominates the cost of autoregressive decoding. Sparse attention reduces this cost by restricting computation to a subset of tokens, but its effectiveness hinges on fast and accurate token scoring and selection at inference time. Data-agnostic approaches offer an attractive way to perform this selection, but often incur substantial memory overhead to maintain high recall. We revisit Locality-Sensitive Hashing (LSH) and introduce SOCKET, a SOft Collision Kernel EsTimator that replaces hard bucket matches with probabilistic, similarity-aware aggregation. Traditional LSH relies on binary collision signals, providing limited information for ranking tokens and necessitating many hash tables for accurate retrieval. In contrast, soft LSH accumulates graded collision evidence across hash tables, closely preserving the true top- k ordering with significantly less memory. This reframes LSH from a candidate-generation mechanism into a principled scoring kernel for sparse attention. Building on this insight, SOCKET enables efficient token selection without ad hoc voting and matches or outperforms existing sparse attention methods across multiple long-context benchmarks and diverse language models. With a custom set of CUDA/Triton kernels for scoring, selection, and attention, SOCKET achieves up to approximately 1.5 times higher throughput than FlashAttention. Code is open-sourced at https://github.com/amarka8/SOCKET.
Sources
- GPT-4 Technical Report
- Longformer: The Long-Document Transformer
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- The Llama 3 Herd of Models
- LLaMA: Open and Efficient Foundation Language Models
- Adamas: Hadamard Sparse Attention for Efficient Long-Context Inference
- Qwen3 Technical Report
- Post-Training Sparse Attention with Double Sparsity
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks