Need advice/guidance on using RSA on fMRI data

I am using an fMRI dataset from openneuro.org, it has 2 tasks, which are on task switching and language switching, and each task has four trial types, each task has 2 runs and each run has eighty trials. so
task 1 has - 160 trials and 4 trial types
task 2 has - 160 trials and 4 trial types
I have single trial beta images of these dataset too(applied Least-Squares Separate (LSS))

I am beginner and teaching myself on fMRI preprocessing and fMRI analysis(using nilearn), want to do a publication worthy hands on project. My methodology is -
RSA 1 -

  • Sub - 001 - extract voxel time series for specific ROI of task 1
  • do the same for run 2 and concatenate both runs resulting in 160 x number of voxels
  • construct 160 x 160 RDM for this ROI
  • construct model RDM of 160 x 160
  • calculate Spearman’s Rho on upper or lower triangle values of both RDMs.
  • Do the same for task 2.
  • Repeat the same for all subjects.
  • Now I will have 77 rho values for task one and task 2 too, z-transform them separately.
  • I will run t -test on task 1 77 rho values and similarly for the 2nd task.
    this is for one ROI.
    ( I am considering to do the same process for other ROI if time permits, I will repeat the same for all of ROI. )
    Am i doing it right manner or missing something.
    is it a standard approach to do RSA?

Now I am not sure how to do a cross-task RSA ? here is my approach for now -
Cross-task RSA :

  • sub-001 - extract voxel time series for specific ROI for vertically stack task 1 for all runs and do similarly for task 2
  • vertically stack both these resulting in 320 x number of voxels
  • construct RDM on this resulting in 320 x 320 matrix
    (I am unsure from below)
  • should i calculate spearman’s rho between upper or lower triangle matrix(where rows belong to task 1 and columns belong to task 2) ?
  • repeat the same for all 77 subjects
  • gather all rho values
  • and perform a t- test(after z transforming)
    Am I doing it in right manner or missing something?

I understand that i need to apply Z score on single trial beta images before constructing RDM but I am very confused about this on both RSA-1 and Cross task RSA. Can you provide clarity on this too. I will be using pdist and cdist from scipy.spatial.distance on RSA -1 and cross task RSA. I am given to the understanding that i need not z score explicitly as these pdist and cdist take care of them when creating specific RDM?

I used newbi4fmri.com, MIT fMRI boot camp to come to this methodologies.
(sorry for the long post. )

thank you very much for your time.

I think that you’re doing it right.

Note that this approach is simply correlative, it does not measure how well the differences between conditions generalize across runs.

You could instead measure on run 2 the accuracy of a task classifier trained on run 1 in each subject and ROI.

And then test the difference between tasks/ and or measure corss-task generalization.

HTH,

Bertrand

@bthirion Thank you very much for the reply Sir.

Initially when I started reading papers on MVPA, I encountered few papers suggested to have around 5+ runs at least, so I dropped the idea of classifiers but now I will now do them too.

One more confusion around z scoring the data as this article -

suggests not to do and I noticed it is controversial or there is no consensus on z scoring the beta images in few other review articles too. But many papers have done it too.
It is not computationally heavy or difficult to get it done because if i give subject by subject, task by task and run by run beta image to the nilearn.maskers.NiftiMasker it will do the z scoring, and I will use them for RSA -1, Cross task RSA, within-subject decoding and cross task generalization analysis.
I want to go with more aggregable or accepted choice. Sir, What are your advice/suggestions/recommendations on this?

To me z-scoring is a reasonable thing to do. Best,

Bertrand

Thank you very much for your help sir.