Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks.
The 3 matches
- [1] § STAR★Methods › Method details › fMRI data preprocessing ↔ Near_PreprocVertex_Smooth_11yo.ipynb, lines 21 to 76 · score 0.66 · Gaussian filter, geodesic distance, smoothing, Confounding, surface, preprocessing · Report a mismatch
- [2] § STAR★Methods › Method details › fMRI data preprocessing ↔ Near_PreprocVertex_Smooth_14yo.ipynb, lines 21 to 76 · score 0.66 · Gaussian filter, geodesic distance, smoothing, Confounding, surface, preprocessing · Report a mismatch
- [3] § STAR★Methods › Method details › fMRI data preprocessing ↔ Near_PreprocVertex_Smooth_Adult.ipynb, lines 105 to 117 · score 0.51 · global signals, CSF, fMRIPrep, preprocessing, masks, adults · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 198 lines · 7.1 KB · CC-BY-4.0 · 1 match
- # %%
- import os
- import glob
- import matplotlib.pyplot as plt
- from nilearn import image as nimg
- from nilearn import plotting as nplot
- from bids.layout import BIDSLayout
- import numpy as np
- import nibabel as nib
- from nibabel import load
- import pandas as pd
- from nilearn.image import resample_to_img
- import pickle
- import scipy
- from numpy import linalg as LA
- from nilearn import datasets
- from nilearn import surface
- import copy
- import gdist
- # %%
- def normalize_voxelwise(func_data):
- #[voxel x time] data
- func_data_tmp = func_data.T
- mean = np.nanmean(func_data_tmp, axis=0)
- sd = np.nanstd(func_data_tmp, axis=0)
- func_data_norm = (func_data_tmp - mean ) /sd
- func_data_norm = np.nan_to_num(func_data_norm.T)
- return func_data_norm
- def gauss(x, a=1, mu=0, sigma=1):
- return a * np.exp(-(x - mu)**2 / (2*sigma**2))
- def smooth(func_data, adj_data, fwhm):
- func_data_smooth = copy.copy(func_data)
- for vv in range(len(adj_data)):
- dists_ind = np.where(adj_data[vv, :] != 0)[0]
- dists = adj_data[vv, adj_data[vv, :] != 0]
- conv_weights = gauss(dists, sigma = fwhm/2.355)
- func_data_smooth[vv] = np.sum(func_data[dists_ind,:].T * conv_weights.T, axis=1).T
- return func_data_smooth
- def func_preproc(func_file, mask_file, confound_file, confound_list, low_pass, high_pass, t_r, n_dummy, fwhm,
- surf_mesh_lh, surf_mesh_rh, inner_mesh_lh, inner_mesh_rh, adj_data_lh, adj_data_rh):
- #Specification of confound exclusion
- confound_df = pd.read_csv(confound_file, delimiter='\t')
- confound_df = confound_df[confound_list]
- #Discard dummy TRs
- raw_func_img = nimg.load_img(func_file)
- func_img = raw_func_img.slicer[:,:,:,n_dummy:]
- drop_confound_df = confound_df.loc[n_dummy:]
- drop_confound_df = drop_confound_df.fillna(0)
- confounds_matrix = drop_confound_df.values
- #Regress out confounds
- clean_img = nimg.clean_img(func_img, confounds=confounds_matrix, detrend=True, standardize=True,
- low_pass=low_pass, high_pass=high_pass, t_r=t_r, mask_img=mask_file)
- #Transform from volume to surface vertex
- func_data_lh = surface.vol_to_surf(clean_img, surf_mesh=surf_mesh_lh, inner_mesh = inner_mesh_lh, interpolation='nearest')
- func_data_rh = surface.vol_to_surf(clean_img, surf_mesh=surf_mesh_rh, inner_mesh = inner_mesh_rh, interpolation='nearest')
- #Smoothing using gaussian filter and geodesic distance
- func_data_smooth_lh = smooth(func_data_lh, adj_data_lh, fwhm)
- func_data_smooth_rh = smooth(func_data_rh, adj_data_rh, fwhm)
- func_data = normalize_voxelwise(np.concatenate([func_data_smooth_lh, func_data_smooth_rh], axis=0))
- return func_data
- # %%
- #Set some constants
- high_pass = 0.01 # 100 s cycle
- low_pass = 0.15 # 6.6s cycle
- fwhm = 8 #smoothing kernel
- t_r = 2 #TR
- n_dummy = 0 #Number of dummy scans to be discarded
- task_name = "Arithmetic"
- fsaverage = datasets.fetch_surf_fsaverage(mesh="fsaverage5")
- surf_mesh_lh = fsaverage["pial_left"]
- inner_mesh_lh = fsaverage["white_left"]
- surf_mesh_rh = fsaverage["pial_right"]
- inner_mesh_rh = fsaverage["white_right"]
- infl_lh = fsaverage["infl_left"]
- infl_rh = fsaverage["infl_right"]
- radius = 2 * fwhm #considering FWHM = 8 gaussian filter, but search within 2*fwhm
- coords_lh, faces_lh = surface.load_surf_mesh(infl_lh)
- adjacency_lh = gdist.local_gdist_matrix(coords_lh.astype('float64'), faces_lh, max_distance=radius)
- adj_data_lh = adjacency_lh.toarray()
- coords_rh, faces_rh = surface.load_surf_mesh(infl_rh)
- adjacency_rh = gdist.local_gdist_matrix(coords_rh.astype('float64'), faces_rh, max_distance=radius)
- adj_data_rh = adjacency_rh.toarray()
- # %%
- curr_dir = os.getcwd()
- save_dir = curr_dir + '/Preproc/'
- fmriprep_dir = curr_dir + '/Preproc'
- layout = BIDSLayout(fmriprep_dir, validate=False, config=['bids','derivatives'])
- #Confound parameter
- confound_vars = ['trans_x','trans_y','trans_z',
- 'rot_x','rot_y','rot_z',
- 'global_signal', 'csf', 'white_matter']
- derivative_columns = ['{}_derivative1'.format(c) for c in confound_vars] # Get derivative column names
- confound_list = confound_vars + derivative_columns
- mask_medial_wall = np.load(curr_dir + '/VertexMask_MedialWall.npy')
- # %%
- sub_list = [83, 84, 86] + list(range(88, 97)) + list(range(98, 111)) + [125, 127, 130, 137, 138, 139]
- exclude_subs = [[137, 3], [138, 4], []] #Runs with large head motion
- # %%
- # %%
- for sub_id in sub_list:
- print('Processing sub-{:03d} ...'.format(sub_id))
- #Get file information of target subject & task
- func_files = layout.get(subject='{:03d}'.format(sub_id),
- datatype='func', task=task_name,
- desc='preproc', #Without ICA-Aroma
- space='MNI152NLin6Asym',
- extension='nii.gz',
- return_type='file')
- mask_files = layout.get(subject='{:03d}'.format(sub_id),
- datatype='func', task=task_name,
- desc='brain',
- suffix='mask',
- space='MNI152NLin6Asym',
- extension="nii.gz",
- return_type='file')
- confound_files = layout.get(subject='{:03d}'.format(sub_id),
- datatype='func', task=task_name,
- desc='confounds',
- extension="tsv",
- return_type='file')
- #List of runs to be removed
- exclude_runs = []
- for ee in exclude_subs:
- if sub_id in ee:
- exclude_runs.append(ee[1])
- #Load brain response data
- preproc_data = []
- run_durs = []
- for run_num in range(0,5):
- print(' Processing data for run {:d} ...'.format(run_num))
- #Load target run data
- if run_num >= len(func_files):
- print(' Some runs are missing for this subject !!')
- elif run_num+1 in exclude_runs:
- print(' This run is removed because of head motion !!')
- else:
- func_file = func_files[run_num] #Without ICA-Aroma
- mask_file = mask_files[run_num]
- confound_file = confound_files[run_num]
- #Preprocessing (confound regression, dummy scan cutting)
- func_data = func_preproc(func_file, mask_file, confound_file, confound_list, low_pass, high_pass, t_r, n_dummy, fwhm,
- surf_mesh_lh, surf_mesh_rh, inner_mesh_lh, inner_mesh_rh, adj_data_lh, adj_data_rh)
- #Exclude medial wall
- func_data = func_data[mask_medial_wall==0,:]
- #Concatenate data
- if run_num == 0:
- preproc_data = func_data
- else:
- preproc_data = np.concatenate((preproc_data, func_data), axis=1)
- run_durs.append(np.shape(func_data)[1])
- preproc_data = preproc_data.T
- #Save data
- fname = save_dir + 'sub-{:03d}_VertexData_Smooth'.format(sub_id)
- np.save(fname, preproc_data)
- fname2 = save_dir + 'sub-{:03d}_RunDurs'.format(sub_id)
- np.save(fname2, run_durs)
- # %%
- # %%
Near_PreprocVertex_Smooth_11yo.ipynb, under CC-BY-4.0 · at the source
Overview
- Graduate School of Information Science and Technology, the University of Tokyo, Tokyo, Japan
- Lyon Neuroscience Research Center (CRNL), INSERM U1028 - CNRS UMR5292, University of Lyon, Bron, France
Abstract
The ability to learn simple arithmetic is often attributed to the associative nature of human memory, where repeated exposure strengthens the relations between operands and outcomes. Because artificial neural networks (ANNs) also learn input-output associations, we tested whether ANN-derived features would increasingly capture arithmetic-related brain activity with development. We analyzed fMRI responses to addition problems in 104 participants across four age groups (8-, 11-, 14-year-olds, and adults). An ANN-based encoding model better predicted activity in older than younger participants in the left precentral sulcus. In adults, prediction accuracy was higher for smaller than larger problems. ANN prediction patterns were consistent with increasingly discrete representations of individual addition problems with age. These findings suggest that some neural representations of arithmetic problems become discretely organized with development. However, ANN-derived features captured this change only in the left precentral sulcus, suggesting that associative mechanisms may account for only part of arithmetic processing.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.
Zenodo 15395718
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
21 files
- Near_ClusterStat_Reg_11y
o.ipynb , Jupyter, 800 lines - Near_ClusterStat_Reg_14y
o.ipynb , Jupyter, 670 lines - Near_ClusterStat_Reg_8yo
.ipynb , Jupyter, 395 lines - Near_ClusterStat_Reg_Adu
lt.ipynb , Jupyter, 389 lines - Near_ClusterStat_Reg_Age
Effect_Kruskal.ipynb , Jupyter, 602 lines - Near_ClusterStat_Reg_Age
Effect_Kruskal_Conjuncti , Jupyter, 315 lineson.ipynb - Near_ExtractROIValue_Ana
tomical.ipynb , Jupyter, 709 lines - Near_FBS.ipynb, Jupyter, 610 lines
- Near_MakeFeatures_MathBe
rt.ipynb , Jupyter, 77 lines - Near_NoiseCeiling.ipynb, Jupyter, 1,081 lines
- Near_PreprocVertex_Smoot
h_11yo.ipynb , Jupyter, 198 lines, 1 match - Near_PreprocVertex_Smoot
h_14yo.ipynb , Jupyter, 194 lines, 1 match - Near_PreprocVertex_Smoot
h_8yo.ipynb , Jupyter, 202 lines - Near_PreprocVertex_Smoot
h_Adult.ipynb , Jupyter, 182 lines, 1 match - Near_Ridge_ConcatDesign_
Reg_11yo.ipynb , Jupyter, 960 lines - Near_Ridge_ConcatDesign_
Reg_14yo.ipynb , Jupyter, 971 lines - Near_Ridge_ConcatDesign_
Reg_8yo.ipynb , Jupyter, 961 lines - Near_Ridge_ConcatDesign_
Reg_Adult.ipynb , Jupyter, 960 lines - Near_Utils.py, Python, 258 lines
- Near_VisualizePCA_AnatRO
I.ipynb , Jupyter, 425 lines - Near_VisualizePCA_FBSbas
e.ipynb , Jupyter, 404 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 21 scripts, each with its path and the digest of its content;
- 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Data links
- zenodo:15395718, Zenodo; found in “Data and code availability”; this record also holds the authors' code (see Code)
Data and code availability
The analysis code is available from Zenodo (https://
The dataset that supports the findings of the current study will be available from the corresponding author upon reasonable request.
Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 3, 28 September 2026
- Authors: added Tomoya Nakai (0000-0001-5225-0894); removed Tomoya Nakai
- Funding: added Agence Nationale de la Recherche: ANR-23-CE28-0002; Fondation de France: 00123415/WB-2021-38649; Fédération pour la Recherche sur le Cerveau: AP-FRC-2022; Japan Society for the Promotion of Science: 26H00539, JP24H02172; Japan Science and Technology Agency
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 4 keywords, 84 references, 4 RRIDs.
Cite
This paper
Nakai, T., & Prado, J. (2026). Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks. iScience, 29(9), 117180. https://
BibTeX
@article{nakai2026develo
author = {Nakai, Tomoya and Prado, Jérôme},
title = {{Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks}},
journal = {iScience},
year = {2026},
month = aug,
volume = {29},
number = {9},
pages = {117180},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/
url = {https://
pmid = {42633320},
pmcid = {PMC13499200}
}
RIS
TY - JOUR
AU - Nakai, Tomoya
AU - Prado, Jérôme
TI - Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/
VL - 29
IS - 9
SP - 117180
SN - 2589-0042
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks",
"container-title": "iScience",
"author": [
{
"family": "Nakai",
"given": "Tomoya"
},
{
"family": "Prado",
"given": "Jérôme"
}
],
"container-title-short":
"volume": "29",
"issue": "9",
"page": "117180",
"DOI": "10.1016/
"PMID": "42633320",
"PMCID": "PMC13499200",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
13
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1126/sciadv.aej5555 [code]
- Cross-domain encoding models reveal shared and domain-specific neural representations across language and mathematics.Journal: Science advancesIn common: Hugging Face Transformers, Nilearn, statsmodels, 8 other tools, 17 references, author Tomoya Nakai
- [2] doi:10.1016/j.dcn.2023.101310 [code]
- Neural evidence for procedural automatization during cognitive development: Intraparietal response to changes in very-small addition problem-size increases with age.Journal: Developmental cognitive neuroscienceIn common: fMRI, 16 references
- [3] doi:10.1038/s42003-025-08134-4 [code]
- Cortical representational geometry of diverse tasks reveals subject-specific and subject-invariant cognitive structures.Journal: Communications biologyIn common: PyBIDS, Nilearn, statsmodels, 7 other tools, 12 references, author Tomoya Nakai
- [4] doi:10.1038/s41467-024-50310-3 [code]
- Modeling short visual events through the BOLD moments video fMRI dataset and metadata.Journal: Nature communicationsIn common: Nilearn, statsmodels, NiBabel, 6 other tools, fMRI, 11 references
- [5] doi:10.7554/elife.82566 [code]
- Statistical inference on representational geometries.Journal: eLifeIn common: Nilearn, h5py, NiBabel, 7 other tools, 11 references
- [6] doi:10.1038/s41467-024-49173-5 [code]
- Shared functional specialization in transformer-based language models and the human brain.Journal: Nature communicationsIn common: Hugging Face Transformers, Nilearn, statsmodels, 8 other tools, 8 references
- [7] doi:10.1073/pnas.2421528122 [code]
- Familial transmission of neural representations for mental arithmetic across two generations.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: Nilearn, NiBabel, pandas, 2 other tools, fMRI, 10 references
- [8] doi:10.1038/s41597-023-02471-x [code]
- A large-scale fMRI dataset for the visual processing of naturalistic scenes.Journal: Scientific dataIn common: PyBIDS, Nilearn, NiBabel, 6 other tools, fMRI, 9 references
- [9] doi:10.1126/sciadv.adw1464 [code]
- Mind captioning: Evolving descriptive text of mental content from human brain activity.Journal: Science advancesIn common: Hugging Face Transformers, h5py, NiBabel, 7 other tools, 7 references
- [10] doi:10.1371/journal.pbio.3002366 [code]
- Many but not all deep neural network audio models capture brain responses and exhibit correspondence between model stages and brain regions.Journal: PLoS biologyIn common: Hugging Face Transformers, h5py, statsmodels, 7 other tools, 7 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 21 scripts, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:afb642f4ae4f69af…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1016/j.isci.2026.117180)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.isci.2026.117180.svg
:target: https://openscicode.org/badge/doi/10.1016/j.isci.2026.117180
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.isci.2026.117180"><img src="https://openscicode.org/badge/doi/10.1016/j.isci.2026.117180.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
