OSCR

Nonergodicity and Simpson's paradox in neurocognitive dynamics of cognitive control.

Code ↔ Paper

18 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 18 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § Results › Between-subjects and within-subjects analysis of brain-behavior associations ↔ taskfmri/6_plotting/plotting_utils.py, lines 9–24 · score 0.90 · basal ganglia, AntSalience, PostSalience, VisualAssoc, lFPN, rFPN
  2. [2] § Methods › Inclusion criteria ↔ taskfmri/0_subjectlist/inclusions_1.py, lines 70–126 · score 0.88 · abcd_imgincl01.txt, iqc_sst_good_ser, mriqcrp20301.txt, imgincl sst
  3. [3] § Results › Between-subjects and within-subjects analysis of brain-behavior associations ↔ taskfmri/6_plotting/plotting_utils.py, lines 4–7 · score 0.86 · AntSalience, BasalGanglia, PostSalience, VisualAssoc, lFPN, rFPN
  4. [4] § Results › Within-subjects analysis reveals that subgroups with distinct control strategies have distinct brain-behavior associations ↔ taskfmri/6_plotting/plotting_utils.py, lines 4–7 · score 0.85 · AntSalience, BasalGanglia, PostSalience, VisualAssoc, lFPN, rFPN
  5. [5] § Methods › Networks and regions of interest ↔ image_masks/make_DMN.py, the whole file · a weak match · score 0.82 · connected_components, connected_regions, Neurosynth automatic, retrieved, masks
  6. [6] § Methods › Between- and within-subjects, general linear model analysis of fMRI ↔ taskfmri/6_plotting/ds_WB.py, lines 71–119 · score 0.81 · fetch_surf_fsaverage, plot_surf_stat_map, nilearn, mesh, surface, brain
  7. [7] § Methods › Networks and regions of interest ↔ image_masks/make_subcortical_ROIs.py, lines 1–10 · score 0.80 · nonlinear asymmetric space, high resolution, MNI152, masks, subcortical, thresholded
  8. [8] § Methods › Inclusion criteria ↔ taskfmri/0_subjectlist/inclusions_1_scanner_info_included_family_member.py, lines 25–78 · score 0.72 · genetic paired subjectid, pihat, siblings, family, scanner, variables
  9. [9] § Methods › Networks and regions of interest ↔ taskfmri/6_plotting/resample.ipynb, lines 4–49 · score 0.69 · subcortical regions, Shirer regions, cognitive control regions, Shirer networks, Yeo, Pearson
  10. [10] § Methods › Brain imaging ↔ taskfmri/1_preprocess/im_proc.py, lines 31–88 · score 0.68 · smooth_img, affine, template, epi, motion, volumes
  11. [11] § Methods › Networks and regions of interest ↔ taskfmri/5_more_second_level/resample.py, lines 87–134 · score 0.66 · subcortical regions, Shirer regions, cognitive control regions, Shirer networks, Yeo, Pearson
  12. [12] § Methods › Between- and within-subjects, general linear model analysis of fMRI ↔ taskfmri/3_individualstats/individualstats.py, lines 126–175 · score 0.64 · FirstLevelModel, design matrices, nilearn, signal, fit, models
  13. [13] § Methods › Statistical testing ↔ taskfmri/5_more_second_level/permutations.ipynb, lines 390–475 · score 0.63 · permutation_test, Pearson correlation, correct go, coefficients, resamples, SSRT
  14. [14] § Results › Nonergodic brain-behavior associations using observed reaction time ↔ taskfmri/4_groupstats/groupstats.py, lines 165–295 · score 0.61 · dorsal attention, salience network, sensorimotor, precuneus, anterior, posterior
  15. [15] § Methods › Statistical testing ↔ taskfmri/5_more_second_level/permutations.ipynb, lines 60–106 · score 0.57 · false_discovery_control, permutation_test, Scipy
  16. [16] § Methods › Representational similarity analysis ↔ taskfmri/6_plotting/rsa.ipynb, lines 58–89 · score 0.56 · common_norm, kdeplot, Density, clip, proactive delaying, correlation
  17. [17] § Methods › Between- and within-subjects, general linear model analysis of fMRI ↔ taskfmri/3_individualstats/individualstats.py, lines 57–68 · score 0.55 · FirstLevelModel, regression coefficients, voxel, fit, SST, fMRI
  18. [18] § Results › Dynamic cognitive process model of behavior ↔ taskfmri/6_plotting/overview.ipynb, lines 219–260 · score 0.53 · stopping expectancy, Stop signal, go process, arrow, proactivity

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 · 27 lines · 870 B · no license · 3 matches

  1. """Utilities used for plotting."""
  2. # Order of Shirer networks:
  3. SHIRER_ORDER = ['AntSalience','PostSalience','lFPN','rFPN','DMN','RSC/PHG',
  4. 'Precuneus','Visuospatial','Language','VisualAssoc','Visual','Auditory',
  5. 'Sensorimotor','BasalGanglia']
  6. # Mapping from network names used in code to network names used in plots:
  7. MAPPING = {
  8. # Yeo-17
  9. 'SalVentAttn-1':'SalVAttn-1',
  10. 'SalVentAttn-2':'SalVAttn-2',
  11. # Shirer networks
  12. 'anterior_Salience':'AntSalience',
  13. 'post_Salience':'PostSalience',
  14. 'LECN':'lFPN',
  15. 'RECN':'rFPN',
  16. 'dorsal_DMN':'DMN',
  17. 'ventral_DMN':'RSC/PHG',
  18. 'high_Visual':'VisualAssoc',
  19. 'prim_Visual':'Visual',
  20. 'Basal_Ganglia':'BasalGanglia',
  21. }
  22. def final_roi_names(roi_names):
  23. return [MAPPING[roi] if roi in MAPPING else roi for roi in roi_names]

