Update README.md
Browse files
README.md
CHANGED
|
@@ -7,6 +7,7 @@ tags:
|
|
| 7 |
- fmri
|
| 8 |
- encoding-model
|
| 9 |
- ridge-regression
|
|
|
|
| 10 |
- natural-scenes-dataset
|
| 11 |
- simclr
|
| 12 |
- resnet18
|
|
@@ -18,7 +19,7 @@ tags:
|
|
| 18 |
|
| 19 |
# VEDB SimCLR ResNet-18 β NSD Voxelwise Encoding Models
|
| 20 |
|
| 21 |
-
This repository contains **subject-specific voxelwise encoding-model fits** from:
|
| 22 |
|
| 23 |
**Diaz, D. M., & Henderson, M. M. (2026). *Eccentricity-Constrained CNN Training Reveals Adaptive Information Coding Around the Visual Field.* Proceedings of the 9th Conference on Cognitive Computational Neuroscience.**
|
| 24 |
|
|
@@ -59,11 +60,12 @@ The four pretrained models were trained on complementary versions of the same so
|
|
| 59 |
| Component | Status |
|
| 60 |
| --- | --- |
|
| 61 |
| Subject-specific encoding-model fits | Available |
|
|
|
|
| 62 |
| Model card | Available |
|
| 63 |
| Feature-extraction / model-fitting code | Forthcoming |
|
| 64 |
| Analysis code | Forthcoming |
|
| 65 |
| VEDB imagery | Full dataset not redistributed; available via [Databrary](https://www.databrary.org/volume/1612) |
|
| 66 |
-
| NSD stimuli and fMRI data | Not redistributed; repository contains encoding-model fits only; see [NSD](https://www.naturalscenesdataset.org/) |
|
| 67 |
|
| 68 |
The feature-extraction, model-fitting, and analysis code is currently being consolidated and documented and will be linked here when released.
|
| 69 |
|
|
@@ -74,9 +76,12 @@ baseline/
|
|
| 74 |
fovea-gaze/
|
| 75 |
periph/
|
| 76 |
periph-nf/
|
|
|
|
|
|
|
|
|
|
| 77 |
```
|
| 78 |
|
| 79 |
-
Each folder contains voxelwise encoding-model fits for **NSD subjects S1βS8**.
|
| 80 |
|
| 81 |
Example:
|
| 82 |
|
|
@@ -182,6 +187,92 @@ These internal identifiers are preserved in fields such as `model`, `model1`, `m
|
|
| 182 |
|
| 183 |
The `features_file_list`, `features_file_list1`, and `features_file_list2` fields also preserve the original analysis paths for provenance. These paths refer to the computing environment used for the original study and are not expected to resolve outside that environment.
|
| 184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
## Loading a Fit
|
| 186 |
|
| 187 |
```python
|
|
@@ -205,7 +296,9 @@ voxel_nc = fit["voxel_nc"]
|
|
| 205 |
|
| 206 |
## Scope of the Released Artifacts
|
| 207 |
|
| 208 |
-
The
|
|
|
|
|
|
|
| 209 |
|
| 210 |
Reproducing voxel predictions for new images also requires the corresponding pretrained ResNet-18 checkpoint and the feature-extraction, spatial-pooling, PCA, concatenation, and normalization procedures used during fitting. These steps will be documented in the accompanying public code release.
|
| 211 |
|
|
|
|
| 7 |
- fmri
|
| 8 |
- encoding-model
|
| 9 |
- ridge-regression
|
| 10 |
+
- variance-partitioning
|
| 11 |
- natural-scenes-dataset
|
| 12 |
- simclr
|
| 13 |
- resnet18
|
|
|
|
| 19 |
|
| 20 |
# VEDB SimCLR ResNet-18 β NSD Voxelwise Encoding Models
|
| 21 |
|
| 22 |
+
This repository contains **subject-specific voxelwise encoding-model fits and the variance-partitioning fits reported in the associated study** from:
|
| 23 |
|
| 24 |
**Diaz, D. M., & Henderson, M. M. (2026). *Eccentricity-Constrained CNN Training Reveals Adaptive Information Coding Around the Visual Field.* Proceedings of the 9th Conference on Cognitive Computational Neuroscience.**
|
| 25 |
|
|
|
|
| 60 |
| Component | Status |
|
| 61 |
| --- | --- |
|
| 62 |
| Subject-specific encoding-model fits | Available |
|
| 63 |
+
| Variance-partitioning fits reported in the paper | Available |
|
| 64 |
| Model card | Available |
|
| 65 |
| Feature-extraction / model-fitting code | Forthcoming |
|
| 66 |
| Analysis code | Forthcoming |
|
| 67 |
| VEDB imagery | Full dataset not redistributed; available via [Databrary](https://www.databrary.org/volume/1612) |
|
| 68 |
+
| NSD stimuli and fMRI data | Not redistributed; repository contains derived encoding-model and variance-partitioning fits only; see [NSD](https://www.naturalscenesdataset.org/) |
|
| 69 |
|
| 70 |
The feature-extraction, model-fitting, and analysis code is currently being consolidated and documented and will be linked here when released.
|
| 71 |
|
|
|
|
| 76 |
fovea-gaze/
|
| 77 |
periph/
|
| 78 |
periph-nf/
|
| 79 |
+
variance-partitioning/
|
| 80 |
+
βββ fovea-gaze-vs-periph/
|
| 81 |
+
βββ periph-vs-periph-nf/
|
| 82 |
```
|
| 83 |
|
| 84 |
+
Each model-condition folder contains voxelwise encoding-model fits for **NSD subjects S1βS8**. The `variance-partitioning/` directory contains the two model comparisons reported in Figure 4CβD of the paper, with one fit for each of the same eight NSD participants.
|
| 85 |
|
| 86 |
Example:
|
| 87 |
|
|
|
|
| 187 |
|
| 188 |
The `features_file_list`, `features_file_list1`, and `features_file_list2` fields also preserve the original analysis paths for provenance. These paths refer to the computing environment used for the original study and are not expected to resolve outside that environment.
|
| 189 |
|
| 190 |
+
## Variance-Partitioning Fits
|
| 191 |
+
|
| 192 |
+
The repository also contains the subject-specific variance-partitioning fits reported in the associated paper:
|
| 193 |
+
|
| 194 |
+
- **Fovea-Gaze vs. Periph** β Figure 4C
|
| 195 |
+
- **Periph vs. Periph-NF** β Figure 4D
|
| 196 |
+
|
| 197 |
+
For each comparison and NSD participant, three voxelwise encoding models were fit using (1) features from model A alone, (2) features from model B alone, and (3) the concatenated feature spaces from both models. Unique variance was computed from held-out voxelwise `RΒ²` using the equations reported in the paper:
|
| 198 |
+
|
| 199 |
+
$$
|
| 200 |
+
R^2_{\mathrm{unique},A}
|
| 201 |
+
=
|
| 202 |
+
R^2_{\mathrm{combined}}
|
| 203 |
+
-
|
| 204 |
+
R^2_{B\text{-only}}
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
R^2_{\mathrm{unique},B}
|
| 209 |
+
=
|
| 210 |
+
R^2_{\mathrm{combined}}
|
| 211 |
+
-
|
| 212 |
+
R^2_{A\text{-only}}
|
| 213 |
+
$$
|
| 214 |
+
|
| 215 |
+
Thus, the unique variance attributed to one model is the variance explained by the combined representation minus the variance explained by the other model alone.
|
| 216 |
+
|
| 217 |
+
Variance-partitioning files are stored under:
|
| 218 |
+
|
| 219 |
+
```text
|
| 220 |
+
variance-partitioning/
|
| 221 |
+
βββ fovea-gaze-vs-periph/
|
| 222 |
+
β βββ NSD_S1_varpart_Fovea-Gaze_vs_Periph.npy
|
| 223 |
+
β βββ ...
|
| 224 |
+
β βββ NSD_S8_varpart_Fovea-Gaze_vs_Periph.npy
|
| 225 |
+
βββ periph-vs-periph-nf/
|
| 226 |
+
βββ NSD_S1_varpart_Periph_vs_Periph-NF.npy
|
| 227 |
+
βββ ...
|
| 228 |
+
βββ NSD_S8_varpart_Periph_vs_Periph-NF.npy
|
| 229 |
+
```
|
| 230 |
+
|
| 231 |
+
Each variance-partitioning file contains a Python dictionary with:
|
| 232 |
+
|
| 233 |
+
- `subject`
|
| 234 |
+
- `model1`
|
| 235 |
+
- `model2`
|
| 236 |
+
- `features_file_list1`
|
| 237 |
+
- `features_file_list2`
|
| 238 |
+
- `lambdas`
|
| 239 |
+
- `voxel_mask`
|
| 240 |
+
- `voxel_index`
|
| 241 |
+
- `voxel_nc`
|
| 242 |
+
- `brain_nii_shape`
|
| 243 |
+
- `weights_varpart`
|
| 244 |
+
- `r2_varpart`
|
| 245 |
+
- `corr_varpart`
|
| 246 |
+
- `best_lambda_inds_varpart`
|
| 247 |
+
|
| 248 |
+
The `weights_varpart`, `r2_varpart`, `corr_varpart`, and `best_lambda_inds_varpart` fields are dictionaries with entries for model A alone, model B alone, and the combined feature space. Their exact keys retain the original internal model identifiers listed above.
|
| 249 |
+
|
| 250 |
+
Because the six retained layers contribute 200 PCA components each, a single-model variance-partition fit contains **1,200 model features plus one intercept**, giving `weights_varpart` matrices with 1,201 rows for the model-only fits. The combined fit contains 2,400 model features plus one intercept, giving 2,401 rows.
|
| 251 |
+
|
| 252 |
+
Example:
|
| 253 |
+
|
| 254 |
+
```python
|
| 255 |
+
import numpy as np
|
| 256 |
+
|
| 257 |
+
fit = np.load(
|
| 258 |
+
"variance-partitioning/fovea-gaze-vs-periph/"
|
| 259 |
+
"NSD_S1_varpart_Fovea-Gaze_vs_Periph.npy",
|
| 260 |
+
allow_pickle=True
|
| 261 |
+
).item()
|
| 262 |
+
|
| 263 |
+
r2 = fit["r2_varpart"]
|
| 264 |
+
|
| 265 |
+
model_a = fit["model1"]
|
| 266 |
+
model_b = fit["model2"]
|
| 267 |
+
|
| 268 |
+
r2_a_only = r2[f"{model_a}-only"]
|
| 269 |
+
r2_b_only = r2[f"{model_b}-only"]
|
| 270 |
+
r2_combined = r2["combined"]
|
| 271 |
+
|
| 272 |
+
r2_unique_a = r2_combined - r2_b_only
|
| 273 |
+
r2_unique_b = r2_combined - r2_a_only
|
| 274 |
+
```
|
| 275 |
+
|
| 276 |
## Loading a Fit
|
| 277 |
|
| 278 |
```python
|
|
|
|
| 296 |
|
| 297 |
## Scope of the Released Artifacts
|
| 298 |
|
| 299 |
+
The repository contains **32 subject-specific encoding-model fits** (4 model conditions Γ 8 NSD participants) and **16 variance-partitioning fits** corresponding to the two variance-partition analyses reported in the paper (2 model comparisons Γ 8 participants), for a total of **48 fitted `.npy` artifacts**.
|
| 300 |
+
|
| 301 |
+
The released files contain fitted voxelwise weights, held-out prediction metrics, ridge-penalty information, and voxel metadata used in the study. The variance-partitioning artifacts additionally contain the model-A-only, model-B-only, and combined fits used to compute unique variance.
|
| 302 |
|
| 303 |
Reproducing voxel predictions for new images also requires the corresponding pretrained ResNet-18 checkpoint and the feature-extraction, spatial-pooling, PCA, concatenation, and normalization procedures used during fitting. These steps will be documented in the accompanying public code release.
|
| 304 |
|