JoFormer(基于旅程的 Transformer):Tiny Shakespeare 数据集上的理论与实证分析
JoFormer (Journey-based Transformer): Theory and Empirical Analysis on the Tiny Shakespeare Dataset
AI总结:
本文提出基于非交换代数、沿序列复合可学习方向变换的 JoFormer,从理论上推广 RoFormer,并在 Tiny Shakespeare 字符级建模中取得更低困惑度与更快收敛。
摘要:
Transformer 已在序列建模中取得显著成功,但如何有效纳入位置信息仍是一个富有挑战且活跃的研究方向。本文提出 JoFormer,这是一种基于旅程的 Transformer 架构,其基础是近期提出的、用于跨位置复合变换的非交换代数。JoFormer 通过可学习的方向变换表示相对位置,这些变换沿输入顺序复合,从而扩展并推广了现有基于相对位置表示的方法。我们从第一性原理推导出 JoFormer 注意力机制,并表明它将旋转变换等标准方法作为特例包含在内。为评估其有效性,我们在 Tiny Shakespeare 字符级语言建模任务上将 JoFormer 与 RoFormer 基线进行比较。结果表明,JoFormer 始终实现更低的困惑度和更快的收敛,凸显了其更具表达力、基于旅程的位置处理方式的优势。值得注意的是,逐 token 的 JoFormer 仍只是一个原始的概念性变体,具有与层无关的角度,但它已展现出强劲性能,从而证明其作为更具表达力架构概念验证的前景。最后,我们讨论 JoFormer 如何提供一种有原则的方法,将位置结构整合进 Transformer 架构。本工作使用的代码可在 https://github.com/mahesh-godavarti/joformer 获取。
英文摘要:
Transformers have demonstrated remarkable success in sequence modeling, yet effectively incorporating positional information remains a challenging and active area of research. In this paper, we introduce JoFormer, a journey-based Transformer architecture grounded in a recently proposed non-commutative algebra for composing transformations across positions. JoFormer represents relative positions through learnable directional transforms that are sequentially composed along the input, thereby extending and generalizing existing approaches based on relative position representations. We derive the JoFormer attention mechanism from first principles and show that it subsumes standard methods such as rotary transformations as special cases. To evaluate its effectiveness, we compare JoFormer to the RoFormer baseline on the Tiny Shakespeare character-level language modeling task. Our results demonstrate that JoFormer consistently achieves lower perplexity and faster convergence, highlighting the advantages of its more expressive, journey-based treatment of position. Notably, the per-token JoFormer is still a primitive, conceptual variant with layer-independent angles, yet it already demonstrates strong performance-underscoring its promise as a proof of concept for more expressive architectures. We conclude by discussing how JoFormer offers a principled approach to integrating positional structure into Transformer architectures. The code used in this work is available at https://github.com/mahesh-godavarti/joformer.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。