abotresol/neutral-vectors-gemma-4-31b-it-postfix
Emotion vectors, google/gemma-4-31b-it (corrected extraction) Residual-stream activations for google/gemma-4-31b-it, pooled per story and averaged per emotion. Each emotion ends up as one direction in the model's activation space. Read LINEAGE.md before using this. This set supersedes abotresol/neutral-vectors-gemma-4-31b-it. The earlier extraction ran while the tokenizer padded on the left, so the step that skips a story's first 50 tokens skipped padding instead. This set… See the full description on the dataset page: https://huggingface.co/datasets/abotresol/neutral-vectors-gemma-4-31b-it-postfix.
Emotion vectors, google/gemma-4-31b-it (corrected extraction)
Residual-stream activations for google/gemma-4-31b-it, pooled per story and averaged per emotion. Each emotion ends up as one direction in the model's activation space.
Read `LINEAGE.md` before using this. This set supersedes `abotresol/neutral-vectors-gemma-4-31b-it`. The earlier extraction ran while the tokenizer padded on the left, so the step that skips a story's first 50 tokens skipped padding instead. This set re-extracts the same corpus with padding forced to the right. LINEAGE.md gives the measured before-and-after impact. The predecessor stays up, unmodified, as the "before" side of that comparison.
What is in it
Shards are published so the per-emotion means can be recomputed, resampled or subsetted without running the model again.
How it was made
- Corpus: `abotresol/neutral-transcripts-gemma-4-31b-it`, transcripts written to carry no emotion
- Layers: every third, 0 to 57
- Pooling: mean over non-padding tokens after position 50, stories truncated at 512 tokens. The first 50 tokens are dropped as narrative framing, which is the convention the source paper used.
- Precision: bf16 weights, fp32 activations. Seed 20260720.
- Across stories: a token-weighted mean, so a long story counts for more than a short one.
Extracted by scripts/extract_emotion_vectors.py in gemma4-emotion-vectors, adapted from sinievanderben/emotion_experiment.
Reproducing
Re-extracting needs the model weights and a GPU with enough memory for a 31B model in bf16. Analysis does not: the per-emotion means in this repository are enough to redo the geometry and detection work on a laptop.
uv run python scripts/extract_emotion_vectors.pyCaveats
A 2-3 day research sprint, not a reviewed publication. The write-up (https://github.com/Antonio-Tresol/gemma4-emotion-vectors) records which findings survived a falsification pass and which did not. These vectors describe a model reading emotions in text; that is a different claim from the model having them.
Licence
MIT, matching the project repository. The model weights and the story corpora carry their own licences.
