Stable individual differences dominate adult brain volume variation until later life.
The 2 matches
- [1] § Results › Dynamical aging norm curves for brain structures ↔ scripts/create_mcmc_figures.ipynb, lines 42–48 · score 0.74 · brain stem volume, supratentorial volumes, lateral ventricles, Gray matter volume, hippocampal
- [2] § Methods › Data ↔ scripts/create_mcmc_figures.ipynb, lines 42–48 · score 0.64 · supratentorial volume, lateral ventricles, hippocampal volume
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
Jupyter notebook · 766 lines · 33 KB · no license · 2 matches
- # %%
- import torch
- import pyro
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib as mpl
- import matplotlib.ticker as ticker
- import os
- import sys
- module_path = os.path.abspath(os.path.join('..'))
- if module_path not in sys.path:
- sys.path.append(module_path)
- from src.ghmm_mcmc import GaussianHMM as ghmm
- #import ghmm_mcmc.GaussianHMM as ghmm
- #/ess/p23/home/p23-edvardgr/Code/gaussian-hmm-mcmc-main/src/ghmm_mcmc/FastGaussianHMM.py
- from pyro.infer import MCMC, NUTS, Predictive
- from pathlib import Path
- import warnings
- warnings.filterwarnings("ignore")
- # %%
- #plt.style.use('ggplot')
- plt.style.use('seaborn-v0_8-whitegrid')
- torch.set_default_dtype(torch.float64)
- torch.autograd.set_grad_enabled(mode=False)
- #mpl.rcParams['font.family'] = 'sans-serif'
- #mpl.rcParams['font.sans-serif'] = ['DejaVu Sans']
- out_dir = Path('/tsd/p23/home/p23-edvardgr/file-export') / 'edvard_export'
- # %%
- pretty_names = {"TotalHippocampus": "Total Hippocampus Volume",
- "TotalGrayVol": "Gray Matter Volume",
- "TotalWhiteVol": "White Matter Volume",
- "SupraTentorialVolNotVent": "Supratentorial Volume",
- "TotalLateralVentricle": "Total Lateral Ventricles Volume",
- "Brain-Stem": "Brain Stem Volume"}
- # %%
- def plt_samplesd_line(y, ax, x=None, plot_method='samples', subsample_rate=10, **args):
- """
- Args:
- x - tensor (samples, time)
- type - string, 'CI': 95%, and 50% confidence interval with median or 'samples': plot the lines directly
- args - plt args
- """
- with torch.no_grad():
- y=y[::subsample_rate]
- n_timesteps = y.shape[1]
- n_samples = y.shape[0]
- if x is None:
- x = np.arange(n_timesteps)
- args_ci = {}
- for key, value in args.items():
- if not key in ['label', 'linestyle', 'ls']:
- args_ci[key] = value
- if plot_method == 'CI':
- q = torch.tensor([0.025, 0.25, 0.5, 0.75, 0.975])
- quantiles = torch.quantile(y, q, dim=0, keepdim=False)
- # Plot first the 95% CI
- ax.fill_between(x, quantiles[0], quantiles[4], alpha=0.25, lw=0, **args_ci)
- ax.fill_between(x, quantiles[1], quantiles[3], alpha=0.25, lw=0, **args_ci)
- ax.plot(x, quantiles[2], **args)
- return ax
- elif plot_method == 'samples':
- n_max = 1000
- if n_samples > n_max:
- perm = torch.randperm(n_samples)
- idx = perm[:n_max]
- y = y[idx]
- alpha = max(1 / y.shape[0], 0.003)
- ax.plot(x, y.T, alpha=alpha, **args_ci)
- return ax
- # %%
- age_interval = 1.0
- n_controlpoints=9
- n_states = 1
- #post_fix = '_years_final_run_uio_ucam' #'_years_final_run' #'_long_icv' # '_strong_priors_smooth_spline2'
- post_fix = '_years_final_run'
- #features=["prior", "TotalHippocampus", "TotalGrayVol", "TotalWhiteVol", "SupraTentorialVolNotVent", "TotalLateralVentricle", "Brain-Stem"]
- features=["TotalHippocampus", "TotalGrayVol", "TotalWhiteVol", "SupraTentorialVolNotVent", "TotalLateralVentricle", "Brain-Stem"]
- #features = ["TotalHippocampus", "TotalGrayVol"]
- #features=["TotalHippocampus", "TotalGrayVol"]
- #features=["TotalHippocampus", "TotalGrayVol", "SupraTentorialVolNotVent", "Brain-Stem"]
- #features = features[:2]
- #dataset_path = Path('/tsd/p23/home/p23-edvardgr/Storage/p23-edvardgr') /'Didac_Data/processed_data' / f'feature_age_interval_{age_interval}_uio_ucam.npy'
- dataset_path = Path('/tsd/p23/home/p23-edvardgr/Storage/p23-edvardgr') /'Didac_Data/processed_data' / f'feature_age_interval_{age_interval}.npy'
- dataset = np.load(dataset_path, allow_pickle=True).item()
- device = torch.device('cpu')
- plot_method = 'CI'
- # %%
- # Plot the std of the dataset as function of age
- fig, axs = plt.subplots(2, 3, figsize=(7, 4))
- axs = axs.flatten()
- for ax, feature in zip(axs, features):
- data = dataset['features'][feature]
- #sd = np.nanstd(np.log(data), axis=0) #/np.nanmean(data, axis=0)
- sd = np.nanstd(data, axis=0) #/np.nanmean(data, axis=0)
- #sd = np.nanmean(data, axis=0)
- ax.plot(sd)
- ages = np.array([20, 30, 40, 50, 60, 70, 80, 90])
- ages_normed = (ages - 18)/age_interval
- ax.set_xticks(ages_normed)
- ax.set_xticklabels(ages)
- ax.set_ylabel("mm\u00B3")
- ax.set_xlabel("Age")
- ax.set_xlim(((18 - 18)/age_interval, (90 - 18)/age_interval))
- ax.set_title(feature)
- ax.yaxis.set_major_locator(ticker.MaxNLocator(nbins=4))
- fig.suptitle("Standard Deviation of Brain Structure Volumes over the Adult Lifespan")
- fig.tight_layout()
- fig.savefig(out_dir / 'std_volumes.pdf', dpi=300, bbox_inches = 'tight')
- # %%
- fig, axs = plt.subplots(2, len(features)//2, figsize=(7, 4))
- axs = axs.flatten()
- for feature_idx, feature in enumerate(features):
- feature_name = feature
- if feature == "prior":
- feature_name = 'TotalHippocampus'
- print(feature, feature_name)
- results_dir = Path('/tsd/p23/home/p23-edvardgr/Code/gaussian-hmm-job-scripts/model_fitter_test/Results') / f'{feature_name}_age_int_{age_interval:.1f}{post_fix}'
- mcmc_samples_path = results_dir / 'mcmc_samples.pht'
- #meta_data_dict = torch.load(results_dir / 'meta_dict.pht', map_location=torch.device('cpu'), weights_only=False)
- y = torch.tensor(dataset['features'][feature_name][: ,:, np.newaxis], device=device, dtype=torch.float64)
- n_timesteps = dataset['features'][feature_name].shape[-1]
- priors = {}
- priors['R_sigma'] = {'loc': dataset['measurment_error'][feature_name]/dataset['norm_std'][feature_name],
- 'scale': 0.5*dataset['measurment_error'][feature_name] /dataset['norm_std'][feature_name]}
- priors['z0_corr_concentration'] = 1000.0
- z0_mu_covariates={'sex': {'type': 'c', 'dim': 2, 'priors': {'loc': torch.tensor([0., 0.]), 'scale': torch.tensor([0.2, 0.01])}},
- 'icv': {'type': 'r', 'dim': 1, 'priors': {'loc': torch.tensor([[0.], [0.]]), 'scale': torch.tensor([[1.], [0.01]])}} }
- n_sites = dataset['covariates']['site'].shape[-1]
- y_bias_covariates={'site': {'type': 'c', 'dim': n_sites, 'priors': {'loc': torch.tensor([0.]), 'scale': torch.tensor([0.1])}}}
- model = ghmm.GaussianStateModel(n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- mcmc_samples = torch.load(mcmc_samples_path, map_location=torch.device('cpu'), weights_only=False)
- # Subsample the mcmc_samples
- new_samples = {}
- for key, value in mcmc_samples.items():
- new_samples[key] = value[::10]
- colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
- #for age_idx, start_age in enumerate([18, 35, 50, 60, 70]):
- # start_age_adjusted = int((start_age-18)/age_interval)
- # nac, nac_R = model.get_auto_covariance_coeff(t0 = start_age_adjusted, unconstrained_params=new_samples)
- # nac = nac[..., 0, 1].squeeze()
- # #nac = nac_R.squeeze()
- # plt_samplesd_line(nac[:, start_age_adjusted:], axs[feature_idx], x=np.arange(start_age_adjusted, n_timesteps), plot_method=plot_method, subsample_rate=1, color=colors[age_idx], label=f"{start_age}")
- corr_coef = model.get_correlation_coeff(unconstrained_params=new_samples).squeeze()
- plt_samplesd_line(corr_coef, axs[feature_idx], plot_method=plot_method, subsample_rate=1, color='black', label="Volume")
- Delta_Ts = [1, 2, 4, 8, 16]
- colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
- for plot_idx, Delta_T in enumerate(Delta_Ts):
- corr_dy_v = model.get_dy_v_covariance(Delta_T=Delta_T, unconstrained_params=new_samples).squeeze()
- if Delta_T == 1:
- label = f"{Delta_T} Yr Interval"
- else:
- label = f"{Delta_T} Yrs Interval"
- plt_samplesd_line(corr_dy_v, axs[feature_idx], x=np.arange(Delta_T, n_timesteps),
- plot_method=plot_method, subsample_rate=1, color=colors[plot_idx], label=label, ls='dotted')
- axs[feature_idx].set_ylim((0.8, 1.05))
- axs[feature_idx].set_title(f'{pretty_names[feature]}')
- ages = np.array([20, 30, 40, 50, 60, 70, 80, 90])
- ages_normed = (ages - 18)/age_interval
- axs[feature_idx].set_xticks(ages_normed)
- axs[feature_idx].set_xticklabels(ages)
- axs[feature_idx].set_xlim(((18 - 18)/age_interval, (90 - 18)/age_interval))
- y_ticks = np.linspace(0, 1, 6)
- axs[feature_idx].set_yticks(y_ticks)
- if feature_idx//3 == 1:
- axs[feature_idx].set_xlabel('Age')
- if feature_idx%3 == 0:
- axs[feature_idx].set_ylabel(r'$\rho$')
- # Assume all subplots share the same legend entries;
- # Get handles and labels from one of the axes.
- handles, labels = axs[0].get_legend_handles_labels()
- # Create a legend on the figure (centered below all subplots)
- fig.legend(handles, labels, loc='lower center', ncol=len(labels)//2,
- bbox_to_anchor=(0.5, -0.10))
- # Adjust the layout to provide space for the legend
- fig.subplots_adjust(bottom=0.25)
- fig.suptitle('Correlation of Estimates of Change Rate with Latent Change Rate')
- fig.tight_layout()
- fig.savefig(out_dir / 'correlation_vol_changerate.pdf', dpi=300, bbox_inches = 'tight')
- # %%
- fig, axs = plt.subplots(2, len(features)//2, figsize=(7, 4))
- axs = axs.flatten()
- for feature_idx, feature in enumerate(features):
- feature_name = feature
- if feature == "prior":
- feature_name = 'TotalHippocampus'
- print(feature, feature_name)
- results_dir = Path('/tsd/p23/home/p23-edvardgr/Code/gaussian-hmm-job-scripts/model_fitter_test/Results') / f'{feature_name}_age_int_{age_interval:.1f}{post_fix}'
- mcmc_samples_path = results_dir / 'mcmc_samples.pht'
- #meta_data_dict = torch.load(results_dir / 'meta_dict.pht', map_location=torch.device('cpu'), weights_only=False)
- y = torch.tensor(dataset['features'][feature_name][: ,:, np.newaxis], device=device, dtype=torch.float64)
- n_timesteps = dataset['features'][feature_name].shape[-1]
- priors = {}
- priors['R_sigma'] = {'loc': dataset['measurment_error'][feature_name]/dataset['norm_std'][feature_name],
- 'scale': 0.5*dataset['measurment_error'][feature_name] /dataset['norm_std'][feature_name]}
- priors['z0_corr_concentration'] = 1000.0
- z0_mu_covariates={'sex': {'type': 'c', 'dim': 2, 'priors': {'loc': torch.tensor([0., 0.]), 'scale': torch.tensor([0.2, 0.01])}},
- 'icv': {'type': 'r', 'dim': 1, 'priors': {'loc': torch.tensor([[0.], [0.]]), 'scale': torch.tensor([[1.], [0.01]])}} }
- n_sites = dataset['covariates']['site'].shape[-1]
- y_bias_covariates={'site': {'type': 'c', 'dim': n_sites, 'priors': {'loc': torch.tensor([0.]), 'scale': torch.tensor([0.1])}}}
- model = ghmm.GaussianStateModel(n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- mcmc_samples = torch.load(mcmc_samples_path, map_location=torch.device('cpu'), weights_only=False)
- # Subsample the mcmc_samples
- new_samples = {}
- for key, value in mcmc_samples.items():
- new_samples[key] = value[::10]
- colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
- start_age_adjusted = 0
- nac, nac_R = model.get_auto_covariance_coeff(t0 = start_age_adjusted, unconstrained_params=new_samples)
- r2 = nac[..., 0, 0].squeeze()**2
- #nac = nac_R.squeeze()
- plt_samplesd_line(r2[:, start_age_adjusted:], axs[feature_idx],
- x=np.arange(start_age_adjusted, n_timesteps),
- plot_method=plot_method, subsample_rate=1,
- color=colors[0], label=f"Latent volume")
- r2_R = nac_R.squeeze()**2
- plt_samplesd_line(r2_R[:, start_age_adjusted:], axs[feature_idx],
- x=np.arange(start_age_adjusted, n_timesteps),
- plot_method=plot_method, subsample_rate=1,
- color=colors[1], label=f"Measured volume")
- print_ages = np.array([30, 40, 50, 60, 70, 80, 90])
- print(feature)
- print('R2 latent:')
- for print_age in print_ages:
- print(f"{print_age}: {torch.mean(r2[:, int((print_age-18)/age_interval)]).item():.4f} - ", end='')
- print('R2 measured:')
- for print_age in print_ages:
- print(f"{print_age}: {torch.mean(r2_R[:, int((print_age-18)/age_interval)]).item():.4f} - ", end='')
- axs[feature_idx].set_ylim((0.8, 1.05))
- axs[feature_idx].set_title(f'{pretty_names[feature]}')
- ages = np.array([20, 30, 40, 50, 60, 70, 80, 90])
- ages_normed = (ages - 18)/age_interval
- axs[feature_idx].set_xticks(ages_normed)
- axs[feature_idx].set_xticklabels(ages)
- axs[feature_idx].set_xlim(((18 - 18)/age_interval, (90 - 18)/age_interval))
- y_ticks = np.linspace(0, 1, 6)
- axs[feature_idx].set_yticks(y_ticks)
- if feature_idx//3 == 1:
- axs[feature_idx].set_xlabel('Age')
- if feature_idx%3 == 0:
- axs[feature_idx].set_ylabel('R\u00B2')
- # Assume all subplots share the same legend entries;
- # Get handles and labels from one of the axes.
- handles, labels = axs[0].get_legend_handles_labels()
- # Create a legend on the figure (centered below all subplots)
- fig.legend(handles, labels, loc='lower center', ncol=len(labels), bbox_to_anchor=(0.5, -0.05))
- # Adjust the layout to provide space for the legend
- fig.subplots_adjust(bottom=0.25)
- fig.suptitle('Explained Variance from Volume Levels at Age 18')
- fig.tight_layout()
- fig.savefig(out_dir / 'explained_variance.pdf', dpi=300, bbox_inches = 'tight')
- # %%
- fig, axs = plt.subplots(2, len(features)//2, figsize=(7, 4))
- axs = axs.flatten()
- for feature_idx, feature in enumerate(features):
- feature_name = feature
- if feature == "prior":
- feature_name = 'TotalHippocampus'
- print(feature, feature_name)
- results_dir = Path('/tsd/p23/home/p23-edvardgr/Code/gaussian-hmm-job-scripts/model_fitter_test/Results') / f'{feature_name}_age_int_{age_interval:.1f}{post_fix}'
- mcmc_samples_path = results_dir / 'mcmc_samples.pht'
- #meta_data_dict = torch.load(results_dir / 'meta_dict.pht', map_location=torch.device('cpu'), weights_only=False)
- y = torch.tensor(dataset['features'][feature_name][: ,:, np.newaxis], device=device, dtype=torch.float64)
- n_timesteps = dataset['features'][feature_name].shape[-1]
- priors = {}
- priors['R_sigma'] = {'loc': dataset['measurment_error'][feature_name]/dataset['norm_std'][feature_name],
- 'scale': 0.5*dataset['measurment_error'][feature_name] /dataset['norm_std'][feature_name]}
- priors['z0_corr_concentration'] = 1000.0
- z0_mu_covariates={'sex': {'type': 'c', 'dim': 2, 'priors': {'loc': torch.tensor([0., 0.]), 'scale': torch.tensor([0.2, 0.01])}},
- 'icv': {'type': 'r', 'dim': 1, 'priors': {'loc': torch.tensor([[0.], [0.]]), 'scale': torch.tensor([[1.], [0.01]])}} }
- n_sites = dataset['covariates']['site'].shape[-1]
- y_bias_covariates={'site': {'type': 'c', 'dim': n_sites, 'priors': {'loc': torch.tensor([0.]), 'scale': torch.tensor([0.1])}}}
- model = ghmm.GaussianStateModel(n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- mcmc_samples = torch.load(mcmc_samples_path, map_location=torch.device('cpu'), weights_only=False)
- # Subsample the mcmc_samples
- new_samples = {}
- for key, value in mcmc_samples.items():
- new_samples[key] = value[::10]
- colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
- for age_idx, start_age in enumerate([18, 35, 50, 60, 70]):
- start_age_adjusted = int((start_age-18)/age_interval)
- nac, nac_R = model.get_auto_covariance_coeff(t0 = start_age_adjusted, unconstrained_params=new_samples)
- nac = nac[..., 1, 1].squeeze()
- plt_samplesd_line(nac[:, start_age_adjusted:], axs[feature_idx], x=np.arange(start_age_adjusted, n_timesteps), plot_method=plot_method, subsample_rate=1, color=colors[age_idx], label=f"{start_age}")
- axs[feature_idx].set_ylim((0.8, 1.05))
- axs[feature_idx].set_title(f'{pretty_names[feature]}')
- ages = np.array([20, 30, 40, 50, 60, 70, 80, 90])
- ages_normed = (ages - 18)/age_interval
- axs[feature_idx].set_xticks(ages_normed)
- axs[feature_idx].set_xticklabels(ages)
- axs[feature_idx].set_xlim(((18 - 18)/age_interval, (90 - 18)/age_interval))
- y_ticks = np.linspace(0, 1, 6)
- axs[feature_idx].set_yticks(y_ticks)
- if feature_idx//3 == 1:
- axs[feature_idx].set_xlabel('Age')
- if feature_idx%3 == 0:
- axs[feature_idx].set_ylabel(r"$\rho_{AC}$")
- # Assume all subplots share the same legend entries;
- # Get handles and labels from one of the axes.
- handles, labels = axs[0].get_legend_handles_labels()
- # Create a legend on the figure (centered below all subplots)
- fig.legend(handles, labels, loc='lower center', ncol=len(labels), bbox_to_anchor=(0.5, -0.05))
- # Adjust the layout to provide space for the legend
- fig.subplots_adjust(bottom=0.25)
- fig.suptitle('Autocorrelation of Latent Change Rate')
- fig.tight_layout()
- fig.savefig(out_dir / 'correlation_changerate.pdf', dpi=300, bbox_inches = 'tight')
- # %%
- for key in mcmc_samples.keys():
- print(f"'{key}': '',")
- # %%
- #fig, axs_features = plt.subplots(3, len(features), figsize=(len(features)/6*20, 5), sharex=True)
- fig = plt.figure(figsize=(8, 20))
- rows = 1
- subfigs = fig.subfigures(rows, int(np.ceil(len(features)/rows))).flatten()
- pretty_coef_names = {'R_sigma': r'$\sigma_R$',
- 'b_t_coeffs': r'$b(t)$',
- 'sigma_p_coeffs': r'$\sigma_q(t)$',
- 'y_bias.cat_coeffs.site.params': r'$\beta(site)$',
- 'z0_mu.bias': r'$\beta_{sv0}$',
- 'z0_mu.cat_coeffs.sex.params': r'$\beta_{sv0,sex}$',
- 'z0_mu.regressors.icv': r'$\beta_{sv0,ICV}$',
- 'z0_sigma': r'$\sigma_{sv0}$'}
- for feature_idx, feature in enumerate(features):
- feature_name = feature
- if feature == "prior":
- feature_name = 'TotalHippocampus'
- print(feature, feature_name)
- results_dir = Path('/tsd/p23/home/p23-edvardgr/Code/gaussian-hmm-job-scripts/model_fitter_test/Results') / f'{feature_name}_age_int_{age_interval:.1f}{post_fix}'
- mcmc_samples_path = results_dir / 'mcmc_samples.pht'
- #meta_data_dict = torch.load(results_dir / 'meta_dict.pht', map_location=torch.device('cpu'), weights_only=False)
- y = torch.tensor(dataset['features'][feature_name][: ,:, np.newaxis], device=device, dtype=torch.float64)
- n_timesteps = dataset['features'][feature_name].shape[-1]
- priors = {}
- priors['R_sigma'] = {'loc': dataset['measurment_error'][feature_name]/dataset['norm_std'][feature_name],
- 'scale': 0.5*dataset['measurment_error'][feature_name] /dataset['norm_std'][feature_name]}
- priors['z0_corr_concentration'] = 1000.0
- z0_mu_covariates={'sex': {'type': 'c', 'dim': 2, 'priors': {'loc': torch.tensor([0., 0.]), 'scale': torch.tensor([1., 0.01])}}}
- n_sites = dataset['covariates']['site'].shape[-1]
- y_bias_covariates={'site': {'type': 'c', 'dim': n_sites, 'priors': {'loc': torch.tensor([0.]), 'scale': torch.tensor([0.1])}}}
- model = ghmm.GaussianStateModel(n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- model.norm_mean = dataset['norm_means'][feature_name]
- model.norm_std = dataset['norm_std'][feature_name]
- if feature == 'prior':
- mcmc_samples = Predictive(model, {}, num_samples=100, parallel=True)(y[[0]])
- else:
- mcmc_samples = torch.load(mcmc_samples_path, map_location=torch.device('cpu'), weights_only=False)
- n_params = len(list(pretty_coef_names.keys()))
- n_params = 0
- for idx, (param_name, pretty_coef_name) in enumerate(pretty_coef_names.items()):
- params = mcmc_samples[param_name]
- params = params.reshape(params.shape[0], -1).cpu().detach().numpy()
- n_params += params.shape[1]
- print(n_params)
- axs = subfigs[feature_idx].subplots(n_params, 1, sharex=True)
- #subfigs[feature_idx].subplots_adjust(hspace=0.4, wspace=0.4)
- subfigs[feature_idx].suptitle(pretty_names[feature], y=0.91, wrap=True)
- param_idx = 0
- for idx, (param_name, pretty_coef_name) in enumerate(pretty_coef_names.items()):
- params = mcmc_samples[param_name]
- params = params.reshape(params.shape[0], -1).cpu().detach().numpy()
- axs[param_idx].text(0, 1, pretty_coef_name, verticalalignment='bottom', horizontalalignment='right', transform=axs[param_idx].transAxes, rotation=90, rotation_mode='anchor')
- for sub_param_idx in range(params.shape[1]):
- axs[param_idx].plot(params[:, sub_param_idx], lw=0.5)
- axs[param_idx].axis('off')
- param_idx += 1
- axs[param_idx-1].plot([0, 1], [0, 0], color='black', transform=axs[param_idx-1].transAxes)
- #fig.tight_layout()
- #plt.show()
- fig.savefig(out_dir / 'trace_plots.pdf', dpi=300, bbox_inches = 'tight')
- # %%
- #fig, axs_features = plt.subplots(3, len(features), figsize=(len(features)/6*20, 5), sharex=True)
- fig = plt.figure(figsize=(7, 7), dpi=300)
- rows = 2
- cols = int(np.ceil(len(features)/rows))
- subfigs = fig.subfigures(rows, cols).flatten()
- for feature_idx, feature in enumerate(features):
- feature_name = feature
- if feature == "prior":
- feature_name = 'TotalHippocampus'
- print(feature, feature_name)
- results_dir = Path('/tsd/p23/home/p23-edvardgr/Code/gaussian-hmm-job-scripts/model_fitter_test/Results') / f'{feature_name}_age_int_{age_interval:.1f}{post_fix}'
- mcmc_samples_path = results_dir / 'mcmc_samples.pht'
- #meta_data_dict = torch.load(results_dir / 'meta_dict.pht', map_location=torch.device('cpu'), weights_only=False)
- y = torch.tensor(dataset['features'][feature_name][: ,:, np.newaxis], device=device, dtype=torch.float64)
- n_timesteps = dataset['features'][feature_name].shape[-1]
- priors = {}
- priors['R_sigma'] = {'loc': dataset['measurment_error'][feature_name]/dataset['norm_std'][feature_name],
- 'scale': 0.5*dataset['measurment_error'][feature_name] /dataset['norm_std'][feature_name]}
- priors['z0_corr_concentration'] = 1000.0
- z0_mu_covariates={'sex': {'type': 'c', 'dim': 2, 'priors': {'loc': torch.tensor([0., 0.]), 'scale': torch.tensor([0.2, 0.01])}},
- 'icv': {'type': 'r', 'dim': 1, 'priors': {'loc': torch.tensor([[0.], [0.]]), 'scale': torch.tensor([[1.], [0.01]])}} }
- n_sites = dataset['covariates']['site'].shape[-1]
- y_bias_covariates={'site': {'type': 'c', 'dim': n_sites, 'priors': {'loc': torch.tensor([0.]), 'scale': torch.tensor([0.1])}}}
- model = ghmm.GaussianStateModel(n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- model.norm_mean = dataset['norm_means'][feature_name]
- model.norm_std = dataset['norm_std'][feature_name]
- if feature == 'prior':
- mcmc_samples = Predictive(model, {}, num_samples=100, parallel=True)(y[[0]])
- else:
- mcmc_samples = torch.load(mcmc_samples_path, map_location=torch.device('cpu'), weights_only=False)
- mu_t_g_t, Sigma_t_g_t, y_mu, y_Sigma, b_t, Q_t, _ = model.get_posterior_distribution(unconstrained_params=mcmc_samples)
- print(f'mu_t_g_t: {mu_t_g_t.shape}')
- print(f'Sigma_t_g_t: {Sigma_t_g_t.shape}')
- print(f'b_t: {b_t.shape}')
- print(f'Q_t: {Q_t.shape}')
- age_range = 100-18
- if not ('prior' in features):
- mu_t_g_t[..., 0] = mu_t_g_t[..., 0]*model.norm_std + model.norm_mean
- mu_t_g_t[..., 1] = mu_t_g_t[..., 1]*model.norm_std/(age_range)
- Sigma_t_g_t[..., 0, 0] = Sigma_t_g_t[..., 0, 0]*model.norm_std**2
- Sigma_t_g_t[..., 1, 1] = Sigma_t_g_t[..., 1, 1]*model.norm_std**2/(age_range**2)
- b_t = b_t*model.norm_std/(age_range**2)
- Q_t = Q_t*model.norm_std**2/(age_range**4)
- #axs = axs_features[:, feature_idx]
- axs = subfigs[feature_idx].subplots(2, 1)
- subfigs[feature_idx].subplots_adjust(hspace=0.4, wspace=0.2)
- subfigs[feature_idx].suptitle(pretty_names[feature])
- ax_s = axs[0]
- ax_v = axs[1]
- #ax_a = axs[2]
- if not ('prior' in features):
- for i in range(y.shape[0]):
- # Get the indices where the observations are not missing
- nan_idx = np.isnan(y[i, :, 0].detach().cpu().numpy())
- t = np.arange(y.shape[1])[~nan_idx]
- ax_s.plot(t, y[i, ~nan_idx, 0].detach().cpu().numpy(), '.-', alpha=0.02, markersize=2, color='black', rasterized=True)
- alpha = 0.003
- for idx in range(mu_t_g_t.shape[-1]):
- mean = mu_t_g_t[:, ..., idx].detach().squeeze().cpu()
- std = torch.sqrt(Sigma_t_g_t[:, ..., idx, idx].detach().squeeze().cpu())
- if idx == 0:
- Sigma_icv = (mcmc_samples['z0_mu.regressors.icv'].squeeze()[..., 0]**2 * 1.0)[:,None]
- std = torch.sqrt(std**2 + Sigma_icv)
- #axs[idx+1].plot(mean, label=f"State {idx}", color='blue', alpha=alpha)
- plt_samplesd_line(mean, axs[idx], plot_method=plot_method, color='blue')
- plt_samplesd_line(mean + 2*std, axs[idx], plot_method=plot_method, color='red')
- plt_samplesd_line(mean - 2*std, axs[idx], plot_method=plot_method, color='red')
- mean = mu_t_g_t[:, ..., :int((90-18)/age_interval), idx].detach().squeeze().cpu()
- std = torch.sqrt(Sigma_t_g_t[:, ..., :int((90-18)/age_interval), idx, idx].detach().squeeze().cpu())
- min_value = torch.min(torch.mean(mean, dim=0) - 2*std)
- max_value = torch.max(torch.mean(mean, dim=0) + 2*std)
- margin = (max_value - min_value)*0.075
- y_lim = (min_value - margin, max_value + margin)
- axs[idx].set_ylim(y_lim)
- # Plot the posterior of the acceleration
- #mean = b_t[:, ..., 0].detach().squeeze().cpu()
- #std = torch.sqrt(Q_t[:, ..., 0].detach().squeeze().cpu())
- #mean = b_t[:, ..., :int((90-18)/age_interval), 0].detach().squeeze().cpu()
- #std = torch.sqrt(Q_t[:, ..., :int((90-18)/age_interval), 0].detach().squeeze().cpu())
- #min_value = torch.min(torch.mean(mean, dim=0) - 2*std)
- #max_value = torch.max(torch.mean(mean, dim=0) + 2*std)
- #margin = (max_value - min_value)*0.075
- #y_lim = (min_value - margin, max_value + margin)
- #ax_a.set_ylim(y_lim)
- #plt_samplesd_line(mean, ax_a, plot_method=plot_method, color='blue')
- #plt_samplesd_line(mean + 2*std, ax_a, plot_method=plot_method, color='red')
- #plt_samplesd_line(mean - 2*std, ax_a, plot_method=plot_method, color='red')
- #ax_s.set_title('Volume')
- ax_v.set_title("Change Rate")
- #ax_a.set_title("Second derviative")
- if feature_idx%cols==0:
- ax_s.set_ylabel("mm\u00B3 ")
- ax_v.set_ylabel("mm\u00B3/year")
- #ax_a.set_ylabel("mm\u00B3/year\u00B2")
- ax_v.set_xlabel("Age")
- ages = np.array([20, 30, 40, 50, 60, 70, 80, 90])
- ages_normed = (ages - 18)/age_interval
- ax_s.set_xticks(ages_normed)
- ax_s.set_xticklabels(ages)
- ax_v.set_xticks(ages_normed)
- ax_v.set_xticklabels(ages)
- ax_s.ticklabel_format(style='sci', useOffset=False, axis='y', scilimits=(3, 3))
- ax_v.ticklabel_format(style='sci', useOffset=False, axis='y', scilimits=(3, 3))
- #ax_a.ticklabel_format(style='sci', useOffset=False, axis='y', scilimits=(3, 3))
- ax_s.yaxis.set_major_locator(ticker.MaxNLocator(nbins=6))
- ax_v.yaxis.set_major_locator(ticker.MaxNLocator(nbins=6))
- #ax_a.yaxis.set_major_locator(ticker.MaxNLocator(nbins=6))
- ax_s.set_xlim((0, (90-18)/age_interval))
- ax_v.set_xlim((0, (90-18)/age_interval))
- #fig.tight_layout()
- #plt.show()
- fig.savefig(out_dir / 'norm_curves.pdf', dpi=300, bbox_inches = 'tight')
- # %%
- fig, axs = plt.subplots(2, len(features)//2, figsize=(7, 4))
- axs = axs.flatten()
- for feature_idx, feature in enumerate(features):
- feature_name = feature
- if feature == "prior":
- feature_name = 'TotalHippocampus'
- print(feature, feature_name)
- results_dir = Path('/tsd/p23/home/p23-edvardgr/Code/gaussian-hmm-job-scripts/model_fitter_test/Results') / f'{feature_name}_age_int_{age_interval:.1f}{post_fix}'
- mcmc_samples_path = results_dir / 'mcmc_samples.pht'
- #meta_data_dict = torch.load(results_dir / 'meta_dict.pht', map_location=torch.device('cpu'), weights_only=False)
- y = torch.tensor(dataset['features'][feature_name][: ,:, np.newaxis], device=device, dtype=torch.float64)
- n_timesteps = dataset['features'][feature_name].shape[-1]
- priors = {}
- priors['R_sigma'] = {'loc': dataset['measurment_error'][feature_name]/dataset['norm_std'][feature_name],
- 'scale': 0.5*dataset['measurment_error'][feature_name] /dataset['norm_std'][feature_name]}
- priors['z0_corr_concentration'] = 1000.0
- z0_mu_covariates={'sex': {'type': 'c', 'dim': 2, 'priors': {'loc': torch.tensor([0., 0.]), 'scale': torch.tensor([0.2, 0.01])}},
- 'icv': {'type': 'r', 'dim': 1, 'priors': {'loc': torch.tensor([[0.], [0.]]), 'scale': torch.tensor([[1.], [0.01]])}} }
- n_sites = dataset['covariates']['site'].shape[-1]
- y_bias_covariates={'site': {'type': 'c', 'dim': n_sites, 'priors': {'loc': torch.tensor([0.]), 'scale': torch.tensor([0.1])}}}
- mcmc_samples = torch.load(mcmc_samples_path, map_location=torch.device('cpu'), weights_only=False)
- # Subsample the mcmc_samples
- new_samples = {}
- for key, value in mcmc_samples.items():
- new_samples[key] = value[::300]
- colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
- model = ghmm.GaussianStateModel(n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- #corr_coef = model.get_correlation_coeff(unconstrained_params=new_samples).squeeze()
- #plt_samplesd_line(corr_coef, axs[feature_idx], plot_method=plot_method, subsample_rate=1, color='black', label="$NAC_{s_k v_k}$")
- n_samples = [1, 5, 11]
- linestyles = ['dotted', (0, (1, 1)), (0, (0.5, 0.5))]
- age_sample_intervals = [1, 2, 4]
- colors = plt.rcParams['axes.prop_cycle'].by_key()['color']
- for age_int_idx, age_sample_interval in enumerate(age_sample_intervals):
- for plot_idx, n_sample in enumerate(n_samples):
- new_n_timesteps = int(n_timesteps*n_sample/age_sample_interval)
- model = ghmm.GaussianStateModel(new_n_timesteps, n_controlpoints,
- n_states, device=device, priors=priors,
- z0_mu_covariates=z0_mu_covariates,
- y_bias_covariates=y_bias_covariates)
- corr_dy_v = model.get_alpha_v_covariance(n=n_sample, unconstrained_params=new_samples).squeeze()
- if age_sample_interval == 1:
- label = f"{age_sample_interval} Yr Interval - {n_sample+1} Samples"
- else:
- label = f"{age_sample_interval} Yrs Interval - {n_sample+1} Samples"
- #age80_normalized = np.round((80-18)/(age_interval*age_sample_interval)*n_sample-n_sample)
- #age80_corr = torch.mean(corr_dy_v[:, age80_normalized]).item()
- #axs[feature_idx].plot((age80_normalized + n_sample)/n_sample*age_sample_interval , age80_corr, 'x', color='black')
- #print(f"Interval {age_sample_interval} years, N samples {n_sample +1}, corr age 80 {age80_corr}")
- plt_samplesd_line(corr_dy_v, axs[feature_idx], x=np.arange(n_sample+1, new_n_timesteps)/n_sample*age_sample_interval,
- plot_method=plot_method, subsample_rate=1, color=colors[age_int_idx], label=label, ls=linestyles[plot_idx])
- #axs[feature_idx].set_ylim((0.8, 1.05))
- axs[feature_idx].set_title(f'{pretty_names[feature]}')
- ages = np.array([20, 30, 40, 50, 60, 70, 80, 90])
- ages_normed = (ages - 18)/age_interval
- axs[feature_idx].set_xticks(ages_normed)
- axs[feature_idx].set_xticklabels(ages)
- axs[feature_idx].set_xlim(((18 - 18)/age_interval, (90 - 18)/age_interval))
- y_ticks = np.linspace(0, 1, 6)
- axs[feature_idx].set_yticks(y_ticks)
- if feature_idx//3 == 1:
- axs[feature_idx].set_xlabel('Age')
- if feature_idx%3 == 0:
- axs[feature_idx].set_ylabel(r'\rho')
- # Assume all subplots share the same legend entries;
- # Get handles and labels from one of the axes.
- handles, labels = axs[0].get_legend_handles_labels()
- # Create a legend on the figure (centered below all subplots)
- fig.legend(handles, labels, loc='lower center', ncol=3, bbox_to_anchor=(0.5, -0.15))
- # Adjust the layout to provide space for the legend
- fig.subplots_adjust(bottom=0.25)
- fig.suptitle('Correlation of Estimates of Change Rate with Latent Change Rate Using Two or More Time Points')
- fig.tight_layout()
- fig.savefig(out_dir / 'num_sessions_changerate.pdf', dpi=300, bbox_inches = 'tight')
create_mcmc_figures.ipynb at commit 49d09d4, no license · at the source
Overview
20 affiliations
- Center for Lifespan Changes in Brain and Cognition (LCBC), Department of Psychology, University of Oslo, Oslo, Norway
- Computational Radiology and Artificial Intelligence (CRAI), Department of Radiology and Nuclear Medicine, Oslo University Hospital, Oslo, Norway
- Department of Medicine, Faculty of Medicine and Health Sciences, Institute of Neurosciences, University of Barcelona, Barcelona, Spain
- Institut Guttmann, Institut Universitari de Neurorehabilitació adscrit a la UAB, Badalona, Spain
- The August Pi i Sunyer Biomedical Research Institute (IDIBAPS), Hospital Clinic of Barcelona, Barcelona, Spain
- Center for Lifespan Psychology, Max Planck Institute for Human Development, Berlin, Germany
- Department of Psychology, MSB Medical School Berlin, Berlin, Germany
- Max Planck UCL Centre for Computational Psychiatry and Ageing Research, Berlin, Germany, and London, United Kingdom
- Fundació Institut d’Investigació en Ciències de la Salut Germans Trias i Pujol, Badalona, Spain
- MRC Cognition and Brain Sciences Unit, Department of Psychiatry, University of Cambridge, Cambridge, United Kingdom
- Center for Environmental Neuroscience, Max Planck Institute for Human Development, Berlin, Germany
- Department of Psychiatry and Psychotherapy, University Medical Center Hamburg-Eppendorf, Hamburg, Germany
- Umeå Center for Functional Brain Imaging, Umeå University, Umeå, Sweden
- Department of Medical and Translational Biology, Umeå University, Umeå, Sweden
- Department of Diagnostics and Intervention, Umeå University, Umeå, Sweden
- Hinda and Arthur Marcus Institute for Aging Research, Deanna and Sidney Wolk Center for Memory Health, Hebrew SeniorLife, Boston, MA, United States
- Department of Neurology, Harvard Medical School, Boston, MA, United States
- Oxford Centre for Functional MRI of the Brain (FMRIB/WIN), Oxford University, Oxford, United Kingdom
- Oslo Delirium Research Group, Institute of Clinical Medicine, Campus Ahus, University of Oslo, Oslo, Norway
- Department of Geriatric Medicine, Akershus University Hospital, Oslo, Norway
Abstract
Individual differences in the volumes of brain structures are often linked to various conditions, including Alzheimer’s disease, schizophrenia, and overall brain health. However, it remains unclear to what extent these differences reflect individual levels present from young adulthood or diverging aging trajectories from later ages. In this study, we analyze the aging dynamics of the volumes of six brain structures based on magnetic resonance imaging (MRI) scans from a large cross-cohort longitudinal sample of cognitively healthy adults (n = 8,311 with 18,520 MRIs, ages from 18 to 97 years). From general assumptions about structural brain dynamics and measurement noise, a stochastic dynamical model was fitted to the data to estimate both the variability and persistence of structural changes across adulthood. Using this model, we calculated how much of the variance of volumetric differences between individuals can be attributed to stable levels from young adulthood versus systematic changes at older ages, as well as the theoretical sensitivity of longitudinal studies to detect individual differences in change. The findings were as follows: (1) Before age 60 years, inter-individual differences in neuroanatomical volumes almost exclusively reflect stable differences between individuals, while the influence from systematic differences in rate-of-change increases thereafter: up to 50% of the variation being due to differences in change at 80 years. In contrast, ventricular volume reflects differences in change from early adulthood. (2) Current brain-age models are unlikely to be sensitive to detect differences in aging trajectories. (3) Imaging studies have low reliability in detecting inter-individual brain changes before age 60 years. After 60 years, the study reliability increases sharply with longer intervals between scans and more modestly with additional intermediate observations. In conclusion, our results reinforce the view that it is critical to distinguish stable early adulthood levels from systematic differences in change when studying adult brain aging.
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.
EdvardGrodem/brain-trajectories
49d09d46b844859a100428ba04f9ef801b3bd210, 11 August 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
10 files
- examples/
example_GaussianHMM.ipyn , Jupyter, 213 linesb - scripts/
create_mcmc_figures.ipyn , Jupyter, 766 lines, 2 matchesb - scripts/
fit_model.py , Python, 105 lines - scripts/
format_data.ipynb , Jupyter, 298 lines - scripts/
significanse_test.ipynb , Jupyter, 222 lines - scripts/
visualize_population.ipy , Jupyter, 219 linesnb - setup.py, Python, 18 lines
- src/
ghmm_mcmc/ , Python, 767 linesGaussianHMM.py - src/
ghmm_mcmc/ , Python, 1 line__init__.py - README.md, Text, 9 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;
- 9 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
No dataset and no data link were found in the paper.
Data and Code Availability
The raw data were gathered from many different datasets. Different agreements are required for each dataset. Most datasets are openly available with prespecified data usage agreements. For some datasets, such as UKB, fees may apply. Requests for LCBC, UB, and COGNORM should be submitted to the corresponding principal investigator. The code to fit the model and generate the figures is available at https://
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, 28 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 20 authors, 7 keywords, 1 funder, 103 references.
Cite
This paper
Grødem, E. O., Vidal-Pineiro, D., Sørensen, Ø., Bartrés-Faz, D., Brandmaier, A. M., Cattaneo, G., Garrido, P. F., Henson, R. N., Kühn, S., Lindenberger, U., MacIntosh, B. J., Nyberg, L., Pascual-Leone, A., Smith, S. M., Solé-Padullés, C., Solana-Sánchez, J., Watne, L. O., Walhovd, K. B., Bjørnerud, A., & Fjell, A. M. (2026). Stable individual differences dominate adult brain volume variation until later life. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1242. https://
BibTeX
@article{grdem2026stable
author = {Grødem, Edvard OS and Vidal-Pineiro, Didac and Sørensen, Øystein and Bartrés-Faz, David and Brandmaier, Andreas M and Cattaneo, Gabriele and Garrido, Pablo F and Henson, Richard N and Kühn, Simone and Lindenberger, Ulman and MacIntosh, Bradley J and Nyberg, Lars and Pascual-Leone, Alvaro and Smith, Stephen M and Solé-Padullés, Cristina and Solana-Sánchez, Javier and Watne, Leiv Otto and Walhovd, Kristine B and Bjørnerud, Atle and Fjell, Anders M},
title = {{Stable individual differences dominate adult brain volume variation until later life}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = may,
volume = {4},
pages = {IMAG.a.1242},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/
url = {https://
pmid = {42212223},
pmcid = {PMC13214574}
}
RIS
TY - JOUR
AU - Grødem, Edvard OS
AU - Vidal-Pineiro, Didac
AU - Sørensen, Øystein
AU - Bartrés-Faz, David
AU - Brandmaier, Andreas M
AU - Cattaneo, Gabriele
AU - Garrido, Pablo F
AU - Henson, Richard N
AU - Kühn, Simone
AU - Lindenberger, Ulman
AU - MacIntosh, Bradley J
AU - Nyberg, Lars
AU - Pascual-Leone, Alvaro
AU - Smith, Stephen M
AU - Solé-Padullés, Cristina
AU - Solana-Sánchez, Javier
AU - Watne, Leiv Otto
AU - Walhovd, Kristine B
AU - Bjørnerud, Atle
AU - Fjell, Anders M
TI - Stable individual differences dominate adult brain volume variation until later life
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/
VL - 4
SP - IMAG.a.1242
SN - 2837-6056
PB - MIT Press
DO - 10.1162/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1162/
"type": "article-journal",
"title": "Stable individual differences dominate adult brain volume variation until later life",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Grødem",
"given": "Edvard OS"
},
{
"family": "Vidal-Pineiro",
"given": "Didac"
},
{
"family": "Sørensen",
"given": "Øystein"
},
{
"family": "Bartrés-Faz",
"given": "David"
},
{
"family": "Brandmaier",
"given": "Andreas M"
},
{
"family": "Cattaneo",
"given": "Gabriele"
},
{
"family": "Garrido",
"given": "Pablo F"
},
{
"family": "Henson",
"given": "Richard N"
},
{
"family": "Kühn",
"given": "Simone"
},
{
"family": "Lindenberger",
"given": "Ulman"
},
{
"family": "MacIntosh",
"given": "Bradley J"
},
{
"family": "Nyberg",
"given": "Lars"
},
{
"family": "Pascual-Leone",
"given": "Alvaro"
},
{
"family": "Smith",
"given": "Stephen M"
},
{
"family": "Solé-Padullés",
"given": "Cristina"
},
{
"family": "Solana-Sánchez",
"given": "Javier"
},
{
"family": "Watne",
"given": "Leiv Otto"
},
{
"family": "Walhovd",
"given": "Kristine B"
},
{
"family": "Bjørnerud",
"given": "Atle"
},
{
"family": "Fjell",
"given": "Anders M"
}
],
"container-title-short":
"volume": "4",
"page": "IMAG.a.1242",
"DOI": "10.1162/
"PMID": "42212223",
"PMCID": "PMC13214574",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
26
]
]
}
}
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/s41593-026-02363-4 [code]
- Cortical thickness changes precede high levels of amyloid by at least 7 years.Journal: Nature neuroscienceIn common: structural MRI / diffusion, 2 references, 4 authors
- [2] doi:10.1162/imag.a.1306 [code]
- Beneficial effects of foreign language learning and aerobic exercise on dentate gyrus volume and mnemonic discrimination in healthy older adults: Results from a randomized controlled trial.Journal: Imaging neuroscience (Cambridge, Mass.)In common: 1 reference, 3 authors
- [3] doi:10.1162/imag.a.1196 [code]
- Failure to detect entorhinal grid-like signals in a passive navigation human fMRI study.Journal: Imaging neuroscience (Cambridge, Mass.)In common: 3 authors
- [4] doi:10.1038/s41467-026-73668-y [code]
- Convergent and divergent brain-cognition development in early adolescence.Journal: Nature communicationsIn common: PyTorch, seaborn, pandas, 3 other tools, 5 references
- [5] doi:10.1038/s41467-026-71271-9 [code]
- Exposome-wide patterns predict brain health in aging.Journal: Nature communicationsIn common: seaborn, pandas, SciPy, 2 other tools, 5 references
- [6] 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, seaborn, pandas, 3 other tools, structural MRI / diffusion, 4 references
- [7] doi:10.1038/s41467-026-74957-2 [code]
- Joint trajectories of brain atrophy, white matter hyperintensities and cognition quantify brain maintenance.Journal: Nature communicationsIn common: structural MRI / diffusion, 6 references
- [8] doi:10.3389/frai.2026.1771088 [code]
- Few-shot deployment of pretrained MRI transformers in brain imaging tasks.Journal: Frontiers in artificial intelligenceIn common: PyTorch, seaborn, pandas, 3 other tools, structural MRI / diffusion, 3 references
- [9] doi:10.64898/2026.08.13.26360304 [code]
- Lifespan brain structural variation reveals shared organization across mental health conditionsJournal: medRxiv (preprint)In common: seaborn, pandas, SciPy, 2 other tools, author Bradley J. MacIntosh
- [10] doi:10.7554/elife.104053 [code]
- Brain cognition gaps reveal associations with dopamine and factors related to brain health through artificial intelligence prediction of functional connectome.Journal: eLifeIn common: pandas, SciPy, NumPy, 1 reference, author Lars Nyberg
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, 9 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:02aeb131c83d50f1…
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.
