OSCR

Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [1] § STAR★Methods › Method details › fMRI data preprocessing ↔ Near_PreprocVertex_Smooth_11yo.ipynb, lines 21–76 · score 0.66 · Gaussian filter, geodesic distance, smoothing, Confounding, surface, preprocessing
  2. [2] § STAR★Methods › Method details › fMRI data preprocessing ↔ Near_PreprocVertex_Smooth_14yo.ipynb, lines 21–76 · score 0.66 · Gaussian filter, geodesic distance, smoothing, Confounding, surface, preprocessing
  3. [3] § STAR★Methods › Method details › fMRI data preprocessing ↔ Near_PreprocVertex_Smooth_Adult.ipynb, lines 105–117 · score 0.51 · global signals, CSF, fMRIPrep, preprocessing, masks, adults

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: 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

  1. # %%
  2. import os
  3. import glob
  4. import matplotlib.pyplot as plt
  5. from nilearn import image as nimg
  6. from nilearn import plotting as nplot
  7. from bids.layout import BIDSLayout
  8. import numpy as np
  9. import nibabel as nib
  10. from nibabel import load
  11. import pandas as pd
  12. from nilearn.image import resample_to_img
  13. import pickle
  14. import scipy
  15. from numpy import linalg as LA
  16. from nilearn import datasets
  17. from nilearn import surface
  18. import copy
  19. import gdist
  20. # %%
  21. def normalize_voxelwise(func_data):
  22. #[voxel x time] data
  23. func_data_tmp = func_data.T
  24. mean = np.nanmean(func_data_tmp, axis=0)
  25. sd = np.nanstd(func_data_tmp, axis=0)
  26. func_data_norm = (func_data_tmp - mean ) /sd
  27. func_data_norm = np.nan_to_num(func_data_norm.T)
  28. return func_data_norm
  29. def gauss(x, a=1, mu=0, sigma=1):
  30. return a * np.exp(-(x - mu)**2 / (2*sigma**2))
  31. def smooth(func_data, adj_data, fwhm):
  32. func_data_smooth = copy.copy(func_data)
  33. for vv in range(len(adj_data)):
  34. dists_ind = np.where(adj_data[vv, :] != 0)[0]
  35. dists = adj_data[vv, adj_data[vv, :] != 0]
  36. conv_weights = gauss(dists, sigma = fwhm/2.355)
  37. func_data_smooth[vv] = np.sum(func_data[dists_ind,:].T * conv_weights.T, axis=1).T
  38. return func_data_smooth
  39. def func_preproc(func_file, mask_file, confound_file, confound_list, low_pass, high_pass, t_r, n_dummy, fwhm,
  40. surf_mesh_lh, surf_mesh_rh, inner_mesh_lh, inner_mesh_rh, adj_data_lh, adj_data_rh):
  41. #Specification of confound exclusion
  42. confound_df = pd.read_csv(confound_file, delimiter='\t')
  43. confound_df = confound_df[confound_list]
  44. #Discard dummy TRs
  45. raw_func_img = nimg.load_img(func_file)
  46. func_img = raw_func_img.slicer[:,:,:,n_dummy:]
  47. drop_confound_df = confound_df.loc[n_dummy:]
  48. drop_confound_df = drop_confound_df.fillna(0)
  49. confounds_matrix = drop_confound_df.values
  50. #Regress out confounds
  51. clean_img = nimg.clean_img(func_img, confounds=confounds_matrix, detrend=True, standardize=True,
  52. low_pass=low_pass, high_pass=high_pass, t_r=t_r, mask_img=mask_file)
  53. #Transform from volume to surface vertex
  54. func_data_lh = surface.vol_to_surf(clean_img, surf_mesh=surf_mesh_lh, inner_mesh = inner_mesh_lh, interpolation='nearest')
  55. func_data_rh = surface.vol_to_surf(clean_img, surf_mesh=surf_mesh_rh, inner_mesh = inner_mesh_rh, interpolation='nearest')
  56. #Smoothing using gaussian filter and geodesic distance
  57. func_data_smooth_lh = smooth(func_data_lh, adj_data_lh, fwhm)
  58. func_data_smooth_rh = smooth(func_data_rh, adj_data_rh, fwhm)
  59. func_data = normalize_voxelwise(np.concatenate([func_data_smooth_lh, func_data_smooth_rh], axis=0))
  60. return func_data
  61. # %%
  62. #Set some constants
  63. high_pass = 0.01 # 100 s cycle
  64. low_pass = 0.15 # 6.6s cycle
  65. fwhm = 8 #smoothing kernel
  66. t_r = 2 #TR
  67. n_dummy = 0 #Number of dummy scans to be discarded
  68. task_name = "Arithmetic"
  69. fsaverage = datasets.fetch_surf_fsaverage(mesh="fsaverage5")
  70. surf_mesh_lh = fsaverage["pial_left"]
  71. inner_mesh_lh = fsaverage["white_left"]
  72. surf_mesh_rh = fsaverage["pial_right"]
  73. inner_mesh_rh = fsaverage["white_right"]
  74. infl_lh = fsaverage["infl_left"]
  75. infl_rh = fsaverage["infl_right"]
  76. radius = 2 * fwhm #considering FWHM = 8 gaussian filter, but search within 2*fwhm
  77. coords_lh, faces_lh = surface.load_surf_mesh(infl_lh)
  78. adjacency_lh = gdist.local_gdist_matrix(coords_lh.astype('float64'), faces_lh, max_distance=radius)
  79. adj_data_lh = adjacency_lh.toarray()
  80. coords_rh, faces_rh = surface.load_surf_mesh(infl_rh)
  81. adjacency_rh = gdist.local_gdist_matrix(coords_rh.astype('float64'), faces_rh, max_distance=radius)
  82. adj_data_rh = adjacency_rh.toarray()
  83. # %%
  84. curr_dir = os.getcwd()
  85. save_dir = curr_dir + '/Preproc/'
  86. fmriprep_dir = curr_dir + '/Preproc'
  87. layout = BIDSLayout(fmriprep_dir, validate=False, config=['bids','derivatives'])
  88. #Confound parameter
  89. confound_vars = ['trans_x','trans_y','trans_z',
  90. 'rot_x','rot_y','rot_z',
  91. 'global_signal', 'csf', 'white_matter']
  92. derivative_columns = ['{}_derivative1'.format(c) for c in confound_vars] # Get derivative column names
  93. confound_list = confound_vars + derivative_columns
  94. mask_medial_wall = np.load(curr_dir + '/VertexMask_MedialWall.npy')
  95. # %%
  96. sub_list = [83, 84, 86] + list(range(88, 97)) + list(range(98, 111)) + [125, 127, 130, 137, 138, 139]
  97. exclude_subs = [[137, 3], [138, 4], []] #Runs with large head motion
  98. # %%
  99. # %%
  100. for sub_id in sub_list:
  101. print('Processing sub-{:03d} ...'.format(sub_id))
  102. #Get file information of target subject & task
  103. func_files = layout.get(subject='{:03d}'.format(sub_id),
  104. datatype='func', task=task_name,
  105. desc='preproc', #Without ICA-Aroma
  106. space='MNI152NLin6Asym',
  107. extension='nii.gz',
  108. return_type='file')
  109. mask_files = layout.get(subject='{:03d}'.format(sub_id),
  110. datatype='func', task=task_name,
  111. desc='brain',
  112. suffix='mask',
  113. space='MNI152NLin6Asym',
  114. extension="nii.gz",
  115. return_type='file')
  116. confound_files = layout.get(subject='{:03d}'.format(sub_id),
  117. datatype='func', task=task_name,
  118. desc='confounds',
  119. extension="tsv",
  120. return_type='file')
  121. #List of runs to be removed
  122. exclude_runs = []
  123. for ee in exclude_subs:
  124. if sub_id in ee:
  125. exclude_runs.append(ee[1])
  126. #Load brain response data
  127. preproc_data = []
  128. run_durs = []
  129. for run_num in range(0,5):
  130. print(' Processing data for run {:d} ...'.format(run_num))
  131. #Load target run data
  132. if run_num >= len(func_files):
  133. print(' Some runs are missing for this subject !!')
  134. elif run_num+1 in exclude_runs:
  135. print(' This run is removed because of head motion !!')
  136. else:
  137. func_file = func_files[run_num] #Without ICA-Aroma
  138. mask_file = mask_files[run_num]
  139. confound_file = confound_files[run_num]
  140. #Preprocessing (confound regression, dummy scan cutting)
  141. func_data = func_preproc(func_file, mask_file, confound_file, confound_list, low_pass, high_pass, t_r, n_dummy, fwhm,
  142. surf_mesh_lh, surf_mesh_rh, inner_mesh_lh, inner_mesh_rh, adj_data_lh, adj_data_rh)
  143. #Exclude medial wall
  144. func_data = func_data[mask_medial_wall==0,:]
  145. #Concatenate data
  146. if run_num == 0:
  147. preproc_data = func_data
  148. else:
  149. preproc_data = np.concatenate((preproc_data, func_data), axis=1)
  150. run_durs.append(np.shape(func_data)[1])
  151. preproc_data = preproc_data.T
  152. #Save data
  153. fname = save_dir + 'sub-{:03d}_VertexData_Smooth'.format(sub_id)
  154. np.save(fname, preproc_data)
  155. fname2 = save_dir + 'sub-{:03d}_RunDurs'.format(sub_id)
  156. np.save(fname2, run_durs)
  157. # %%
  158. # %%

