scgpt-replogle-activations
收藏资源简介:
该数据集包含来自两个scGPT检查点的每细胞隐藏状态,这些状态是在State-Replogle-Filtered数据集的平衡样本上捕获的。样本在`(cell_line, gene)`桶中以每个桶25个细胞进行平衡。数据集旨在用于跨编码器差异分析和其他机制可解释性分析,以比较两个模型在相同输入上的表现。数据集包含约72,100个细胞,分布在2,884个桶中。数据布局包括基础模型和ESM模型的捕获,每个模型的数据分布在4个分片中,总计约625 GB。技术细节包括使用的硬件(NVIDIA H100 PCIe)、捕获层(transformer_encoder.layers.{5,7,10})、数据类型(fp16)和压缩方式(gzip-4)。数据集还提供了预测结果和训练统计信息,适用于需要比较模型内部表示的研究。
This dataset contains per-cell hidden states from two scGPT checkpoints, captured on a balanced sample of the State-Replogle-Filtered dataset. The samples are balanced with 25 cells per `(cell_line, gene)` bucket. The dataset is intended for cross-encoder difference analysis and other mechanistic interpretability analyses to compare the performance of two models on the same inputs. The dataset contains approximately 72,100 cells distributed across 2,884 buckets. The data layout includes captures from the base model and the ESM model, with each models data distributed across 4 shards, totaling approximately 625 GB. Technical details include the hardware used (NVIDIA H100 PCIe), capture layers (transformer_encoder.layers.{5,7,10}), data type (fp16), and compression method (gzip-4). The dataset also provides prediction results and training statistics, making it suitable for research requiring comparison of internal model representations.
数据集概述:scGPT activation captures on Replogle (base vs ESM)
数据集基本信息
- 数据集地址:https://huggingface.co/datasets/matthewshu/scgpt-replogle-activations
- 许可证:其他(license: other)
- 标签:单细胞、扰动预测、scGPT、激活值、机械可解释性、crosscoder
- 基础数据集:arcinstitute/State-Replogle-Filtered
数据集内容
该数据集包含从两个scGPT模型检查点(base和ESM)中提取的逐细胞层{5,7,10}隐藏状态,这些激活值来自于72,100个细胞的平衡样本,样本来自State-Replogle-Filtered数据集。
样本按照(cell_line, gene)桶进行平衡,每个桶包含25个细胞,总共2,884个桶。数据集的目的是用于crosscoder差分分析和其他机械可解释性研究,比较两个模型在相同输入上的表现。
数据集布局
matthewshu/scgpt-replogle-activations/ ├── README.md ├── base/ ← scGPT-base捕获(约313 GB) │ ├── shard-00000.h5 … shard-00003.h5 (4个分片,50个批次×批次大小384) │ ├── stats.h5 (每个维度的Welford运行均值和M2) │ ├── predictions.h5ad (3.78 GB,.X = 预测值,.layers["truth"] = 真实值) │ └── training_stats.json (训练轮次、wandb URL、最佳验证pearson_delta) └── esm/ ← scGPT+ESM捕获(约312 GB),相同布局
总大小:约625 GB,共14个数据文件(每侧7个)。
分片信息
| 分片 | 细胞数 | 布局 |
|---|---|---|
| 0 | 19,200 | 完整(50×384) |
| 1 | 19,200 | 完整 |
| 2 | 19,200 | 完整 |
| 3 | 14,500 | 部分(最后一个批次裁剪至总计72,100) |
捕获配置
两个模型运行共享以下配置:
| 配置项 | 详情 |
|---|---|
| 源代码提交 | 7384c03 |
| 运行命令 | python -m scripts.run scgpt --dataset replogle --split sample |
| 采样方式 | --sample-by cell_line,gene --sample-n-per-bucket 25 --seed 42 → 72,100个细胞,2,884个桶 |
| 样本顺序 | 使用rng.permutation随机打乱,每个分片混合了不同细胞系和扰动 |
| 捕获层 | transformer_encoder.layers.{5,7,10} |
| 捕获数据类型 | fp16 |
| 分片大小 | 50个批次×批次大小384 = 19,200个细胞/分片 |
| 压缩方式 | gzip-4(无损) |
| 硬件 | NVIDIA H100 PCIe(80 GB) |
两个捕获的唯一区别在于模型:
- base:直接加载
replogle_base_ft/best_model.pt - ESM:加载
replogle_esm_ft/best_model.pt,使用冻结的ESM2-15B每基因先验(scgpt_esm_prior.safetensors,5120→512线性映射)构建模型
样本顺序:打乱而非排序
较早期版本的数据集按照obs帧索引顺序存储细胞,导致每个分片100%为单一细胞系(早期分片为K562,后期为RPE1)。当前版本使用rng.permutation对桶索引进行打乱,每个分片包含接近全局比例的混合(经验上每个分片K562/RPE1约为52/48)。
确定性与base/esm对齐
- 使用相同的
--seed 42、相同的数据预处理、相同的平衡样本桶索引 - 训练/验证/测试对数量在两个运行之间一致(180,021 / 8,569 / 109,207)
- 72,100行样本在细胞ID级别是比特一致的——仅捕获的激活值不同
- 每个分片中,
cell_id数组在base和esm分片之间元素相等,确保crosscoder配对的一致性
文件详情
shard-NNNNN.h5
每个分片包含:
- 以fp16格式捕获的BTD张量,位于
<capture>/<tags>/activation,形状为(B, T=1536, D=512) - 每个细胞的标签:
cell_id、pert、cell_index、gene_dataset_ids - 每个分片的Welford累加器:
count、mean、M2
stats.h5
全局每个维度的Welford累加器,跨所有分片,形状为(D,),适用于crosscoder训练归一化。
predictions.h5ad
自包含的预测结果:
.X= 预测的对数归一化表达.layers["truth"]= 真实值- 没有额外的对照细胞
training_stats.json
包含模型来源信息:wandb运行URL、训练轮次、最佳验证pearson_delta、总训练细胞数。
数据来源
- 源代码仓库:mattshu0410/sc-interp
- 生成这些捕获的组件:Runner、HookManager、H5ActivationSink





