arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.13572cs.LGcs.AIcs.NAmath.NA
收藏

AlgoFormer:一种具有算法结构的高效 Transformer 框架

AlgoFormer: An Efficient Transformer Framework with Algorithmic Structures

National University of Singapore(新加坡国立大学);Chinese University of Hong Kong(香港中文大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室);Hong Kong Baptist University(香港浸会大学);University of Electronic Science and Technology of China(电子科技大学)

Yihang Gao, Chuanyang Zheng, Enze Xie, Han Shi, Tianyang Hu, Yu Li, Michael K. Ng, Zhenguo Li, Zhaoqiang Liu

AI总结:

本文提出融合预处理、循环迭代优化与后处理结构的 AlgoFormer,利用任务和算法先验提升 Transformer 的算法表示与学习能力,并在理论及语言任务实验中验证其优势。

摘要:

除自然语言处理外,transformers 在解决更广泛的应用(包括科学计算和计算机视觉)方面表现出非凡性能。以往工作试图从表达能力和性能的角度解释这一点,即标准 transformers 能够执行某些算法。为赋予 transformers 算法能力,并受最近提出的循环 transformer 启发,我们设计了一种新型 transformer 框架,称为 Algorithm Transformer(缩写为 AlgoFormer)。我们提出一种见解:可以利用任务的先验知识和潜在算法的底层结构来设计高效的 transformer 架构。与标准 transformer 和普通循环 transformer 相比,所提出的 AlgoFormer 能在某些特定任务中高效完成算法表示。具体而言,受人工设计的学习算法结构启发,我们的 transformer 框架由负责任务预处理的 pre-transformer、用于迭代优化算法的循环 transformer,以及在后处理后生成所需结果的 post-transformer 组成。我们提供了 AlgoFormer 在解决某些挑战性问题时表达能力的理论证据,其能力可与人工设计的算法相媲美。此外,本文给出的一些理论和实证结果表明,所设计的 transformer 具有执行算法表示和学习的潜力。实验结果证明了所提 transformer 的实证优越性:它在某些特定任务上优于标准 transformer 和普通循环 transformer。在真实语言任务(例如德语和英语的神经机器翻译以及文本分类)上的大量实验进一步验证了 AlgoFormer 的表达能力和有效性。

英文摘要:

Besides natural language processing, transformers exhibit extraordinary performance in solving broader applications, including scientific computing and computer vision. Previous works try to explain this from the expressive power and capability perspectives that standard transformers are capable of performing some algorithms. To empower transformers with algorithmic capabilities and motivated by the recently proposed looped transformer, we design a novel transformer framework, dubbed Algorithm Transformer (abbreviated as AlgoFormer). We provide an insight that efficient transformer architectures can be designed by leveraging prior knowledge of tasks and the underlying structure of potential algorithms. Compared with the standard transformer and vanilla looped transformer, the proposed AlgoFormer can perform efficiently in algorithm representation in some specific tasks. In particular, inspired by the structure of human-designed learning algorithms, our transformer framework consists of a pre-transformer that is responsible for task preprocessing, a looped transformer for iterative optimization algorithms, and a post-transformer for producing the desired results after post-processing. We provide theoretical evidence of the expressive power of the AlgoFormer in solving some challenging problems, mirroring human-designed algorithms. Furthermore, some theoretical and empirical results are presented to show that the designed transformer has the potential to perform algorithm representation and learning. Experimental results demonstrate the empirical superiority of the proposed transformer in that it outperforms the standard transformer and vanilla looped transformer in some specific tasks. An extensive experiment on real language tasks (e.g., neural machine translation of German and English, and text classification) further validates the expressiveness and effectiveness of AlgoFormer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