Paper: Learning Cortical Parcellations Using Graph Neural Networks

648 views
Skip to first unread message

Aly Kotb

unread,
Sep 2, 2025, 3:03:05 PMSep 2
to HCP-Users
Hello All,

I have two questions on this paper:

1- In this paper https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2021.797500/full: , the connectivity matrix between each vertex in the cortical surface mesh and each ROI in the destrieux Atlas was computed. I want to make sure that this was done using the -cifti-average-roi-correlation command in the connectome workbench, if not please share with me any codes you have if possible.

2- I do not know also if the parcellation labels per subject can be made available that were used in training the GNNs

Thanks in advance.

Tim Coalson

unread,
Sep 2, 2025, 8:20:58 PMSep 2
to hcp-...@humanconnectome.org
It would probably be better to use -cifti-parcellate and then -cifti-cross-correlation, making the resulting file easier to display in wb_view.  On the other hand, if individual parcellations were used, you might need to alter the parcel mapping in order to average it across subjects afterwards.  I'm not sure why someone would use a gyral-based atlas for averaging fMRI data.

We are working on an improved individual parcellation classifier, and have not publicly released the per-subject outputs of the old method.

Tim


--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/66fa3ee5-cf04-462e-bba4-21ac9d0aca0an%40humanconnectome.org.

Glasser, Matthew

unread,
Sep 2, 2025, 9:40:21 PMSep 2
to hcp-...@humanconnectome.org

Don’t you mean -cifti-correlation?

Matt.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Tim Coalson

unread,
Sep 2, 2025, 11:00:39 PMSep 2
to hcp-...@humanconnectome.org
The question and the paper indicated correlation between vertex timeseries and ROI average timeseries, resulting in dpconn or pdconn.  I meant -cifti-cross-correlation, though perhaps I should have specified between the original dtseries and the parcellated ptseries.

For clarity, -cifti-average-roi-correlation should also be able to do this, but its output uses scalars (named maps) instead of parcels (names and lists of vertices/voxels) for the ROIs dimension, and thus requires selecting the ROI by name in wb_view (instead of clicking on the ROI/vertex of interest).  It doesn't allow the use of separate ROIs per input cifti file, so you'd still have to run it per-subject for any individualized parcellation.

Tim


Aly Kotb

unread,
Sep 2, 2025, 11:50:58 PMSep 2
to HCP-Users, glas...@wustl.edu
Cifit-correlation computes the correlation in vertex-vertex manner or ordinate-ordinate resulting in a 91,282 x 91,282 matrix which cannot be practical to train an AI model, instead the paper computed vertex-ROI correlation resulting 64K(number of vertices)-150 (number of ROIs in destrieux),.

Aly Kotb

unread,
Sep 3, 2025, 12:13:40 AMSep 3
to HCP-Users, tim.c...@gmail.com

May you please explain further what is meant by altering the parcel mapping in order to average it across subjects afterwards?
Also, as for they gyral atlas they repeated their experiment by using the (Yeo-17) atlas which is functionally aware, but results did not differ, maybe this is due to the ability of the deep learning model to capture the hidden information, as at the end the regions in an ROI defined based on gyral patterns have some degree of functional similarity that was enough for the model to understand in which parcel the vertex should be located.

Aly.

Aly Kotb

unread,
Sep 3, 2025, 12:27:16 AMSep 3
to HCP-Users, Aly Kotb, tim.c...@gmail.com
Something else please, in the CIFTI file are the 64k cortical vertices the first 64K elements as per the order of the array?

Tim Coalson

