Skip to content

Commit 8657f82

Browse files
torwagerclaude
andcommitted
Docs: human-readable feature descriptions, references, and feature-map labels
- Feature map: chips now use plain-language names + a count of levels/dims (e.g. "action category (400)", "AudioSet sound tags (527)"); regenerated SVG. - FEATURE_MAP.md: new "major feature types" guide describing each deployed model (type, outputs, fMRI use cases) with canonical reference links. - Scoping review (02-07): clickable reference on every table row + linkified <details> bullets; "In plain terms" lay descriptions with category counts for the deployed models; note on later-added EmoNet/CardiffNLP in affect. - Reference PDFs downloaded to PDFs/ (gitignored, Dropbox-only); documented in .gitignore and DEPLOYING.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 0ed3b02 commit 8657f82

11 files changed

Lines changed: 608 additions & 296 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ __pycache__/
1515
# run logs
1616
/logs/
1717

18+
# Reference PDFs — copyrighted publisher/preprint PDFs of the papers behind each
19+
# model. Kept in Dropbox only, excluded from git (the docs link to public arXiv/DOI
20+
# URLs instead, which resolve on the web book). See PDFs/README.md.
21+
/PDFs/
22+
1823
# Annotation derivatives — kept in Dropbox only, excluded from git by choice.
1924
# The docs site does NOT need them (it uses analysis/figures + analysis/web).
2025
# Regenerate from the media with the pipeline; or host the dataset on OSF/Zenodo.

analysis/figures/feature_map.svg

Lines changed: 9 additions & 9 deletions
Loading

docs/DEPLOYING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ This project mixes small, shareable text with large, copyrighted media. The spli
1313
| Pipeline code (`src/`, `matlab/`, `tools/`) | Stimulus **media** — the movies and audio (`data/**/*.mp4,*.wav,…`, ~11 GB) |
1414
| Docs (`docs/`, `README.md`) and the book config (`book/book.toml`) | Annotation **derivatives** (`annotations/`, ~217 MB of `.h5` + sidecars) |
1515
| Schema (`schema/`), figures (`analysis/figures/`), search index (`analysis/web/`) | |
16-
| Corpus **metadata** (`data/manifest.csv`, `data/**/SOURCES.md`, lexicon CSVs, text story) | |
16+
| Corpus **metadata** (`data/manifest.csv`, `data/**/SOURCES.md`, lexicon CSVs, text story) | Reference **PDFs** (`PDFs/`, ~100 MB) — publisher/preprint PDFs of the papers behind each model |
1717

18-
Why the media and annotations stay out of git:
18+
Why the media, annotations, and reference PDFs stay out of git:
1919

2020
- **Media** exceed GitHub's 100 MB per-file limit and are **copyrighted** (the `spacetop`
2121
clips, the *Narratives* audio, and *Kung Fury* are third-party IP). Only the CC-BY
2222
Blender open films are freely redistributable.
2323
- **Annotations** are large derivatives (and their ASR transcripts reproduce film
2424
dialogue). They are regenerable from the media, so they are kept in Dropbox and can be
2525
published separately (e.g. OSF/Zenodo with a DOI) if a citable dataset is wanted.
26+
- **Reference PDFs** (`PDFs/`) are copyrighted publisher/preprint copies kept for offline
27+
convenience; the docs link to the public arXiv/DOI URLs instead, so the site needs no PDFs.
2628

2729
The published site does **not** need either: it is built from the docs, the figures, and
2830
the interactive search index, all of which are committed.

