drKeeman commited on
Commit
e0ec2bd
·
verified ·
1 Parent(s): 696b6b2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +261 -3
README.md CHANGED
@@ -1,3 +1,261 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - emotion
7
+ - affect
8
+ - clinical-psychology
9
+ - mechanistic-interpretability
10
+ - keyword-free
11
+ - matched-controls
12
+ - stimulus-design
13
+ - ai-psychology
14
+ - transformers
15
+ - safety
16
+ pretty_name: "AIPsy-Affect: Clinical Affect Stimuli for Mechanistic Interpretability"
17
+ size_categories:
18
+ - n<1K
19
+ task_categories:
20
+ - text-classification
21
+ configs:
22
+ - config_name: default
23
+ data_files:
24
+ - split: clinical
25
+ path: data/clinical.parquet
26
+ - split: neutral
27
+ path: data/neutral.parquet
28
+ - split: moderate
29
+ path: data/moderate.parquet
30
+ - split: complex_neutral
31
+ path: data/complex_neutral.parquet
32
+ ---
33
+
34
+ # AIPsy-Affect
35
+
36
+ **Clinical affect stimuli for mechanistic interpretability research.**
37
+
38
+ 480 keyword-free clinical vignettes designed to study how language models process emotional content — without the confound that has compromised every prior emotion dataset.
39
+
40
+ The core problem: existing emotion datasets contain the emotion words being tested. A stimulus labeled "anger" that contains the word "furious" doesn't test emotion processing — it tests keyword detection. Every mechanistic interpretability study built on such data inherits this confound.
41
+
42
+ AIPsy-Affect eliminates it. These are third-person clinical vignettes that evoke specific emotions through narrative situation alone. No emotion keywords. Matched neutral controls share the same surface structure with the emotional content surgically removed. If a model's internal representations differ between a clinical vignette and its matched control, that difference cannot be lexical.
43
+
44
+ This is the first stimulus battery designed by a clinical psychologist specifically for mechanistic interpretability research on emotion processing in transformers.
45
+
46
+ **Part of the [AIPsy](https://huggingface.co/keidolabs) dataset family** — clinical psychology-backed resources for AI Psychology research.
47
+
48
+ ---
49
+
50
+ ## Quick Start
51
+
52
+ ```python
53
+ from datasets import load_dataset
54
+
55
+ ds = load_dataset("keidolabs/aipsy-affect")
56
+
57
+ # Access individual splits
58
+ clinical = ds["clinical"] # 192 keyword-free vignettes (peak intensity)
59
+ neutral = ds["neutral"] # 192 matched neutral controls
60
+ moderate = ds["moderate"] # 48 moderate-intensity vignettes
61
+ complex_n = ds["complex_neutral"] # 48 narrative-rich, zero-affect controls
62
+
63
+ # Get a matched clinical–neutral pair
64
+ clin_item = clinical.filter(lambda x: x["id"] == "B-rage-d1-v1")[0]
65
+ neut_item = neutral.filter(lambda x: x["id"] == "N-rage-d1-c1")[0]
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Why This Dataset Exists
71
+
72
+ Mechanistic interpretability research on emotion processing has a stimulus problem.
73
+
74
+ The standard approach: take an existing emotion-labeled dataset (GoEmotions, crowd-enVENT, Empathetic Dialogues), extract hidden states, train probes or analyze SAE features, report that the model "represents" emotion. The finding is real — but what it *means* is ambiguous. When the stimulus "I am absolutely furious about this" activates an internal feature, is the model detecting emotional significance, or is it detecting the word "furious"?
75
+
76
+ This is not a minor methodological concern. It determines whether mechanistic interpretability findings about emotion processing are findings about *emotion processing* or findings about *lexical co-occurrence*.
77
+
78
+ Clinical psychology solved this problem decades ago. Neuropsychological testing routinely uses stimuli designed to evoke a construct without naming it — because naming it activates different pathways than experiencing it. The same discipline applies here.
79
+
80
+ AIPsy-Affect brings clinical stimulus design methodology to mechanistic interpretability:
81
+
82
+ - **Keyword-free vignettes** that evoke emotion through situation, not vocabulary
83
+ - **Matched neutral controls** that share surface structure, eliminating lexical confounds
84
+ - **Intensity gradients** that test whether processing varies smoothly with emotional intensity
85
+ - **Discriminant validity controls** that rule out narrative richness as a confound
86
+
87
+ ---
88
+
89
+ ## Dataset Structure
90
+
91
+ ### Splits
92
+
93
+ | Split | N | Description | Purpose |
94
+ |---|---|---|---|
95
+ | `clinical` | 192 | Keyword-free peak-intensity vignettes | Core stimuli — 8 emotions × 6 domains × 4 vignettes |
96
+ | `neutral` | 192 | Matched neutral controls | Each item paired 1:1 with a clinical vignette via `matched_control_id` |
97
+ | `moderate` | 48 | Moderate-intensity vignettes | Same domains, lower stakes — tests intensity-dependent processing |
98
+ | `complex_neutral` | 48 | Narrative-rich, zero-affect prose | Discriminant validity — vivid writing without emotional content |
99
+
100
+ ### Schema
101
+
102
+ | Field | Type | Description |
103
+ |---|---|---|
104
+ | `id` | string | Unique identifier (e.g., `B-rage-d1-v1`, `N-rage-d1-c1`) |
105
+ | `emotion` | string | Target emotion (Plutchik 8) or `neutral` |
106
+ | `intensity` | string | `peak`, `moderate`, or `none` |
107
+ | `domain` | int | Domain number (1–6 for clinical/neutral, 1–3 for moderate, null for complex_neutral) |
108
+ | `domain_label` | string | Human-readable domain description |
109
+ | `matched_control_id` | string | ID of the paired item in the other split (clinical ↔ neutral) |
110
+ | `word_count` | int | Token count |
111
+ | `text` | string | The stimulus text |
112
+
113
+ ### Emotions
114
+
115
+ The eight primary emotions from Plutchik's wheel of emotions:
116
+
117
+ | Emotion | Clinical items | Neutral matches | Moderate items |
118
+ |---|---|---|---|
119
+ | Rage | 24 | 24 | 6 |
120
+ | Terror | 24 | 24 | 6 |
121
+ | Grief | 24 | 24 | 6 |
122
+ | Loathing | 24 | 24 | 6 |
123
+ | Amazement | 24 | 24 | 6 |
124
+ | Admiration | 24 | 24 | 6 |
125
+ | Ecstasy | 24 | 24 | 6 |
126
+ | Vigilance | 24 | 24 | 6 |
127
+
128
+ ### Domains
129
+
130
+ Each emotion is instantiated across 6 thematic domains. The same emotion in different contexts tests whether the model's representation is domain-general or context-dependent.
131
+
132
+ | Domain | Theme | Example (rage) |
133
+ |---|---|---|
134
+ | 1 | Financial betrayal | Theft by a trusted person |
135
+ | 2 | Professional violation | Workplace exploitation or sabotage |
136
+ | 3 | Medical/institutional failure | System failure affecting someone vulnerable |
137
+ | 4 | Caregiving responsibility | Dependent in your charge |
138
+ | 5 | Inheritance/legacy | Intergenerational discovery |
139
+ | 6 | Public witness | Stranger encounter in shared space |
140
+
141
+ Domains 1–3 are represented across all splits (clinical, neutral, moderate). Domains 4–6 appear in clinical and neutral only.
142
+
143
+ ---
144
+
145
+ ## Example: Matched Clinical–Neutral Pair
146
+
147
+ This is the core design principle in action. Both vignettes share the same surface structure — same characters, same setting, same narrative skeleton. Only the emotional content differs.
148
+
149
+ ### Clinical (B-rage-d1-v1)
150
+
151
+ > The papers were spread across the floor where he'd thrown them. His daughter's college fund statement. Zero balance. His brother's signature on the withdrawal form — six separate transactions over nine months, each one just under the reporting threshold. The most recent was dated the same week his brother had sat at this table and told him he should put more money in for the girl's future. He picked up the phone. He put the phone down. He picked it up again.
152
+
153
+ ### Matched Neutral (N-rage-d1-c1)
154
+
155
+ > The papers were spread across the table where he'd sorted them. His daughter's college fund statement. The balance had grown by four percent over the quarter. His brother had co-signed the original account — there were six deposits logged over nine months, each one automatic. The most recent was dated the same week they'd met for dinner. He picked up his phone to check the online portal, then set it aside and added the figures to the spreadsheet he'd been updating.
156
+
157
+ Same domain (financial, family). Same characters (father, brother, daughter). Same objects (papers, phone, fund statement). Same approximate length (82 vs 81 words). The difference is purely situational: betrayal versus routine. If a model's internal representations diverge on these two texts, the divergence is not lexical.
158
+
159
+ ---
160
+
161
+ ## Design Methodology
162
+
163
+ ### Keyword-Free Stimulus Design
164
+
165
+ Every clinical vignette was written to evoke its target emotion without using emotion keywords — no "angry," "terrified," "heartbroken," or any synonym. This follows clinical neuropsychological testing principles: the stimulus should activate the construct, not the label.
166
+
167
+ The constraint is strict. A vignette targeting rage does not contain "furious," "outraged," "livid," or any affective adjective. The emotion arises from the situation described — what happened, to whom, and what it means. The reader (or model) must *infer* the emotional content from narrative context.
168
+
169
+ ### Matched-Pair Control Design
170
+
171
+ Each clinical vignette has a neutral counterpart constructed by systematic transformation:
172
+
173
+ 1. **Preserve**: domain, characters, objects, setting, approximate word count, sentence structure
174
+ 2. **Remove**: stakes, violation, threat, loss, moral transgression — the elements that make it emotional
175
+ 3. **Replace with**: routine, expected, mundane versions of the same events
176
+
177
+ The result: pairs of texts where surface-level features (vocabulary distribution, syntactic structure, domain keywords) are matched, and only the emotional dimension varies. This is the standard methodology for isolating a psychological construct from its surface correlates.
178
+
179
+ ### Intensity Gradient
180
+
181
+ The moderate split contains the same emotion–domain combinations as the clinical split, but at lower intensity:
182
+
183
+ - **Peak** (clinical): High stakes, immediate consequences, irreversible situations
184
+ - **Moderate**: Same domain, but with ambiguity, temporal distance, or reduced severity
185
+
186
+ This enables dose-response analysis: does the model's internal representation scale with emotional intensity, or is it binary (present/absent)?
187
+
188
+ ### Discriminant Validity Control (Set C)
189
+
190
+ The complex_neutral split contains vivid, sensory-rich third-person narratives with zero emotional content — a lathe machining brass, a vessel navigating coastal waters, textile manufacturing processes. These match the clinical vignettes on narrative richness, sentence complexity, and descriptive density, but contain no human stakes, interpersonal dynamics, or moral dimensions.
191
+
192
+ Purpose: rule out the hypothesis that a binary "emotion vs. no-emotion" probe is actually detecting "interesting narrative vs. flat text." If the probe fires on clinical vignettes but not on complex neutrals, the detection is genuinely affective, not merely attentional.
193
+
194
+ ---
195
+
196
+ ## Validation
197
+
198
+ ### Keyword Verification
199
+
200
+ All stimuli were verified for keyword contamination using multiple automated methods:
201
+
202
+ **Domains 1–3** (n=288 items): VADER sentiment lexicon scan. No clinical vignette contains any term from the VADER sentiment lexicon as an emotion-carrying word. Verified 2026-02-25.
203
+
204
+ **Domains 4–6** (n=192 items): Four-layer audit —
205
+ 1. VADER lexicon scan
206
+ 2. NRC Emotion Lexicon cross-reference
207
+ 3. Embedding-based synonym detection (flagging words with high cosine similarity to emotion terms)
208
+ 4. Manual clinical review
209
+
210
+ Verified 2026-03-20.
211
+
212
+ ### Known Limitations of Validation
213
+
214
+ - Loathing vignettes carry the highest residual leakage risk. Dehumanizing language patterns (e.g., referring to a child as a "scheduling problem") may co-occur with disgust in training corpora. The matched-pair design controls for this at the analysis stage, but researchers should flag loathing results for sensitivity analysis.
215
+ - Positive-emotion neutrals (admiration, amazement) should be spot-checked for engagement confounds. Inherently "interesting" scenarios risk differing from neutrals on salience rather than affect alone.
216
+
217
+ ---
218
+
219
+ ## Intended Use
220
+
221
+ This dataset is designed for:
222
+
223
+ - **Mechanistic interpretability** — probing, activation patching, SAE feature analysis, causal ablation on emotion processing circuits in transformers
224
+ - **Behavioral evaluation** — testing whether language models distinguish emotional from non-emotional content without keyword cues
225
+ - **Dose-response analysis** — measuring whether internal representations scale with emotional intensity
226
+ - **Discriminant validity testing** — separating affect detection from narrative complexity detection
227
+
228
+ ### Citing This Dataset
229
+
230
+ ```bibtex
231
+ @dataset{keeman2026aipsy_affect,
232
+ title = {AIPsy-Affect: Clinical Affect Stimuli for Mechanistic Interpretability},
233
+ author = {Keeman, Michael},
234
+ year = {2026},
235
+ url = {https://huggingface.co/datasets/keidolabs/aipsy-affect},
236
+ note = {480 keyword-free clinical vignettes with matched controls for studying emotion processing in language models}
237
+ }
238
+ ```
239
+
240
+ ### Related Papers
241
+
242
+ - Keeman, M. (2026). *Whether, Not Which: Affect Reception as a Dissociable Computation in Large Language Models.* arXiv preprint.
243
+
244
+ ---
245
+
246
+ ## Limitations
247
+
248
+ - **English only.** All vignettes are written in English. Cross-linguistic emotion processing requires separate stimulus sets.
249
+ - **Categorical emotion model.** Uses Plutchik's 8 primary emotions. Does not cover dimensional models (valence-arousal) or compound emotions (Plutchik's dyads). Future AIPsy releases may extend to dimensional representations.
250
+ - **Moderate split covers domains 1–3 only** (48 items vs. 192 for peak). Intensity-gradient analysis cannot be performed on domains 4–6.
251
+ - **No matched neutrals for moderate split.** Binary affect detection (affect vs. no-affect) should use the peak clinical–neutral pairs. Peak-vs-moderate comparisons work without controls (direct intensity contrast).
252
+ - **Third-person perspective only.** All vignettes describe situations from an observer's viewpoint. First-person stimuli (e.g., "I found the papers on the floor...") may activate different processing pathways.
253
+ - **Written by a small team.** While designed by a clinical psychologist and validated computationally, the vignettes reflect a single research group's stimulus design choices. Independent replication with different authors' vignettes would strengthen generalizability claims.
254
+
255
+ ---
256
+
257
+ ## About
258
+
259
+ **[Keido Labs](https://keidolabs.com)** is an AI Psychology research lab building the science of emotional intelligence in artificial systems. We combine clinical psychology methodology with mechanistic interpretability to study how transformers process psychological constructs — and what happens when you change them.
260
+
261
+ AIPsy-Affect is the first release in the **AIPsy** dataset family — clinical psychology-backed stimulus batteries for mechanistic interpretability research. Planned future releases include stimuli for psychological safety evaluation, attachment processing, cognitive distortions, and emotion regulation.