This folder contains supplementary and control scripts for computing various types of representational alignment. These analyses go beyond the main subject–subject and subject–model RSA comparisons, including:
- comparisons across modalities (language ↔ vision),
- untrained models,
- semantic and perceptual features,
- object-level alignment,
- and control analyses (e.g., mismatched stimulus identity).
All scripts are based on the NSD dataset, and require that subject beta responses and model features have already been extracted and placed in their expected locations. Paths are assumed to be accessible via the convergence library interface.
| Script Name | Description |
|---|---|
| 1_subject_subject_alignment_other_metrics.py | Compute subject–subject alignment using alternative metrics (e.g. CKA, mutual KNN). |
| 2_subject_model_alignment_other_metrics.py | Compute subject–model alignment with metrics beyond RSA. |
| 3_aligment_language_vision_features.py | Measure alignment between language and vision model feature spaces. |
| 4_categories_alignment.py | Align brain activity to COCO object categories and presence of people. |
| 5_extract_tokenizer_vocabulary.py | Build token-level representations from captions using classic and LLM tokenizers. |
| 6_alignment_perceptual_statistics.py | Align brain activity to low-level perceptual image statistics (e.g., edge density). |
| 7_untrained_models_alignment.py | Compute subject–model alignment using untrained models as a control. |
| 8_extract_object_boxes.py | Use DETR to extract object bounding boxes and semantic categories from NSD images. |
| 9_cross_subject_out_of_order.py | Control analysis: cross-subject alignment with mismatched stimuli but matched trial structure. |