把算法直接编码进Transformer参数,新手也能快速上手。
The Transformer Cookbook
- 将算法转化为Transformer层的参数配置,实现端到端编码。
- 从基础算术到复杂数据路由,完整覆盖各类算法实现。
- 适合初学者入门与专家参考,统一整理零散研究成果。
我们提出Transformer食谱:一套将算法直接编码至Transformer参数中的技术集合。该工作旨在解决此类研究的陡峭学习曲线问题,该问题因文献碎片化而加剧,关键成果分散于众多论文中。本文将这些分散的研究成果整合为一系列精选配方,展示如何在前馈层中实现基础算术,通过自注意力机制完成复杂数据路由。这套系统化的公式整理,既为初学者提供易入门的起点,也为专家提供系统性参考。统一呈现的Transformer构造方法,为未来研究奠定了基础,涵盖计算复杂性理论、架构设计与可解释性等方向。
原文摘要 · Abstract (English)
We present the transformer cookbook: a collection of techniques for directly encoding algorithms into a transformer's parameters. This work addresses the steep learning curve of such endeavors, a problem exacerbated by a fragmented literature where key results are scattered across numerous papers. In particular, we synthesize this disparate body of findings into a curated set of recipes that demonstrate how to implement everything from basic arithmetic in feed-forward layers to complex data routing via self-attention. Our mise en place of formulations is for both newcomers seeking an accessible entry point and experts in need of a systematic reference. This unified presentation of transformer constructions provides a foundation for future work spanning theoretical research in computational complexity to empirical investigations in architecture design and interpretability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。