arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.26355cs.LGcs.CLeess.SP
收藏

能量门控注意力与小波位置编码:Transformer注意力的互补归纳偏置

Energy-Gated Attention and Wavelet Positional Encoding: Complementary Inductive Biases for Transformer Attention

Independent Researcher(独立研究者);Athens, Greece(希腊雅典)

Athanasios Zeris

AI总结:

针对标准注意力缺乏能量显著性和尺度选择性局部性两种互补归纳偏置的问题,提出能量门控注意力(EGA)和莫雷特位置编码(MoPE),两者组合在字符级语言建模上实现超加性性能提升。

摘要:

标准Transformer注意力计算成对标记相似性,但将所有标记视为同等显著、所有位置视为同等局部,忽略了输入的信息结构。我们识别出标准注意力缺乏两种互补归纳偏置:能量显著性(哪些标记集中了信息能量,通过端到端学习而不需要显式频率分解)和尺度选择性局部性(在每个频率上位置影响的范围,通过Morlet小波编码实现)。我们通过两个简单组件解决这两个问题。能量门控注意力(EGA)通过键标记嵌入的学习能量估计(通过单个线性投影计算)来门控值聚合;它选择关注什么。莫雷特位置编码(MoPE)用学习的高斯窗口小波替换固定的正弦编码,使联合位置-频率定位适应语料库;它指定注意力在每个尺度上操作的位置。在TinyShakespeare上,单独EGA相比标准注意力实现+0.092验证损失改进(相比Phase 1-3基线+0.103);单独MoPE为-0.032(作为独立编码低于基线);但它们的组合实现+0.119——超过各部分之和。这种超加性在两个独立训练运行中观察到,是核心实证发现:显著性和局部性是互补归纳偏置,各自填补对方无法单独填补的空白。消融实验证实,结构化谱先验(Morlet小波门控、尺度初始化头、固定正弦PE)始终不如其无约束学习对应物,而互补学习组件交互产生超加性。所有实验都在小规模(≤6M参数、字符级基准、单种子)进行;更大规模的多种子验证是未来工作最重要的方向。

英文摘要:

Standard transformer attention computes pairwise token similarity but treats all tokens as equally salient and all positions as equally local, regardless of the informational structure of the input. We identify two complementary inductive biases that standard attention lacks: energy salience (which tokens concentrate informational energy, learned end-to-end without explicit frequency decomposition) and scale-selective locality (how far positional influence extends at each frequency, implemented via Morlet wavelet encoding). We address both with two simple components. Energy-Gated Attention (EGA) gates value aggregation by a learned energy estimate of key token embeddings, computed via a single linear projection; it selects what to attend to. Morlet Positional Encoding (MoPE) replaces fixed sinusoidal encodings with learned Gaussian-windowed wavelets that adapt the joint position-frequency localization to the corpus; it specifies where attention operates at each scale. On TinyShakespeare, EGA alone achieves +0.092 validation loss improvement over standard attention (+0.103 over Phase 1-3 baseline); MoPE alone is -0.032 (below baseline as a standalone encoding); but their combination achieves +0.119 -- more than the sum of parts. This superadditivity, observed across two independent training runs, is the central empirical finding: salience and locality are complementary inductive biases, each addressing a gap the other cannot fill alone. Ablations confirm that structured spectral priors (Morlet wavelet gates, scale-initialized heads, fixed sinusoidal PE) consistently underperform their unconstrained learned counterparts, while complementary learned components interact superadditively. All experiments are at small scale (<=6M parameters, character-level benchmarks, single seed); larger-scale multi-seed validation is the most important direction for future work.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