junidude14 commited on
Commit
8cd5af6
·
verified ·
1 Parent(s): 1cb375c

Archive 4 checkpoints (1-4)

Browse files
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/tables/results_summary.tex ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \begin{table}[t]
2
+ \centering
3
+ \small
4
+ \caption{Results on shared genes in the childhood SLE pseudobulk test. Disease-effect scores are equal-weight means over T cells, B cells, monocytes and NK cells. RMSE measures errors in disease effects. F1 combines coverage and precision in the shared cell-expression space. TVD measures errors in cell-type shares. The first three rows use one completed schedule part. The last two rows add training only for the 2K model. Higher values are better except for RMSE and TVD.}
5
+ \label{tab:interim_results}
6
+ \begin{tabular}{lrrrrrr}
7
+ \toprule
8
+ Checkpoint & Effect $r$ & RMSE & Coverage & Precision & F1 & TVD \\
9
+ \midrule
10
+ 2K E1 & 0.436 & 0.1216 & 0.918 & 0.765 & 0.835 & 0.105 \\
11
+ 6K E1 & 0.347 & 0.1270 & 0.798 & 0.926 & 0.857 & 0.125 \\
12
+ 11.6K E1 & 0.225 & 0.1340 & 0.636 & 0.944 & 0.760 & 0.139 \\
13
+ \midrule
14
+ 2K E2 & 0.573 & 0.1126 & 0.941 & 0.707 & 0.807 & 0.115 \\
15
+ 2K E3 & 0.689 & 0.1017 & 0.958 & 0.693 & 0.804 & 0.100 \\
16
+ \bottomrule
17
+ \end{tabular}
18
+ \end{table}
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/tables/results_threshold.tex ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ \begin{table}[t]
2
+ \centering
3
+ \small
4
+ \caption{Sweeping the support threshold on one checkpoint. Base arm, part 16, one condition set, one sampler seed and 50 deterministic steps; only the support threshold $\tau$ changes, which decides at the last step whether a gene is expressed ($p>\mathrm{sigmoid}(\tau)$). Weights and predicted values are untouched. Zero fraction and detected genes per cell (median) are measured on the same 2,980-gene panel and the same cells as the scores. Coverage is the fraction of observed cells with a generated neighbour inside their fifteenth-neighbour radius. The threshold that matches the observed mean detection rate is $-1.55$; $-2.0$ maximizes $r$ within twice the seed resolution of $-3.0$ while producing 13\% more detected genes than observed.}
5
+ \label{tab:threshold}
6
+ \begin{tabular}{rrrrrrr}
7
+ \toprule
8
+ $\tau$ & zero fraction & genes/cell & $r$ & DEG & comp.\ $L_1$ & coverage \\
9
+ \midrule
10
+ $+0.5$ & 0.9394 & 170 & 0.231 & 53 & 0.221 & 0.737 \\
11
+ $0.0$ (default) & 0.9360 & 177 & 0.241 & 57 & 0.227 & 0.771 \\
12
+ $-0.5$ & 0.9316 & 188 & 0.253 & 62 & 0.231 & 0.797 \\
13
+ $-1.0$ & 0.9255 & 202 & 0.272 & 63 & 0.233 & 0.814 \\
14
+ $-1.5$ & 0.9168 & 223 & 0.291 & 64 & 0.236 & \textbf{0.821} \\
15
+ $-2.0$ & 0.9040 & 257 & 0.322 & 65 & 0.240 & 0.818 \\
16
+ $-2.5$ & 0.8846 & 310 & 0.316 & 68 & 0.242 & 0.807 \\
17
+ $-3.0$ & 0.8547 & 397 & \textbf{0.327} & \textbf{73} & 0.243 & 0.787 \\
18
+ $-3.5$ & 0.8107 & 530 & 0.317 & 64 & 0.245 & --- \\
19
+ $-4.0$ & 0.7529 & 708 & 0.311 & 67 & 0.246 & --- \\
20
+ \midrule
21
+ Observed cells & 0.9155 & 229 & --- & --- & --- & --- \\
22
+ \bottomrule
23
+ \end{tabular}
24
+ \end{table}
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/data/sec04_metrics_overview.csv ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ group,metric,question,compared_against,reference
2
+ Cells,Precision / coverage,Land on real cells? Cover all real cells?,held-out real cells (R2),Kynkäänniemi 2019; Naeem 2020
3
+ Cells,Classifier AUC,Can a classifier tell generated from real cells?,0.5 = indistinguishable,Lopez-Paz & Oquab 2017
4
+ Cells,MMD²,How far apart are the two cell distributions?,real vs real,Gretton 2012
5
+ Cells,E_N,scSemiProfiler's own nearest-neighbour error,within-sample split,Wang 2024
6
+ Composition,Cell-type L1,Right mix of the six scANVI cell types?,other donors' mean (null),—
7
+ Disease,logFC r (Pearson / Spearman),Same case-vs-control change in each cell type?,zero-shot; partial r (vs bulk),Roohani 2024; Viñas Torné 2026
8
+ Disease,Top-50 DEG overlap,Same top disease genes per cell type?,chance; limma-voom check,Li 2026; Squair 2021; Law 2014
9
+ Disease,CAT curve,Same genes at every list length k?,chance = k / 2G,Irizarry 2005
10
+ Cost,GPU time,How long to apply to a new cohort?,"same donors, same GPU",—
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/tools/sec04_metrics_overview.py ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Section 4 of the 2026-09-30 paper-summary deck: how generated cells are scored (metric overview; added 2026-10-02).
3
+
4
+ CPU only; draws a plain table figure. One row per metric used anywhere in the deck: what it asks, what it is compared
5
+ against (control, null or ceiling), and the paper the definition comes from. The definitions match the scorers:
6
+ plans/paired_finetune_intradataset_20260927/tools/score_ft.py (composition, precision/coverage, logFC r, top-50 DEG),
7
+ tools/extra_metrics.py (classifier AUC, MMD^2, E_N) and tools/contrast_extra.py (Spearman, split-half ceiling,
8
+ limma-voom DEG, CAT). 2026-10-10: the logFC r row no longer lists the bulk-broadcast baseline (user rule of
9
+ 2026-10-08: no broadcast anywhere); it names zero-shot and partial r (the signal beyond the bulk) instead. References are the PDFs in paper-release-20260928/reference-papers/ (INDEX.md).
10
+
11
+ Outputs: figures/sec04_metrics_overview.{png,pdf}; data/sec04_metrics_overview.csv (the table as text).
12
+ """
13
+ import os
14
+
15
+ os.environ["CUDA_VISIBLE_DEVICES"] = ""
16
+ import sys
17
+ from pathlib import Path
18
+
19
+ import pandas as pd
20
+
21
+ DECK = Path("/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/presentations/"
22
+ "2026-09-30--paper-summary--r00")
23
+ sys.path.insert(0, str(DECK / "tools"))
24
+ import style # noqa: E402
25
+ import matplotlib.pyplot as plt # noqa: E402
26
+
27
+ FIGDIR = Path(os.environ.get("DECK_FIGDIR", str(DECK / "figures")))
28
+ OUTDATA = Path(os.environ.get("DECK_OUTDATA", str(DECK / "data")))
29
+
30
+ # group, metric, question, compared against, reference
31
+ ROWS = [
32
+ ("Cells", "Precision / coverage", "Land on real cells? Cover all real cells?",
33
+ "held-out real cells (R2)", "Kynkäänniemi 2019; Naeem 2020"),
34
+ ("Cells", "Classifier AUC", "Can a classifier tell generated from real cells?",
35
+ "0.5 = indistinguishable", "Lopez-Paz & Oquab 2017"),
36
+ ("Cells", "MMD²", "How far apart are the two cell distributions?",
37
+ "real vs real", "Gretton 2012"),
38
+ ("Cells", "E_N", "scSemiProfiler's own nearest-neighbour error",
39
+ "within-sample split", "Wang 2024"),
40
+ ("Composition", "Cell-type L1", "Right mix of the six scANVI cell types?",
41
+ "other donors' mean (null)", "—"),
42
+ ("Disease", "logFC r (Pearson / Spearman)", "Same case-vs-control change in each cell type?",
43
+ "zero-shot; partial r (vs bulk)", "Roohani 2024; Viñas Torné 2026"),
44
+ ("Disease", "Top-50 DEG overlap", "Same top disease genes per cell type?",
45
+ "chance; limma-voom check", "Li 2026; Squair 2021; Law 2014"),
46
+ ("Disease", "CAT curve", "Same genes at every list length k?",
47
+ "chance = k / 2G", "Irizarry 2005"),
48
+ ("Cost", "GPU time", "How long to apply to a new cohort?",
49
+ "same donors, same GPU", "—"),
50
+ ]
51
+ HEAD = ("", "Metric", "Question", "Compared against", "Definition from")
52
+ COLX = (0.0, 0.103, 0.29, 0.607, 0.80)
53
+ GROUP_COL = {"Cells": style.ARM["lora"], "Composition": style.ARM["zs_cal"], "Disease": style.ARM["sconly"],
54
+ "Cost": style.GREY}
55
+
56
+
57
+ def main() -> int:
58
+ fig = plt.figure(figsize=(12.3, 5.0))
59
+ ax = fig.add_axes([0.0, 0.0, 1.0, 1.0])
60
+ ax.set_axis_off()
61
+ n = len(ROWS)
62
+ top, step = 0.93, 0.093
63
+ fs = style.FS - 2
64
+ for x, h in zip(COLX, HEAD):
65
+ ax.text(x + 0.005, top + 0.045, h, fontsize=fs, fontweight="bold", color=style.INK, va="center")
66
+ ax.plot([0, 1], [top + 0.012, top + 0.012], color=style.INK, lw=1.0)
67
+ prev = None
68
+ for i, (g, m, q, c, r) in enumerate(ROWS):
69
+ y = top - (i + 0.5) * step
70
+ if g != prev:
71
+ if prev is not None:
72
+ ax.plot([0, 1], [y + step / 2, y + step / 2], color="#C8C8C8", lw=0.8)
73
+ ax.text(COLX[0] + 0.005, y, g, fontsize=fs + 1, fontweight="bold", color=GROUP_COL[g], va="center")
74
+ prev = g
75
+ ax.text(COLX[1] + 0.005, y, m, fontsize=fs, color=style.INK, va="center")
76
+ ax.text(COLX[2] + 0.005, y, q, fontsize=fs, color=style.SUBINK, va="center")
77
+ ax.text(COLX[3] + 0.005, y, c, fontsize=fs, color=style.SUBINK, va="center")
78
+ ax.text(COLX[4] + 0.005, y, r, fontsize=fs - 1, color=style.SUBINK, va="center", style="italic")
79
+ ax.plot([0, 1], [top - n * step, top - n * step], color=style.INK, lw=1.0)
80
+ ax.set_xlim(0, 1)
81
+ ax.set_ylim(top - n * step - 0.01, top + 0.08)
82
+ style.save(fig, "sec04_metrics_overview", FIGDIR)
83
+ OUTDATA.mkdir(exist_ok=True)
84
+ pd.DataFrame(ROWS, columns=["group", "metric", "question", "compared_against", "reference"]).to_csv(
85
+ OUTDATA / "sec04_metrics_overview.csv", index=False)
86
+ return 0
87
+
88
+
89
+ if __name__ == "__main__":
90
+ sys.exit(main())