English
Related papers

Related papers: Understanding Addition in Transformers

200 papers

Transformer-based large language models have achieved remarkable performance across various natural language processing tasks. However, they often struggle with seemingly easy tasks like arithmetic despite their vast capabilities. This…

Computation and Language · Computer Science 2024-07-23 Luyu Qiu , Jianing Li , Chi Su , Chen Jason Zhang , Lei Chen

Transformers are widely deployed in large language models (LLMs), yet most models still fail on basic arithmetic tasks such as multidigit addition. In contrast, we show that small transformers trained from scratch can solve n-digit addition…

Machine Learning · Computer Science 2025-10-06 Philip Quirke , Clement Neo , Fazl Barez

Addition is perhaps one of the simplest arithmetic tasks one can think of and is usually performed using the carrying over algorithm. This algorithm consists of two tasks: adding digits in the same position and carrying over a one whenever…

Machine Learning · Computer Science 2024-01-18 Jorrit Kruthoff

The poor performance of transformers on arithmetic tasks seems to stem in large part from their inability to keep track of the exact position of each digit inside of a large span of digits. We mend this problem by adding an embedding to…

Transformer becomes the state-of-the-art translation model, while it is not well studied how each intermediate component contributes to the model performance, which poses significant challenges for designing optimal architectures. In this…

Computation and Language · Computer Science 2020-11-10 Wenxuan Wang , Zhaopeng Tu

Even for simple arithmetic tasks like integer addition, it is challenging for Transformers to generalize to longer sequences than those encountered during training. To tackle this problem, we propose position coupling, a simple yet…

Machine Learning · Computer Science 2024-10-31 Hanseul Cho , Jaeyoung Cha , Pranjal Awasthi , Srinadh Bhojanapalli , Anupam Gupta , Chulhee Yun

Modular exponentiation is crucial to number theory and cryptography, yet remains largely unexplored from a mechanistic interpretability standpoint. We train a 4-layer encoder-decoder Transformer model to perform this operation and…

Machine Learning · Computer Science 2025-10-24 David Demitri Africa , Sara M. Kapoor , Theo Simon Sorg , Challenger Mishra

The ability to perform arithmetic tasks is a remarkable trait of human intelligence and might form a critical component of more complex reasoning tasks. In this work, we investigate if the surface form of a number has any influence on how…

Computation and Language · Computer Science 2021-04-14 Rodrigo Nogueira , Zhiying Jiang , Jimmy Lin

Mathematical reasoning is one of the most impressive achievements of human intellect but remains a formidable challenge for artificial intelligence systems. In this work we explore whether modern deep learning architectures can learn to…

Machine Learning · Computer Science 2022-07-07 Samuel Cognolato , Alberto Testolin

Multi-digit addition is a clear probe of the computational power of large language models. To dissect the internal arithmetic processes in LLaMA-3-8B-Instruct, we combine linear probing with logit-lens inspection. Inspired by the…

Artificial Intelligence · Computer Science 2025-09-10 Yao Yan

In the evolving landscape of machine learning, a pivotal challenge lies in deciphering the internal representations harnessed by neural networks and Transformers. Building on recent progress toward comprehending how networks execute…

Machine Learning · Computer Science 2025-03-11 Chenyang Li , Yingyu Liang , Zhenmei Shi , Zhao Song , Tianyi Zhou

Transformers, central to the successes in modern Natural Language Processing, often falter on arithmetic tasks despite their vast capabilities --which paradoxically include remarkable coding abilities. We observe that a crucial challenge is…

Computation and Language · Computer Science 2023-11-28 Ruoqi Shen , Sébastien Bubeck , Ronen Eldan , Yin Tat Lee , Yuanzhi Li , Yi Zhang

We show that a constant number of self-attention layers can efficiently simulate, and be simulated by, a constant number of communication rounds of Massively Parallel Computation. As a consequence, we show that logarithmic depth is…

Machine Learning · Computer Science 2024-02-15 Clayton Sanford , Daniel Hsu , Matus Telgarsky

Transformers have demonstrated exceptional in-context learning capabilities, yet the theoretical understanding of the underlying mechanisms remains limited. A recent work (Elhage et al., 2021) identified a ``rich'' in-context mechanism…

Machine Learning · Computer Science 2025-01-30 Mingze Wang , Ruoxi Yu , Weinan E , Lei Wu

Despite the remarkable success of transformer-based models in various real-world tasks, their underlying mechanisms remain poorly understood. Recent studies have suggested that transformers can implement gradient descent as an in-context…

Machine Learning · Computer Science 2024-08-09 Xingwu Chen , Lei Zhao , Difan Zou

State of the art sequence-to-sequence models for large scale tasks perform a fixed number of computations for each input sequence regardless of whether it is easy or hard to process. In this paper, we train Transformer models which can make…

Computation and Language · Computer Science 2020-02-18 Maha Elbayad , Jiatao Gu , Edouard Grave , Michael Auli

Understanding the transformer architecture and its workings is essential for machine learning (ML) engineers. However, truly understanding the transformer architecture can be demanding, even if you have a solid background in machine…

Machine Learning · Computer Science 2025-02-28 Joni-Kristian Kämäräinen

Sequence modelling requires determining which past tokens are causally relevant from the context and their importance: a process inherent to the attention layers in transformers, yet whose underlying learned mechanisms remain poorly…

Machine Learning · Computer Science 2026-04-14 Francesco D'Angelo , Nicolas Flammarion

Modern large language models (LLMs) excel at tasks that require storing and retrieving knowledge, such as factual recall and question answering. Transformers are central to this capability because they can encode information during training…

Machine Learning · Statistics 2026-03-18 Nuri Mert Vural , Alberto Bietti , Mahdi Soltanolkotabi , Denny Wu

Fine-tuning pre-trained transformers is a powerful technique for enhancing the performance of base models on specific tasks. From early applications in models like BERT to fine-tuning Large Language Models (LLMs), this approach has been…

Computation and Language · Computer Science 2025-02-25 Suneel Nadipalli
‹ Prev 1 2 3 10 Next ›