Near_PreprocVertex_Smooth_11yo.ipynb, under CC-BY-4.0 · at the source

Overview

Authors: Tomoya Nakai1, Jérôme Prado2
ORCID iDs: Tomoya Nakai
  1. Graduate School of Information Science and Technology, the University of Tokyo, Tokyo, Japan
  2. Lyon Neuroscience Research Center (CRNL), INSERM U1028 - CNRS UMR5292, University of Lyon, Bron, France
Journal: iScience, volume 29, issue 9, article 117180
Dates: received 27 November 2025; accepted 28 July 2026; published online 13 August 2026
Type: Research article · Language: English
License: CC BY-NC
Identifiers: DOI 10.1016/j.isci.2026.117180 · PMID 42633320 · PMCID PMC13499200 · OpenAlex W7202373504
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism)
Methods: Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, fMRI & imaging
Keywords: mental arithmetic, development, encoding model, fMRI
Topic: Cognitive and developmental aspects of mathematical skills (Statistics and Probability, Mathematics), according to OpenAlex
Citations: not cited yet (Europe PMC); 87 references in the paper
Research resources: Nilearn version 0.8.1 RRID:SCR_001362, Scikit-learn version 0.24.1 RRID:SCR_002577, Python version 3.8.8 RRID:SCR_008394, fMRIPrep version 21.0.2 RRID:SCR_016216

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

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: Jupyter (20), Python (1)
Size: 26 files, 21 scripts
Software Heritage: not checked
Found in: “Data and code availability”
Holds: 20 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (21 files), Matplotlib (20 files), NiBabel (20 files), Nilearn (20 files), pandas (20 files), PyBIDS (20 files), SciPy (20 files), scikit-learn (16 files), h5py (15 files), seaborn (15 files), statsmodels (10 files), PyTorch (1 file), Hugging Face Transformers (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
21 files

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

No dataset and no data link were found in the paper.

Data and code availability

The analysis code is available from Zenodo (https://zenodo.org/records/15395718).

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://doi.org/10.1016/j.isci.2026.117180

BibTeX

@article{nakai2026developmental,
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/j.isci.2026.117180},
url = {https://doi.org/10.1016/j.isci.2026.117180},
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/08/13
VL - 29
IS - 9
SP - 117180
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.117180
UR - https://doi.org/10.1016/j.isci.2026.117180
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.117180",
"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": "iScience",
"volume": "29",
"issue": "9",
"page": "117180",
"DOI": "10.1016/j.isci.2026.117180",
"PMID": "42633320",
"PMCID": "PMC13499200",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.117180",
"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.1038/s42003-026-10169-0 [code]
Shared representations in brains and models reveal a two-route cortical organization during scene perception.
Journal: Communications biology
In common: Hugging Face Transformers, h5py, NiBabel, 8 other tools, 5 references
[2] doi:10.7554/elife.107933 [code]
Modality-agnostic decoding of vision and language from fMRI.
Journal: eLife
In common: Hugging Face Transformers, Nilearn, h5py, 9 other tools, fMRI, 3 references
[3] doi:10.1038/s41467-026-71428-6 [code]
Binding items to contexts through conjunctive neural representations with the method of loci.
Journal: Nature communications
In common: Nilearn, h5py, NiBabel, 7 other tools, 6 references
[4] doi:10.1162/imag.a.1286 [code]
Behavioral imitation with artificial neural networks leads to personalized models of brain dynamics during videogame play.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Nilearn, h5py, NiBabel, 8 other tools, fMRI, 3 references
[5] doi:10.1371/journal.pbio.3003684 [code]
The retrieval of previously learned motor memories is facilitated by the reinstatement of default mode network manifold structures.
Journal: PLoS biology
In common: Nilearn, NiBabel, seaborn, 5 other tools, fMRI, 7 references
[6] doi:10.1038/s41467-026-72253-7 [code]
Spurious alignment between large language models and brains can emerge from non-robust methods and overlooked confounds.
Journal: Nature communications
In common: Hugging Face Transformers, Nilearn, h5py, 8 other tools, 2 references
[7] doi:10.1007/s00234-026-04103-8 [code]
Enhanced detection of subtle cortical abnormalities in focal epilepsy using 7 T MRI surface-based models and graph neural networks.
Journal: Neuroradiology
In common: PyBIDS, Nilearn, h5py, 9 other tools, 1 reference
[8] doi:10.1523/jneurosci.0038-26.2026 [code]
Multidimensional Feature Tuning in Category Selective Areas of Human Visual Cortex.
Journal: The Journal of neuroscience : the official journal of the Society for Neuroscience
In common: h5py, NiBabel, statsmodels, 7 other tools, fMRI, 3 references
[9] doi:10.1371/journal.pbio.3003755 [code]
Action information is integrated into entorhinal representations of conceptual space and is reflected in eye movements.
Journal: PLoS biology
In common: Nilearn, NiBabel, statsmodels, 5 other tools, 6 references
[10] doi:10.1167/jov.26.5.7 [code]
Representations in vision and language converge in a shared, multidimensional space of perceived similarities.
Journal: Journal of vision
In common: Nilearn, h5py, NiBabel, 8 other tools, 2 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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.