Archive 4 checkpoints (1-4)
Browse files- paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/COMPARISON.pdf +0 -0
- paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/COMPARISON.png +3 -0
- paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/COMPARISON.svg +0 -0
- paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/scores/draw0/README.md +73 -0
paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/COMPARISON.pdf
ADDED
|
Binary file (33.3 kB). View file
|
|
|
paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/COMPARISON.png
ADDED
|
Git LFS Details
|
paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/COMPARISON.svg
ADDED
|
|
paper-releases/pbisc-diffusion/updates/20261013T142727Z-trunk4x-sepsis-results/diffusion/dataset/server_1/model8/plans/trunk4x_lora_sepsis_20261013/scores/draw0/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# score_ft.py output: ye2026_sepsis, 77 scored donors
|
| 2 |
+
|
| 3 |
+
Arms: trunk4x, panel_matched_1x, current_f01, scsemi. Every arm is scored on the same donors against the same observed reference.
|
| 4 |
+
|
| 5 |
+
## Inputs and fixed contracts
|
| 6 |
+
- Observed reference: `/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/trunk4x_lora_sepsis_20261013/reference/reference.npz` (sha 8c5f2d794d13), built from datadir:/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/trunk4x_lora_sepsis_20261013/evaluation_data/ye2026_sepsis;
|
| 7 |
+
observed cells sum exactly to the features pseudobulk of every donor. Observed labels: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/trunk4x_lora_sepsis_20261013/reference/observed_labels/labels/labels.parquet.
|
| 8 |
+
- Generated cells: `generated_counts` read out once with Poisson(seed 20260916) over the **whole NPZ in row order**
|
| 9 |
+
(`poisson_readout.poisson_integerise`), then the scored donors' rows. These integer counts are used for labels, embedding,
|
| 10 |
+
depth and the contrast. Pseudobulk uses the summed `generated_counts` (rates), as `score_generated.py`.
|
| 11 |
+
- Labels: frozen f01common scANVI (`predict_scanvi.py`, CPU, zero query epochs), six-type gate ['T cell', 'B cell', 'Monocyte', 'NK cell', 'DC', 'Other']; query genes =
|
| 12 |
+
the 1,006-gene annotation list minus genes the dataset's sc assay did not measure in every sample (1006 genes).
|
| 13 |
+
- Scoring genes: 6k panel genes measured by both assays in every sample of the dataset (4243 genes).
|
| 14 |
+
|
| 15 |
+
## Definitions
|
| 16 |
+
1. **Composition**: fraction of each donor's cells per six-type label (all generated cells; all observed QC cells).
|
| 17 |
+
`comp_l1` = sum over the six labels of |generated - observed| (immicro_common.l1). `comp_l1_obs_loo_null` = L1 of the
|
| 18 |
+
donor's observed composition to the mean of the *other scored donors'* observed compositions. `composition_top1` =
|
| 19 |
+
fraction of donors whose generated composition is closest (L1) to their own observed composition.
|
| 20 |
+
2. **Pseudobulk**: `pb_r` = Pearson r of CPM-log1p(summed generated_counts) vs CPM-log1p(observed pseudobulk) on the scoring
|
| 21 |
+
genes (evaluate_realbulk.cpm_log1p / paired_r). `pb_top1` = the donor's generated pseudobulk is closest (Pearson) to its own
|
| 22 |
+
observed pseudobulk among the 77 scored donors (immicro_common.retrieval = evaluate_realbulk.top1 arithmetic).
|
| 23 |
+
3. **Precision / coverage / density** (stage_b_embed.py functions): per-cell CP10K over the scoring genes + log1p; PCA-50
|
| 24 |
+
(randomized, random_state 20260925) and k = 10 real-real k-NN balls fitted on **R1 of the scored donors only**.
|
| 25 |
+
Reference rule (independent of fold and arm): per donor, cells in canonical order (library_id+barcode), one
|
| 26 |
+
permutation from `default_rng([20260925, uint64(sha256(donor)[:8])])`; R1 = first n, R2 = next n,
|
| 27 |
+
n = min(150, n_cells // 2) (11550 R1 cells here). Generated query: per donor n cells (the donor's R1 size),
|
| 28 |
+
without replacement, `default_rng([20260926, same key])`. Precision = fraction of generated cells inside any R1 ball
|
| 29 |
+
(Kynkaanniemi 2019); coverage = fraction of R1 cells whose ball holds a generated cell; density = Naeem 2020.
|
| 30 |
+
Per-donor precision = that donor's generated cells; per-donor coverage = that donor's R1 cells (the pooled values are
|
| 31 |
+
their n-weighted means; plain means when every donor has 150 reference cells). R2 (held-out real cells of the same donors) is the
|
| 32 |
+
perfect-generator control: precision 0.9800, coverage 0.9999.
|
| 33 |
+
**Depth matched**: stage_b_embed depth matching run pairwise (R1 vs this arm): per donor and within-donor rank of detected
|
| 34 |
+
genes, both cells are thinned by UMI sampling without replacement to the smaller detected-gene count; PCA kept from
|
| 35 |
+
un-thinned R1, radii recomputed on thinned R1; fresh rng(20260929) per arm. R2 control: precision
|
| 36 |
+
0.9786, coverage 0.9999.
|
| 37 |
+
4. **Monocyte %** = 100 x Monocyte fraction (all cells) per donor; **median UMI per cell** = median over cells of the
|
| 38 |
+
Poisson-read (generated) / observed counts summed over the scoring genes (per donor, and pooled).
|
| 39 |
+
5. **Group contrast** (T, B, Monocyte, NK): case groups ['adult_sepsis', 'ped_sepsis'] (n = 57) vs control groups ['adult_HC', 'adult_ICU_ctrl', 'ped_HC', 'ped_ICU_ctrl'] (n = 20); rule: explicit --case-groups / --control-groups; groups from features groups.
|
| 40 |
+
Genes per type = scoring genes detected (count > 0) in >= 1 % of the scored donors' observed
|
| 41 |
+
cells of that type. Primary statistic `mean_cp10k`: per-cell CP10K over the scoring genes; per donor the mean over its
|
| 42 |
+
cells of the type (donors with >= 1 such cell); group mean = mean over the group's donors (donor-balanced);
|
| 43 |
+
logFC = log2(case mean + 1) - log2(control mean + 1). Secondary `pseudobulk_log1p_cpm`: the SLE benchmark evaluator's
|
| 44 |
+
statistic (donor x type summed counts, log1p CPM over the scoring genes, mean case - mean control;
|
| 45 |
+
evaluate_generated_vs_truth.group_log_fold_change). Both are computed on the generated cells (their frozen labels) and on
|
| 46 |
+
the observed cells; `r_generated` = Pearson r of the two logFC vectors. Broadcast baseline `r_broadcast`: the same
|
| 47 |
+
observed vector against the logFC of the input bulk (condition NPZ `bulk_counts` of the arm, scoring genes, per-donor
|
| 48 |
+
CP10K resp. log1p CPM, group means). `partial_r_generated_given_broadcast`: r of the OLS residuals of observed and
|
| 49 |
+
generated logFC on the bulk logFC (residual_specificity.py).
|
| 50 |
+
6. **Top-50 DEG overlap** (contrast.csv rows `statistic = welch_top50_deg`; summary `deg_top50`): the SLE benchmark's score (`total_top50_overlap` of
|
| 51 |
+
`bulk2sc-paper/scripts/evaluate_generated_vs_truth.py`, Welch backend: the "top-50 DEG 81 / 84" of the final model), run
|
| 52 |
+
with the evaluator's own functions on the same donor x type pseudobulks as the contrast. Per cell type, observed and
|
| 53 |
+
generated separately: donor x type summed counts on all 4243 scoring genes (donors of the two groups with
|
| 54 |
+
>= 1 cell of the type) -> `welch_bh_deg` (log1p CPM, two-sided Welch t-test case vs control, Benjamini-Hochberg over the
|
| 55 |
+
genes with a defined p-value; needs >= 2 donors per group) -> `top_deg_genes` (FDR < 0.05, descending |logFC|,
|
| 56 |
+
first 50; shorter when fewer genes pass). `top50_overlap` = |observed list & generated list|; `top50_jaccard`
|
| 57 |
+
the evaluator's Jaccard. Summary `sum` = total over the scored types (the quantity reported as 81), `max` = the sum of
|
| 58 |
+
the observed list lengths (the "of 262"), `sum_4type` = T + B + Monocyte + NK. A type is scored when its observed test
|
| 59 |
+
is defined; an arm whose generated test is undefined for a scored type gets overlap 0. Types: T cell, B cell, Monocyte, NK cell, DC
|
| 60 |
+
(aggregates: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/trunk4x_lora_sepsis_20261013/reference/deg_reference.npz).
|
| 61 |
+
**Broadcast analogue** (`top50_overlap_broadcast`, as `sle_broadcast.py` `broadcast_input_bulk`; not part of the
|
| 62 |
+
published benchmark): the same test on the arm's condition bulk_counts (scoring genes, the 57 + 20
|
| 63 |
+
donors), one whole-PBMC top-50 list, compared with every type's observed list.
|
| 64 |
+
|
| 65 |
+
## Files
|
| 66 |
+
- `per_donor.csv`: one row per arm x donor (all per-donor quantities above).
|
| 67 |
+
- `summary.json`: per arm the donor means / pooled values, provenance (NPZ sha, receipt check, generation metadata,
|
| 68 |
+
Poisson nnz of the whole NPZ, annotation contract), and the reference block (PCA, R2 control).
|
| 69 |
+
- `contrast.csv`: per arm x cell type x statistic (`mean_cp10k`, `pseudobulk_log1p_cpm`: logFC r; `welch_top50_deg`:
|
| 70 |
+
top-50 DEG overlap, T / B / Monocyte / NK / DC; columns of the other kind are empty).
|
| 71 |
+
- `arms/<arm>/labels/` (predict_scanvi.py labels + manifest), `arms/<arm>/generated_cells.parquet` (NPZ row, donor, label,
|
| 72 |
+
UMI on the scoring genes, P/C subsample flag), `arms/<arm>/deg_top50_lists.csv` (observed, generated and broadcast
|
| 73 |
+
top-50 gene lists, Ensembl ids, rank order).
|