Initial organization and progressive expansion of the math-responsive brain network during the first school years.
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
Python · 136 lines · 5.8 KB · no license
- import nilearn
- import nilearn.image
- import nilearn.plotting
- import nilearn.glm
- import nilearn.glm.first_level
- import nilearn.reporting
- from matplotlib import pyplot as plt
- import numpy as np
- from nilearn.glm.first_level import make_first_level_design_matrix
- from nilearn.plotting import plot_design_matrix
- from nilearn.glm.first_level import FirstLevelModel
- from nilearn.glm.second_level import SecondLevelModel
- from nilearn.image import threshold_img
- from nilearn.glm import threshold_stats_img
- from nilearn import datasets
- from nilearn import surface
- from matplotlib.colors import ListedColormap, LinearSegmentedColormap
- from nilearn import plotting, image
- from matplotlib import cm
- from nilearn.interfaces.bids import save_glm_to_bids
- from nilearn.glm.second_level import make_second_level_design_matrix
- from nilearn.surface import vol_to_surf
- import pandas as pd
- from scipy.stats import norm
- import pickle
- from nilearn.reporting import get_clusters_table
- from sklearn.preprocessing import PolynomialFeatures
- from pathlib import Path
- import json
- from tqdm import tqdm
- # Path for the first-level contrasts
- deriv_root = Path("../Data/derivatives/firstlevel")
- task = "sentences"
- view = ["lateral","posterior","medial"]
- contrastAll = ["maths_vs_nonmath","social_vs_nonsocial"]
- z_thresh = norm.isf(0.001)
- sessions = ["01","02","03"]
- #____________________________________________________________________________________________________
- # Compute the second level model
- # Figure 2A : Activations for math vs. non-math sentences (top row)
- # Figure S5A: Activations for social vs. non-social sentences (top row)
- #____________________________________________________________________________________________________
- for contrastName in tqdm(contrastAll, total = 2, desc = "Contrasts"):
- # ---- 1. Collect subject-level maps ----
- contrast_maps = []
- for ses in sessions:
- contrast_maps.extend(
- deriv_root.glob(
- f"sub-*/ses-{ses}/func/"
- f"*desc-{contrastName}_stat-es.nii.gz"
- )
- )
- contrast_maps = sorted(contrast_maps)
- # ---- 2. Compute the second-level design matrix ----
- design_matrix = pd.DataFrame({
- "intercept": [1] * len(contrast_maps)
- })
- # ---- 3. Compute second-level analysis ----
- second_level_model = SecondLevelModel(smoothing_fwhm=8)
- second_level_model = second_level_model.fit(contrast_maps,
- design_matrix = design_matrix)
- # ---- 4. Compute contrast ----
- zmap = second_level_model.compute_contrast(second_level_contrast = "intercept",
- output_type="z_score")
- zmap_corrected, threshold1 = threshold_stats_img(zmap, alpha=0.01,
- height_control="fdr",
- two_sided=True)
- # ---- 5. Plotting in surface ----
- nilearn.plotting.plot_img_on_surf(zmap_corrected,
- views=view,
- hemispheres=['left', 'right'],
- colorbar=True,
- title = "1st Level : " + contrastName,
- threshold = z_thresh,
- inflate = True)
- nilearn.plotting.show()
- # ---- 5. Plotting in volumes (z-axis) ----
- nilearn.plotting.plot_stat_map(zmap_corrected, colorbar=True,
- threshold = z_thresh,
- title = "1st Level : " + contrastName,
- display_mode = "z",
- cut_coords = [-20, -10, 0, 10, 20, 30, 40, 50, 60])
- nilearn.plotting.show()
- #____________________________________________________________________________________________________
- # In each period separately
- # Figure 2A : Activations for math vs. non-math sentences (bottom row)
- # Figure S5A: Activations for social vs. non-social sentences (bottom row)
- # #____________________________________________________________________________________________________
- for ses in sessions:
- for contrastName in tqdm(contrastAll, total=2, desc="Contrasts"):
- # ---- 1. Collect subject-level maps ----
- contrast_maps = []
- contrast_maps.extend(
- deriv_root.glob(
- f"sub-*/ses-{ses}/func/"
- f"*desc-{contrastName}_stat-es.nii.gz"))
- contrast_maps = sorted(contrast_maps)
- design_matrix = pd.DataFrame({
- "intercept": [1] * len(contrast_maps)
- })
- # ---- 2. Compute second-level analysis ----
- second_level_model = SecondLevelModel(smoothing_fwhm=8)
- second_level_model = second_level_model.fit(contrast_maps,
- design_matrix=design_matrix)
- # ---- 3. Compute contrast ----
- zmap = second_level_model.compute_contrast(second_level_contrast="intercept")
- zmap_corrected, threshold1 = threshold_stats_img(zmap, alpha=0.1,
- height_control="fdr",
- two_sided=True)
- # ---- 4. Plotting in surface ----
- nilearn.plotting.plot_img_on_surf(zmap_corrected,
- views=view,
- hemispheres=['left', 'right'],
- colorbar=True,
- title = "1st Level : " + contrastName + ", Period: " + ses,
- threshold = z_thresh,
- vmax = 6.5,
- inflate = True)
- nilearn.plotting.show()
secondLevelEstimation.py, no license · at the source
Overview
- Chair of Experimental Cognitive Psychology, Collège de France, Paris 75005, France
- Cognitive NeuroImaging Unit, Commissariat à l’Energie atomique et aux énergies alternatives, INSERM, Université Paris-Sud, Université Paris-Saclay, NeuroSpin Center, Gif-sur-Yvette 91191, France
Abstract
The neural mechanisms by which the developing brain acquires higher mathematical concepts from elementary intuitions remain poorly understood. Through a large-scale longitudinal functional MRI study of children from preschool through first and second grade, we tracked how neural responses to mathematical and nonmathematical statements change in the first 2 y of formal schooling, and we used these data to evaluate several theories of developmental change. Before school, when listening to math statements, children already engaged an adult-like cortical network, with partial specialization for geometry. Over the first 2 y of school, we observed an overall increase in math-related activation, a small recruitment of additional neural territory, reduced activation for facts that get better known, and a small overall increase in the dimensionality of representational space. fMRI responses to individual sentences suggest that these mechanisms, particularly in left inferior frontal gyrus and bilateral intraparietal sulcus, all contribute to children’s growing mastery of mathematical concepts.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
OSF 5kvd9
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
3 files
- Analysis/
Python/ , Python, 136 linesScripts/ secondLevelEstimation.py - Analysis/
Python/ , Python, 147 linesScripts/ secondLevelEstimation_Co ntrolAnalysis.py - Analysis/
Python/ , Python, 101 linesScripts/ secondLevelEstimation_Ge ometry.py
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;
- 3 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- 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, Materials, and Software Availability
All code used for data preprocessing, statistical analyses, and figure generation is available on the Open Science Framework (OSF) at https://
Reproduced under the paper's license (CC BY), 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 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 5 keywords, 13 MeSH terms, 2 funders, 84 references.
Cite
This paper
Morfoisse, T., Becuwe, S., Palu, M., Potier-Watkins, C., Dehaene-Lambertz, G., & Dehaene, S. (2026). Initial organization and progressive expansion of the math-responsive brain network during the first school years. Proceedings of the National Academy of Sciences of the United States of America, 123(27), e2602515123. https://
BibTeX
@article{morfoisse2026in
author = {Morfoisse, Théo and Becuwe, Séverine and Palu, Marie and Potier-Watkins, Cassandra and Dehaene-Lambertz, Ghislaine and Dehaene, Stanislas},
title = {{Initial organization and progressive expansion of the math-responsive brain network during the first school years}},
journal = {Proceedings of the National Academy of Sciences of the United States of America},
year = {2026},
month = jul,
volume = {123},
number = {27},
pages = {e2602515123},
publisher = {National Academy of Sciences},
issn = {0027-8424},
doi = {10.1073/
url = {https://
pmid = {42391394},
pmcid = {PMC13342980}
}
RIS
TY - JOUR
AU - Morfoisse, Théo
AU - Becuwe, Séverine
AU - Palu, Marie
AU - Potier-Watkins, Cassandra
AU - Dehaene-Lambertz, Ghislaine
AU - Dehaene, Stanislas
TI - Initial organization and progressive expansion of the math-responsive brain network during the first school years
T2 - Proceedings of the National Academy of Sciences of the United States of America
J2 - Proc Natl Acad Sci U S A
PY - 2026
DA - 2026/
VL - 123
IS - 27
SP - e2602515123
SN - 0027-8424
PB - National Academy of Sciences
DO - 10.1073/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1073/
"type": "article-journal",
"title": "Initial organization and progressive expansion of the math-responsive brain network during the first school years",
"container-title": "Proceedings of the National Academy of Sciences of the United States of America",
"author": [
{
"family": "Morfoisse",
"given": "Théo"
},
{
"family": "Becuwe",
"given": "Séverine"
},
{
"family": "Palu",
"given": "Marie"
},
{
"family": "Potier-Watkins",
"given": "Cassandra"
},
{
"family": "Dehaene-Lambertz",
"given": "Ghislaine"
},
{
"family": "Dehaene",
"given": "Stanislas"
}
],
"container-title-short":
"volume": "123",
"issue": "27",
"page": "e2602515123",
"DOI": "10.1073/
"PMID": "42391394",
"PMCID": "PMC13342980",
"ISSN": "0027-8424",
"publisher": "National Academy of Sciences",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
2
]
]
}
}
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/s41539-026-00419-5 [code]
- Home numeracy experiences are associated with number-related brain activity and connectivity in early childhood.Journal: NPJ science of learningIn common: NumPy, 14 references
- [2] doi:10.1371/journal.pone.0353139 [code]
- No developmental fronto-parietal shift in brain activation during mental arithmetic across the lifespan: A registered report.Journal: PloS oneIn common: 8 references
- [3] doi:10.1016/j.dcn.2026.101703 [code]
- Visual Word Form Area demonstrates individual and task-agnostic consistency but inter-individual variability.Journal: Developmental cognitive neuroscienceIn common: Nilearn, pandas, SciPy, 2 other tools, fMRI, 5 references
- [4] doi:10.1016/j.isci.2026.117180 [code]
- Developmental changes in similarity between neural representations of mental arithmetic and artificial neural networks.Journal: iScienceIn common: Nilearn, scikit-learn, pandas, 3 other tools, fMRI, 3 references
- [5] doi:10.1016/j.dcn.2026.101765 [code]
- Fusiform face area development correlates with development in higher-order social brain regions.Journal: Developmental cognitive neuroscienceIn common: Nilearn, scikit-learn, pandas, 3 other tools, fMRI, 3 references
- [6] doi:10.1038/s41597-026-06869-1 [code]
- Individual Brain Charting: fifth release of high-resolution fMRI data for cognitive mapping.Journal: Scientific dataIn common: Nilearn, scikit-learn, pandas, 3 other tools, fMRI, 2 references
- [7] doi:10.1038/s41562-026-02494-5 [code]
- Active vision is linked to category selectivity in the individual brain.Journal: Nature human behaviourIn common: 5 references
- [8] doi:10.1162/imag.a.1347 [code]
- Neural and behavioural correlates of theory of mind reasoning in five-year-old children born preterm.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Nilearn, scikit-learn, pandas, 3 other tools, fMRI, 1 reference
- [9] doi:10.1038/s41467-026-75745-8 [code]
- A language network in the individualized functional connectomes of 1199 human brains doing arbitrary tasks.Journal: Nature communicationsIn common: Nilearn, scikit-learn, pandas, 3 other tools, 1 reference
- [10] doi:10.1038/s41467-026-74566-z [code]
- Low-dimensional and optimised representations of high-level information in the expert brain.Journal: Nature communicationsIn common: Nilearn, scikit-learn, pandas, 3 other tools, 1 reference
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, 3 scripts, and 0 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:5c9f0c560571bec2…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
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.
