paper-with-me

홈 › Papers

Positional Description Matters for Transformers Arithmetic

2023-11-22 · Ruoqi Shen, Sébastien Bubeck, Ronen Eldan, Yin Tat Lee, Yuanzhi Li, Yi Zhang

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 their naive reliance on positional information to solve arithmetic problems with a small number of digits, leading to poor performance on larger numbers. Herein, we delve deeper into the role of positional encoding, and propose several ways to fix the issue, either by modifying the positional encoding directly, or by modifying the representation of the arithmetic task to leverage standard positional encoding differently. We investigate the value of these modifications for three tasks: (i) classical multiplication, (ii) length extrapolation in addition, and (iii) addition in natural language context. For (i) we train a small model on a small dataset (100M parameters and 300k samples) with remarkable aptitude in (direct, no scratchpad) 15 digits multiplication and essentially perfect up to 12 digits, while usual training in this context would give a model failing at 4 digits multiplication. In the experiments on addition, we use a mere 120k samples to demonstrate: for (ii) extrapolation from 10 digits to testing on 12 digits numbers while usual training would have no extrapolation, and for (iii) almost perfect accuracy up to 5 digits while usual training would be correct only up to 3 digits (which is essentially memorization with a training set of 120k samples).

📄 PDF Abstract BibTeX arXiv:2311.14737

Code (0)

등록된 구현이 없습니다.

Tasks

Memorization

Methods 이 논문이 사용한 방법론

SET Dynamic Sparse Training method where weight mask is updated randomly periodically

Similar Papers 제목 키워드 기반

Positional Attention: Expressivity and Learnability of Algorithmic Computation

2024-10-02 · Artur Back de Luca, George Giapitzakis, Shenghao Yang, Petar Veličković 외

There is a growing interest in the ability of neural networks to execute algorithmic tasks (e.g., arithmetic, summary statistics, and sorting). The goal of this work is to better understand the role of attention in Trans…

Out-of-Distribution Generalization

Individual Parameters in Weight-Sparse Transformers Appear Interpretable

2026-07-03 · Arnau Marin-Llobet, Stefan Heimersheim arxiv

A central goal of mechanistic interpretability is to understand how neural networks work and what each individual component does. Dominant circuit-finding approaches focus on a specific behavior and reverse-engineer the …

Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmetic

2026-01-30 · Xingyu Zhao, Darsh Sharma, Rheeya Uppaal, Yiqiao Zhong arxiv

Large language models (LLMs) often exhibit unexpected errors or unintended behavior, even at scale. While recent work reveals the discrepancy between LLMs and humans in skill compositions, the learning dynamics of skill …

Evaluating Compositionality in Neural Models Using Arithmetic Expressions

2022-01-16 · ACL ARR January 2022 1 · Anonymous

We introduce CobA, a dataset designed to evaluate the compositional properties of neural models. The dataset consists of simple arithmetic expressions combining natural integers with addition and multiplication operators…

Positional Information Matters for Invariant In-Context Learning: A Case Study of Simple Function Classes

2023-11-30 · Yongqiang Chen, Binghui Xie, Kaiwen Zhou, Bo Han 외

In-context learning (ICL) refers to the ability of a model to condition on a few in-context demonstrations (input-output examples of the underlying task) to generate the answer for a new query input, without updating par…

In-Context Learning