docs/FEATURE_MAP.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,179 @@ The map is a plain, flat **SVG** built for editing:
2020
python3 tools/build_feature_map.py # reads schema/channel_template.json
2121
```
2222

23+
## The major feature types
24+
25+
What each model in the pipeline is, what it outputs, why it is useful (with an eye to
26+
fMRI encoding / brain–feature modeling), and the canonical reference. Counts in
27+
parentheses match the chips above. Reference links go to the public paper; local PDF
28+
copies live in `PDFs/` (Dropbox-only).
29+
30+
### Visual — what the frame looks like
31+
32+
- **Low-level image statistics** — Classic per-frame pixel/color measures computed with
33+
[scikit-image](https://doi.org/10.7717/peerj.453): luminance, RMS contrast, mean red/
34+
green/blue and hue/saturation/brightness, edge density, image entropy, the slope of the
35+
spatial-frequency (Fourier) power spectrum, and perceptual
36+
[colorfulness](https://infoscience.epfl.ch/record/33994) (Hasler & Süsstrunk 2003).
37+
These are the cheapest, most reproducible visual regressors and the standard low-level
38+
controls in vision/fMRI work — early visual cortex (V1–V2) tracks luminance, contrast,
39+
and spatial-frequency energy closely, so they are essential nuisance/target regressors
40+
before attributing signal to higher-level features.
41+
42+
- **SigLIP 2 embedding (768) + scene probes (16)** — Google's
43+
[SigLIP 2](https://arxiv.org/abs/2502.14786) is a contrastive vision–language model (a
44+
Vision Transformer trained to align images with text). It converts each frame into a
45+
768-dimensional semantic embedding, and by scoring the frame against short text prompts
46+
it also yields 16 interpretable scene-probe values (e.g. indoor/outdoor, nature, faces,
47+
text). The embedding is a strong general-purpose semantic space for encoding/RSA models
48+
of higher visual and category-selective cortex; the probes give human-readable scene
49+
descriptors.
50+
51+
- **DINOv2 embedding (384)** — Meta AI's [DINOv2](https://arxiv.org/abs/2304.07193) is a
52+
self-supervised Vision Transformer that turns an image into general-purpose visual
53+
features **without** using any labels or text. Its 384-d global embedding captures
54+
objects, parts, texture, and layout, and is a leading backbone for representational-
55+
similarity analysis, linear-probe decoding, and voxelwise encoding of ventral-stream
56+
responses — complementary to SigLIP because it is label-free (vision-only).
57+
58+
- **Action recognition (400)**[VideoMAE](https://arxiv.org/abs/2203.12602) (masked-
59+
autoencoder video Transformer, fine-tuned on Kinetics-400) reads a short clip and
60+
outputs a probability over **400 human-action categories** (e.g. running, dancing,
61+
cooking, shaking hands, playing guitar). The pipeline stores the full 400-value
62+
probability vector plus the single top action label per second — a semantic
63+
"what are people doing" regressor for action-observation and social/motor brain systems.
64+
65+
- **Motion (optical flow)**[RAFT](https://arxiv.org/abs/2003.12039) estimates dense
66+
per-pixel motion between consecutive frames. From it the pipeline derives overall
67+
optical-flow magnitude, a camera-motion estimate, and residual (object) motion. Low-
68+
level motion energy is a classic driver of MT/MST and dorsal-stream responses and a
69+
standard motion regressor in naturalistic fMRI.
70+
71+
- **Shot cuts & shot index** — A histogram-based cut detector (a lightweight stand-in for
72+
[TransNetV2](https://arxiv.org/abs/2008.04838)) flags edit boundaries and numbers the
73+
shots. Cuts are strong low-level visual-transient events and useful for modeling
74+
attention/event-onset responses.
75+
76+
- **Faces & bodies**[MTCNN](https://arxiv.org/abs/1604.02878) detects faces (count,
77+
detection confidence, largest-face size, face-present flag) and
78+
[Keypoint R-CNN](https://arxiv.org/abs/1703.06870) (from the Mask R-CNN family) detects
79+
human body pose (person count, pose confidence, body-present flag). Face presence/size
80+
is a primary regressor for face-selective cortex (FFA/OFA/STS); body/person presence
81+
drives EBA and the person-perception network.
82+
83+
- **Saliency & depth** — A spectral-residual [saliency](https://ieeexplore.ieee.org/document/4270292)
84+
model (Hou & Zhang 2007; stand-in for a deep video-saliency net) gives where the eye is
85+
likely drawn (mean/peak saliency, spread, salient-area fraction), and
86+
[Depth-Anything-V2](https://arxiv.org/abs/2406.09414) gives monocular depth (mean depth,
87+
depth range, depth complexity, foreground fraction). Saliency proxies bottom-up
88+
attention; depth/near-far structure relates to scene-geometry coding (PPA/OPA).
89+
90+
### Audio — what the soundtrack sounds like
91+
92+
- **Low-level acoustics**[librosa](https://doi.org/10.25080/Majora-7b98e3ed-003)
93+
computes loudness (RMS), spectral shape (centroid, bandwidth, rolloff, flatness),
94+
zero-crossing rate, onset strength, a 13-value **MFCC** timbre vector, and a 12-value
95+
**chroma** (musical pitch-class) vector; pitch/F0 uses
96+
[pYIN](https://www.eecs.qmul.ac.uk/~simond/pub/2014/MauchDixon-PYIN-ICASSP2014.pdf) and
97+
tempo uses [dynamic-programming beat tracking](https://www.music.columbia.edu/~dpwe/pubs/Ellis07-beattrack.pdf)
98+
(Ellis 2007). These are the standard acoustic regressors for auditory-cortex encoding
99+
(loudness/spectral envelope track Heschl's-gyrus responses).
100+
101+
- **AudioSet sound tags (527)** — the [Audio Spectrogram Transformer](https://arxiv.org/abs/2104.01778)
102+
(AST) classifies each ~1 s window into **527 sound-event categories** from Google's
103+
AudioSet ontology (speech, music, laughter, vehicles, animals, gunshots, applause,
104+
weather, …). The pipeline stores the full 527-value tag vector plus the top tag — a rich
105+
semantic description of the auditory scene for modeling category-selective auditory and
106+
associative regions.
107+
108+
- **CLAP audio embedding (512) + sound probes (12)**
109+
[CLAP](https://arxiv.org/abs/2211.06687) is a contrastive language–audio model (the audio
110+
analogue of CLIP): it embeds each audio window into a 512-d space aligned with text, so
111+
arbitrary text prompts ("a crowd cheering", "tense music") can be scored against it. The
112+
pipeline keeps the 512-d embedding and 12 interpretable sound probes. The embedding is a
113+
general auditory-semantic feature space for encoding models.
114+
115+
- **Speech**[faster-whisper](https://arxiv.org/abs/2212.04356) (Whisper) transcribes
116+
speech and yields a speech-present flag and speaking rate (words/s);
117+
[audEERING wav2vec2](https://arxiv.org/abs/2203.07378) reads **vocal affect** directly
118+
from the voice as continuous valence, arousal, and dominance. Speech presence and
119+
speaking rate are core language-network regressors; vocal affect targets prosody/emotion
120+
circuits (e.g. voice-sensitive STS, amygdala).
121+
122+
### Language — what is said (from the transcript)
123+
124+
- **Lexical semantic norms** — per word, human-rated norms are looked up: emotional
125+
[valence, arousal, dominance](https://doi.org/10.3758/s13428-012-0314-x) (Warriner 2013),
126+
[concreteness](https://doi.org/10.3758/s13428-013-0403-5) (Brysbaert 2014), and
127+
[age of acquisition](https://doi.org/10.3758/s13428-012-0210-4) (Kuperman 2012). These
128+
are the classic word-property regressors for language and semantic fMRI.
129+
130+
- **Word frequency & length**[wordfreq](https://doi.org/10.5281/zenodo.7199437) gives
131+
each word's log frequency (Zipf scale) and its length. Frequency is a robust predictor
132+
of lexical-access difficulty and reading/listening time.
133+
134+
- **Surprisal & next-word entropy**[GPT-2](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)
135+
provides each word's **surprisal** (how unexpected it was, in bits) and the entropy of
136+
the model's next-word prediction. Word-by-word surprisal from language models is one of
137+
the most reliable predictors of language-network and N400-type responses in
138+
naturalistic-comprehension fMRI/MEG.
139+
140+
- **Syntax**[spaCy](https://spacy.io) parses each utterance for content-word fraction,
141+
noun/verb fraction, parse-tree depth, and mean dependency distance — proxies for
142+
syntactic complexity and processing load.
143+
144+
### Social — who is present and how they relate
145+
146+
- Derived from the video by the [Qwen2.5-VL](https://arxiv.org/abs/2502.13923) vision-
147+
language model (setting, interaction type, social dominance) plus face/pose detectors
148+
([MTCNN](https://arxiv.org/abs/1604.02878) agent count;
149+
[Keypoint R-CNN](https://arxiv.org/abs/1703.06870) closest-pair distance). These target
150+
the social-perception network (STS, TPJ, mentalizing regions) that tracks the number of
151+
agents, their proximity, and the type of interaction.
152+
153+
### Situation — where/when; event structure
154+
155+
- **Scene & setting** — the [Qwen2.5-VL](https://arxiv.org/abs/2502.13923) VLM produces a
156+
free-text scene description, an indoor/outdoor label, and a coarse setting label per
157+
second — high-level context for scene/place-selective cortex.
158+
- **Event boundaries**[GSBS](https://doi.org/10.1016/j.neuroimage.2021.118085)
159+
(Greedy State Boundary Search; Geerligs 2021) segments the annotation time series into
160+
discrete "events," emitting boundary events and a running event number. This directly
161+
operationalizes event-segmentation theory and models the boundary responses seen in
162+
hippocampus and default-mode regions during naturalistic viewing.
163+
164+
### Affect — depicted emotion across channels
165+
166+
Emotion is read from four independent channels so it can be cross-validated by modality:
167+
168+
- **EmoNet — image emotion (20)**[EmoNet](https://www.science.org/doi/10.1126/sciadv.aaw4358)
169+
(Kragel et al. 2019, *Science Advances*) is an AlexNet-based CNN that maps a video frame
170+
onto **20 emotion categories** (e.g. amusement, awe, fear, sexual desire, horror, joy,
171+
sadness). It was trained to predict the emotion evoked by images and validated against
172+
human ratings and brain responses, making it a purpose-built regressor for visual
173+
emotion-category coding in the brain.
174+
175+
- **Facial affect (8 + valence/arousal)**
176+
[HSEmotion](https://arxiv.org/abs/2403.11590) (Savchenko) reads faces detected in the
177+
video and classifies expression into **8 categories** (anger, contempt, disgust, fear,
178+
happiness, neutral, sadness, surprise) plus continuous facial valence and arousal —
179+
targeting emotion read-out from faces (amygdala, STS, face network).
180+
181+
- **Text emotion & sentiment (28 + 3)** — from the transcript,
182+
[GoEmotions](https://arxiv.org/abs/2005.00547) RoBERTa scores **28 fine-grained emotions**
183+
(admiration, gratitude, grief, …) and [CardiffNLP](https://arxiv.org/abs/2202.03829)
184+
RoBERTa scores **3-way sentiment** (negative/neutral/positive) with a continuous polarity.
185+
These capture the emotional content of what is said.
186+
187+
- **VLM depicted emotion**[Qwen2.5-VL](https://arxiv.org/abs/2502.13923) also judges the
188+
overall depicted emotion, valence, and arousal of the scene as a holistic cross-check on
189+
the specialized channels.
190+
23191
## Related
24192

25193
- The **designed semantic hierarchy** behind these channels (the taxonomy the pipeline is
26194
organized around): [feature hierarchy](scoping_review/01_hierarchy.md).
27195
- What each pass actually computes: [pipeline status](design/PHASE2_STATUS.md).
196+
- The full per-model survey (all surveyed tools, with references): the
197+
[scoping review](scoping_review/00_overview.md) sections.
28198
- The on-disk layout of these channels in each `.h5`: [annotation format](design/ANNOTATION_FORMAT.md).

0 commit comments

Comments
 (0)