counterfactual-investigations-data
收藏资源简介:
Counterfactual Investigations数据集是论文《利用反事实调查解释模型在现实世界中的行为》的配套数据集,旨在支持反事实调查方法,通过调查代理对目标模型在真实聊天和代理提示下的行为进行解释。调查代理通过运行针对目标模型的反事实实验,生成可验证的二元反事实声明(例如:如果提示按X方式改变,行为将按Y方式改变),并由评估代理根据预测这些声明的真伪标签进行评分。数据集包含所有已发布调查运行的每个流水线阶段数据(包括补全、筛选、调查、验证)、衍生的声明评估数据集、SFT训练数据以及提示数据集。每个调查的完整反事实实验日志和书面报告都保存在`investigations.jsonl`文件中。数据集规模约93GB,分为评估运行和训练运行两大类,针对多个目标模型(如Qwen3-8B、Qwen3-32B、Qwen3.5-397B、Qwen3.6-35B-A3B、Gemma 3 27B、Llama 3.1 8B)构建。数据来源于WildChat+代理提示池和Petri对齐审计转录本。该数据集适用于模型可解释性、模型理解、反事实推理、行为评估等研究任务,并为训练反事实预测模型和自解释模型提供数据支持。
The Counterfactual Investigations dataset is a companion dataset for the paper Explaining Model Behavior in the Real World through Counterfactual Investigations. It aims to support counterfactual investigation methods by explaining the behavior of target models in real-world chat and agent prompts through investigation agents. The investigation agents run counterfactual experiments on target models to generate verifiable binary counterfactual claims (e.g., if the prompt is changed in X way, the behavior will change in Y way), which are then scored by evaluation agents based on predicting the truth labels of these claims. The dataset includes data from all published investigation runs for each pipeline stage (completion, filtering, investigation, validation), derived claim evaluation datasets, SFT training data, and prompt datasets. Complete counterfactual experiment logs and written reports for each investigation are stored in `investigations.jsonl`. The dataset size is approximately 93GB, divided into evaluation runs and training runs, and is built for multiple target models (including Qwen3-8B, Qwen3-32B, Qwen3.5-397B, Qwen3.6-35B-A3B, Gemma 3 27B, Llama 3.1 8B). Data sources include the WildChat+ agent prompt pool and Petri alignment audit transcripts. The dataset is suitable for research tasks such as model interpretability, model understanding, counterfactual reasoning, behavior evaluation, and provides data support for training counterfactual prediction models and self-explaining models.
数据集概述
该数据集为论文 "Explaining Model Behaviors in the Wild with Counterfactual Investigations" 的配套数据集,用于研究如何通过反事实实验解释目标模型在真实聊天/智能体提示下的行为。
核心思想
一个调查智能体(Investigator Agent)通过针对目标模型运行反事实实验,解释目标模型(如 Qwen3-8B、Qwen3-32B、Qwen3.5-397B、Qwen3.6-35B-A3B、Gemma 3 27B、Llama 3.1 8B)在真实聊天/智能体提示下的行为。已验证的解释被转化为二进制反事实声明(“如果提示按X方式改变,行为将按Y方式改变”),评估智能体(无论是否使用工具,如激活神谕、NLA、SAE)根据预测每个声明的真/假标签进行评分。
数据集构成
数据集包含每次已发布调查运行的每个管道阶段(完成、筛选、调查、验证)、衍生声明评估数据集、SFT训练数据和提示数据集。每个调查的完整反事实实验日志和书面报告均保存在 investigations.jsonl 中。
- 总大小: 约 93 GB
- 数据格式: JSONL(每行一个 JSON 记录)
- 代码仓库: https://github.com/adamkarvonen/counterfactual-investigations
- 模型仓库: https://huggingface.co/adamkarvonen
文件夹命名与布局
数据文件夹结构为 datasets/<name>/ 和 prompt_sources/<name>/,命名规则为 {target}_{source}_{split}:
- target: 被调查模型,包括
qwen3_8b、qwen3_32b、qwen3p5_397b、qwen3p6_35b_a3b、gemma3_27b_it、llama3_1_8b。 - source: 提示池,包括
wildchat(WildChat + 智能体切片)或petri(对齐审计转录)。 - split:
eval(每个提示 30 次完成,保留评估运行)或train(每个提示 10 次完成,SFT 规模训练运行)。 _thinking: 目标模型以推理模式运行(思考预算 1024)。self_investigate: 目标模型自我调查(调查者 = 评判者 = 目标模型)。
每个文件夹均包含 MANIFEST.txt(文件、字节、JSONL 文件行数,上限 2 GiB)。
评估运行(每个提示 30 次完成,Claude Opus 4.6 调查者)
| 文件夹 | 目标模型 | 提示来源 | 调查数 | 声明库 | 评估集 | 大小 |
|---|---|---|---|---|---|---|
gemma3_27b_it_wildchat_eval |
google/gemma-3-27b-it | WildChat+agentic (5000) | 1,987 | 4,813 | 1,750 | 3.1G |
qwen3_8b_wildchat_eval |
Qwen/Qwen3-8B | WildChat+agentic (5000) | 1,906 | 4,389 | 2,000 | 2.8G |
qwen3_8b_petri_eval |
Qwen/Qwen3-8B | Petri (8B audit, 2061) | 868 | 2,125 | 1,442 | 1.2G |
qwen3p5_397b_wildchat_eval |
Qwen/Qwen3.5-397B-A17B-FP8 | WildChat+agentic (5000) | 1,778 | 4,370 | 1,396 | 2.9G |
qwen3p5_397b_petri_eval |
Qwen/Qwen3.5-397B-A17B-FP8 | Petri (397B audit, 1732) | 547 | 1,322 | 708 | 951M |
qwen3_32b_wildchat_eval |
Qwen/Qwen3-32B-FP8 | WildChat+agentic (5000) | 1,571 | — | — | 2.4G |
llama3_1_8b_wildchat_eval |
meta-llama/Llama-3.1-8B-Instruct | WildChat+agentic (5000) | 1,906 | 4,300 | 1,798 | 2.8G |
qwen3_8b_wildchat_thinking_eval |
Qwen/Qwen3-8B (thinking 1024) | WildChat+agentic (5000) | 1,573 | 3,798 | 1,872 | 6.8G |
qwen3p5_397b_wildchat_thinking_eval |
Qwen/Qwen3.5-397B-A17B-FP8 (thinking 1024) | WildChat+agentic (5000) | 954 | 2,318 | 928 | 5.9G |
所有 WildChat 评估运行均使用相同的 prompt_sources/prompts_wildchat_agentic/prompts.jsonl 的前 5000 条切片(偏移量为 0)。
每个文件夹的文件:
config.json:完整运行来源信息prompts.jsonl:输入提示completions.jsonl:目标模型完成(每个提示 30 个样本)screening.jsonl:阶段 2 筛选investigations.jsonl:调查者发现(包含完整实验日志和书面报告)verification.jsonl:独立的 5 名评判者验证binary_counterfactual_questions.jsonl:衍生声明库mechanism_concreteness.jsonl:每个调查的具体性标签eval_set_conc3_n2000.jsonl:论文中使用的平衡评估集(具体性 >= 3 的声明,上限 2000)
训练运行(每个提示 10 次完成)
| 文件夹 | 目标模型 | 调查者 | 调查数 | 声明库 | 大小 |
|---|---|---|---|---|---|
qwen3_8b_wildchat_train |
Qwen/Qwen3-8B | Claude Opus 4.6 | 21,780 | 52,561 | 6.1G |
qwen3_32b_wildchat_train |
Qwen/Qwen3-32B (fp8) | Claude Opus 4.6 | 39,946 | 81,769 | 12G |
llama3_1_8b_wildchat_train |
meta-llama/Llama-3.1-8B-Instruct | Claude Opus 4.6 | 15,299 | 34,218 | 4.2G |
qwen3p5_397b_wildchat_self_investigate_train |
Qwen/Qwen3.5-397B-A17B-FP8 | 目标自身 | 50,508 | 69,485 | 16G |
qwen3p6_35b_a3b_wildchat_self_investigate_train |
Qwen/Qwen3.6-35B-A3B-FP8 | 目标自身 | 65,464 | — | 25G |
每个文件夹的文件:
investigations.jsonl、screening.jsonl、verification.jsonl:与评估运行记录模式相同binary_counterfactual_questions.jsonl:声明库provenance_config.json:原始管道运行配置
提示来源
| 文件夹 | 内容 | 提示数 | 大小 |
|---|---|---|---|
prompts_wildchat_agentic |
prompts.jsonl — 评估提示池(WildChat 4.8M 单轮聊天 + Hermes/ToolACE/SystemChat 智能体提示) |
189,542 | 711M |
prompts_wildchat_172k |
prompts.jsonl — 较大的 WildChat 训练提示池 |
172,332 | 660M |
记录模式:{conversation_hash, messages, user_message, n_turns, total_chars, id, source}。
记录模式摘要
investigations.jsonl: 包含prompt_id、interest_score、behavior_summary、question、suggested_counterfactual、user_message、completions、investigation_report、experiment_log、structured_findings等字段。screening.jsonl: 包含prompt、completions、interest_score、screening_rationale等字段。verification.jsonl: 包含prompt_id、score (1-10)、experiment_assessments、explanation_assessment等字段。binary_counterfactual_questions.jsonl: 包含dataset、source_run、prompt_id、question、transcript、statement、is_true、claim_type等字段。mechanism_concreteness.jsonl: 包含prompt_id、mechanism_concreteness (1-5)、categories、is_mistake、rationale等字段。
已发布模型
论文中的训练检查点以 LoRA 适配器形式发布,基于以下基础模型:
| 仓库 | 基础模型 | 说明 |
|---|---|---|
qwen3_8b_counterfactual_e1_kl0 |
Qwen/Qwen3-8B | 主要反事实预测模型 |
qwen3_8b_counterfactual_e1_kl1 |
Qwen/Qwen3-8B | 同上,带 KL 惩罚 |
qwen3_8b_selfexpl_structured_e3_kl0 |
Qwen/Qwen3-8B | 自由格式结构化自我解释 |
qwen3_8b_selfexpl_first_person_e3_kl0 |
Qwen/Qwen3-8B | 第一人称段落自我解释 |
qwen3_32b_selfexpl_structured_e3_kl0 |
Qwen/Qwen3-32B | 32B 自由格式结构化自我解释 |
qwen3_32b_selfexpl_synth_e1_kl1 |
Qwen/Qwen3-32B | 32B 合成混合模型 |
qwen3p5_397b_counterfactual_e1_kl0 |
Qwen/Qwen3.5-397B-A17B | 397B 反事实预测 |
qwen3p5_397b_selfexpl_e3_kl0 |
Qwen/Qwen3.5-397B-A17B | 397B 自由格式自我解释 |
许可、来源与归属
该数据集根据混合条款发布,源自多个上游来源,每个来源保留其自身许可:
| 组件 | 来源 | 上游许可/条款 |
|---|---|---|
| WildChat 提示及其衍生内容 | allenai/WildChat-4.8M |
ODC-BY 1.0 — 需注明 AI2/allenai |
| 智能体提示池 | NousResearch/hermes-function-calling-v1、Team-ACE/ToolACE、cognitivecomputations/SystemChat-2.0 |
Apache-2.0 |
| Petri 评估转录 | safety-research/petri |
MIT |
| Qwen 目标完成/调查 | Qwen 相关模型 | Apache-2.0 |
| Llama 目标完成 | Meta Llama-3.1-8B-Instruct | Llama 3.1 Community License — Built with Llama |
| Gemma 目标完成 | Google Gemma-3-27b-it | Gemma Terms of Use + Gemma Prohibited Use Policy |
| 调查者/验证者/评判者输出 | Claude Opus 4.6 (Anthropic) | Anthropic Commercial Terms;输出不得用于训练竞争模型 |
加载方式
通过代码仓库重建数据布局:
bash git clone https://github.com/adamkarvonen/counterfactual-investigations cd counterfactual-investigations pip install -e . python scripts/download_data.py
或通过 huggingface_hub 下载单个文件夹:
python from huggingface_hub import snapshot_download
path = snapshot_download( repo_id="adamkarvonen/counterfactual-investigations-data", repo_type="dataset", allow_patterns=["datasets/qwen3_8b_wildchat_eval/**"], )
或通过 datasets 库直接流式加载单个文件:
python from datasets import load_dataset
ds = load_dataset( "json", data_files="hf://datasets/adamkarvonen/counterfactual-investigations-data/" "datasets/qwen3_8b_wildchat_eval/eval_set_conc3_n2000.jsonl", split="train", )




