OSCR

Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort.

Code ↔ Paper

2 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 2 matches
  1. [1] § 2. Materials and Methods › 2.2. Neuroanatomical Pattern Discovery via Surreal-GAN › 2.2.3. Model Training and Hyperparameter Optimization ↔ SurrealGAN/Surreal_GAN_representation_learning.py, lines 72–148 · score 0.76 · rindices corr, Surreal GAN, orthogonality, chosen, hyperparameters, confounding
  2. [2] § 2. Materials and Methods › 2.2. Neuroanatomical Pattern Discovery via Surreal-GAN › 2.2.2. Study Design ↔ SurrealGAN/Surreal_GAN_representation_learning.py, lines 72–148 · score 0.69 · Surreal GAN model, rindices corr, model training, hyperparameter, retrain, supervised

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 · 148 lines · 8.7 KB · MIT · 2 matches

  1. import sys
  2. import os
  3. import numpy as np
  4. import itertools
  5. import pandas as pd
  6. from sklearn import metrics
  7. from .model import SurrealGAN
  8. from .utils import parse_validation_data
  9. from .training import Surreal_GAN_train
  10. from scipy.stats import pearsonr
  11. __author__ = "Zhijian Yang"
  12. __copyright__ = "Copyright 2019-2020 The CBICA & SBIA Lab"
  13. __credits__ = ["Zhijian Yang"]
  14. __license__ = "See LICENSE file"
  15. __version__ = "0.0.1"
  16. __maintainer__ = "Zhijian Yang"
  17. __email__ = "[email hidden]"
  18. __status__ = "Development"
  19. def apply_saved_model(model_dir, data, epoch, covariate=None):
  20. """
  21. Function used for derive representation results from one saved model
  22. Args:
  23. model_dir: string, path to the saved data
  24. data, data_frame, dataframe with same format as training data. PT data can be any samples in or out of the training set.
  25. covariate, data_frame, dataframe with same format as training covariate. PT data can be any samples in or out of the training set.
  26. Returns: R-indices
  27. """
  28. data = data[data['diagnosis']==1]
  29. if covariate is not None:
  30. covariate = covariate[covariate['diagnosis']==1]
  31. model = SurrealGAN()
  32. model.load(model_dir, epoch)
  33. model.get_corr()
  34. validation_data = parse_validation_data(data, covariate,model.opt.correction_variables,model.opt.normalization_variables)
  35. model.predict_rindices(validation_data)
  36. return model.predict_rindices(validation_data)
  37. def representation_result(output_dir, npattern, data, final_saving_epoch, saving_freq, repetition, covariate=None):
  38. """
  39. Function used for derive representation results from several saved models
  40. Args:
  41. model_dirs: list, list of dirs of all saved models
  42. npattern: int, number of pre-defined patterns
  43. data, data_frame, dataframe with same format as training data.
  44. covariate, data_frame, dataframe with same format as training covariate.
  45. final_saving_epoch: int, epoch number from which the last model will be saved and model training will be stopped if saving criteria satisfied
  46. Returns: R-indices, Pattern c-indices between the selected repetition and all other repetitionss, Pattern c-indices among all repetitions, path to the final selected model used for deriving R-indices
  47. """
  48. if os.path.exists("%s/model_agreements.csv" % output_dir):
  49. agreement_f = pd.read_csv(os.path.join(output_dir,'model_agreements.csv'))
  50. if agreement_f['epoch'].max() < final_saving_epoch and (not (agreement_f['stop'] == 'yes').any()):
  51. raise Exception("Waiting for other repetitions to finish to derive the final R-indices")
  52. best_row = agreement_f.iloc[agreement_f['Rindices_corr'].idxmax()]
  53. if repetition > 3:
  54. max_index = best_row['best_model']
  55. best_model_dir = os.path.join(output_dir, 'model'+str(max_index))
  56. model = SurrealGAN()
  57. model.load(best_model_dir,best_row['epoch'])
  58. validation_data = parse_validation_data(data, covariate,model.opt.correction_variables,model.opt.normalization_variables)[1]
  59. r_indices = model.predict_rindices(validation_data)
  60. else:
  61. raise Exception("At least 10 trained models are required (repetition number need to be at least 10)")
  62. else:
  63. raise Exception("Waiting for other repetitions to finish to derive the final R-indices")
  64. return np.array(r_indices), best_row['best_dimension_corr'], best_row['best_difference_corr'], best_row['dimension_corr'], best_row['difference_corr'], best_row['epoch'], best_model_dir
  65. def repetitive_representation_learning(data, npattern, repetition, fraction, final_saving_epoch, output_dir, mono_loss_threshold=0.006, saving_freq = 2000,\
  66. recons_loss_threshold=0.003, covariate=None, lam=0.2, zeta=80, kappa=80, gamma=2, mu=500, eta=6, alpha = 0.02, batchsize=300, lipschitz_k = 0.5, verbose = False, \
  67. beta1 = 0.5, lr = 0.0008, max_gnorm = 100, eval_freq = 100, start_repetition = 0, stop_repetition = None, early_stop_thresh = 0.02):
  68. """
  69. Args:
  70. data: dataframe, dataframe file with all ROI (input features) The dataframe contains
  71. the following headers: "
  72. "i) the first column is the participant_id;"
  73. "iii) the second column should be the diagnosis;"
  74. "The following column should be the extracted features. e.g., the ROI features"
  75. covariate: dataframe, not required; dataframe file with all confounding covariates to be corrected. The dataframe contains
  76. the following headers: "
  77. "i) the first column is the participant_id;"
  78. "iii) the second column should be the diagnosis;"
  79. "The following column should be all confounding covariates. e.g., age, sex"
  80. npattern: int, number of defined patterns
  81. repetition: int, number of repetition of training process
  82. fraction: float, fraction of data used for training in each repetition
  83. final_saving_epoch: int, epoch number from which the last model will be saved and model training will be stopped if saving criteria satisfied
  84. output_dir: str, the directory underwhich model and results will be saved
  85. mono_loss_threshold: float, chosen mono_loss theshold for stopping criteria
  86. recons_loss_threshold: float, chosen recons_loss theshold for stopping criteria
  87. lam: int, hyperparameter for orthogonal_loss
  88. zeta: int, hyperparameter for recons_loss
  89. kappa: int, hyperparameter for decompose_loss
  90. gamma: int, hyperparameter for change_loss
  91. mu: int, hyperparameter for mono_loss
  92. eta: int, hyperparameter for cn_loss
  93. batchsize: int, batck size for training procedure
  94. lipschitz_k: float, hyper parameter for weight clipping of transformation and reconstruction function
  95. verbose: bool, choose whether to print out training procedure
  96. beta1: float, parameter of ADAM optimization method
  97. lr: float, learning rate
  98. max_gnorm: float, maximum gradient norm for gradient clipping
  99. eval_freq: int, the frequency at which the model is evaluated during training procedure
  100. save_epoch_freq: int, the frequency at which the model is saved during training procedure
  101. start_repetition; int, indicate the last saved repetition index,
  102. used for restart previous half-finished repetition training or for parallel training; set defaultly to be 0 indicating a new repetition training process
  103. stop_repetition: int, indicate the index of repetition at which the training process early stop,
  104. used for stopping repetition training process eartly and resuming later or for parallel training; set defaultly to be None and repetition training will not stop till the end
  105. Returns: clustering outputs.
  106. """
  107. print('Start Surreal-GAN for semi-supervised representation learning')
  108. Surreal_GAN_model = Surreal_GAN_train(npattern, final_saving_epoch, recons_loss_threshold, mono_loss_threshold, \
  109. lam=lam, zeta=zeta, kappa=kappa, gamma=gamma, mu=mu, eta=eta, alpha=alpha, batchsize=batchsize, \
  110. lipschitz_k = lipschitz_k, beta1 = beta1, lr = lr, max_gnorm = max_gnorm, eval_freq = eval_freq, saving_freq = saving_freq, early_stop_thresh = early_stop_thresh)
  111. if stop_repetition == None:
  112. stop_repetition = repetition
  113. for i in range(start_repetition, stop_repetition):
  114. print('****** Starting training of Repetition '+str(i)+" ******")
  115. converge = Surreal_GAN_model.train(data, covariate, output_dir, repetition, random_seed=i, data_fraction = fraction, verbose = verbose)
  116. while not converge:
  117. print("****** Model not converged at max interation, Start retraining ******")
  118. converge = Surreal_GAN_model.train(data, covariate, output_dir, random_seed=i, data_fraction = fraction, verbose = verbose)
  119. r_indices, selected_model_dimension_corr, selected_model_difference_corr, dimension_corr, difference_corr, best_epoch, selected_model_dir = representation_result(output_dir, npattern, data, final_saving_epoch, saving_freq, repetition, covariate = covariate)
  120. pt_data = data.loc[data['diagnosis'] == 1][['participant_id','diagnosis']]
  121. for i in range(npattern):
  122. pt_data['r'+str(i+1)] = r_indices[:,i]
  123. pt_data["Rindices-corr" ] = ["%.3f" %((dimension_corr+difference_corr)/2)]+['' for _ in range(r_indices.shape[0]-1)]
  124. pt_data["best epoch" ] = [best_epoch]+['' for _ in range(r_indices.shape[0]-1)]
  125. pt_data["path to selected model"] = [selected_model_dir]+['' for _ in range(r_indices.shape[0]-1)]
  126. pt_data["selected model Rindices-corr"] = ["%.3f" %((selected_model_dimension_corr+selected_model_difference_corr)/2)]+['' for _ in range(r_indices.shape[0]-1)]
  127. pt_data["dimension-corr" ] = ["%.3f" %(dimension_corr)]+['' for _ in range(r_indices.shape[0]-1)]
  128. pt_data["difference-corr" ] = ["%.3f" %(difference_corr)]+['' for _ in range(r_indices.shape[0]-1)]
  129. pt_data["selected model dimension-corr"] = ["%.3f" %(selected_model_dimension_corr)]+['' for _ in range(r_indices.shape[0]-1)]
  130. pt_data["selected model difference-corr"] = ["%.3f" %(selected_model_difference_corr)]+['' for _ in range(r_indices.shape[0]-1)]
  131. pt_data.to_csv(os.path.join(output_dir,'representation_result.csv'), index = False)
  132. print('****** Surreal-GAN Representation Learning finished ******')

