OSCR

Feature selection leads to divergent neurobiological interpretations of brain-based machine learning biomarkers.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

2 blocks of code here have 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. [1] § Methods › Ridge regression CPM ↔ train_model_ranked_edges.m, lines 221 to 259 · score 0.55 · hyperparameter optimization, fitrlinear, fitting, training, ridge, CPM · block oscr:b:H0Y69CHV0PXSB-Y · Report a mismatch
  2. [2] § Methods › Datasets ↔ run_models.m, lines 38 to 46 · score 0.51 · Card Sort age, Flanker, NIH, HBN · block oscr:b:7ZBW3P1Z0114F-Z · 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

MATLAB · 499 lines · 19 KB · CC-BY-4.0 · 1 match

  1. function results = train_model(dataset, varargin)
  2. %{
  3. Function to train a ridge CPM or basic CPM model
  4. To use this script for within dataset predictions, you should pass one
  5. dataset
  6. To use this script for external (cross-dataset) predictions, you should
  7. pass two datasets
  8. %}
  9. %% Parse input arguments
  10. p = inputParser;
  11. addRequired(p, 'dataset', @isstruct);
  12. addParameter(p, 'external_dataset', '', @isstruct); % external pca table
  13. addParameter(p, 'model_type', 'ridge', @ischar); % options: ridge, cpm
  14. addParameter(p, 'seed', 1, @isnumeric);
  15. addParameter(p, 'num_folds', 10, @isnumeric);
  16. addParameter(p, 'feat_thresh', 0.05, @isnumeric);
  17. addParameter(p, 'feat_selection', 'percent', @ischar); % percent, p, ranked_10_percent, ranked_20_percent, ranked_5_percent, ranked_1_percent, all, top_half, bottom_half
  18. addParameter(p, 'null', 0, @isnumeric); % 1 for yes
  19. addParameter(p, 'control_covars', 0, @isnumeric); % 1 for yes
  20. addParameter(p, 'ranked_segment', 1, @isnumeric);
  21. addParameter(p, 'lambda', NaN, @isnumeric);
  22. parse(p, dataset, varargin{:});
  23. external_dataset = p.Results.external_dataset;
  24. model_type = p.Results.model_type;
  25. seed = p.Results.seed;
  26. num_folds = p.Results.num_folds;
  27. feat_thresh = p.Results.feat_thresh;
  28. feat_selection = p.Results.feat_selection;
  29. null = p.Results.null;
  30. control_covars = p.Results.control_covars == 1;
  31. ranked_segment = p.Results.ranked_segment;
  32. lambda = p.Results.lambda;
  33. if ~isnan(lambda) && length(lambda) > 1
  34. error(['Only a single lambda value is supported. ', ...
  35. 'To optimize lambda automatically, omit the lambda parameter or set it to NaN.']);
  36. end
  37. clearvars p
  38. %% get data
  39. % matrix data (vectorized)
  40. X = mat2edge(dataset.mats)';
  41. % behavioral data
  42. num_behav = length(dataset.phenotypes);
  43. behav_all = dataset.behav_table{:, dataset.phenotypes};
  44. n = length(behav_all);
  45. % covariate data
  46. if control_covars
  47. if isfield(dataset, 'covars') && isfield(dataset, 'covar_table')
  48. covars = dataset.covar_table{:, dataset.covars};
  49. disp('running with covariates')
  50. else
  51. disp('control_covars is set to run covariates, but either covars phenotypes or covar_table not specified')
  52. end
  53. end
  54. % shuffle for null distribution
  55. rng(seed)
  56. if null == 1
  57. shuffle_idx = randperm(length(behav_all));
  58. behav_all = behav_all(shuffle_idx, :);
  59. if control_covars && isfield(dataset, 'covars') && isfield(dataset, 'covar_table')
  60. covars = covars(shuffle_idx, :);
  61. end
  62. end
  63. % option for no PCA, external PCA, or cross-validated PCA
  64. if length(dataset.phenotypes) == 1
  65. pca_type = 'none';
  66. behav = behav_all;
  67. elseif (length(dataset.phenotypes) > 1) && (isfield(dataset, 'external_behav_table'))
  68. % if more than 1 phenotype present and if external pca file exists
  69. pca_type = 'external';
  70. % run pca in external (non-imaging) data
  71. behav_external_pca = dataset.external_behav_table{:, dataset.phenotypes};
  72. [pca_coeff, score, latent, tsquared, explained, mu] = pca(behav_external_pca);
  73. % project behavior in main dataset
  74. behav_pcs = (behav_all - mu) * pca_coeff;
  75. behav = behav_pcs(:, 1);
  76. elseif (length(dataset.phenotypes) > 1) && (~isfield(dataset, 'external_behav_table'))
  77. % if more than 1 phenotype present but no external pca file
  78. if ~isstruct(external_dataset)
  79. % do PCA within cross-validation folds for within-dataset predictions
  80. pca_type = 'cv';
  81. % make an empty array to fill in with PC test data (obtained via PCA within cross-validation scheme)
  82. behav = NaN + zeros(n, 1);
  83. elseif isstruct(external_dataset)
  84. % if no behavior-only pca file is provided, you can still do internal PCA when predicting in an external dataset
  85. pca_type = 'internal';
  86. % run pca in external (non-imaging) data
  87. [pca_coeff, score, latent, tsquared, explained, mu] = pca(behav_all);
  88. % project behavior in main dataset
  89. behav_pcs = (behav_all - mu) * pca_coeff;
  90. behav = behav_pcs(:, 1);
  91. end
  92. end
  93. rng(seed)
  94. %% Within-dataset
  95. if isempty(external_dataset)
  96. % Select cross-validation splits
  97. cv_idx = cv_indices(n, num_folds);
  98. coef_all = zeros(size(X, 2), num_folds);
  99. coef0_all = zeros(num_folds, 1);
  100. y_predict = zeros(n, 1);
  101. lambda_total = NaN(num_folds, 1);
  102. for k = 1:num_folds
  103. train_idx = find(cv_idx ~= k);
  104. test_idx = find(cv_idx == k);
  105. X_train = X(train_idx, :);
  106. X_test = X(test_idx, :);
  107. if strcmp(pca_type, 'cv')
  108. % run pca in training data
  109. [pca_coeff, score, latent, tsquared, explained, mu] = pca(behav_all(train_idx, :));
  110. % project behavior in training data
  111. behav_pcs = (behav_all(train_idx, :) - mu) * pca_coeff;
  112. behav_train = behav_pcs(:, 1);
  113. % project behavior in test data
  114. behav_pcs = (behav_all(test_idx, :) - mu) * pca_coeff;
  115. behav_test = behav_pcs(:, 1);
  116. behav(test_idx) = behav_test; % save the test cross-validated PC for later
  117. else
  118. behav_train = behav(train_idx);
  119. behav_test = behav(test_idx);
  120. end
  121. % Step 1 of feature selection: correlation
  122. if control_covars
  123. covars_train = covars(train_idx);
  124. % select features with partial correlation
  125. [edge_corr, edge_p] = partialcorr(X_train, behav_train, covars_train);
  126. else
  127. % select features with standard correlation
  128. [edge_corr, edge_p] = corr(X_train, behav_train);
  129. end
  130. % Step 2 of feature selection: thresholding
  131. if strcmp(feat_selection, 'p') % selecting by p value
  132. p_thresh = feat_thresh;
  133. feat_loc = find(edge_p < p_thresh);
  134. elseif strcmp(feat_selection, 'percent')
  135. p_thresh = prctile(edge_p, 100 * feat_thresh);
  136. feat_loc = find(edge_p < p_thresh);
  137. elseif strcmp(feat_selection, 'ranked_10_percent')
  138. total_features = length(edge_p);
  139. segment_size = round(total_features * 0.10);
  140. start_index = (ranked_segment - 1) * segment_size + 1;
  141. end_index = min(ranked_segment * segment_size, total_features);
  142. [~, sorted_indices] = sort(edge_p);
  143. feat_loc = sorted_indices(start_index:end_index);
  144. elseif strcmp(feat_selection, 'ranked_20_percent')
  145. total_features = length(edge_p);
  146. segment_size = round(total_features * 0.20);
  147. start_index = (ranked_segment - 1) * segment_size + 1;
  148. end_index = min(ranked_segment * segment_size, total_features);
  149. [~, sorted_indices] = sort(edge_p);
  150. feat_loc = sorted_indices(start_index:end_index);
  151. elseif strcmp(feat_selection, 'ranked_5_percent')
  152. total_features = length(edge_p);
  153. segment_size = round(total_features * 0.05);
  154. start_index = (ranked_segment - 1) * segment_size + 1;
  155. end_index = min(ranked_segment * segment_size, total_features);
  156. [~, sorted_indices] = sort(edge_p);
  157. feat_loc = sorted_indices(start_index:end_index);
  158. elseif strcmp(feat_selection, 'ranked_1_percent')
  159. total_features = length(edge_p);
  160. segment_size = round(total_features * 0.01);
  161. start_index = (ranked_segment - 1) * segment_size + 1;
  162. end_index = min(ranked_segment * segment_size, total_features);
  163. [~, sorted_indices] = sort(edge_p);
  164. feat_loc = sorted_indices(start_index:end_index);
  165. elseif strcmp(feat_selection, 'all')
  166. feat_loc = 1:length(edge_p);
  167. elseif strcmp(feat_selection, 'top_half')
  168. [~, sorted_indices] = sort(edge_p);
  169. feat_loc = sorted_indices(1:round(length(edge_p)/2));
  170. elseif strcmp(feat_selection, 'bottom_half')
  171. [~, sorted_indices] = sort(edge_p, 'descend');
  172. feat_loc = sorted_indices(1:round(length(edge_p)/2));
  173. elseif strcmp(feat_selection, 'top_10_percent')
  174. p_thresh = prctile(edge_p, 10);
  175. feat_loc = find(edge_p < p_thresh);
  176. elseif strcmp(feat_selection, 'bottom_90_percent')
  177. p_thresh = prctile(edge_p, 10);
  178. feat_loc = find(edge_p > p_thresh);
  179. elseif strcmp(feat_selection, 'top_20_percent')
  180. p_thresh = prctile(edge_p, 20);
  181. feat_loc = find(edge_p < p_thresh);
  182. elseif strcmp(feat_selection, 'bottom_80_percent')
  183. p_thresh = prctile(edge_p, 20);
  184. feat_loc = find(edge_p > p_thresh);
  185. end
  186. % model fitting
  187. if strcmp(model_type, 'ridge')
  188. if isnan(lambda)
  189. mdl = fitrlinear(X_train(:, feat_loc), behav_train, ...
  190. 'Learner', 'leastsquares', ...
  191. 'Regularization', 'ridge', ...
  192. 'OptimizeHyperparameters', {'Lambda'}, ...
  193. 'HyperparameterOptimizationOptions', struct('ShowPlots', false, 'Verbose', 0));
  194. coef = mdl.Beta;
  195. coef0 = mdl.Bias;
  196. lambda_total(k) = mdl.ModelParameters.Lambda;
  197. fprintf('Lambda fold %d: %.4f\n', k, lambda_total(k));
  198. else
  199. mdl = fitrlinear(X_train(:, feat_loc), behav_train, ...
  200. 'Learner', 'leastsquares', ...
  201. 'Regularization', 'ridge', ...
  202. 'Lambda', lambda);
  203. coef = mdl.Beta;
  204. coef0 = mdl.Bias;
  205. lambda_total(k) = mdl.Lambda;
  206. fprintf('Lambda fold %d: %.4f\n', k, lambda_total(k));
  207. end
  208. coef_all(feat_loc, k) = coef;
  209. coef0_all(k) = coef0;
  210. % prediction
  211. y_predict(test_idx) = X_test(:, feat_loc) * coef + coef0;
  212. elseif strcmp(model_type, 'cpm')
  213. % get positive and negative networks, and summarize into a single feature
  214. pos_network = feat_loc(edge_corr(feat_loc) > 0);
  215. neg_network = feat_loc(edge_corr(feat_loc) < 0);
  216. X_train_summary = sum(X_train(:, pos_network), 2) - sum(X_train(:, neg_network), 2);
  217. % fit model
  218. mdl = robustfit(X_train_summary, behav_train);
  219. % predict
  220. X_test_summary = sum(X_test(:, pos_network), 2) - sum(X_test(:, neg_network), 2);
  221. y_predict(test_idx) = mdl(1) + mdl(2) * X_test_summary;
  222. % save coefficients
  223. coef = zeros(length(edge_corr), 1);
  224. coef(pos_network) = mdl(2);
  225. coef(neg_network) = -mdl(2);
  226. coef0 = mdl(1);
  227. coef_all(:, k) = coef;
  228. coef0_all(k) = coef0;
  229. end
  230. end
  231. results.y_true = behav; % I changed from y to y_true
  232. results.y_predict = y_predict;
  233. results.cv_idx = cv_idx;
  234. coef_consensus_mean = zeros(35778, 1); % Initialize coef_consensus_mean with zeros
  235. for i = 1:size(coef_all, 1)
  236. if all(coef_all(i, :) ~= 0)
  237. coef_consensus_mean(i) = mean(coef_all(i, :));
  238. end
  239. end
  240. results.lambda = lambda_total;
  241. results.coef_all = coef_all;
  242. results.coef_consensus_mean = coef_consensus_mean;
  243. results.coef_mean = mean(coef_all, 2);
  244. results.coef0_mean = mean(coef0_all, 2);
  245. results.r = corr(results.y_true, results.y_predict);
  246. results.pca_type = pca_type;
  247. results.phenotypes = dataset.phenotypes;
  248. results.model_type = model_type;
  249. results.seed = seed;
  250. results.num_folds = num_folds;
  251. results.feat_thresh = feat_thresh;
  252. results.feat_selection = feat_selection;
  253. results.null = null; % 1 is for null
  254. results.control_covars = control_covars; % 1 is for yes
  255. if ismember(feat_selection, {'ranked_10_percent', 'ranked_20_percent', 'ranked_5_percent', 'ranked_1_percent'})
  256. results.ranked_segment = ranked_segment;
  257. else
  258. results.ranked_segment = 'none';
  259. end
  260. if control_covars
  261. results.covars = dataset.covars; % which variables were used as covariates
  262. else
  263. results.covars = 'none';
  264. end
  265. %% Across datasets
  266. else
  267. % get second (external) dataset X data
  268. X_external = mat2edge(external_dataset.mats)';
  269. behav_all_external = external_dataset.behav_table{:, external_dataset.phenotypes};
  270. % for second (external) y data, depends if PCA is needed
  271. if length(external_dataset.phenotypes)==1
  272. behav_external = behav_all_external;
  273. elseif (length(external_dataset.phenotypes)>1) && (isfield(external_dataset, 'external_behav_table'))
  274. % if more than 1 phenotype present and if external pca file exists
  275. pca_type = 'external';
  276. % run pca in external (non-imaging) data
  277. behav_external_external_pca = external_dataset.external_behav_table{:, external_dataset.phenotypes}; % added "external_" before both "datasets:
  278. [pca_coeff,score,latent,tsquared,explained,mu] = pca(behav_external_external_pca);
  279. % project behavior in main dataset
  280. behav_pcs_external = (behav_all_external-mu)*pca_coeff;
  281. behav_external = behav_pcs_external(:, 1);
  282. elseif (length(external_dataset.phenotypes)>1) && (~isfield(external_dataset, 'external_behav_table'))
  283. pca_type = 'internal';
  284. % run pca in external dataset
  285. behav_external_internal_pca = external_dataset.behav_table{:, external_dataset.phenotypes};
  286. [pca_coeff,score,latent,tsquared,explained,mu] = pca(behav_external_internal_pca);
  287. % project behavior in main dataset
  288. behav_pcs_external = (behav_external_internal_pca-mu)*pca_coeff;
  289. behav_external = behav_pcs_external(:, 1);
  290. end
  291. % Step 1 of feature selection: correlation
  292. if control_covars
  293. % select features with partial correlation
  294. [edge_corr, edge_p] = partialcorr(X, behav, covars);
  295. else
  296. % select features with standard correlation
  297. [edge_corr, edge_p] = corr(X, behav);
  298. end
  299. % Step 2 of feature selection: thresholding
  300. if strcmp(feat_selection, 'p')
  301. p_thresh = feat_thresh;
  302. feat_loc = find(edge_p < p_thresh);
  303. elseif strcmp(feat_selection, 'percent')
  304. p_thresh = prctile(edge_p, 100 * feat_thresh);
  305. feat_loc = find(edge_p < p_thresh);
  306. elseif strcmp(feat_selection, 'ranked_10_percent')
  307. total_features = length(edge_p);
  308. segment_size = round(total_features * 0.10);
  309. start_index = (ranked_segment - 1) * segment_size + 1;
  310. end_index = min(ranked_segment * segment_size, total_features);
  311. [~, sorted_indices] = sort(edge_p);
  312. feat_loc = sorted_indices(start_index:end_index);
  313. elseif strcmp(feat_selection, 'ranked_20_percent')
  314. total_features = length(edge_p);
  315. segment_size = round(total_features * 0.20);
  316. start_index = (ranked_segment - 1) * segment_size + 1;
  317. end_index = min(ranked_segment * segment_size, total_features);
  318. [~, sorted_indices] = sort(edge_p);
  319. feat_loc = sorted_indices(start_index:end_index);
  320. elseif strcmp(feat_selection, 'ranked_5_percent')
  321. total_features = length(edge_p);
  322. segment_size = round(total_features * 0.05);
  323. start_index = (ranked_segment - 1) * segment_size + 1;
  324. end_index = min(ranked_segment * segment_size, total_features);
  325. [~, sorted_indices] = sort(edge_p);
  326. feat_loc = sorted_indices(start_index:end_index);
  327. elseif strcmp(feat_selection, 'ranked_1_percent')
  328. total_features = length(edge_p);
  329. segment_size = round(total_features * 0.01);
  330. start_index = (ranked_segment - 1) * segment_size + 1;
  331. end_index = min(ranked_segment * segment_size, total_features);
  332. [~, sorted_indices] = sort(edge_p);
  333. feat_loc = sorted_indices(start_index:end_index);
  334. elseif strcmp(feat_selection, 'all')
  335. feat_loc = 1:length(edge_p);
  336. elseif strcmp(feat_selection, 'top_half')
  337. [~, sorted_indices] = sort(edge_p);
  338. feat_loc = sorted_indices(1:round(length(edge_p)/2));
  339. elseif strcmp(feat_selection, 'bottom_half')
  340. [~, sorted_indices] = sort(edge_p, 'descend');
  341. feat_loc = sorted_indices(1:round(length(edge_p)/2));
  342. elseif strcmp(feat_selection, 'top_10_percent')
  343. p_thresh = prctile(edge_p, 10);
  344. feat_loc = find(edge_p < p_thresh);
  345. elseif strcmp(feat_selection, 'bottom_90_percent')
  346. p_thresh = prctile(edge_p, 10);
  347. feat_loc = find(edge_p > p_thresh);
  348. elseif strcmp(feat_selection, 'top_20_percent')
  349. p_thresh = prctile(edge_p, 20);
  350. feat_loc = find(edge_p < p_thresh);
  351. elseif strcmp(feat_selection, 'bottom_80_percent')
  352. p_thresh = prctile(edge_p, 20);
  353. feat_loc = find(edge_p > p_thresh);
  354. end
  355. % model training
  356. if strcmp(model_type, 'ridge')
  357. if isnan(lambda)
  358. mdl = fitrlinear(X_train(:, feat_loc), behav_train, ...
  359. 'Learner', 'leastsquares', ...
  360. 'Regularization', 'ridge', ...
  361. 'OptimizeHyperparameters', {'Lambda'}, ...
  362. 'HyperparameterOptimizationOptions', struct('ShowPlots', false, 'Verbose', 0));
  363. coef = mdl.Beta;
  364. coef0 = mdl.Bias;
  365. lambda_used = mdl.ModelParameters.Lambda;
  366. fprintf('Lambda used (optimized): %.4f\n', lambda_used);
  367. else
  368. mdl = fitrlinear(X(:, feat_loc), behav, ...
  369. 'Learner', 'leastsquares', ...
  370. 'Regularization', 'ridge', ...
  371. 'Lambda', lambda);
  372. coef = mdl.Beta;
  373. coef0 = mdl.Bias;
  374. lambda_used = mdl.Lambda;
  375. fprintf('Lambda used (fixed): %.4f\n', lambda_used);
  376. end
  377. elseif strcmp(model_type, 'cpm')
  378. pos_network = feat_loc(edge_corr(feat_loc) > 0);
  379. neg_network = feat_loc(edge_corr(feat_loc) < 0);
  380. X_summary = sum(X(:, pos_network), 2) - sum(X(:, neg_network), 2);
  381. % fit model
  382. mdl = robustfit(X_summary, behav);
  383. % save coefficients
  384. coef = zeros(length(edge_corr), 1);
  385. coef(pos_network) = mdl(2);
  386. coef(neg_network) = -mdl(2);
  387. coef0 = mdl(1);
  388. end
  389. % prediction
  390. if strcmp(model_type, 'ridge')
  391. y_predict = X_external(:, feat_loc) * coef + coef0;
  392. elseif strcmp(model_type, 'cpm')
  393. y_predict = X_external * coef + coef0;
  394. end
  395. % store results
  396. results.y_train = behav;
  397. results.y_external_true = behav_external;
  398. results.y_external_predict = y_predict;
  399. results.coef = coef;
  400. results.coef0 = coef0;
  401. if strcmp(model_type, 'ridge')
  402. results.lambda = lambda_used;
  403. elseif strcmp(model_type, 'cpm')
  404. results.lambda = NaN;
  405. end
  406. results.coef = coef;
  407. results.coef0 = coef0;
  408. results.r = corr(results.y_external_true, results.y_external_predict);
  409. results.pca_type = pca_type;
  410. results.phenotypes = dataset.phenotypes;
  411. results.model_type = model_type;
  412. results.seed = seed;
  413. results.feat_thresh = feat_thresh;
  414. results.feat_selection = feat_selection;
  415. results.null = null; % 1 is for null
  416. results.control_covars = control_covars; % 1 is for yes
  417. if ismember(feat_selection, {'ranked_10_percent', 'ranked_20_percent', 'ranked_5_percent', 'ranked_1_percent'})
  418. results.ranked_segment = ranked_segment; % save the rankem segment number if used
  419. else
  420. results.ranked_segment = 'none';
  421. end
  422. if control_covars
  423. results.covars = dataset.covars; % which variables were used as covariates
  424. else
  425. results.covars = 'none';
  426. end
  427. end
  428. end

