提出聚焦注意力机制,解决大模型中注意力分散与冗余问题。
Attention Needs to Focus: A Unified Perspective on Attention Allocation
- 从注意力分配不均出发,统一解释表征崩溃与注意力陷阱现象。
- 在9个基准上实现最高59.58%注意力稀疏度,性能媲美主流架构。
- 适合关注模型可解释性与推理效率的研究者与开发者。
Transformer架构凭借其注意力机制在序列建模中取得巨大成功,但标准注意力机制存在表征崩溃与注意力陷阱等固有问题。以往研究多孤立处理这些问题,忽视其深层关联。本文提出统一视角,指出二者均源于注意力分配不当:注意力过载导致令牌权重趋同、语义模糊;注意力不足则强迫分配,引发虚假聚焦。为此,提出懒惰注意力(Lazy Attention)机制:通过头与维度上的位置区分缓解过载;引入弹性Softmax松弛归一化约束,抑制无关令牌的关注。在FineWeb-Edu语料上,跨9个多样基准的实验表明,该方法有效缓解注意力陷阱,性能优于标准注意力且媲美现代架构,可达最高59.58%注意力稀疏度。
原文摘要 · Abstract (English)
The Transformer architecture, a cornerstone of modern Large Language Models (LLMs), has achieved extraordinary success in sequence modeling, primarily due to its attention mechanism. However, despite its power, the standard attention mechanism is plagued by well-documented issues: representational collapse and attention sink. Although prior work has proposed approaches for these issues, they are often studied in isolation, obscuring their deeper connection. In this paper, we present a unified perspective, arguing that both can be traced to a common root -- improper attention allocation. We identify two failure modes: 1) Attention Overload, where tokens receive comparable high weights, blurring semantic features that lead to representational collapse; 2) Attention Underload, where no token is semantically relevant, yet attention is still forced to distribute, resulting in spurious focus such as attention sink. Building on this insight, we introduce Lazy Attention, a novel mechanism designed for a more focused attention distribution. To mitigate overload, it employs positional discrimination across both heads and dimensions to sharpen token distinctions. To counteract underload, it incorporates Elastic-Softmax, a modified normalization function that relaxes the standard softmax constraint to suppress attention on irrelevant tokens. Experiments on the FineWeb-Edu corpus, evaluated across nine diverse benchmarks, demonstrate that Lazy Attention successfully mitigates attention sink and achieves competitive performance compared to both standard attention and modern architectures, while reaching up to 59.58% attention sparsity.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。