OSCR

Initial organization and progressive expansion of the math-responsive brain network during the first school years.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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

  1. import nilearn
  2. import nilearn.image
  3. import nilearn.plotting
  4. import nilearn.glm
  5. import nilearn.glm.first_level
  6. import nilearn.reporting
  7. from matplotlib import pyplot as plt
  8. import numpy as np
  9. from nilearn.glm.first_level import make_first_level_design_matrix
  10. from nilearn.plotting import plot_design_matrix
  11. from nilearn.glm.first_level import FirstLevelModel
  12. from nilearn.glm.second_level import SecondLevelModel
  13. from nilearn.image import threshold_img
  14. from nilearn.glm import threshold_stats_img
  15. from nilearn import datasets
  16. from nilearn import surface
  17. from matplotlib.colors import ListedColormap, LinearSegmentedColormap
  18. from nilearn import plotting, image
  19. from matplotlib import cm
  20. from nilearn.interfaces.bids import save_glm_to_bids
  21. from nilearn.glm.second_level import make_second_level_design_matrix
  22. from nilearn.surface import vol_to_surf
  23. import pandas as pd
  24. from scipy.stats import norm
  25. import pickle
  26. from nilearn.reporting import get_clusters_table
  27. from sklearn.preprocessing import PolynomialFeatures
  28. from pathlib import Path
  29. import json
  30. from tqdm import tqdm
  31. # Path for the first-level contrasts
  32. deriv_root = Path("../Data/derivatives/firstlevel")
  33. task = "sentences"
  34. view = ["lateral","posterior","medial"]
  35. contrastAll = ["maths_vs_nonmath","social_vs_nonsocial"]
  36. z_thresh = norm.isf(0.001)
  37. sessions = ["01","02","03"]
  38. #____________________________________________________________________________________________________
  39. # Compute the second level model
  40. # Figure 2A : Activations for math vs. non-math sentences (top row)
  41. # Figure S5A: Activations for social vs. non-social sentences (top row)
  42. #____________________________________________________________________________________________________
  43. for contrastName in tqdm(contrastAll, total = 2, desc = "Contrasts"):
  44. # ---- 1. Collect subject-level maps ----
  45. contrast_maps = []
  46. for ses in sessions:
  47. contrast_maps.extend(
  48. deriv_root.glob(
  49. f"sub-*/ses-{ses}/func/"
  50. f"*desc-{contrastName}_stat-es.nii.gz"
  51. )
  52. )
  53. contrast_maps = sorted(contrast_maps)
  54. # ---- 2. Compute the second-level design matrix ----
  55. design_matrix = pd.DataFrame({
  56. "intercept": [1] * len(contrast_maps)
  57. })
  58. # ---- 3. Compute second-level analysis ----
  59. second_level_model = SecondLevelModel(smoothing_fwhm=8)
  60. second_level_model = second_level_model.fit(contrast_maps,
  61. design_matrix = design_matrix)
  62. # ---- 4. Compute contrast ----
  63. zmap = second_level_model.compute_contrast(second_level_contrast = "intercept",
  64. output_type="z_score")
  65. zmap_corrected, threshold1 = threshold_stats_img(zmap, alpha=0.01,
  66. height_control="fdr",
  67. two_sided=True)
  68. # ---- 5. Plotting in surface ----
  69. nilearn.plotting.plot_img_on_surf(zmap_corrected,
  70. views=view,
  71. hemispheres=['left', 'right'],
  72. colorbar=True,
  73. title = "1st Level : " + contrastName,
  74. threshold = z_thresh,
  75. inflate = True)
  76. nilearn.plotting.show()
  77. # ---- 5. Plotting in volumes (z-axis) ----
  78. nilearn.plotting.plot_stat_map(zmap_corrected, colorbar=True,
  79. threshold = z_thresh,
  80. title = "1st Level : " + contrastName,
  81. display_mode = "z",
  82. cut_coords = [-20, -10, 0, 10, 20, 30, 40, 50, 60])
  83. nilearn.plotting.show()
  84. #____________________________________________________________________________________________________
  85. # In each period separately
  86. # Figure 2A : Activations for math vs. non-math sentences (bottom row)
  87. # Figure S5A: Activations for social vs. non-social sentences (bottom row)
  88. # #____________________________________________________________________________________________________
  89. for ses in sessions:
  90. for contrastName in tqdm(contrastAll, total=2, desc="Contrasts"):
  91. # ---- 1. Collect subject-level maps ----
  92. contrast_maps = []
  93. contrast_maps.extend(
  94. deriv_root.glob(
  95. f"sub-*/ses-{ses}/func/"
  96. f"*desc-{contrastName}_stat-es.nii.gz"))
  97. contrast_maps = sorted(contrast_maps)
  98. design_matrix = pd.DataFrame({
  99. "intercept": [1] * len(contrast_maps)
  100. })
  101. # ---- 2. Compute second-level analysis ----
  102. second_level_model = SecondLevelModel(smoothing_fwhm=8)
  103. second_level_model = second_level_model.fit(contrast_maps,
  104. design_matrix=design_matrix)
  105. # ---- 3. Compute contrast ----
  106. zmap = second_level_model.compute_contrast(second_level_contrast="intercept")
  107. zmap_corrected, threshold1 = threshold_stats_img(zmap, alpha=0.1,
  108. height_control="fdr",
  109. two_sided=True)
  110. # ---- 4. Plotting in surface ----
  111. nilearn.plotting.plot_img_on_surf(zmap_corrected,
  112. views=view,
  113. hemispheres=['left', 'right'],
  114. colorbar=True,
  115. title = "1st Level : " + contrastName + ", Period: " + ses,
  116. threshold = z_thresh,
  117. vmax = 6.5,
  118. inflate = True)
  119. nilearn.plotting.show()

