ALTA:基于编译器的Transformer分析
ALTA: Compiler-Based Analysis of Transformers
AI总结:
本文提出ALTA语言及其编译器,将程序映射为Transformer权重,支持循环和Universal Transformer,展示长度不变算法及SCAN基准解决方案,并利用执行轨迹作为细粒度监督信号分析可学习性。
摘要:
我们提出了一种名为ALTA的新编程语言,以及一个能将ALTA程序映射为Transformer权重的编译器。ALTA的灵感来源于Weiss等人(2021)提出的RASP语言,以及Lindner等人(2023)提出的Tracr——一个将RASP程序编译为Transformer权重的编译器。ALTA补充并扩展了这些先前工作,提供了表达循环的能力以及将程序编译为Universal Transformer等优势。ALTA使我们能够建设性地展示Transformer如何表示用于计算奇偶校验和加法的长度不变算法,以及一个针对SCAN组合泛化任务基准的解决方案,而无需中间暂存解码步骤。我们还提出了工具来分析以下情况:算法的可表达性已确立,但在给定训练集上的端到端训练未能诱导出与期望算法一致的行为。为此,我们探索从ALTA执行轨迹进行训练,将其作为一种更细粒度的监督信号。这使得额外的实验和理论分析成为可能,这些分析将各种算法的可学习性与数据可用性和建模决策(如位置编码)联系起来。我们将ALTA框架——包括语言规范、符号解释器和权重编译器——提供给社区,以促进进一步的应用和见解。
英文摘要:
We propose a new programming language called ALTA and a compiler that can map ALTA programs to Transformer weights. ALTA is inspired by RASP, a language proposed by Weiss et al. (2021), and Tracr (Lindner et al., 2023), a compiler from RASP programs to Transformer weights. ALTA complements and extends this prior work, offering the ability to express loops and to compile programs to Universal Transformers, among other advantages. ALTA allows us to constructively show how Transformers can represent length-invariant algorithms for computing parity and addition, as well as a solution to the SCAN benchmark of compositional generalization tasks, without requiring intermediate scratchpad decoding steps. We also propose tools to analyze cases where the expressibility of an algorithm is established, but end-to-end training on a given training set fails to induce behavior consistent with the desired algorithm. To this end, we explore training from ALTA execution traces as a more fine-grained supervision signal. This enables additional experiments and theoretical analyses relating the learnability of various algorithms to data availability and modeling decisions, such as positional encodings. We make the ALTA framework -- language specification, symbolic interpreter, and weight compiler -- available to the community to enable further applications and insights.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。