unread,
Sep 3, 2025, 12:35:42 AMSep 3
to Aly Kotb, HCP-Users
wb_command -cifti-parcellate puts the list of vertices (and/or voxels) each parcel used into the XML part of the header.  But, when using parcellations that are individualized, these lists of vertices change per-subject.  Some wb_command -cifti-* commands, when operating on multiple cifti files, will check for whether the mappings match (if you are doing some ROI analyses, and you have two different subsets with only 3 parcels in each, but they aren't the same areas, this check will stop you from accidentally averaging/subtracting/etc two files that use different areas).

The downside is that wb_command can't figure out when parcels are "conceptually" the same across subjects, despite having lists of vertices that aren't a perfect match, and it will also error in that case.  To fix it, you can overwrite the parcels mapping in the files (say, with the group-consensus parcel definitions) before averaging them.  The -cifti-change-mapping command can make this change.

In the standard "91k grayordinates", the cortical vertices are the first ~59k of the file, not 64k.  This is because we exclude the medial wall vertices.  However, surface-only cifti files are not standardized in this way, some have 59k indices, others have 64k.  It is also possible to generate a surface and volume cifti file that doesn't exclude the medial wall, and has ~96k total indices.  I recommend using wb_command -cifti-separate if you want to get just the cortical data without any complications (there is also -cifti-create-dense-from-template if you want to go straight from cifti to cifti).  You can also use nibabel to get the full indexing information in python, or cifti-matlab in matlab, and extract it that way.

Tim

Aly Kotb

unread,
Sep 6, 2025, 1:19:05 AMSep 6
to HCP-Users, tim.c...@gmail.com, HCP-Users, Aly Kotb
Thank you so much for the thorough explanation.

Aly Kotb

unread,
Sep 6, 2025, 7:35:55 AMSep 6
to HCP-Users, Aly Kotb, tim.c...@gmail.com, HCP-Users

Another question, when I print the labels table of "L.aparc.a2009s.32k_fs_LR.label.gii'", I do not understand what is the highlighted ???

Also when I compute the correlation between CIFTI files of the sessions the same subject it is around 0.8.  but after I compute the connectivity matrices between vertices and brain regions the correlation between the connectivity matrices of intra subject sessions is around 0.18-0.2!!!

Label table for ALL maps KEY NAME RED GREEN BLUE ALPHA 0 ??? 0.000 0.000 0.000 0.000 1 L_G_and_S_frontomargin 0.090 0.863 0.235 1.000 2 L_G_and_S_occipital_inf 0.090 0.235 0.706 1.000 3 L_G_and_S_paracentral 0.247 0.392 0.235 1.000 4 L_G_and_S_subcentral 0.247 0.078 0.863 1.000

Glasser, Matthew

unread,
Sep 6, 2025, 9:59:19 AMSep 6
to hcp-...@humanconnectome.org, Aly Kotb, tim.c...@gmail.com

??? is unlabeled.

 

fMRI data have a lot of unstructured noise, particularly single vertices.  A parcels-by-parcels matrix will be more similar.  Also I am not clear which files you are using.


Matt.

 

From: Aly Kotb <alyko...@gmail.com>
Reply-To: "hcp-...@humanconnectome.org" <hcp-...@humanconnectome.org>
Date: Saturday, September 6, 2025 at 6:35 AM
To: HCP-Users <hcp-...@humanconnectome.org>
Cc: Aly Kotb <alyko...@gmail.com>, "tim.c...@gmail.com" <tim.c...@gmail.com>, HCP-Users <hcp-...@humanconnectome.org>
Subject: Re: [hcp-users] Paper: Learning Cortical Parcellations Using Graph Neural Networks

 

 

Another question, when I print the labels table of "L.aparc.a2009s.32k_fs_LR.label.gii'", I do not understand what is the highlighted ???

Aly Kotb

unread,
Sep 6, 2025, 10:26:16 AMSep 6
to HCP-Users, glas...@wustl.edu, Aly Kotb, tim.c...@gmail.com
This:   L.aparc.a2009s.32k_fs_LR.label.gii
the suffix of the parcellation result of the left cortex of any subject based on the destrieux atlas generated from FreeSurfer.

Glasser, Matthew

unread,
Sep 6, 2025, 10:26:55 AMSep 6
to Aly Kotb, HCP-Users, tim.c...@gmail.com

The fMRI files.

Aly Kotb

unread,
Sep 6, 2025, 10:37:42 AMSep 6
to HCP-Users, glas...@wustl.edu, tim.c...@gmail.com, Aly Kotb
1- They are in this directory: HCP_1200/subject id (e.g. 100307)/MNINonLinear/fsaverage_LR32k/   ,

2- Also, this raises a challenge of how you would unify the size of matrices representing the cortical functional time-series of all subjects, as the number of single vertices (noisy) varies from a subject to another, in other words if I am to train a deep learning model am I to include or exclude these vertices, and if to exclude as mentioned how I unify the tensor size??!!

Aly Kotb

unread,
Sep 7, 2025, 6:02:51 AMSep 7
to HCP-Users, Aly Kotb, glas...@wustl.edu, tim.c...@gmail.com
I've done some search, if I set their connectivity matrix as zero, and cut their edges in a graph representation, I think this would work.

Aly Kotb

unread,
Sep 7, 2025, 8:42:42 AMSep 7
to HCP-Users, tim.c...@gmail.com, Aly Kotb, glas...@wustl.edu
Additionally, I have a question on this, how the medial wall vertices were excluded, based on what template, because the number  of the excluded vertices from the 64K in the CIFT file is different from the number of unlabeled vertices in the  "L.aparc.a2009s.32k_fs_LR.label.gii'" and   "R.aparc.a2009s.32k_fs_LR.label.gii'
which are the result of parcellating both the right and left hemispheres based on the destrieux Atlas.
On Wednesday, September 3, 2025 at 7:35:42 AM UTC+3 tim.c...@gmail.com wrote:

Tim Coalson

unread,
Sep 8, 2025, 10:25:05 PMSep 8
to Aly Kotb, HCP-Users, glas...@wustl.edu
In standard 91k cifti files, we use a standard group consensus mask to exclude the medial wall, so it is the same in every subject.  The aparc files may be simply resampled from freesurfer outputs without any additional masking (or dilation, for if the freesurfer medial wall for a subject wanders outside the group consensus).

Tim

Aly Kotb

unread,
Sep 20, 2025, 6:40:17 AM (13 days ago) Sep 20
to HCP-Users, tim.c...@gmail.com, HCP-Users, glas...@wustl.edu, Aly Kotb
Thanks for your answer. Another question please why when I compute the correlation between ROIs for each subject's sessions, the intra subject correlation is around 0.5 while inter subject is around 0.3. When computing the same between vertex-ROI correlation matrices of each cortical surface the intra subject correlation is around 0.2 while inter subject i 0.1. While when computed between the preprocessed timeseries before computing any correlation matrices the intra subject vs inter subject is 0.8 vs 0.6. Why this variation of the observability of the intra subject vs inter subject happens between the different kind of connectivity representations mentioned.

Glasser, Matthew

unread,
Sep 20, 2025, 8:54:11 AM (13 days ago) Sep 20
to Aly Kotb, HCP-Users, tim.c...@gmail.com

I can’t parse this question.  Can you try again?

Thanks,


Matt.

 

From: Aly Kotb <alyko...@gmail.com>
Date: Saturday, September 20, 2025 at 5:40 AM
To: HCP-Users <hcp-...@humanconnectome.org>
Cc: "tim.c...@gmail.com" <tim.c...@gmail.com>, HCP-Users <hcp-...@humanconnectome.org>, "Glasser, Matthew" <glas...@wustl.edu>, Aly Kotb <alyko...@gmail.com>
Subject: Re: [hcp-users] Paper: Learning Cortical Parcellations Using Graph Neural Networks

 

Thanks for your answer. Another question please why when I compute the correlation between ROIs for each subject's sessions, the intra subject correlation is around 0.5 while inter subject is around 0.3. When computing the same between vertex-ROI correlation matrices of each cortical surface the intra subject correlation is around 0.2 while inter subject i 0.1. While when computed between the preprocessed timeseries before computing any correlation matrices the intra subject vs inter subject is 0.8 vs 0.6. Why this variation of the observability of the intra subject vs inter subject happens between the different kind of connectivity representations mentioned.

Aly Kotb

unread,
Sep 21, 2025, 5:23:56 AM (13 days ago) Sep 21
to HCP-Users, glas...@wustl.edu, tim.c...@gmail.com, Aly Kotb

When I compute connectivity  matrices based on the correlation matrices between ROIs each sessions. I find that the correlation between connectivity matrices of  intra-subject sessions is around 0.5, while the inter-subject correlation (correlations between connectivity matrices of sessions of different subjects) is around 0.3.

When I instead compute correlations between vertex–ROI correlation matrices of each cortical surface, the intra-subject correlation drops to about 0.2, while the inter-subject correlation is about 0.1.

Finally, when I compute correlations directly on the preprocessed time series (before forming any correlation matrices), I observe much higher values: intra-subject correlations around 0.8 and inter-subject correlations around 0.6.

Is it clear like that?


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Aly Kotb

unread,
Sep 22, 2025, 2:28:54 PM (11 days ago) Sep 22
to HCP-Users, Aly Kotb, glas...@wustl.edu, tim.c...@gmail.com
If it is not clear after re-writing please tell me??

Best, 
Ali.

Tim Coalson

unread,
Sep 22, 2025, 6:04:29 PM (11 days ago) Sep 22
to Aly Kotb, HCP-Users, glas...@wustl.edu
Averaging over ROIs removes a lot of random noise, so a dense map for each parcel should probably be expected to be more consistent than a set of parcel "affinities" calculated for each vertex.  If you used Destrieux, then the individual differences between gyral patterns and functional area locations might explain the difference in inter- versus intra-subject consistency.

We generally don't compare timeseries themselves across subjects, we do task contrast or other analysis within each subject independently, and then compare the results.  Those numbers are suspiciously high for timeseries, though, what filename exactly did you use?  It might have been an "ica-series" rather than an actual timeseries.

What type of sessions are you using?  What filenames specifically?  Resting state timeseries shouldn't really correlate across sessions, even for the same subject.  Task sessions would need to be matched directly (while RL versus LR task runs presumably used different stimulus to avoid memorization effects), so you'd need to use retest subjects to directly compare task timeseries.  Some subjects have short scans (the subject asked to get out, presumably), so that is another issue to be aware of.

Tim

Aly Kotb

unread,
Sep 27, 2025, 7:09:50 AM (6 days ago) Sep 27
to HCP-Users, tim.c...@gmail.com, HCP-Users, glas...@wustl.edu, Aly Kotb
Thank you so much for this insightful answer.

First, I used the file  "rfMRI_REST1_LR_Atlas.dtseries.nii" of the very first release from which I did these computations.

Now, I computed vertex-ROI connectivity correlation data using "rfMRI_REST1_LR_Atlas_hp2000_clean.dtseries.nii" from the S1200 release. Differences from the first insight  are more obvious for inter vs intra subjects correlation, for the vertex-ROI connectivity correlation data.

I will proceed with 70 subjects and plot the inter vs intra correlations.

My end goal is find out how can we do individualized functional parcellation based on resting-state-fMRI data, benefitting from similarity gap between inter and intra subjects correlation.

Aly Kotb

unread,
Sep 27, 2025, 7:22:28 AM (6 days ago) Sep 27
to HCP-Users, Aly Kotb, tim.c...@gmail.com, HCP-Users, glas...@wustl.edu
Another question, why can a time series of a vertex have all values as zeros??

Best,
Ali.

Glasser, Matthew

unread,
Sep 27, 2025, 9:44:29 AM (6 days ago) Sep 27
to Aly Kotb, HCP-Users, tim.c...@gmail.com

Just to be clear: we recommend use of the following file:

 

${StudyFolder}/${Subject}/MNINonLinear/Results/rfMRI_REST/rfMRI_REST_Atlas_MSMAll_hp2000_clean_rclean_tclean.dtseries.nii for studies going forward.  This file is available at ConnectomeDB powered by BALSA. 

 

There should not be any data with all zeros in the above file.

Aly Kotb

unread,
Sep 28, 2025, 3:46:46 AM (6 days ago) Sep 28
to HCP-Users, glas...@wustl.edu, tim.c...@gmail.com, Aly Kotb
Is downloading using AWS CLI or APIs yet available?

Tim Coalson

unread,
Sep 29, 2025, 8:50:41 PM (4 days ago) Sep 29
to Aly Kotb, HCP-Users, glas...@wustl.edu
While that can happen in intermediate files due to medial wall ROIs not fully overlapping after registration, but we dilate the data to fill in the relatively few vertices per subject this happens in.  The recommended released dtseries files shouldn't have cifti rows that are all zeros.

If you -cifti-separate them into gifti metric files, then because the medial wall values aren't represented in cifti format (and gifti is unable to exclude the medial wall), the command will fill the medial wall with zeros.

Tim

Tim Coalson

unread,
Sep 29, 2025, 8:53:54 PM (4 days ago) Sep 29
to Aly Kotb, HCP-Users, glas...@wustl.edu
Not for the 2025 release.  We don't have an estimate of when this will happen.

Tim

Harms, Michael

unread,
Sep 29, 2025, 9:11:22 PM (4 days ago) Sep 29
to hcp-...@humanconnectome.org, Aly Kotb, Glasser, Matthew

I don't know if that is the situation here, but note in cases of large movement during a run, it IS possible to get zeros for some vertices in the CIFTI, where the dilation (30 mm I believe) is not sufficient to fill in the zeros that arise in the volume from the participant moving outside of the scanning FOV. 

 

Cheers,

-MH

 

-- 

Michael Harms, Ph.D.

-----------------------------------------------------------

Professor of Psychiatry

Washington University School of Medicine

Department of Psychiatry, Box 8134

660 South Euclid Ave.                        Tel: 314-747-6173

St. Louis, MO  63110                          Email: mha...@wustl.edu

Reply all
Reply to author
Forward
0 new messages