plotting_utils.py at commit b066a52, no license · at the source

Overview

  1. Department of Psychiatry & Behavioral Sciences, Stanford University School of Medicine, Stanford, CA USA
  2. Wu Tsai Neurosciences Institute, Stanford University, Stanford, CA USA
  3. Department of Neurology & Neurological Sciences, Stanford University School of Medicine, Stanford, CA USA
Institutions: Stanford Medicine (United States); Stanford University (United States)
Journal: Nature communications, volume 17, issue 1, article 3494
Dates: received 29 January 2025; accepted 12 March 2026; published online 27 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-71404-0 · PMID 42045209 · PMCID PMC13121725 · OpenAlex W4400490780
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), cognitive (subfield)
Methods: Connectivity, Statistics, Preprocessing, fMRI & imaging, Machine learning
Keywords: Cognitive control, Computational neuroscience, Human behaviour
MeSH: Brain*, Cognition*, Bayes Theorem, Brain Mapping, Female, Humans, Magnetic Resonance Imaging, Male (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: U.S. Department of Health & Human Services | National Institutes of Health (NIH) (MH121069, MH124816); National Science Foundation (NSF) (2024856)
Citations: not cited yet (Europe PMC); 80 references in the paper

Abstract

Nonergodicity and Simpson’s paradox present significant, yet underappreciated challenges in cognitive neuroscience. Leveraging brain imaging and behavioral data from over 4000 individuals and a Bayesian computational model of cognitive dynamics, we investigated brain-behavior relationships underlying cognitive control at both between-subjects and within-subjects levels. Strikingly, brain-behavior associations reversed across levels of analysis, revealing pervasive nonergodicity. Within-subjects analysis uncovered dissociated neural representations of reactive and proactive control and revealed that individuals who adaptively versus maladaptively regulated cognitive control exhibited distinct brain-behavior associations. Our findings demonstrate that between-subjects analyses can fundamentally mischaracterize within-individuals mechanisms, as group-level patterns not only disagreed with individual-level patterns but often reversed them. This work highlights the necessity of distinguishing between-subjects and within-subjects inferences in neuroscience, with implications for understanding cognitive mechanisms and designing personalized interventions.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 18 matches between paragraphs and lines of code.

Zenodo 18626601

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (35 files), pandas (29 files), Matplotlib (13 files), Nilearn (11 files), SciPy (10 files), seaborn (8 files), scikit-learn (5 files), FSL (2 files), Statistics and Machine Learning Toolbox (1 file), statsmodels (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
75 files
At the source:

scsnl/mistry_branigan_nonergodicity_2026

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: b066a52ce857aff8287f75ae6971f15c3b4815a1, 12 February 2026
Languages: Python (53), Jupyter (9), MATLAB (8), Shell (4)
Size: 82 files, 74 scripts
Software Heritage: not archived
Found in: the Zenodo archive record
Holds: README, environment (environment.yml), tests, 9 notebooks
Not found: license file, CITATION.cff, continuous integration, documentation
Tools: NumPy (35 files), pandas (29 files), Matplotlib (13 files), Nilearn (11 files), SciPy (10 files), seaborn (8 files), scikit-learn (5 files), FSL (2 files), Statistics and Machine Learning Toolbox (1 file), statsmodels (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
75 files

Code availability

All code used in this study has been archived at 10.5281/zenodo.18626601.

Reproduced under the paper's license (CC BY), from the paper cited above.

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 148 scripts, each with its path and the digest of its content;
  • 18 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 availability

Data used in this study were from the ABCD study (https://abcdstudy.org/), held in the National Institute of Mental Health Data Archive. These data are available to eligible researchers. Source data are provided with this paper.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 3 keywords, 8 MeSH terms, 2 funders, 68 references.

Cite

This paper

Mistry, P. K., Branigan, N. K., Gao, Z., Cai, W., & Menon, V. (2026). Nonergodicity and Simpson's paradox in neurocognitive dynamics of cognitive control. Nature communications, 17(1), 3494. https://doi.org/10.1038/s41467-026-71404-0

BibTeX

@article{mistry2026nonergodicity,
author = {Mistry, Percy K and Branigan, Nicholas K and Gao, Zhiyao and Cai, Weidong and Menon, Vinod},
title = {{Nonergodicity and Simpson's paradox in neurocognitive dynamics of cognitive control}},
journal = {Nature communications},
year = {2026},
month = apr,
volume = {17},
number = {1},
pages = {3494},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-71404-0},
url = {https://doi.org/10.1038/s41467-026-71404-0},
pmid = {42045209},
pmcid = {PMC13121725}
}

RIS

TY - JOUR
AU - Mistry, Percy K
AU - Branigan, Nicholas K
AU - Gao, Zhiyao
AU - Cai, Weidong
AU - Menon, Vinod
TI - Nonergodicity and Simpson's paradox in neurocognitive dynamics of cognitive control
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/04/27
VL - 17
IS - 1
SP - 3494
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-71404-0
UR - https://doi.org/10.1038/s41467-026-71404-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-71404-0",
"type": "article-journal",
"title": "Nonergodicity and Simpson's paradox in neurocognitive dynamics of cognitive control",
"container-title": "Nature communications",
"author": [
{
"family": "Mistry",
"given": "Percy K"
},
{
"family": "Branigan",
"given": "Nicholas K"
},
{
"family": "Gao",
"given": "Zhiyao"
},
{
"family": "Cai",
"given": "Weidong"
},
{
"family": "Menon",
"given": "Vinod"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "3494",
"DOI": "10.1038/s41467-026-71404-0",
"PMID": "42045209",
"PMCID": "PMC13121725",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-71404-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
27
]
]
}
}

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/s41467-026-73668-y [code]
Convergent and divergent brain-cognition development in early adolescence.
Journal: Nature communications
In common: FSL, Nilearn, Statistics and Machine Learning Toolbox, 6 other tools, 5 references
[2] doi:10.1111/psyp.70397 [code]
Cortical Contributions to Attentional Orienting and Response Cancellation in Action Stopping.
Journal: Psychophysiology
In common: statsmodels, seaborn, scikit-learn, 4 other tools, cognitive, 5 references
[3] doi:10.1038/s41467-026-71568-9 [code]
Convergent and selective representations of pain, appetitive processes, aversive processes, and cognitive control in the insula.
Journal: Nature communications
In common: FSL, Nilearn, statsmodels, 6 other tools, cognitive, 4 references
[4] doi:10.1002/hbm.70512 [code]
Precision Imaging for Intraindividual Investigation of the Reward Response.
Journal: Human brain mapping
In common: FSL, pandas, Matplotlib, 1 other tool, 6 references
[5] doi:10.1038/s41467-026-75102-9 [code]
Glutamatergic signaling underlies brain structural organization for mathematical and reading abilities in children.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, scikit-learn, pandas, 2 other tools, 2 references, author Vinod Menon
[6] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: FSL, Nilearn, statsmodels, 7 other tools, cognitive, 1 reference
[7] doi:10.1093/nc/niag029 [code]
A data-driven approach to identifying and evaluating connectivity-based neural correlates of conscious visual perception.
Journal: Neuroscience of consciousness
In common: FSL, Nilearn, statsmodels, 7 other tools, cognitive, 1 reference
[8] doi:10.1038/s41467-026-71719-y [code]
Brain functional-structural gradient coupling reflects development, behavior and genetic influences.
Journal: Nature communications
In common: FSL, Nilearn, Statistics and Machine Learning Toolbox, 5 other tools, 3 references
[9] doi:10.1038/s41467-026-74743-0 [code]
Meta-analytic evidence for distinct neural correlates of conditioned versus verbally induced placebo analgesia.
Journal: Nature communications
In common: FSL, Nilearn, statsmodels, 7 other tools, 1 reference
[10] doi:10.1038/s41586-026-10631-3 [code]
A prognostic human brain network for diffuse midline glioma.
Journal: Nature
In common: FSL, Nilearn, Statistics and Machine Learning Toolbox, 6 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.