Papers › Arithmetic in the Wild: Llama uses Base-10 Addition to Reason About Cyclic Concepts

Arithmetic in the Wild: Llama uses Base-10 Addition to Reason About Cyclic Concepts

1 May 2026arXiv:2605.01148added by Syntology

Sheridan Feucht, Tal Haklay, Usha Bhalla, Daniel Wurgaft, Can Rager, Raphaël Sarfati, Jack Merullo, Thomas McGrath, Owen Lewis, Ekdeep Singh Lubana, Thomas Fel, Atticus Geiger

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Does structure in representations imply structure in computation? We study how Llama-3.1-8B reasons over cyclic concepts (e.g., "what month is six months after August?"). Even though Llama-3.1-8B's representations for these concepts are circularly structured, we find that instead of directly computing modular addition in the period of the cyclic concept (e.g., 12 for months), the model re-uses a generic addition mechanism across tasks that operates independently of concept-specific geometry. First, it computes the sum of its two inputs using base-10 addition (six + August=14). Then, it maps this sum back to cyclic concept space (14->February). We show that Llama-3.1-8B uses task-agnostic Fourier features to compute these sums--in fact, these features have periods that respect standard base-10 addition, e.g., 2, 5, and 10, rather than the cyclic concept period (e.g., 12 for months). Furthermore, we identify a sparse set of 28 MLP neurons re-used across all tasks (approximately 0.2% of the MLP at layer 18) that can be partitioned into disjoint clusters, each computing the sum for a Fourier feature with a different period. Our work highlights how an interplay between causal abstraction and feature geometry can deepen our mechanistic understanding of LMs.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.01148")

Code

Syntology Ran 13 of 13 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 13 ran with no contract checked.

By repository: found in paper text by Syntology: 13 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

goodfire-ai/arithmetic-wild found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 13 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13ran

Licence: 13 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from goodfire-ai/arithmetic-wild. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_prompts goodfire-ai/arithmetic-wild/src/cache_neuron_activations.py found in paper text by Syntology ran no licence file found · pointer only · 7e320c66925fb217 · report
compute_result_sum goodfire-ai/arithmetic-wild/src/tasks/addition/causal_models.py found in paper text by Syntology ran no licence file found · pointer only · b562bac0a8389106 · report
filter_correct_samples goodfire-ai/arithmetic-wild/src/fourier_probes/pca_fourier_probes_sweep.py found in paper text by Syntology ran no licence file found · pointer only · 90bcdad6464647b9 · report
find_variable_token_position goodfire-ai/arithmetic-wild/src/fourier_probes/pca_fourier_probes_sweep.py found in paper text by Syntology ran no licence file found · pointer only · 250925766b357c22 · report
generate_samples goodfire-ai/arithmetic-wild/src/fourier_probes/pca_fourier_probes_sweep.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · d0869cb2a6ea673c · report
inp_to_idx goodfire-ai/arithmetic-wild/src/fourier_probes/fourier_probes_sweep.py found in paper text by Syntology ran no licence file found · pointer only · 51241d8dde00208b · report
inp_to_idx goodfire-ai/arithmetic-wild/src/tasks/addition/causal_models.py found in paper text by Syntology ran no licence file found · pointer only · 90f0695ee8e23142 · report
make_prompt goodfire-ai/arithmetic-wild/src/fourier_probes/fourier_probes_sweep.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · b086cc55c7031e8d · report
metric goodfire-ai/arithmetic-wild/src/utils.py found in paper text by Syntology ran no licence file found · pointer only · a66b49b30c54c8d3 · report
num_to_idx goodfire-ai/arithmetic-wild/src/fourier_probes/fourier_probes_sweep.py found in paper text by Syntology ran no licence file found · pointer only · b413766776239549 · report
num_to_idx goodfire-ai/arithmetic-wild/src/tasks/addition/causal_models.py found in paper text by Syntology ran no licence file found · pointer only · c17516fe0f6769ed · report
random_subspace_in_pca goodfire-ai/arithmetic-wild/src/train_das.py found in paper text by Syntology ran fingerprinted no licence file found · pointer only · c28b93bd82b38211 · report
shard_name goodfire-ai/arithmetic-wild/src/cross_task_patch.py found in paper text by Syntology ran no licence file found · pointer only · ab32bb9c64609ad8 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.01148, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections