AlgoFormer: An Efficient Transformer Framework with Algorithmic Structures
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 27 of its 36 references that are in the map. First posted on arXiv 21 Feb 2024.
Builds on
27 of 36 references.
References · 27
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2023SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shotcited by 1,121
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2023MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Modelscited by 735
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
15 more
- 2019Enhancing the Locality and Breaking the Memory Bottleneck of Transformer on Time Series Forecastingcited by 607
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 415
- 2021Choose a Transformer: Fourier or Galerkincited by 343
- 2023Trained Transformers Learn Linear Models In-Contextcited by 337
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 294
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
- 2023Looped Transformers as Programmable Computerscited by 237
- 2023MathPrompter: Mathematical Reasoning using Large Language Modelscited by 236
- 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 170
- 2023Looped Transformers are Better at Learning Learning Algorithmscited by 149
- 2023In-Context Convergence of Transformerscited by 115
- 2023How Do Transformers Learn In-Context Beyond Simple Functions? A Case Study on Learning with Representationscited by 75
- 2021Making Transformers Solve Compositional Taskscited by 72
Built on by
Citing papers per year: 2024: 2; 2025: 5; 2026: 4.
11 papers.
- 2025A Survey on Latent Reasoningcited by 81
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrencecited by 47
- 2025Enabling Agents to Communicate Entirely in Latent Spacecited by 34
- 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoningcited by 19
- 2026Training-Free Looped Transformerscited by 15
- 2026Loop the Loopies!cited by 8
- 2024Exact Conversion of In-Context Learning to Model Weights in Linearized-Attention Transformerscited by 7
- 2024Advancing the Understanding of Fixed Point Iterations in Deep Neural Networks: A Detailed Analytical Studycited by 4
- 2026How Transparent is DiffusionGemma?cited by 3
- 2025Selection, Reflection and Self-Refinement: Revisit Reasoning Tasks via a Causal Lenscited by 2
- 2026Think Deep, Speak Once: Relit, A Recursive Latent Implicit Transformer Frameworkcited by 1
- 2026Think Deep, Speak Once: Relit, A Recursive Latent Implicit Transformer Framework8 Aug 2026
- 2026Loop the Loopies!17 Jul 2026
- 2026How Transparent is DiffusionGemma?18 Jun 2026
- 2026Training-Free Looped Transformers22 May 2026
- 2025Enabling Agents to Communicate Entirely in Latent Space12 Nov 2025
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrence10 Nov 2025
- 2025Selection, Reflection and Self-Refinement: Revisit Reasoning Tasks via a Causal Lens9 Oct 2025
- 2025A Survey on Latent Reasoning8 Jul 2025
- 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoning12 Feb 2025
- 2024Advancing the Understanding of Fixed Point Iterations in Deep Neural Networks: A Detailed Analytical Study15 Oct 2024
- 2024Exact Conversion of In-Context Learning to Model Weights in Linearized-Attention Transformers5 Jun 2024