train_model_ranked_edges.m at commit 9b10607, under CC-BY-4.0 · at the source

Overview

Authors: Brendan D. Adkinson1, Matthew Rosenblatt2, Huili Sun1, Javid Dadashkarimi3, Link Tejavibulya1, Corey Horien4, Margaret L. Westwater5,6, Raimundo X. Rodriguez1, Stephanie Noble7,8,9, Dustin Scheinost1,2,5,10,11,12
  1. Yale School of Medicine,New Haven, CT USA
  2. Department of Biomedical Engineering, Yale University,New Haven, CT USA
  3. Department of Radiology, Perelman School of Medicine,Philadelphia, PA USA
  4. Department of Psychiatry, University of Pennsylvania,Philadelphia, PA USA
  5. Department of Radiology & Biomedical Imaging, Yale School of Medicine,New Haven, CT USA
  6. Department of Psychiatry, University of Oxford, Warneford Hospital,Oxford, UK
  7. Department of Bioengineering, Northeastern University,Boston, MA USA
  8. Department of Psychology, Northeastern University,Boston, MA USA
  9. Institute for Cognitive & Behavioral Health, Northeastern University,Boston, MA USA
  10. Department of Statistics & Data Science, Yale University,New Haven, CT USA
  11. Child Study Center, Yale School of Medicine,New Haven, CT USA
  12. Wu Tsai Institute, Yale University,New Haven, CT USA
