ChatPaper.aiChatPaper

SSA: 특징 공간에서 전체 주의력과 희소 주의력 출력을 정렬하는 희소 희소 주의력

SSA: Sparse Sparse Attention by Aligning Full and Sparse Attention Outputs in Feature Space

November 25, 2025
저자: Zhenyi Shen, Junru Lu, Lin Gui, Jiazheng Li, Yulan He, Di Yin, Xing Sun
cs.AI

초록

전체 어텐션의 이차 복잡도는 대규모 언어 모델(LLM)에서 효율적인 장문맥 처리를 제한한다. 희소 어텐션은 각 쿼리가 이전 토큰의 일부 집합에만 주목하도록 제한하여 이러한 비용을 완화하지만, 훈련이 필요 없는 접근법은 종종 심각한 성능 저하를 초래한다. NSA, MoBA와 같은 기본 희소 어텐션 방법은 이 문제를 완화하지만 중요한 패러독스를 보인다: 이들은 전체 어텐션을 근사하려는 목표에도 불구하고 전체 어텐션 모델보다 더 낮은 어텐션 희소성을 생성하며, 이는 그 효과성을 제한할 수 있다. 우리는 이 패러독스를 그래디언트 업데이트 결함으로 귀결한다: 희소 훈련 동안 배제된 낮은 순위의 키-값 쌍은 순전파 기여도나 역전파 그래디언트를 받지 못하여 적절한 억제를 학습하지 못한다. 이 한계를 극복하기 위해 우리는 희소 어텐션과 전체 어텐션을 모두 고려하고 매 계층에서 양방향 정렬을 강제하는 통합 훈련 프레임워크인 SSA(Sparse Sparse Attention)를 제안한다. 이 설계는 모든 토큰으로의 그래디언트 흐름을 유지하면서 희소 어텐션 출력이 전체 어텐션 출력과 정렬되도록 명시적으로 장려하여 더 강력한 희소성을 촉진한다. 그 결과, SSA는 여러 상식 벤치마크에서 희소 및 전체 어텐션 추론 모두에서 최첨단 성능을 달성한다. 더 나아가, SSA는 모델이 다양한 희소 예산에 원활하게 적응할 수 있도록 한다; 더 많은 토큰이 주목하도록 허용될수록 성능이 지속적으로 향상되어 추론 시 유연한 계산-성능 트레이드오프를 지원한다. 마지막으로, 우리는 기본 희소 어텐션 훈련이 싱크 영역에서의 어텐션 값 과할당을 완화함으로써 놀랍게도 장문맥 외삽 능력을 향상시키며, SSA가 가장 강력한 외삽 능력을 보임을 확인한다.
English
The quadratic complexity of full attention limits efficient long-context processing in large language models (LLMs). Sparse attention mitigates this cost by restricting each query to attend to a subset of previous tokens; however, training-free approaches often lead to severe performance degradation. Native sparse-attention methods (e.g., NSA, MoBA) alleviate this issue, yet exhibit a critical paradox: they produce lower attention sparsity than full-attention models, despite aiming to approximate full attention, which may constrain their effectiveness. We attribute this paradox to gradient update deficiency: low-ranked key-value pairs excluded during sparse training receive neither forward contribution nor backward gradients, and thus never learn proper suppression. To overcome this limitation, we propose SSA (Sparse Sparse Attention), a unified training framework that considers both sparse and full attention and enforces bidirectional alignment at every layer. This design preserves gradient flow to all tokens while explicitly encouraging sparse-attention outputs to align with their full-attention counterparts, thereby promoting stronger sparsity. As a result, SSA achieves state-of-the-art performance under both sparse and full attention inference across multiple commonsense benchmarks. Furthermore, SSA enables models to adapt smoothly to varying sparsity budgets; performance improves consistently as more tokens are allowed to attend, supporting flexible compute-performance trade-offs at inference time. Finally, we show that native sparse-attention training surprisingly improves long-context extrapolation by mitigating the over-allocation of attention values in sink areas, with SSA demonstrating the strongest extrapolation capability.
PDF253December 1, 2025