Surreal_GAN_representation_learning.py at commit eecdc92, under MIT · at the source

Overview

Authors: Yanxue Li1, Hongjian Gao1, Lan Lin1, Min Xiong2
ORCID iDs: Hongjian Gao, Lan Lin
  1. Department of Biomedical Engineering, College of Chemistry and Life Science, Beijing University of Technology, Beijing 100124, China; (Y.L.); (H.G.)
  2. School of Science, North China University of Technology, Beijing 100144, China
Journal: Bioengineering (Basel, Switzerland), volume 13, issue 7, article 844
Dates: received 15 June 2026; accepted 21 July 2026; published online 22 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3390/bioengineering13070844 · PMID 42510509 · PMCID PMC13404865 · OpenAlex W7170064491
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), clinical / translational (subfield)
Methods: Statistics, Machine learning, Connectivity, fMRI & imaging, Preprocessing
Keywords: brain aging, deep learning, structural MRI, heterogeneity, influencing factors, UK Biobank
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Natural Science Foundation of China (81971683, 12572064); Beijing Municipality Natural Science Foundation (L182010)
Citations: not cited yet (Europe PMC); 51 references in the paper

Abstract

Brain aging exhibits substantial interindividual heterogeneity, yet separating aging-related neuroanatomical variation from pathological influences remains methodologically challenging. To address this issue, we constructed a Clinically Defined Aging Reference (CDAR) cohort from the UK Biobank by excluding individuals with overt clinical pathology and applied the Surreal-GAN framework to characterize latent patterns of age-associated structural variations. A total of 26,251 participants were included. The model identified two co-occurring dimensions of brain aging, referred to as R1 and R2, that were stable across subsamples (R1: r = 0.873, R2: r = 0.953) and remained consistent when refitted separately in males and females (female: r = 0.792, male: r = 0.818). R1 was characterized by widespread gray matter reduction involving cortical, subcortical, and cerebellar regions and was associated with broadly poorer cognitive performance, adverse lifestyle profiles, metabolic and inflammatory alterations, and age-related diseases. R2 exhibited relative preservation of subcortical structures together with widespread preservation of cortical surface area and more selective differences in cortical thickness. Compared with R1, R2 showed weaker associations with cognition and peripheral physiological measures but retained associations with cardiovascular-related outcomes. These findings suggest that brain aging within a clinically defined aging reference cohort may involve multiple partially dissociable neuroanatomical dimensions rather than a single pattern, providing an operational reference for studying aging-related structural heterogeneity under reduced clinical confounding.

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

