Pith. sign in

REVIEW 1 cited by

Carrying over algorithm in transformers

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2401.07993 v2 pith:LJHX7ZQ4 submitted 2024-01-15 cs.LG cs.AI

classification cs.LGcs.AI
keywords algorithmcarryingmodelsfirstsametasksaddingdigits
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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 necessary. We study how transformer models implement this algorithm and how the two aforementioned tasks are allocated to different parts of the network. We first focus on two-layer encoder-only models and show that the carrying over algorithm is implemented in a modular fashion. The first layer is mostly responsible for adding digits in the same position. The second layer first decides, in the attention, which positions need a carried one or not, and then performs the carrying of the one in the final MLP. We provide a simple way of precisely identifying which neurons are responsible for that task. This implementation of the carrying over algorithm occurs across a range of hyperparameters for two as well as three-layer models. For small decoder-only models, we observe the same implementation and provide suggestive evidence for its existence in three 7B large language models.

Discussion (0). Sign in to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMs

    cs.AI 2025-06 conditional novelty 5.0 of 10

    In LLaMA-3-8B-Instruct, addition information becomes linearly decodable in a fixed layer-wise order: formula structure, carries and sums, result digits, then output generation.

Pith tools