emotion-vectors-experiment-artifacts
收藏资源简介:
本数据集是用于复现情感向量在Gemma-4-31B模型上的研究的实验产物集合,旨在提供完整的实验记录,包含所有模型激活张量、提示集以及评分输出,从而无需重新运行模型推理即可进行复现研究。数据来源于谷歌的Gemma-4-31B(基础版)和Gemma-4-31B-it(指令调优版)大语言模型,重点关注模型内部各层的激活状态(d_model = 5376)。具体内容包括:1)基础模型和指令模型在多种提示(如场景、保留集、模板)下的激活张量(格式为.npz,包含plain、chat等不同格式的键);2)针对情感偏好、模型转向等假设进行测试的logits数据(部分早期版本存在已知的填充错误,已提供修复后的证据版本);3)从外部故事语料库或模型自生成故事中提取的情感向量均值;4)大量用于实验诊断、验证和几何分析的JSON文件(如模板诊断、对数透镜、栅极测试、证伪分数卡等)。数据规模体现为多维张量,例如激活数据维度为[提示数, 20层, 5376],情感向量维度为[171种情感, 20层, 5376]。该数据集专为模型可解释性、机制可操控性以及情感表征的探测研究而设计,是进行大语言模型内部表征分析与假设检验的高专业性资源。
This dataset is a collection of experimental products for reproducing the research on Emotion Vectors in the Gemma-4-31B Model (cbai-cambria-project). It aims to provide a complete experimental record, including all model activation tensors, prompt sets, and scoring outputs, enabling reproduction studies without re-running model inference. The core data is sourced from Googles Gemma-4-31B (base) and Gemma-4-31B-it (instruction-tuned) large language models, focusing on the activation states of internal layers (d_model = 5376). The content includes: 1) Activation tensors for the base and instruction models under various prompts (e.g., scenarios, holdout sets, templates) in .npz format (with keys for plain, chat, etc.); 2) Logits data for testing hypotheses such as emotional preferences and model steering (some early versions have known padding errors, with corrected evidence versions provided); 3) Mean emotion vectors extracted from external story corpora or model-generated stories; 4) Numerous JSON files for experimental diagnosis, validation, and geometric analysis (e.g., template diagnostics, log-lens, gate tests, falsification scorecards). The data scale is represented as multi-dimensional tensors, e.g., activation data dimensions [number of prompts, 20 layers, 5376], emotion vector dimensions [171 emotions, 20 layers, 5376]. This dataset is designed for model interpretability, mechanism manipulability, and emotion representation probing, serving as a highly specialized resource for analyzing internal representations and hypothesis testing in large language models.
数据集概述:Emotion-vectors replication on Gemma-4-31B: experiment artifacts
该数据集包含对 Gemma-4-31B 模型进行情感向量复制实验的完整产物,包括激活张量、提示集和评分输出,无需重新运行推理即可复现报告。数据来自 cbai-cambria-project 仓库(commit a8e2352)。研究记录(假设、预注册预测、结论)位于仓库的 TREE.md,日常日志位于 RESEARCH_LOG.md。
模型与参数
- 模型:
google/gemma-4-31b(基础模型)和google/gemma-4-31b-it(指令模型),bf16 精度 - 层:
range(0, 60, 3)(除非另有说明) - 模型维度: d_model = 5376
- 激活值: fp16 格式,存储在 npz 文件中(除非另有说明)
- 提示对齐: 每个目录中的
prompts.jsonl文件与激活索引对齐
已知仪器缺陷
- 2026-07-22 之前进行的批次收集采用右填充假设,导致中间提示的 logit 读取错误(详见 TREE Q1.H3.E4)
- 所有
_fixed目录是包含证据的修正版本,原始版本保留作为记录
数据集目录结构
探测器扫描(Probe Sweep)
| 目录/文件 | 内容 |
|---|---|
probe_sweep/ |
基础模型电池+模板激活:activations.npz,键为 plain_{last,mean_all,mean_content} [提示数, 20层, 5376],层=range(0,60,3);prompts.jsonl 索引对齐 |
probe_sweep_it/ |
指令模型电池+模板激活:相同结构,额外 chat_* 键(聊天模板格式,关闭思考模式) |
probe_validation/ |
E1 电池激活,基础模型,层 33/39,纯文本格式 |
template_thinking_on/ |
E8 思考模式开启分支:37 个数值模板提示,chat_* 键,相同层网格 |
偏好与引导(Preference & Steering)
| 目录/文件 | 内容 |
|---|---|
preferences_it/ |
Q1.H3.E1(纯文本格式)A/B 偏好 logits + 活动 token 激活(存在填充缺陷,已由 _fixed 版本取代) |
preferences_it_chat/ |
Q1.H3.E3(聊天格式)偏好收集(存在填充缺陷,已由 _fixed 版本取代) |
steering_it/ |
Q1.H3.E2 alpha=2 引导 A/B logits(存在填充缺陷,已由 _fixed 版本取代) |
steering_it_a8/ |
Q1.H3.E2 alpha=8 分支(存在填充缺陷,已由 _fixed 版本取代) |
preferences_it_fixed/ |
E1 填充修复后的重运行版本(证据承载版本) |
preferences_it_chat_fixed/ |
E3 填充修复后的重运行版本(证据承载版本) |
steering_it_fixed/ |
E2 alpha=2 填充修复后的重运行版本(证据承载版本) |
steering_it_a8_fixed/ |
E2 alpha=8 填充修复后的重运行版本(证据承载版本) |
情感向量与中性数据
| 文件 | 内容 |
|---|---|
emotion_vectors_it_means.npz |
指令模型情感均值 [171, 20, 5376] fp16,来源:外部 gemma-4-4B 故事语料库 |
e6_scale_means.npz |
E6 规模测试探测器均值,n ∈ {16,64,128,256} 故事/情感,来源:自生成故事 |
e7_neutral_bundle.npz |
E7 中性转录激活向量 [128, 20, 5376] |
e8_template_diagnostic.json 及变体 |
E8 混淆诊断,包括指令模型、基础模型、思考模式开启分支,以及不同读出的结果 |
跨谱系与 logit 透镜
| 文件 | 内容 |
|---|---|
e9_centered_readout.json |
E9 中心化余弦读出网格,两个模型 |
e5_cross_lineage_n256.json |
跨谱系比较:自生成与语料库方向余弦 0.219 |
e10_lineage_headtohead.json |
谱系对比,指令模型层 33 表现良好 |
logit_lens_base_L33.json |
Logit 透镜表,基础层 33(部分正值) |
logit_lens_base_L57.json |
Logit 透镜,基础层 57 |
logit_lens_it_L33_normed.json |
Logit 透镜,指令层 33(负值) |
logit_lens_it_L57.json |
Logit 透镜,指令层 57(负值) |
Q3 门控与记录
| 文件 | 内容 |
|---|---|
q3_gate_r1_it.json |
Q3.H1.E1 门控 G + 边界参考 R1 读出 |
q3_gate_r1_it_v2.json |
Q3.H1.E1 门控 + R1,v2 基底 |
q3_gate_r1_deepseek.json |
Q3.H1.E1 门控 + R1,DeepSeek 基底 |
q3_gate_r1_base.json |
Q3.H1.E1 门控 + R1,基础模型读取分支 |
trajectory_instrument_calibration_base.json |
Q3 仪器校准,基础分支 |
q3_records_base.npz |
Q3.H1.E2 每条记录基底,基础模型读取分支,195 探测器 |
q3_records_base_meta.json |
记录对齐元数据 |
q3_records_it.npz |
Q3.H1.E2 每条记录基底,Gemma 故事 v1,207 探测器 |
q3_records_it_meta.json |
记录对齐元数据 |
q3_records_it_v2.npz |
Q3.H1.E2 每条记录基底,Gemma 故事 v2,219 探测器 |
q3_records_it_v2_meta.json |
记录对齐元数据 |
q3_records_deepseek.npz |
Q3.H1.E2 每条记录基底,DeepSeek 故事分支,219 探测器 |
q3_records_deepseek_meta.json |
记录对齐元数据 |
q3_records_deepseek_constant.npz |
Q3.H1.E2 每条记录基底,恒定情感控制分支,219 探测器 |
q3_records_deepseek_constant_meta.json |
记录对齐元数据 |
验证分数卡
| 文件 | 内容 |
|---|---|
falsify_c1_scorecard.json |
验证门控分数卡,C1 几何(通过) |
falsify_c2_scorecard.json |
验证门控分数卡,C2 噪声天花板(失败) |
falsify_c3_scorecard.json |
验证门控分数卡,C3 探测器空值(减弱) |
falsify_h3_scorecard.json |
H3 偏好分数卡(填充修复前版本,已取代) |
falsify_h3_steering_scorecard.json |
H3 引导分数卡(填充修复前版本,已取代) |
几何、稳定性与基准测试
| 文件 | 内容 |
|---|---|
emotion_geometry_correlations.json |
每层 PC-效价/唤醒相关性,基础模型 |
emotion_geometry_correlations_it.json |
同上,指令模型 |
geometry_pc_demotion.json |
指令调优的效价降维诊断 |
probe_stability.json |
自举探测器方向稳定性,语料库规模 |
vllm_activation_bench.json |
vLLM 钩子可行性 + 数值一致性基准 |
activation_engine_bench.json |
三引擎激活提取吞吐量基准 |
未包含的内容
- NRC VAD 词典 v2.1(第三方资源,需从 saifmohammad.com 获取)
- 故事语料库和提取向量(以独立数据集形式发布)
- 任何仅从代码可推导的内容




