paper-with-me

Papers

Algorithmic Capabilities of Random Transformers

2024-10-06 · Ziqian Zhong, Jacob Andreas

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.

📄 PDF Abstract BibTeX arXiv:2410.04368

Code (1)

fjzzq2002/random_transformers 공식 구현 pytorch

Tasks

Text Generation

Similar Papers 제목 키워드 기반

Randomized Positional Encodings Boost Length Generalization of Transformers

2023-05-26 · Anian Ruoss, Grégoire Delétang, Tim Genewein, Jordi Grau-Moya 외

Transformers have impressive generalization capabilities on tasks with a fixed context length. However, they fail to generalize to sequences of arbitrary length, even for seemingly simple tasks such as duplicating a stri…

Understanding Transformer Reasoning Capabilities via Graph Algorithms

2024-05-28 · Clayton Sanford, Bahare Fatemi, Ethan Hall, Anton Tsitsulin 외

Which transformer scaling regimes are able to perfectly solve different classes of algorithmic problems? While tremendous empirical advances have been attained by transformer-based neural networks, a theoretical understa…

Retrieval

Lower Bounds for Chain-of-Thought Reasoning in Hard-Attention Transformers

2025-02-04 · Alireza Amiri, Xinting Huang, Mark Rofin, Michael Hahn

Chain-of-thought reasoning and scratchpads have emerged as critical tools for enhancing the computational capabilities of transformers. While theoretical results show that polynomial-length scratchpads can extend transfo…

Hard Attention

Generalization vs. Memorization in the Presence of Statistical Biases in Transformers

2024-09-06 · John Mitros, Damien Teney

This study aims to understand how statistical biases affect the model's ability to generalize to in-distribution and out-of-distribution data on algorithmic tasks. Prior research indicates that transformers may inadverte…

Memorization

Layer Specialization Underlying Compositional Reasoning in Transformers

2025-10-20 · Jing Liu arxiv

Transformers exhibit compositional reasoning on sequences not observed during training, a capability often attributed to in-context learning (ICL) and skill composition. We investigate this phenomenon using the Random Hi…