Hyper-SET:通过超球面能量最小化设计 Transformer
Hyper-SET: Designing Transformers via Hyperspherical Energy Minimization
AI总结:
针对 Transformer 层启发式设计缺乏可解释性的问题,提出基于超球面能量最小化的 Hyper-SET 模型,通过联合最大似然估计实现任意深度扩展,在多项任务中表现优异。
摘要:
基于 Transformer 的模型取得了显著成功,但其核心组件 Transformer 层在很大程度上是由启发式驱动并自下而上设计的,因此需要一种具有高可解释性和实用能力的原型模型。为此,我们提出了一种基于能量解释的有原则的自顶向下方法。具体而言,我们将 token 动力学形式化为超球面上的联合最大似然估计,具有两个特性:高维空间中的语义对齐和低维空间中的分布均匀性。通过使用扩展的 Hopfield 能量函数对它们进行量化,我们将这一想法实例化为一个约束能量最小化问题,从而能够设计具有 RMS 归一化的对称注意力和前馈模块。我们进一步提出了 Hyper-Spherical Energy Transformer (Hyper-SET),它是普通 Transformer 的一种循环深度替代方案,自然产生于超球面上的迭代能量优化。通过跨层共享参数,Hyper-SET 可以用更少的参数扩展到任意深度。它在理论上具有基础且紧凑,在包括数独求解、图像分类和掩码图像建模在内的多种任务中取得了有竞争力或更优的性能。我们还在提出的通用原则下设计了新颖的变体,例如线性注意力和门控前馈层。此外,我们展示了其在深度方向上的 LoRA 可扩展性。我们的结果突出了 Hyper-SET 朝着可解释和有原则的 Transformer 设计迈出的一步。
英文摘要:
Transformer-based models have achieved remarkable success, but their core components, Transformer layers, are largely heuristics-driven and engineered from the bottom up, calling for a prototypical model with high interpretability and practical competence. To this end, we conceptualize a principled, top-down approach grounded in energy-based interpretation. Specifically, we formalize token dynamics as a joint maximum likelihood estimation on the hypersphere, featuring two properties: semantic alignment in the high-dimensional space and distributional uniformity in the low-dimensional space. By quantifying them with extended Hopfield energy functions, we instantiate this idea as a constrained energy minimization problem, which enables designs of symmetric attention and feedforward modules with RMS normalization. We further present \textit{Hyper-Spherical Energy Transformer} (Hyper-SET), a recurrent-depth alternative to vanilla Transformers naturally emerging from iterative energy optimization on the hypersphere. With shared parameters across layers, Hyper-SET can scale to arbitrary depth with fewer parameters. Theoretically grounded and compact, it achieves competitive or superior performance across diverse tasks, including Sudoku solving, image classification, and masked image modeling. We also design novel variations under the proposed general principle, such as linear attention and gated feedforward layer. Moreover, we showcase its scalability with depth-wise LoRA. Our results highlight Hyper-SET as a step toward interpretable and principled Transformer design.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。