Repository

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

zhijian-yang/SurrealGAN

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: eecdc924082942f2dc4a6b518d70c4c6ac05aaac, 3 November 2024
Languages: Python (13)
Size: 21 files, 13 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README, license file, environment (setup.py)
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: PyTorch (8 files), pandas (7 files), NumPy (5 files), scikit-learn (3 files), SciPy (3 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
15 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;
  • 13 scripts, each with its path and the digest of its content;
  • 2 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

Datasets cited

Data Availability Statement

The imaging data analyzed in this study were obtained from the UK Biobank and are available through the UK Biobank Access Management System (http://www.ukbiobank.ac.uk/register-apply/; accessed on 20 September 2025). Access to these data is governed by the UK Biobank Research Access Administration Team and is open to both academic and commercial applicants under the same review procedures. Applications are assessed based on their relevance to health-related research objectives. Additional information regarding available datasets can be found on the UK Biobank website (http://www.ukbiobank.ac.uk; accessed on 20 September 2025). Owing to ongoing updates to the resource, the number of participants with available imaging data may differ slightly from the sample reported in this study. The Surreal-GAN framework is publicly available from Yang et al. (https://github.com/zhijian-yang/SurrealGAN, [22]; accessed on 20 September 2025). The hyperparameter configuration used in this study is fully reported in Section 2.2.3 Model Training and Hyperparameter Optimization and Section 3.1 Model Selection. Analysis code is available from the corresponding author upon reasonable request.

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, 4 authors, 6 keywords, 2 funders, 49 references.

Cite

This paper

Li, Y., Gao, H., Lin, L., & Xiong, M. (2026). Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort. Bioengineering (Basel, Switzerland), 13(7), 844. https://doi.org/10.3390/bioengineering13070844

BibTeX

@article{li2026mapping,
author = {Li, Yanxue and Gao, Hongjian and Lin, Lan and Xiong, Min},
title = {{Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort}},
journal = {Bioengineering (Basel, Switzerland)},
year = {2026},
month = jul,
volume = {13},
number = {7},
pages = {844},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {2306-5354},
doi = {10.3390/bioengineering13070844},
url = {https://doi.org/10.3390/bioengineering13070844},
pmid = {42510509},
pmcid = {PMC13404865}
}

RIS

TY - JOUR
AU - Li, Yanxue
AU - Gao, Hongjian
AU - Lin, Lan
AU - Xiong, Min
TI - Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort
T2 - Bioengineering (Basel, Switzerland)
J2 - Bioengineering (Basel)
PY - 2026
DA - 2026/07/22
VL - 13
IS - 7
SP - 844
SN - 2306-5354
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/bioengineering13070844
UR - https://doi.org/10.3390/bioengineering13070844
LA - en
ER -

CSL-JSON

{
"id": "10.3390/bioengineering13070844",
"type": "article-journal",
"title": "Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort",
"container-title": "Bioengineering (Basel, Switzerland)",
"author": [
{
"family": "Li",
"given": "Yanxue"
},
{
"family": "Gao",
"given": "Hongjian"
},
{
"family": "Lin",
"given": "Lan"
},
{
"family": "Xiong",
"given": "Min"
}
],
"container-title-short": "Bioengineering (Basel)",
"volume": "13",
"issue": "7",
"page": "844",
"DOI": "10.3390/bioengineering13070844",
"PMID": "42510509",
"PMCID": "PMC13404865",
"ISSN": "2306-5354",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://doi.org/10.3390/bioengineering13070844",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
22
]
]
}
}

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/s41380-026-03691-4 [code]
Breaking the norm: population-scale deviations of brain structure in depression and anxiety.
Journal: Molecular psychiatry
In common: PyTorch, scikit-learn, pandas, 2 other tools, ukbiobank.ac.uk/register-apply, structural MRI / diffusion, clinical / translational
[2] doi:10.1371/journal.pbio.3003856 [code]
Aging and metabolism contribute separately to brain-body health.
Journal: PLoS biology
In common: PyTorch, scikit-learn, pandas, 2 other tools, structural MRI / diffusion, clinical / translational, 3 references
[3] doi:10.1162/imag.a.1242 [code]
Stable individual differences dominate adult brain volume variation until later life.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: PyTorch, pandas, SciPy, 1 other tool, structural MRI / diffusion, 3 references
[4] doi:10.1038/s41467-026-71271-9 [code]
Exposome-wide patterns predict brain health in aging.
Journal: Nature communications
In common: scikit-learn, pandas, SciPy, 1 other tool, clinical / translational, 3 references
[5] doi:10.1038/s43587-026-01121-2 [code]
Predicting categorical and continuous Alzheimer's disease outcomes from a single MRI scan.
Journal: Nature aging
In common: PyTorch, SciPy, NumPy, structural MRI / diffusion, clinical / translational, 3 references
[6] doi:10.1162/imag.a.1352 [code]
Brain-age in ultra-low-field MRI: How well does it work?
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: PyTorch, pandas, SciPy, 1 other tool, structural MRI / diffusion, 3 references
[7] doi:10.21203/rs.3.rs-9246968/v1 [code]
Copy number variants reveal divergent genetic and diagnostic cortical signatures across psychiatric disorders
Journal: Research Square (preprint)
In common: pandas, NumPy, ukbiobank.ac.uk/register-apply, clinical / translational, 1 reference
[8] doi:10.1186/s40708-026-00316-y [code]
Generalizable and explainable deep learning for brain MRI: a multi-cohort evaluation of 3D architectures for age and sex prediction.
Journal: Brain informatics
In common: PyTorch, scikit-learn, pandas, 2 other tools, structural MRI / diffusion, 2 references
[9] doi:10.1038/s41467-026-71555-0 [code]
A deep representation learning model to predict response to vagus nerve stimulation.
Journal: Nature communications
In common: PyTorch, scikit-learn, pandas, 2 other tools, structural MRI / diffusion, clinical / translational, 2 references
[10] doi:10.1038/s43856-026-01722-3 [code]
Local and global patterns support medical imaging as a biomarker of ageing.
Journal: Communications medicine
In common: PyTorch, pandas, SciPy, 1 other tool, clinical / translational, 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.