随机初始化的Transformer已有多种算法能力,无需训练即可完成算术与记忆任务。
Algorithmic Capabilities of Random Transformers
- 仅优化嵌入层,测试随机初始化模型能否学新功能
- 可实现模运算、括号匹配、十进制加法等10余种算法任务
- 表明部分算法能力源自模型初始结构,非训练独有
已训练的Transformer模型能实现可解释的算术和关联回忆等程序,但这些电路如何在训练中形成仍不明确。我们研究仅优化嵌入层时,随机初始化Transformer能否学习新功能,从而仅利用模型初始即存在的输入-输出映射(取决于编码方式)。结果发现,这类随机模型能完成包括模运算、权重内与上下文内关联回忆、十进制加法、括号平衡,甚至部分自然语言生成在内的多项有意义算法任务。这表明某些算法能力在训练前就存在于Transformer中,且可通过合理输入结构被激发。代码见https://github.com/fjzzq2002/random_transformers。
原文摘要 · Abstract (English)
Trained transformer models have been found to implement interpretable procedures for tasks like arithmetic and associative recall, but little is understood about how the circuits that implement these procedures originate during training. To what extent do they depend on the supervisory signal provided to models, and to what extent are they attributable to behavior already present in models at the beginning of training? To investigate these questions, we investigate what functions can be learned by randomly initialized transformers in which only the embedding layers are optimized, so that the only input--output mappings learnable from data are those already implemented (up to a choice of encoding scheme) by the randomly initialized model. We find that these random transformers can perform a wide range of meaningful algorithmic tasks, including modular arithmetic, in-weights and in-context associative recall, decimal addition, parenthesis balancing, and even some aspects of natural language text generation. Our results indicate that some algorithmic capabilities are present in transformers (and accessible via appropriately structured inputs) even before these models are trained. Code is available at https://github.com/fjzzq2002/random_transformers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。