beetle-phase-transition
收藏资源简介:
该数据集记录了Beetle语言模型在训练过程中感应头(induction head)阶段转变的机制指标。数据来源于BeetleLM的多个检查点,涵盖不同规模的模型(2B、24B等)和多种训练课程(双语、单语)。数据集包含六个配置,对应不同的数据模式:trajectories(全训练过程对数间隔的检查点指标)、trajectories_hires(转变窗口密集采样)、head_properties(每个头的属性,如重复依赖性、集中度、位置稳定性)、ablation(头消融下的关联回忆,含随机和熵匹配控制)、transition_fits(断点变化点拟合及自举置信区间)、cascade_stages(前文头/感应头/关联回忆开始的步骤与尺度)、final_revision(主分支上的最终指标)。每个配置包含的字段有:前缀匹配分数(best_ps)、感应头数量(n_induction_heads)、关联回忆准确率(ar_acc)、前文头分数(best_pth)、残差流有效秩(mean_effective_rank)、重复依赖性(repeat_dependence)等。主要发现包括:PS在约第8k步发生尖锐转变,从基线0.028上升至0.64-0.84;转变不受双语课程或语言影响;消融实验表明感应头功能有效;存在三阶段级联(前文头先形成,然后感应头,最后功能关联回忆)。数据集适用于可解释性研究、训练动力学分析、阶段转变检测、以及语言模型内电路形成机制的研究。
This dataset records the mechanistic indicators of the induction head phase transition during the training of the Beetle language model. The data originates from multiple checkpoints of BeetleLM, covering models of different sizes (2B, 24B, etc.) and various training curricula (bilingual, monolingual). The dataset includes six configurations corresponding to different data modes: trajectories (log-spaced checkpoint indicators for the full training process), trajectories_hires (dense sampling within the transition window), head_properties (attributes of each head, such as repeat dependence, concentration, position stability), ablation (associative recall under head ablation, with random and entropy-matched controls), transition_fits (breakpoint change point fitting with bootstrap confidence intervals), cascade_stages (steps and scales for the onset of previous-head/induction-head/associative recall), and final_revision (final metrics on the main branch). Each configuration contains fields including prefix matching score (best_ps), number of induction heads (n_induction_heads), associative recall accuracy (ar_acc), previous-head score (best_pth), effective rank of residual stream (mean_effective_rank), and repeat dependence (repeat_dependence). Key findings include: a sharp PS transition around step ~8k, rising from baseline 0.028 to 0.64-0.84; the transition is unaffected by bilingual curriculum or language; ablation experiments show induction heads are functionally effective; a three-stage cascade exists (previous-head forms first, then induction head, finally functional associative recall). The dataset is suitable for interpretability research, training dynamics analysis, phase transition detection, and studying the formation mechanisms of circuits within language models.
BeetleLM 归纳头相变数据集
数据集概览
该数据集记录了 Beetle 语言模型在训练过程中归纳电路(induction circuit)形成的逐检查点机制指标,旨在追踪训练期间归纳头(induction heads)的形成过程。数据集遵循 Apache-2.0 许可证,属于可解释性(interpretability)研究范畴,覆盖归纳头、训练动态和相变等主题。
数据集配置结构
由于不同文件包含六种不同的数据模式,为避免加载时出现类型转换错误,数据被划分为七个独立配置:
| 配置名称 | 内容说明 |
|---|---|
trajectories |
全训练过程按对数间隔采样的逐检查点归纳指标 |
trajectories_hires |
相变窗口(步骤 6k-30k)的密集采样数据 |
head_properties |
各头的属性(重复依赖性、集中度、位置稳定性) |
ablation |
头部消融下的联想回忆表现,含随机和熵匹配对照组 |
transition_fits |
断棍(broken-stick)变点拟合结果及 bootstrap 置信区间 |
cascade_stages |
不同课程和规模下的 PTH/IH/AR 起始步骤 |
final_revision |
main 版本(step-* 扫描未覆盖)的最终指标 |
核心指标说明
| 指标列名 | 含义 |
|---|---|
best_ps |
各头中最大的前缀匹配分数(参照 Olsson 等人 2022 年的方法) |
n_induction_heads |
前缀匹配分数大于 0.3 的头的数量 |
ar_acc |
在重复随机 token 序列上的联想回忆准确率 |
best_pth |
最大的前一个 token 头分数 |
mean_effective_rank |
残差流的有效秩 |
repeat_dependence |
重复输入上的 PS 减去长度匹配的非重复输入上的 PS |
其中 repeat_dependence 是判断高 PS 头是否为真正归纳头的关键指标:候选头约为 0.7,而其他头约为 0.0003。
主要发现
相变现象
PS 分数在约第 8k 步前维持在机会水平(0.028,即均匀因果注意力在平均查询位置的值),随后急剧上升至 0.64–0.84,有 4–9 个头跨越阈值。
与课程和语言无关
- 五种双语课程下相变起始时间变化甚微
- 荷兰语、英语、德语、意大利语和中文的单语模型均在相近计算预算下出现该现象
- 表明该相变是优化过程和架构本身的属性,而非双语训练所特有
电路功能性验证
消融前 3 个归纳头使联想回忆从 0.052 降至 0.001;消融三个熵匹配的对照头后,联想回忆仍保持 0.057,证明归纳电路不仅是存在,而且具有实际功能。
三阶段级联
- 前一个 token 头首先形成(约第 1.5–2k 步)
- 归纳头约 7.5k 步后形成
- 功能性联想回忆再约 17k 步后出现
2B 模型在阶段一内终止训练,因此表现出前一个 token 的结构但从未形成归纳头。
注意事项与局限
- 2B 模型截断问题:2B 检查点阶梯止于 4096–7127 步,低于相变阈值,其平坦的 PS 曲线是截断造成的,不能证明归纳头不存在
- 单语模型混淆:单语模型使用
fineweb3语料库构建,语言与语料库在该比较中相互混淆 - 时间分辨率有限:相隔一个对数网格步(8192 vs 16384)的起始时间在 20 个检查点下无法区分
- 缺少种子运行:24B 和 2B 规模无种子运行;种子仅限 HumanScale 的 B2/B3
- 规模可分离性受限:仅两种规模,无法将 token 预算与模型规模分开考量