Institutions: Yale University (United States); University of Pennsylvania (United States); Warneford Hospital (United Kingdom); Northeastern University (United States)
Journal: Nature human behaviour, volume 10, issue 7, pages 1356-1370
Dates: received 8 April 2025; accepted 16 March 2026; published online 15 April 2026; in print 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41562-026-02447-y · PMID 41986741 · PMCID PMC13388108 · OpenAlex W7154479054
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: structural MRI / diffusion (modality), human (organism), clinical / translational (subfield)
Methods: Smoothing, state filtering, decompositions, Machine learning, Statistics, Connectivity, fMRI & imaging
Keywords: Cognitive neuroscience, Machine learning, Psychology, Computational neuroscience
MeSH: Brain*, Connectome*, Machine Learning*, Neuroimaging*, Biomarkers, Diffusion Tensor Imaging, Female, Humans, Magnetic Resonance Imaging, Predictive Learning Models (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: cited by 1 paper (Europe PMC); 124 references in the paper

Abstract

A central objective in human neuroimaging is to understand the neurobiology underlying cognition and mental health. Machine learning models trained on neuroimaging data are increasingly used as tools for predicting behavioural phenotypes, enhancing precision medicine and improving generalizability compared with traditional MRI studies. However, the high dimensionality of brain connectivity data makes model interpretation challenging. Prevailing practices rely on selecting features and, implicitly, interpreting identified feature networks as uniquely representative of a given phenotype while overlooking others. Despite its widespread use, how univariate feature selection balances the trade-off between simplification for optimizing modelling and oversimplification that misrepresents true neurobiology remains understudied. Here, using four large-scale neuroimaging datasets spanning over 12,000 participants and 13 outcomes, we demonstrate that edges discarded by feature selection can achieve significant prediction accuracies while yielding different neurobiological interpretations. These results are observed across cognitive, developmental and psychiatric phenotypes, extend to both functional connectivity (functional MRI) and structural (diffusion tensor imaging) connectomes, and remain evident in external validation. They suggest that focusing on only the top features may simplify the neurobiological bases of brain–behaviour associations. Such interpretations present only the tip of the iceberg when certain disregarded features may be just as meaningful, potentially contributing to ongoing issues surrounding reproducibility within the field. More broadly, our results reinforce that subtle brain-wide signals should not be ignored.

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.

brendan-adkinson/overlooked-features

License: CC-BY-4.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 9b1060783d708e71ee5b5714dd2a8d3a73baf139, 26 September 2025
Languages: MATLAB (4)
Size: 6 files, 4 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
5 files

Code availability

The analyses were conducted using MATLAB v.R2024a. The code is available via GitHub at https://github.com/brendan-adkinson/overlooked-features. Preprocessing was carried out using Bioimage Suite v.3.01, which is freely available (https://medicine.yale.edu/bioimaging/suite/). Additional preprocessing was performed with the Human Connectome Project minimal preprocessing pipeline v.3.4.0 (https://github.com/Washington-University/HCPpipelines/releases).

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

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 4 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 availability

The data are available through the PNC, HCPD, HBN and ABCD datasets.

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

Recorded: type, language, journal, volume, issue, pages, dates, 10 authors, 4 keywords, 10 MeSH terms, 5 funders, 122 references.

Cite

This paper

Adkinson, B. D., Rosenblatt, M., Sun, H., Dadashkarimi, J., Tejavibulya, L., Horien, C., Westwater, M. L., Rodriguez, R. X., Noble, S., & Scheinost, D. (2026). Feature selection leads to divergent neurobiological interpretations of brain-based machine learning biomarkers. Nature human behaviour, 10(7), 1356-1370. https://doi.org/10.1038/s41562-026-02447-y

BibTeX

@article{adkinson2026feature,
author = {Adkinson, Brendan D. and Rosenblatt, Matthew and Sun, Huili and Dadashkarimi, Javid and Tejavibulya, Link and Horien, Corey and Westwater, Margaret L. and Rodriguez, Raimundo X. and Noble, Stephanie and Scheinost, Dustin},
title = {{Feature selection leads to divergent neurobiological interpretations of brain-based machine learning biomarkers}},
journal = {Nature human behaviour},
year = {2026},
month = apr,
volume = {10},
number = {7},
pages = {1356--1370},
publisher = {Nature Portfolio},
issn = {2397-3374},
doi = {10.1038/s41562-026-02447-y},
url = {https://doi.org/10.1038/s41562-026-02447-y},
pmid = {41986741},
pmcid = {PMC13388108}
}

RIS

TY - JOUR
AU - Adkinson, Brendan D.
AU - Rosenblatt, Matthew
AU - Sun, Huili
AU - Dadashkarimi, Javid
AU - Tejavibulya, Link
AU - Horien, Corey
AU - Westwater, Margaret L.
AU - Rodriguez, Raimundo X.
AU - Noble, Stephanie
AU - Scheinost, Dustin
TI - Feature selection leads to divergent neurobiological interpretations of brain-based machine learning biomarkers
T2 - Nature human behaviour
J2 - Nat Hum Behav
PY - 2026
DA - 2026/04/15
VL - 10
IS - 7
SP - 1356
EP - 1370
SN - 2397-3374
PB - Nature Portfolio
DO - 10.1038/s41562-026-02447-y
UR - https://doi.org/10.1038/s41562-026-02447-y
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41562-026-02447-y",
"type": "article-journal",
"title": "Feature selection leads to divergent neurobiological interpretations of brain-based machine learning biomarkers",
"container-title": "Nature human behaviour",
"author": [
{
"family": "Adkinson",
"given": "Brendan D."
},
{
"family": "Rosenblatt",
"given": "Matthew"
},
{
"family": "Sun",
"given": "Huili"
},
{
"family": "Dadashkarimi",
"given": "Javid"
},
{
"family": "Tejavibulya",
"given": "Link"
},
{
"family": "Horien",
"given": "Corey"
},
{
"family": "Westwater",
"given": "Margaret L."
},
{
"family": "Rodriguez",
"given": "Raimundo X."
},
{
"family": "Noble",
"given": "Stephanie"
},
{
"family": "Scheinost",
"given": "Dustin"
}
],
"container-title-short": "Nat Hum Behav",
"volume": "10",
"issue": "7",
"page": "1356-1370",
"DOI": "10.1038/s41562-026-02447-y",
"PMID": "41986741",
"PMCID": "PMC13388108",
"ISSN": "2397-3374",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41562-026-02447-y",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
15
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41467-024-46150-w [code]
Data leakage inflates prediction performance in connectome-based machine learning models.
Journal: Nature communications
In common: 19 references, 4 authors
[2] doi:10.1038/s41586-022-05118-w [code]
Brain-phenotype models fail for individuals who defy sample stereotypes.
Journal: Nature
In common: Statistics and Machine Learning Toolbox, 14 references, 3 authors
[3] doi:10.1038/s44220-026-00623-7 [code]
Optimizing functional connectivity scanning conditions for predicting autistic traits.
Journal: Nature. Mental health
In common: Statistics and Machine Learning Toolbox, clinical / translational, 12 references, 3 authors
[4] doi:10.1016/j.patter.2023.100756 [code]
Connectome-based machine learning models are vulnerable to subtle data manipulations.
Journal: Patterns (New York, N.Y.)
In common: Statistics and Machine Learning Toolbox, 12 references, 3 authors
[5] doi:10.1162/imag_a_00071 [code]
Rescuing missing data in connectome-based predictive modeling.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Statistics and Machine Learning Toolbox, 14 references, author Brendan D Adkinson
[6] doi:10.1016/j.neuroimage.2022.119742 [code]
Leveraging edge-centric networks complements existing network-level inference for functional connectomes.
Journal: NeuroImage
In common: Statistics and Machine Learning Toolbox, 8 references, 2 authors
[7] doi:10.1038/s41467-024-54022-6 [code]
How measurement noise limits the accuracy of brain-behaviour predictions.
Journal: Nature communications
In common: 17 references
[8] doi:10.1016/j.xpro.2021.101077 [code]
A protocol for working with open-source neuroimaging datasets.
Journal: STAR protocols
In common: 4 references, 3 authors
[9] doi:10.1038/s41467-026-73941-0 [code]
Using connectome-based predictive models to reveal the systems standardized tests and clinical symptoms are reflecting.
Journal: Nature communications
In common: 10 references, author Dustin Scheinost
[10] doi:10.1093/pnasnexus/pgaf175 [code]
Improving predictability, reliability, and generalizability of brain-wide associations for cognitive abilities via multimodal stacking.
Journal: PNAS nexus
In common: 13 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41562-026-02447-y.svg)](https://openscicode.org/badge/doi/10.1038/s41562-026-02447-y)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41562-026-02447-y.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41562-026-02447-y
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41562-026-02447-y"><img src="https://openscicode.org/badge/doi/10.1038/s41562-026-02447-y.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.