Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 2 matches
- [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 to 148 · score 0.76 · rindices corr, Surreal GAN, orthogonality, chosen, hyperparameters, confounding · block
oscr:b:1M5XED4SZPG1V-D· Report a mismatch - [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 to 148 · score 0.69 · Surreal GAN model, rindices corr, model training, hyperparameter, retrain, supervised · block
oscr:b:1M5XED4SZPG1V-D· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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
- import sys
- import os
- import numpy as np
- import itertools
- import pandas as pd
- from sklearn import metrics
- from .model import SurrealGAN
- from .utils import parse_validation_data
- from .training import Surreal_GAN_train
- from scipy.stats import pearsonr
- __author__ = "Zhijian Yang"
- __copyright__ = "Copyright 2019-2020 The CBICA & SBIA Lab"
- __credits__ = ["Zhijian Yang"]
- __license__ = "See LICENSE file"
- __version__ = "0.0.1"
- __maintainer__ = "Zhijian Yang"
- __email__ = "[email hidden]"
- __status__ = "Development"
- def apply_saved_model(model_dir, data, epoch, covariate=None):
- """
- Function used for derive representation results from one saved model
- Args:
- model_dir: string, path to the saved data
- data, data_frame, dataframe with same format as training data. PT data can be any samples in or out of the training set.
- covariate, data_frame, dataframe with same format as training covariate. PT data can be any samples in or out of the training set.
- Returns: R-indices
- """
- data = data[data['diagnosis']==1]
- if covariate is not None:
- covariate = covariate[covariate['diagnosis']==1]
- model = SurrealGAN()
- model.load(model_dir, epoch)
- model.get_corr()
- validation_data = parse_validation_data(data, covariate,model.opt.correction_variables,model.opt.normalization_variables)
- model.predict_rindices(validation_data)
- return model.predict_rindices(validation_data)
- def representation_result(output_dir, npattern, data, final_saving_epoch, saving_freq, repetition, covariate=None):
- """
- Function used for derive representation results from several saved models
- Args:
- model_dirs: list, list of dirs of all saved models
- npattern: int, number of pre-defined patterns
- data, data_frame, dataframe with same format as training data.
- covariate, data_frame, dataframe with same format as training covariate.
- final_saving_epoch: int, epoch number from which the last model will be saved and model training will be stopped if saving criteria satisfied
- 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
- """
- if os.path.exists("%s/model_agreements.csv" % output_dir):
- agreement_f = pd.read_csv(os.path.join(output_dir,'model_agreements.csv'))
- if agreement_f['epoch'].max() < final_saving_epoch and (not (agreement_f['stop'] == 'yes').any()):
- raise Exception("Waiting for other repetitions to finish to derive the final R-indices")
- best_row = agreement_f.iloc[agreement_f['Rindices_corr'].idxmax()]
- if repetition > 3:
- max_index = best_row['best_model']
- best_model_dir = os.path.join(output_dir, 'model'+str(max_index))
- model = SurrealGAN()
- model.load(best_model_dir,best_row['epoch'])
- validation_data = parse_validation_data(data, covariate,model.opt.correction_variables,model.opt.normalization_variables)[1]
- r_indices = model.predict_rindices(validation_data)
- else:
- raise Exception("At least 10 trained models are required (repetition number need to be at least 10)")
- else:
- raise Exception("Waiting for other repetitions to finish to derive the final R-indices")
- 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
- def repetitive_representation_learning(data, npattern, repetition, fraction, final_saving_epoch, output_dir, mono_loss_threshold=0.006, saving_freq = 2000,\
- 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, \
- beta1 = 0.5, lr = 0.0008, max_gnorm = 100, eval_freq = 100, start_repetition = 0, stop_repetition = None, early_stop_thresh = 0.02):
- """
- Args:
- data: dataframe, dataframe file with all ROI (input features) The dataframe contains
- the following headers: "
- "i) the first column is the participant_id;"
- "iii) the second column should be the diagnosis;"
- "The following column should be the extracted features. e.g., the ROI features"
- covariate: dataframe, not required; dataframe file with all confounding covariates to be corrected. The dataframe contains
- the following headers: "
- "i) the first column is the participant_id;"
- "iii) the second column should be the diagnosis;"
- "The following column should be all confounding covariates. e.g., age, sex"
- npattern: int, number of defined patterns
- repetition: int, number of repetition of training process
- fraction: float, fraction of data used for training in each repetition
- final_saving_epoch: int, epoch number from which the last model will be saved and model training will be stopped if saving criteria satisfied
- output_dir: str, the directory underwhich model and results will be saved
- mono_loss_threshold: float, chosen mono_loss theshold for stopping criteria
- recons_loss_threshold: float, chosen recons_loss theshold for stopping criteria
- lam: int, hyperparameter for orthogonal_loss
- zeta: int, hyperparameter for recons_loss
- kappa: int, hyperparameter for decompose_loss
- gamma: int, hyperparameter for change_loss
- mu: int, hyperparameter for mono_loss
- eta: int, hyperparameter for cn_loss
- batchsize: int, batck size for training procedure
- lipschitz_k: float, hyper parameter for weight clipping of transformation and reconstruction function
- verbose: bool, choose whether to print out training procedure
- beta1: float, parameter of ADAM optimization method
- lr: float, learning rate
- max_gnorm: float, maximum gradient norm for gradient clipping
- eval_freq: int, the frequency at which the model is evaluated during training procedure
- save_epoch_freq: int, the frequency at which the model is saved during training procedure
- start_repetition; int, indicate the last saved repetition index,
- used for restart previous half-finished repetition training or for parallel training; set defaultly to be 0 indicating a new repetition training process
- stop_repetition: int, indicate the index of repetition at which the training process early stop,
- 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
- Returns: clustering outputs.
- """
- print('Start Surreal-GAN for semi-supervised representation learning')
- Surreal_GAN_model = Surreal_GAN_train(npattern, final_saving_epoch, recons_loss_threshold, mono_loss_threshold, \
- lam=lam, zeta=zeta, kappa=kappa, gamma=gamma, mu=mu, eta=eta, alpha=alpha, batchsize=batchsize, \
- 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)
- if stop_repetition == None:
- stop_repetition = repetition
- for i in range(start_repetition, stop_repetition):
- print('****** Starting training of Repetition '+str(i)+" ******")
- converge = Surreal_GAN_model.train(data, covariate, output_dir, repetition, random_seed=i, data_fraction = fraction, verbose = verbose)
- while not converge:
- print("****** Model not converged at max interation, Start retraining ******")
- converge = Surreal_GAN_model.train(data, covariate, output_dir, random_seed=i, data_fraction = fraction, verbose = verbose)
- 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)
- pt_data = data.loc[data['diagnosis'] == 1][['participant_id','diagnosis']]
- for i in range(npattern):
- pt_data['r'+str(i+1)] = r_indices[:,i]
- pt_data["Rindices-corr" ] = ["%.3f" %((dimension_corr+difference_corr)/2)]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["best epoch" ] = [best_epoch]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["path to selected model"] = [selected_model_dir]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["selected model Rindices-corr"] = ["%.3f" %((selected_model_dimension_corr+selected_model_difference_corr)/2)]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["dimension-corr" ] = ["%.3f" %(dimension_corr)]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["difference-corr" ] = ["%.3f" %(difference_corr)]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["selected model dimension-corr"] = ["%.3f" %(selected_model_dimension_corr)]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data["selected model difference-corr"] = ["%.3f" %(selected_model_difference_corr)]+['' for _ in range(r_indices.shape[0]-1)]
- pt_data.to_csv(os.path.join(output_dir,'representation_result.csv'), index = False)
- print('****** Surreal-GAN Representation Learning finished ******')
Surreal_GAN_representation_learning.py at commit eecdc92, under MIT · at the source
Overview
- Department of Biomedical Engineering, College of Chemistry and Life Science, Beijing University of Technology, Beijing 100124, China; (Y.L.); (H.G.)
- School of Science, North China University of Technology, Beijing 100144, China
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
eecdc924082942f2dc4a6b518d70c4c6ac05aaac, 3 November 2024Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
15 files
- SurrealGAN/
Surreal_GAN_representati , Python, 148 lines, 2 matcheson_learning.py - SurrealGAN/
__init__.py , Python, 1 line - SurrealGAN/
copula.py , Python, 57 lines - SurrealGAN/
data_loading.py , Python, 100 lines - SurrealGAN/
model.py , Python, 289 lines - SurrealGAN/
modules.py , Python, 47 lines - SurrealGAN/
networks.py , Python, 134 lines - SurrealGAN/
training.py , Python, 179 lines - SurrealGAN/
utils.py , Python, 197 lines - datasets/
sample_code.py , Python, 22 lines - pretrained_models/
ad_2rindices/ , Python, 18 linesapply_pretained_model.py - pretrained_models/
brain_aging_5rindices/ , Python, 18 linesapply_pretained_model.py - setup.py, Python, 31 lines
- LICENSE, License, 21 lines
- README.md, Text, 211 lines
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
- ukbiobank.ac.uk/
register-apply , at UK Biobank; found in “Data Availability Statement”
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://
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://
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/
url = {https://
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/
VL - 13
IS - 7
SP - 844
SN - 2306-5354
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3390/
"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":
"volume": "13",
"issue": "7",
"page": "844",
"DOI": "10.3390/
"PMID": "42510509",
"PMCID": "PMC13404865",
"ISSN": "2306-5354",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://
"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.3390/bioengineering11070647 [code]
- Understanding the Temporal Dynamics of Accelerated Brain Aging and Resilient Brain Aging: Insights from Discriminative Event-Based Analysis of UK Biobank Data.Journal: Bioengineering (Basel, Switzerland)In common: scikit-learn, pandas, SciPy, 1 other tool, ukbiobank.ac.uk/register-apply, structural MRI / diffusion, clinical / translational, 5 references, author Lan Lin
- [2] doi:10.3390/bioengineering13030315
- From Infancy to Aging: Precise Brain Age Estimation via Hybrid CoTResNet3D and CrossViT Models on T1-Weighted Imaging.Journal: Bioengineering (Basel, Switzerland)In common: structural MRI / diffusion, 4 references, 2 authors
- [3] doi:10.3390/bioengineering11020124
- Elucidating Multimodal Imaging Patterns in Accelerated Brain Aging: Heterogeneity through a Discriminant Analysis Approach Using the UK Biobank Dataset.Journal: Bioengineering (Basel, Switzerland)In common: ukbiobank.ac.uk/register-apply, structural MRI / diffusion, 6 references, author Lan Lin
- [4] doi:10.1038/s41467-026-72091-7 [code]
- Coupled cross-sectional and longitudinal non-negative matrix factorization reveals dominant brain aging trajectories in 48,949 individuals.Journal: Nature communicationsIn common: scikit-learn, pandas, NumPy, structural MRI / diffusion, 7 references
- [5] doi:10.3390/brainsci13121651
- Exploring Successful Cognitive Aging: Insights Regarding Brain Structure, Function, and Demographics.Journal: Brain sciencesIn common: ukbiobank.ac.uk/register-apply, structural MRI / diffusion, 3 references, author Lan Lin
- [6] doi:10.3390/bioengineering12060607
- Regional Brain Aging Disparity Index: Region-Specific Brain Aging State Index for Neurodegenerative Diseases and Chronic Disease Specificity.Journal: Bioengineering (Basel, Switzerland)In common: ukbiobank.ac.uk/register-apply, structural MRI / diffusion, clinical / translational, 2 references, author Lan Lin
- [7] doi:10.3390/s23073622
- Comparison of Machine Learning Models for Brain Age Prediction Using Six Imaging Modalities on Middle-Aged and Older Adults.Journal: Sensors (Basel, Switzerland)In common: ukbiobank.ac.uk/register-apply, structural MRI / diffusion, 2 references, author Lan Lin
- [8] doi:10.1038/s41598-025-96234-w [code]
- Decomposing the effect of normal aging and Alzheimer's disease in brain morphological changes via learned aging templates.Journal: Scientific reportsIn common: PyTorch, scikit-learn, pandas, 2 other tools, structural MRI / diffusion, clinical / translational, 3 references
- [9] doi:10.1016/j.ebiom.2025.105763 [code]
- Radiomic and proteomic signatures of body mass index on brain ageing and Alzheimer's-like patterns of brain atrophy.Journal: EBioMedicineIn common: structural MRI / diffusion, clinical / translational, 6 references
- [10] doi:10.1038/s41467-023-44271-2 [code]
- Gene-SGAN: discovering disease subtypes with imaging and genetic signatures via multi-view weakly-supervised deep clustering.Journal: Nature communicationsIn common: PyTorch, scikit-learn, pandas, 2 other tools, structural MRI / diffusion, 4 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.
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, 13 scripts, and 2 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:f58528e57c8dad91…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.3390/bioengineering13070844)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.3390/bioengineering13070844.svg
:target: https://openscicode.org/badge/doi/10.3390/bioengineering13070844
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.3390/bioengineering13070844"><img src="https://openscicode.org/badge/doi/10.3390/bioengineering13070844.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
