SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.01148 · 2026

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

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

arXiv · PDF · Open in the Atlas

Code that ran

13 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 6 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.01148.json · badge: /api/ran/2605.01148.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
goodfire-ai/arithmetic-wild canonical (classifier label)
classifier basis: census
13 ran · 0 no recorded run
FunctionStatusWhere it lives
build_prompts Ran
ran; our contract draft was wrong, not the code
goodfire-ai/arithmetic-wild/src/cache_neuron_activations.py
pointer only (licence: NONE) · get_code("7e320c66925fb217")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_result_sum Ran
ran; our contract draft was wrong, not the code
goodfire-ai/arithmetic-wild/src/tasks/addition/causal_models.py
pointer only (licence: NONE) · get_code("b562bac0a8389106")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

filter_correct_samples Ran
ran, honoured the contract we drafted
goodfire-ai/arithmetic-wild/src/fourier_probes/pca_fourier_probes_sweep.py
pointer only (licence: NONE) · get_code("90bcdad6464647b9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_variable_token_position Ran
ran, honoured the contract we drafted
goodfire-ai/arithmetic-wild/src/fourier_probes/pca_fourier_probes_sweep.py
pointer only (licence: NONE) · get_code("250925766b357c22")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_samples Ran
ran; our contract draft was wrong, not the code
goodfire-ai/arithmetic-wild/src/fourier_probes/pca_fourier_probes_sweep.py
pointer only (licence: NONE) · get_code("d0869cb2a6ea673c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

inp_to_idx Ran
ran, honoured the contract we drafted
goodfire-ai/arithmetic-wild/src/fourier_probes/fourier_probes_sweep.py
pointer only (licence: NONE) · get_code("51241d8dde00208b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

inp_to_idx Ran
ran, honoured the contract we drafted
goodfire-ai/arithmetic-wild/src/tasks/addition/causal_models.py
pointer only (licence: NONE) · get_code("90f0695ee8e23142")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_prompt Ran
ran; our contract draft was wrong, not the code
goodfire-ai/arithmetic-wild/src/fourier_probes/fourier_probes_sweep.py
pointer only (licence: NONE) · get_code("b086cc55c7031e8d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

metric Ran
ran, violated the contract we drafted
goodfire-ai/arithmetic-wild/src/utils.py
pointer only (licence: NONE) · get_code("a66b49b30c54c8d3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

num_to_idx Ran
ran, honoured the contract we drafted
goodfire-ai/arithmetic-wild/src/fourier_probes/fourier_probes_sweep.py
pointer only (licence: NONE) · get_code("b413766776239549")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

num_to_idx Ran
ran, honoured the contract we drafted
goodfire-ai/arithmetic-wild/src/tasks/addition/causal_models.py
pointer only (licence: NONE) · get_code("c17516fe0f6769ed")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

random_subspace_in_pca Ran
ran; our contract draft was wrong, not the code
goodfire-ai/arithmetic-wild/src/train_das.py
pointer only (licence: NONE) · get_code("c28b93bd82b38211")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

shard_name Ran
ran; our contract draft was wrong, not the code
goodfire-ai/arithmetic-wild/src/cross_task_patch.py
pointer only (licence: NONE) · get_code("ab32bb9c64609ad8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, goodfire-ai/arithmetic-wild when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

https://github.com/goodfire-ai/arithmetic-wild 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.01148")
get_code_for_paper("2605.01148")
have("2605.01148")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.01148.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.01148.svg)](https://syntology.ai/paper/2605.01148)

Connect an agent — have() is free.