MAHA:面向大语言模型高效上下文建模的多尺度聚合分层注意力框架
Multiscale Aggregated Hierarchical Attention (MAHA): A Constrained and Consensus-Based Approach to Efficient Contextual Modeling in Large Language Models
MAHA 通过可学习下采样算子将输入序列动态划分为多个层级尺度,并以概率单纯形上的 softmax 归一化权重或固定次数的可微共识更新来聚合各尺度输出。在四个压缩尺度、压缩比为 2 的设置下,MAHA 在每个序列长度上所需的注意力分数计算量比全分辨率注意力少 66.8%(N=4096 时每头 5.57M 对 16.8M)。单次基准实验显示其下游性能与标准注意力相当。
arXiv:2512.14925v3 Announce Type: replace Abstract: The quadratic computational complexity of Multi-Head Self-Attention (MHSA) remains a fundamental bottleneck in scaling Large Language Models (LLMs) for long-context tasks. While sparse and linearized attention mechanisms attempt to mitigate this, they often compromise the representation of global dependencies or fail to capture multiscale semantic granularity effectively. In this paper, we propose Multiscale Aggregated Hierarchical Attention (MAHA), a novel architectural framework that reformulates the attention mechanism through hierarchical decomposition and explicitly constrained aggregation. Unlike conventional approaches that treat token interactions at a single resolution, MAHA dynamically partitions the input sequence into hierarchical scales via learnable downsampling operators. The aligned scale outputs are combined either by softmax-normalized weights on the probability simplex or by a fixed number of differentiable consensus updates based on scale-to-consensus discrepancy. The latter is a game-inspired update and is not claimed to compute a Nash equilibrium. Implemented within a hybrid dilated-convolutional transformer backbone, MAHA enables end-to-end training. With four compressed scales and a compression ratio of two, MAHA requires 66.8% fewer attention-score computations than full-resolution attention at every sequence length (5.57M versus 16.8M per head at N=4096), and single-run benchmark experiments indicate downstream performance competitive with standard attention. This work offers a scalable multiscale solution for next-generation LLMs.
来源:arXiv (AI + Vision + Imaging) · arxiv.org