{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2605-01148","title":"Arithmetic in the Wild: Llama uses Base-10 Addition to Reason About Cyclic Concepts","arxiv_id":"2605.01148","date":"2026-05-01","proceeding":null,"authors":["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"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2605.01148","url_pdf":"https://arxiv.org/pdf/2605.01148","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2605.01148","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.01148"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/goodfire-ai/arithmetic-wild","reach":null}],"summary":{"ran":13},"by_repo_kind":{"found_in_text":{"samples":13,"ran":13,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":13,"samples":[{"code_sha256_prefix":"7e320c66925fb217","entry":"build_prompts","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/cache_neuron_activations.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/cache_neuron_activations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7e320c66925fb217"}},{"code_sha256_prefix":"b562bac0a8389106","entry":"compute_result_sum","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/tasks/addition/causal_models.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/tasks/addition/causal_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b562bac0a8389106"}},{"code_sha256_prefix":"90bcdad6464647b9","entry":"filter_correct_samples","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/fourier_probes/pca_fourier_probes_sweep.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/fourier_probes/pca_fourier_probes_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"90bcdad6464647b9"}},{"code_sha256_prefix":"250925766b357c22","entry":"find_variable_token_position","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/fourier_probes/pca_fourier_probes_sweep.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/fourier_probes/pca_fourier_probes_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"250925766b357c22"}},{"code_sha256_prefix":"d0869cb2a6ea673c","entry":"generate_samples","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/fourier_probes/pca_fourier_probes_sweep.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/fourier_probes/pca_fourier_probes_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d0869cb2a6ea673c"}},{"code_sha256_prefix":"51241d8dde00208b","entry":"inp_to_idx","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/fourier_probes/fourier_probes_sweep.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/fourier_probes/fourier_probes_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"51241d8dde00208b"}},{"code_sha256_prefix":"90f0695ee8e23142","entry":"inp_to_idx","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/tasks/addition/causal_models.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/tasks/addition/causal_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"90f0695ee8e23142"}},{"code_sha256_prefix":"b086cc55c7031e8d","entry":"make_prompt","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/fourier_probes/fourier_probes_sweep.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/fourier_probes/fourier_probes_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b086cc55c7031e8d"}},{"code_sha256_prefix":"a66b49b30c54c8d3","entry":"metric","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/utils.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a66b49b30c54c8d3"}},{"code_sha256_prefix":"b413766776239549","entry":"num_to_idx","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/fourier_probes/fourier_probes_sweep.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/fourier_probes/fourier_probes_sweep.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b413766776239549"}},{"code_sha256_prefix":"c17516fe0f6769ed","entry":"num_to_idx","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/tasks/addition/causal_models.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/tasks/addition/causal_models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c17516fe0f6769ed"}},{"code_sha256_prefix":"c28b93bd82b38211","entry":"random_subspace_in_pca","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/train_das.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/train_das.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c28b93bd82b38211"}},{"code_sha256_prefix":"ab32bb9c64609ad8","entry":"shard_name","repo":"goodfire-ai/arithmetic-wild","repo_kind":"found_in_text","path":"src/cross_task_patch.py","file_url":"https://github.com/goodfire-ai/arithmetic-wild/blob/HEAD/src/cross_task_patch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ab32bb9c64609ad8"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}