Papers › An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought...

An Investigation of Neuron Activation as a Unified Lens to Explain Chain-of-Thought Eliciting Arithmetic Reasoning of LLMs

18 Jun 2024arXiv:2406.12288archive 2025-07-28

Daking Rai, Ziyu Yao

Large language models (LLMs) have shown strong arithmetic reasoning capabilities when prompted with Chain-of-Thought (CoT) prompts. However, we have only a limited understanding of how they are processed by LLMs. To demystify it, prior work has primarily focused on ablating different components in the CoT prompt and empirically observing their resulting LLM performance change. Yet, the reason why these components are important to LLM reasoning is not explored. To fill this gap, in this work, we investigate ``neuron activation'' as a lens to provide a unified explanation to observations made by prior work. Specifically, we look into neurons within the feed-forward layers of LLMs that may have activated their arithmetic reasoning capabilities, using Llama2 as an example. To facilitate this investigation, we also propose an approach based on GPT-4 to automatically identify neurons that imply arithmetic reasoning. Our analyses revealed that the activation of reasoning neurons in the feed-forward layers of an LLM can explain the importance of various components in a CoT prompt, and future research can extend it for a more complete understanding.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2406.12288")

Code

Syntology Ran 34 of 36 code samples harvested from 2 repositories linked to this paper; 2 have no recorded run. Of those that ran: 3 ran · violated contract; 2 ran · fixture could not drive it; 29 ran with no contract checked.

By repository: official repository: 11 samples from 1 repository, 11 ran; community (archive-listed): 25 samples from 1 repository, 23 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

dakingrai/neuron-analysis-cot-arithmetic-reasoning officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. 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

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

3ran · violated contract
2ran · fixture could not drive it
29ran
2unverified

Licence: 11 of the 36 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

apply_rotary_emb dakingrai/neuron-analysis-cot-arithmetic-reasoning/llama/model.py official repository ran · fixture could not drive it no licence file found · pointer only · d7b6dcfe63bfe59b · report
extract_answers dakingrai/neuron-analysis-cot-arithmetic-reasoning/gsm8k_inference.py official repository ran no licence file found · pointer only · 86934d817edfb0b2 · report
filter_neurons dakingrai/neuron-analysis-cot-arithmetic-reasoning/experiments/neuron_discovery/prompt_gpt.py official repository ran no licence file found · pointer only · f538f708c101a742 · report
get_concept_token dakingrai/neuron-analysis-cot-arithmetic-reasoning/experiments/neuron_discovery/prompt_gpt.py official repository ran no licence file found · pointer only · 5dfbf88ad85ff847 · report
get_intervene_dict dakingrai/neuron-analysis-cot-arithmetic-reasoning/experiments/ablation_study/corrupt_inference.py official repository ran no licence file found · pointer only · f585b2c1cb9db5ed · report
get_random_neurons dakingrai/neuron-analysis-cot-arithmetic-reasoning/experiments/ablation_study/corrupt_inference.py official repository ran no licence file found · pointer only · 79c240794dbedd88 · report
load_data dakingrai/neuron-analysis-cot-arithmetic-reasoning/experiments/neuron_discovery/prompt_gpt.py official repository ran no licence file found · pointer only · c09cd334d12700d3 · report
precompute_freqs_cis dakingrai/neuron-analysis-cot-arithmetic-reasoning/llama/model.py official repository ran · violated contract no licence file found · pointer only · 04a1fa63d6d4b8e4 · report
read_data dakingrai/neuron-analysis-cot-arithmetic-reasoning/gsm8k_inference.py official repository ran no licence file found · pointer only · 396741975c6b6994 · report
reshape_for_broadcast dakingrai/neuron-analysis-cot-arithmetic-reasoning/llama/model.py official repository ran · fixture could not drive it no licence file found · pointer only · 5a639d78ada17fee · report
sample_top_p dakingrai/neuron-analysis-cot-arithmetic-reasoning/llama/generation.py official repository ran no licence file found · pointer only · e28848558038eee4 · report
condition_has_like dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/evaluation.py community (archive-listed) ran · violated contract MIT (permissive) · 8231e3fdffa9c8ee · report
condition_has_or dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/evaluation.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · f2d76234528d3b57 · report
convert_fk_index dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/get_tables.py community (archive-listed) ran MIT (permissive) · 64dd3849a251a1bf · report
dump_db_json_schema dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/get_tables.py community (archive-listed) ran fingerprinted MIT (permissive) · 992c7947d4eb2bb1 · report
get_schema dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/process_sql.py community (archive-listed) ran fingerprinted MIT (permissive) · 0992d2a47ae733fa · report
get_schema_from_json dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/process_sql.py community (archive-listed) ran MIT (permissive) · c4dcaf29b663a364 · report
insert_from_natsql dakingrai/ood-generalization-semantic-boundary-techniques/utils.py community (archive-listed) ran fingerprinted MIT (permissive) · 1e399f0027148c73 · report
insert_from_natsql dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/inference.py community (archive-listed) ran MIT (permissive) · 06ac1db87dec5a08 · report
insert_from_natsql_all dakingrai/ood-generalization-semantic-boundary-techniques/utils.py community (archive-listed) ran MIT (permissive) · d12e4d909a954372 · report
insert_from_natsql_single dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/inference.py community (archive-listed) ran fingerprinted MIT (permissive) · 817623d12e3dc619 · report
is_commonword dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/bridge_content_encoder.py community (archive-listed) ran MIT (permissive) · b724cc2d4066a429 · report
is_number dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/bridge_content_encoder.py community (archive-listed) ran MIT (permissive) · f39fdc1ce6cffe08 · report
is_stopword dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/bridge_content_encoder.py community (archive-listed) ran MIT (permissive) · d56a1f9221823a48 · report
join_tokens dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/parse.py community (archive-listed) ran MIT (permissive) · 2178b95c919ae420 · report
load_data dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/inference.py community (archive-listed) ran MIT (permissive) · e2470d9fb45b08bf · report
normalize dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/dataset.py community (archive-listed) ran fingerprinted MIT (permissive) · 448eab4c7249a72c · report
permute_tuple dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/exec_eval.py community (archive-listed) ran MIT (permissive) · f23d6ff3772963bc · report
postprocess dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/parse.py community (archive-listed) ran fingerprinted MIT (permissive) · 58e472cff9780d63 · report
quick_rej dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/exec_eval.py community (archive-listed) ran MIT (permissive) · a40510ba6a37f798 · report
read_data dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/evaluation.py community (archive-listed) ran MIT (permissive) · 63fda278334d1f2e · report
read_json dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/token_preprocessing.py community (archive-listed) ran MIT (permissive) · fde2a650a2455e30 · report
remove_from_clause dakingrai/ood-generalization-semantic-boundary-techniques/utils.py community (archive-listed) ran fingerprinted MIT (permissive) · 4bb08893ae4be14f · report
unorder_row dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/exec_eval.py community (archive-listed) ran MIT (permissive) · afc8ef89576ef2aa · report
prepare_splits dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/dataset.py community (archive-listed) unverified MIT (permissive) · d3c1fa9d710cc4ff · report
tokenize dakingrai/ood-generalization-semantic-boundary-techniques/evaluations/src/process_sql.py community (archive-listed) unverified MIT (permissive) · a906f5de1f5971b0 · report

Tasks

Arithmetic Reasoning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGPT-4Label SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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