secondLevelEstimation.py, no license · at the source

Overview

Authors: Théo Morfoisse1,2, Séverine Becuwe2, Marie Palu2, Cassandra Potier-Watkins1, Ghislaine Dehaene-Lambertz2, Stanislas Dehaene1,2
  1. Chair of Experimental Cognitive Psychology, Collège de France, Paris 75005, France
  2. 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
Institutions: Collège de France (France); Université Paris-Saclay (France)
Dates: received 23 January 2026; accepted 19 May 2026; published online 2 July 2026; in print 7 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1073/pnas.2602515123 · PMID 42391394 · PMCID PMC13342980 · OpenAlex W7167060396
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism)
Methods: Statistics, fMRI & imaging
Keywords: cognitive development, mathematical cognition, longitudinal study, education, fMRI
MeSH: Brain*, Child Development*, Mathematics*, Nerve Net*, Brain Mapping, Child, Child, Preschool, Cognition, Female, Humans, Longitudinal Studies, Magnetic Resonance Imaging, Male (* major topic)
Journal subjects: Biological Sciences, Neuroscience
Topic: Cognitive and developmental aspects of mathematical skills (Statistics and Probability, Mathematics), according to OpenAlex
Funding: ERC (ERC-2022-ADG101095866); France 2030 program (ANR-23-IAHU-0010)
Citations: not cited yet (Europe PMC); 92 references in the paper

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

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: Python (3)
Size: 238 files, 3 scripts
Software Heritage: not checked
Found in: “Data, Materials, and Software Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (3 files), Nilearn (3 files), NumPy (3 files), pandas (3 files), SciPy (3 files), scikit-learn (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
3 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;
  • 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://osf.io/5kvd9/overview?view_only=52f336a5f13f446eb569ada6c798cf31 (92). All other data are included in the manuscript and/or SI Appendix (http://www.pnas.org/lookup/doi/10.1073/pnas.2602515123#supplementary-materials).

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://doi.org/10.1073/pnas.2602515123

BibTeX

@article{morfoisse2026initial,
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/pnas.2602515123},
url = {https://doi.org/10.1073/pnas.2602515123},
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/07/02
VL - 123
IS - 27
SP - e2602515123
SN - 0027-8424
PB - National Academy of Sciences
DO - 10.1073/pnas.2602515123
UR - https://doi.org/10.1073/pnas.2602515123
LA - en
ER -

CSL-JSON

{
"id": "10.1073/pnas.2602515123",
"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": "Proc Natl Acad Sci U S A",
"volume": "123",
"issue": "27",
"page": "e2602515123",
"DOI": "10.1073/pnas.2602515123",
"PMID": "42391394",
"PMCID": "PMC13342980",
"ISSN": "0027-8424",
"publisher": "National Academy of Sciences",
"URL": "https://doi.org/10.1073/pnas.2602515123",
"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 learning
In 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 one
In 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 neuroscience
In 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: iScience
In 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 neuroscience
In 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 data
In 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 behaviour
In 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 communications
In 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 communications
In 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.

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.