Mapping Neuroanatomical Heterogeneity of Brain Aging Within a Clinically Defined Aging Reference Cohort.
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–148 · score 0.76 · rindices corr, Surreal GAN, orthogonality, chosen, hyperparameters, confounding
- [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
- 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.1038/s41380-026-03691-4 [code]
- Breaking the norm: population-scale deviations of brain structure in depression and anxiety.Journal: Molecular psychiatryIn 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 biologyIn 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 communicationsIn 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 agingIn 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 disordersJournal: 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 informaticsIn 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 communicationsIn 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 medicineIn 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.
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:4e6edd763a7d07b9…
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
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
