suchirsalhan commited on
Commit
3d3c650
·
verified ·
1 Parent(s): c54cf2d

Add README documenting contents and the scanner-run confound

Browse files
Files changed (1) hide show
  1. README.md +82 -0
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ tags:
4
+ - fmri
5
+ - neuroscience
6
+ - rdm
7
+ - rsa
8
+ ---
9
+
10
+ # ds003604 session RDMs
11
+
12
+ Brain representational dissimilarity matrices for the **ds003604** auditory language fMRI
13
+ dataset, one per (task × session), so the fMRI preprocessing never has to be repeated.
14
+
15
+ **12 of 12 cells present:** `Sem`, `Phon`, `Gram`, `Plaus` × `ses-5`, `ses-7`, `ses-9`.
16
+
17
+ Each `<Task>/session_rdm_<ses>.npz` contains:
18
+
19
+ | key | contents |
20
+ |---|---|
21
+ | `rdm` | the RDM, `(n_stim, n_stim)`, correlation distance. 72×72 for Sem/Phon, 60×60 for Gram/Plaus (perceptual-control trials excluded) |
22
+ | `stimuli` | stimulus **filenames**, in RDM row/column order |
23
+ | `stimulus_texts` | the stimulus **text**, parallel to `stimuli` — use this if you are feeding a language model, not `stimuli` |
24
+ | `trial_types` | condition code per stimulus (e.g. `S_H`, `P_R`, `G_G`, `SP_S`) |
25
+ | `semantic_categories` | coarse category per stimulus |
26
+ | `n_subjects`, `subject_ids` | cohort behind the RDM (38–98 depending on cell) |
27
+ | `metric`, `aggregation` | `correlation`, and how subjects were combined |
28
+
29
+ ---
30
+
31
+ ## ⚠️ These RDMs are dominated by a scanner-run confound
32
+
33
+ **Do not use them for representational similarity analysis without correcting this first.**
34
+
35
+ In ds003604 **each stimulus is presented in exactly one scanner run** (for Phon, run-01
36
+ carries 48 of the 96 stimuli and run-02 the other 48). Run membership is therefore
37
+ perfectly confounded with stimulus identity, and every cross-run stimulus pair also
38
+ differs by that run's drift, baseline and scaling. Measured on these files:
39
+
40
+ ```
41
+ "different run" predicts brain dissimilarity, Spearman rho:
42
+ Gram ses-5 +0.866 ses-7 +0.812 ses-9 +0.828
43
+ Plaus ses-5 +0.741 ses-7 +0.689 ses-9 +0.761
44
+ Phon ses-5 +0.562 ses-7 +0.488 ses-9 +0.624
45
+ Sem ses-5 +0.511 ses-7 +0.510 ses-9 +0.601
46
+ ```
47
+
48
+ Meanwhile **no stimulus property predicts them**: trial type ≈ −0.02, text length ≈ 0,
49
+ lexical overlap ≈ 0, in every cell.
50
+
51
+ These RDMs correlate across independent subject cohorts at **rho 0.74–0.92** (different
52
+ sessions of the same task), which looks like excellent reliability — but run assignment is
53
+ fixed by the protocol and so repeats identically for every subject, meaning much of that
54
+ reliability is the reliability of an acquisition artefact rather than of brain
55
+ representation.
56
+
57
+ ### The fix
58
+
59
+ Z-score each voxel **within run** before combining runs. Verified on Phon/ses-5 rebuilt
60
+ from 28 subjects' raw patterns:
61
+
62
+ ```
63
+ standard RDM vs run model: rho = +0.562
64
+ within-run-normed vs run model: rho = -0.041 <- confound removed
65
+ standard vs normed : rho = +0.287 <- they are largely different RDMs
66
+ ```
67
+
68
+ That last line matters: correcting the confound does not nudge the RDM, it changes it.
69
+
70
+ **Cohort size is not the issue** — Sem/ses-7 rebuilt from 40 to 98 subjects agrees with
71
+ the 40-subject version at rho 0.928.
72
+
73
+ After correction, alignment between these RDMs and a trained language model peaks at
74
+ **+0.022** (early layers, not significant), with a sensible layer profile but ≈0
75
+ magnitude. Evidence and scripts:
76
+ [`BrainAlign/cdl-devai-results`](https://huggingface.co/datasets/BrainAlign/cdl-devai-results)
77
+ (`diagnostics_run_confound`, `diagnostics_layerwise`) and
78
+ [`suchirsalhan/cdl-representations-brains-babylms`](https://github.com/suchirsalhan/cdl-representations-brains-babylms)
79
+ (`scripts/test_within_run_norm.py`, `scripts/run_confound_check.py`).
80
+
81
+ The files here are published **uncorrected**, as produced by the pipeline, so that the
82
+ correction is an explicit and visible choice rather than something baked in silently.