junidude14 commited on
Commit
d654734
·
verified ·
1 Parent(s): c69bceb

Archive 4 checkpoints (1-4)

Browse files
.gitattributes CHANGED
@@ -254,3 +254,5 @@ paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-maste
254
  paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-master/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/figures/figure_enrichment_20261013/trajectory_step_17.pdf filter=lfs diff=lfs merge=lfs -text
255
  paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-master/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/figures/figure_enrichment_20261013/trajectory_step_33.pdf filter=lfs diff=lfs merge=lfs -text
256
  paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-master/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/figures/figure_enrichment_20261013/trajectory_step_50.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
254
  paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-master/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/figures/figure_enrichment_20261013/trajectory_step_17.pdf filter=lfs diff=lfs merge=lfs -text
255
  paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-master/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/figures/figure_enrichment_20261013/trajectory_step_33.pdf filter=lfs diff=lfs merge=lfs -text
256
  paper-releases/pbisc-diffusion/updates/20261013T072655Z-enriched-140-slide-master/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/figures/figure_enrichment_20261013/trajectory_step_50.pdf filter=lfs diff=lfs merge=lfs -text
257
+ paper-releases/pbisc-diffusion/updates/20261013T094815Z-all-celltypes-final-palette-142/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pdf filter=lfs diff=lfs merge=lfs -text
258
+ paper-releases/pbisc-diffusion/updates/20261013T094815Z-all-celltypes-final-palette-142/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pptx filter=lfs diff=lfs merge=lfs -text
paper-releases/pbisc-diffusion/updates/20261013T094815Z-all-celltypes-final-palette-142/diffusion/dataset/server_1/model8/AGENTS.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Model 8 PBISC-Diffusion paper maintenance
2
+
3
+ This active Model 8 source and its experiments are part of the
4
+ `pbisc-diffusion` paper. At task start, read
5
+ `../../paper-release-20260928/maintenance/POLICY.md` along with this
6
+ directory's README and applicable parent instructions.
7
+
8
+ At the end of each related task, follow that policy's versioned update
9
+ workflow for the exact source, experiment, checkpoint, or evidence assets that
10
+ changed. From the release root, use
11
+ `maintenance/update.py prepare --request FILE --id ID`, inspect the prepared
12
+ update, then run `maintenance/update.py publish ID --execute` and
13
+ `maintenance/update.py status` under the policy. Record a no-op or pending
14
+ status when no
15
+ asset changed or publication failed; never describe that as an upload. Do not
16
+ regenerate or alter the frozen 2026-09-28 release, its root manifests, or the
17
+ HF `paper-20260928` revision. Inference assets are location plus receipt by
18
+ default unless the task explicitly needs their payload.
19
+
20
+ The private dataset must stay private. Include datalake, VAE, or Model 7 assets
21
+ only with exact evidence that they are dependencies of this diffusion paper.
22
+ The parent host GPU safety rules still apply.
23
+
24
+ ## Reuse existing experiments before starting compute
25
+
26
+ User instruction, 2026-10-13: avoid repeating completed Model 8 experiments.
27
+ Start with `EXPERIMENT_INDEX.md` and query `EXPERIMENT_REUSE_INDEX.jsonl` using
28
+ `scripts/audit_experiment_reuse.py`. A missing output in a new plan directory
29
+ does not establish that an experiment has never been done.
30
+
31
+ - Before training, generation, or deconvolution, compare existing source
32
+ receipts: base checkpoint, exact support/test sample and donor IDs, data and
33
+ condition content, measured genes/masks, validation access, optimization and
34
+ selection schedule, seed, and implementation/configuration provenance.
35
+ - Registry matches are candidates, not automatic equivalence. Verify payloads
36
+ and write truthful adoption evidence. Preserve original execution provenance;
37
+ do not relabel an old artifact as newly executed strict work.
38
+ - Changing a sampling seed or receipt format does not justify retraining an
39
+ existing model. Reuse verified checkpoints and run only the genuinely changed
40
+ operation. Missing native receipts call for adoption, not automatic reruns.
41
+ - Record the candidate sources and the exact scientific reason for any new
42
+ operation before launching it. Unknown provenance requires investigation,
43
+ not a conclusion that new compute is necessary. Consult newer live receipts
44
+ when the inventory predates an ongoing campaign.
45
+ - Distinguish existing results, CPU-only statistics/plotting, a new protocol
46
+ update, and missing data in plans and decks. Never label all four as an empty
47
+ TODO. Archive/backup copies and tensor-identical models are not independent
48
+ experimental evidence.
49
+
50
+ The 2026-10-13 audit and confirmed duplicate-training proof are in
51
+ `plans/paper_figures_strictpairs_20261012/audit_reuse_20261013/`.
52
+ Sepsis deconvolution uses verified historical draw-specific outputs through
53
+ `tools/adopt_deconv_legacy.py` in that plan; its methods must not be rerun as a
54
+ fallback when adoption validation fails. Current expanded evidence master (142 slides, all 140 parent pages represented):
55
+ `presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pptx`.
56
+ Use its `data/celltypes_palette_master_20261013/page_map.csv` and source manifest.
57
+ Earlier 140/131-slide decks remain preserved source versions, not the current master.
58
+ The 34-slide review is a historical subset, not the master. The approved method palette is
59
+ `presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_color_palette_20261013.md`:
60
+ PBISC LoRA #168FE5, calibrated #59A8DF, raw #C3E2F4; scSemiProfiler #83C6A8;
61
+ BayesPrism #D9B23F and CIBERSORTx #F0D77D. Preserve biological/cohort colours and quantitative heatmap scales.
62
+ Older gold/blue source figures are preserved historical assets; use the final semantic palette derivatives in current decks.
63
+
64
+ ## Current manuscript figure scopes
65
+
66
+ The user's 2026-10-13 definitions supersede old figure numbers inside the deck and earlier plans:
67
+ Figure 1 overview/corpus statistics; Figure 2 architecture/gene-context ablations on SLE pseudobulk;
68
+ Figure 3 healthy measured bulk–sc paired mismatch, full FT, LoRA ranks and support budgets;
69
+ Figure 4 disease measured-paired quantitative integrity comparisons;
70
+ Figure 5 paired rare-population qualitative recovery; Figure 6 paired adaptation followed by
71
+ bulk-only published-finding reproduction (TODO).
72
+ The authoritative scope and proposed 131-page mapping are in
73
+ `presentations/2026-09-30--paper-summary--r00/data/figure_assignment_20261013/`.
74
+ Read `AUTHOR_SCOPE.md` and `ASSIGNMENT.md` before figure work. Preserve the distinction
75
+ between total-five pairs and five training plus extra validation; rank16 is not universally
76
+ best in existing metrics, and disease comparisons have cohort/endpoint exceptions.
77
+ Existing rare-state quantitative slides do not substitute for paired qualitative panels.
78
+ The scope is now applied in the actual reordered PPTX/PDF, not only in planning documents.
79
+ Use `tools/build_celltypes_palette_master_20261013.py` in the presentation directory. It consumes
80
+ saved all-cell-type results and the validated full-deck palette map; older builders are preserved historical entry points.
81
+ Figure 2 now includes corpus-validation curves and cost metadata alongside SLE pseudobulk
82
+ benchmarks; these are not paired real-bulk performance panels. Figure 1's recorded PCA
83
+ uses an existing ctx2048 E12 illustration, with endpoint colours revealed by denoising progress,
84
+ not per-step confidence. Display real R2 as a real-cell repeat from the same donors, not new donors.
85
+ Healthy pair-budget panels cover all six types with both Pearson correlation and MAE, including adverse results.
86
+ They use historical n+7 validation access, not total-n. Do not omit NK/DC/Other to make a five-pair claim appear stronger.
paper-releases/pbisc-diffusion/updates/20261013T094815Z-all-celltypes-final-palette-142/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8eacd43eba7d1192b1f5ec1a56390f889af6ee496d3f4bb21c53f861d0f7801f
3
+ size 18489723
paper-releases/pbisc-diffusion/updates/20261013T094815Z-all-celltypes-final-palette-142/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pptx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1440301e805ba310d6ce7b32b388fdb927d6e5730b1032da188aef280812cc4
3
+ size 20103494
paper-releases/pbisc-diffusion/updates/20261013T094815Z-all-celltypes-final-palette-142/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/README.md ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PBISC-Diffusion expanded evidence master
2
+
3
+ **Current working master: 142 slides, with all-cell-type pair budgets and the approved method palette.**
4
+
5
+ [Current editable PPTX](PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pptx) · [Current PDF](PBISC-Diffusion_expanded_master_20261013_celltypes_palette.pdf)
6
+
7
+ Pages **31–32** now show donor-fraction correlation and absolute error for T, B, Monocyte, NK, DC and Other. The historical global pair-budget summary remains on page **84**. All 140 parent pages are retained once. These curves use **n training + 7 validation pairs**; the genuine total-five-pair comparison remains separate on pages 33–34.
8
+
9
+ The [approved palette](PBISC-Diffusion_color_palette_20261013.md) is applied throughout: PBISC blue, scSemiProfiler mint green, external comparators yellow; biological/cohort colours and quantitative heatmap scales keep their meaning.
10
+
11
+ - [Current changes and interpretation](data/celltypes_palette_master_20261013/README.md)
12
+ - [Current/parent/original page map](data/celltypes_palette_master_20261013/page_map.csv)
13
+ - [Verification](data/celltypes_palette_master_20261013/qa/VERIFICATION.json)
14
+ - Builder: `tools/build_celltypes_palette_master_20261013.py`; uses saved cell-type results and the validated semantic palette map.
15
+
16
+ ## Earlier 140-slide enriched master (preserved)
17
+
18
+ The links and page ranges below describe the prior version.
19
+
20
+ [Current editable PPTX](PBISC-Diffusion_expanded_master_20261013_enriched.pptx) · [Current PDF](PBISC-Diffusion_expanded_master_20261013_enriched.pdf)
21
+
22
+ Figure 1 adds four recorded PCA denoising stages. Figure 2 now includes context/trunk and pred/oracle-hint diagrams, complete saved validation progressions, all-arm parameter/training-time comparisons, and a plain-language real-cell-repeat control. Figure 3 directly compares same-person bulk/pseudobulk expression values instead of donor-retrieval bars. The six author-defined scopes remain unchanged.
23
+
24
+ - [Changes, page guide and scientific scope](data/figure_enrichment_20261013/README.md)
25
+ - [Current/previous/original page map](data/figure_enrichment_20261013/page_map.csv)
26
+ - [Verification](data/figure_enrichment_20261013/qa/VERIFICATION.json)
27
+ - Builder: `tools/build_enriched_master_20261013.py`; consumes saved enrichment assets and the preserved 131-slide ordered spec. No training/inference launch is part of rebuilding this deck.
28
+
29
+ ## Earlier 131-slide ordered master (preserved)
30
+
31
+ The following links and page ranges describe the previous ordered version.
32
+
33
+ [Corrected editable PPTX](PBISC-Diffusion_expanded_master_20261013_reordered.pptx) · [Corrected PDF](PBISC-Diffusion_expanded_master_20261013_reordered.pdf)
34
+
35
+ The actual PPTX/PDF now follow the [author-defined scope](data/figure_assignment_20261013/AUTHOR_SCOPE.md): Figure 1 overview/corpus (pages 5–9), Figure 2 SLE architecture/gene-context ablations (10–14), Figure 3 healthy paired mismatch → full FT → rank → paired budget (15–23), Figure 4 disease integrity (24–29), Figure 5 paired rare qualitative plan (30–31), Figure 6 published-finding reproduction plan (32–34). Supplementary begins at page 35. There is no separate main figure devoted only to healthy PBISC-versus-scSemi performance.
36
+
37
+ - [Current order and correction report](data/figure_order_fixed_20261013/README.md)
38
+ - [Previous 131-page IDs → current pages, with original 76-page IDs](data/figure_order_fixed_20261013/page_map.csv)
39
+ - [Verification](data/figure_order_fixed_20261013/qa/VERIFICATION.json)
40
+ - Current builder: `tools/reorder_master_figures_20261013.py`; consumes the verified earlier master spec and saved figures directly. Do not run the old expanded builder to update this order.
41
+
42
+ All 131 source pages are accounted for. Original figure data are retained, obsolete planning cards are replaced, and the former availability-guide slot now shows a healthy-only extraction of the saved full-FT table. The mixed-cohort source plot remains in Supplementary. The original 76-slide files and prior 131-slide master remain unchanged. The [earlier classification CSV](data/figure_assignment_20261013/slide_assignment.csv) uses **previous** page numbers; use the current page map above.
43
+
44
+ ## Earlier 131-slide expansion (preserved)
45
+
46
+ [Earlier PPTX](PBISC-Diffusion_expanded_master_20261013.pptx) · [Earlier PDF](PBISC-Diffusion_expanded_master_20261013.pdf)
47
+
48
+ This is the comprehensive manuscript-working deck requested by the user, not a shortened talk. Every original slide is retained in its original relative order; new evidence is inserted next to the relevant topic. Original protocol wording is clarified where necessary.
49
+
50
+ - [Original 76 → expanded page mapping](data/expanded_master_20261013/original_76_coverage.csv)
51
+ - [All slide titles and provenance](data/expanded_master_20261013/slide_map.csv)
52
+ - [Expansion report and evidence boundaries](data/expanded_master_20261013/REPORT.md)
53
+ - [Verification](data/expanded_master_20261013/qa/VERIFICATION.json)
54
+ - [Sources and immutable input hashes](data/expanded_master_20261013/manifest.json)
55
+
56
+ The 55 additions comprise 20 healthy/input-control views, 25 disease/rare-state/external or exploratory views, six reconstructed review figures and four evidence/protocol guides. Existing saved results and coordinates are reused; no new training, inference or statistical fitting was launched. Historical scoring, diagnostic-only reference access, completed strict subsets and Figure 6 awaiting new data are labelled explicitly.
57
+
58
+ **Palette:** PBISC muted yellow/gold #C5AA4B; scSemiProfiler blue #2166AC. Method variants use related shades, while biological/cohort colors retain their own meaning. The complete policy is `data/expanded_master_20261013/palette.json`.
59
+
60
+ Builder: `tools/build_expanded_master_20261013.py`. CPU export/verification entry: `data/expanded_master_20261013/render.py` (use the host's bounded-memory execution policy). Plot caches are reused only after module, input and output hashes match.
61
+
62
+ The previous [34-slide review](PBISC-Diffusion_results_review_20261013.pptx) is a historical subset; it is not the working master. The original 76-slide source deck and frozen archives remain unchanged.
63
+
64
+ ## Original 2026-09-30 r00 deck and historical change log
65
+
66
+ 76-slide English deck, ordered by the six main figures of the Nature-style manuscript plan (user request 2026-10-06,
67
+ following `paper-release-20260928/reference-papers/Nature Style Manuscript Writing.pdf`):
68
+ - Title and outline: 6 figures, Supplementary, Appendix, Discussion.
69
+ - "Manuscript plan: six main figures": a table of each figure's claim and how many panels are ready.
70
+ - For each figure:
71
+ - a divider;
72
+ - a plan slide, a table of panel / content / evidence slide / status (Ready, Adapt, Draft, Build, Run, Plan);
73
+ - the existing slides that serve its panels, each labelled "Fig. 2c" etc. in the top-right corner.
74
+ - Supplementary: a plan slide plus the from-scratch results. Appendix: the modified scSemiProfiler run. Discussion: the
75
+ other-tissues outlook.
76
+
77
+ User decisions of 2026-10-06:
78
+ - No PBISC-VAE: scSemiProfiler, a VAE-based method, is the comparison (Fig. 3).
79
+ - Fig. 2 shows LoRA first on the healthy cohort (ImMicro) with the realism metrics (precision, coverage, classifier
80
+ AUROC, MMD, E_N); the disease-cohort comparison comes later.
81
+ - CYBERSORTx and other bulk deconvolution methods go to the Supplementary only (PBISC generates single cells).
82
+ - Figs 4 and 6 stay unplanned. Their existing slides are kept in the section as "Fig. 4 candidate" / "Fig. 6 candidate".
83
+
84
+ Only order, section labels, the agenda and new plan or draft slides changed. The new slides are "Overview draft (Nature
85
+ style)", the manuscript's candidate Fig. 1, and "Pretraining corpus", the Fig. 1d strip. No new result figures were
86
+ made.
87
+ - The plan lives in `data/figure_plan.json`.
88
+ - `tools/figure_plan.py` draws the plan tables and the slide text, and checks that every slide is placed exactly once.
89
+ - `tools/restructure_figure_order_20261006.py` rebuilds the order from the plan. It is rerun after every plan change and
90
+ keeps all slide fields.
91
+ - The earlier section order (10 sections, 45 slides) is in `_archive/2026-10-06_before_figure_order/`.
92
+
93
+ Short keyword lines only; the figures carry the results. Every slide that uses a published method, metric or
94
+ baseline has a one-line "References:" footer; full citations are in the speaker notes.
95
+
96
+ - `PBISC-Diffusion_paper_summary_20260930.pptx`: the deck
97
+ - `PBISC-Diffusion_paper_summary_20260930.pdf`: LibreOffice PDF of the deck
98
+ - `data/slides_spec.json`: slide order, titles, keywords, footnotes, references, speaker-note text
99
+ - `generate_deck.py`: builds the pptx from `data/slides_spec.json` only (python-pptx)
100
+ - `figures/`: exactly the figures the slides show (PNG + PDF), made by `tools/sec*.py`. Intermediate panels go to a
101
+ temporary folder; superseded figures are deleted, not kept (2026-10-02, user request; every deleted file was
102
+ checked to be in the paper archive by sha256 first).
103
+ - `data/sec*.csv` and `data/*_slide_text.json`: every plotted or quoted number with its source path
104
+ - `render/`: PDF and 70-dpi slide JPGs for checking
105
+
106
+ ## Slide order
107
+
108
+ | section | slides |
109
+ |---|---|
110
+ | 1 Model overview | bulk in, cells out; denoiser |
111
+ | 2 Backbone | SDD → PBISC-Diffusion; bulk conditioning |
112
+ | 3 Architecture ablation | width & context (loss, benchmark); gene panel |
113
+ | 4 Metrics + SLE benchmark | **how we score generated cells** (metric table with references); SLE benchmark; per cell type; bulk broadcast baseline |
114
+ | 5 Real bulk vs pseudobulk | input shift; same shift in three cohorts; cells off-manifold; disease direction flips |
115
+ | 6 Paired fine-tuning | method; evaluation design |
116
+ | 7 LoRA ablations | full vs LoRA vs cond.-encoder-only; LoRA rank r = 4 / 16 / 64; K diversification |
117
+ | 8 Pairs needed | composition / coverage / steps (with scSemiProfiler at the same n); donor and disease signal; pairs from other cohorts; longer training on them (with training minutes) |
118
+ | 9 Paired validation | cohorts; 5 donors: cells, realism beyond P/C, P/C at k = 3 / 5 / 10, scSemiProfiler copies its representative, disease signal, CAT curves, time to apply; 5-fold CV (with scSemiProfiler on the same pairs); same training pairs: LoRA vs scSemiProfiler; 5-fold realism metrics |
119
+ | 10 Next steps | paired-subset cohorts (planned); other tissues from a few dozen pairs (Discussion framing of the from-scratch results) |
120
+ | Supplementary | no pretraining: same cohort, from scratch (pilot); no pretraining: other cohorts, from scratch (pilot); rare states: from scratch vs pretrained; deconvolution with the same pairs: composition; deconvolution with the same pairs: disease signal |
121
+ | Appendix | scSemiProfiler without its output threshold (sensitivity; modified read-out, not the official output) |
122
+
123
+ ## Rebuild
124
+
125
+ Everything is CPU only; no GPU or checkpoint is touched.
126
+
127
+ ```bash
128
+ # prerequisites (plan folder plans/paired_finetune_intradataset_20260927/, CPU):
129
+ # scsemi/tools/representative_dependence.py -> scsemi/analysis/representative_dependence_20261002/
130
+ # tools/contrast_extra.py (+ tools/contrast_extra_tables.py) -> scores_contrast/ (Spearman, ceiling, limma, CAT, RBO)
131
+ # tools/build_tpm_zeroshot.py + tools/score_tpm_zeroshot.sh -> scores/<ds>/zeroshot_tpm_20261002/pooled/
132
+ # (the length-corrected zero-shot arm needs one GPU sampling step: tools/sample_lockwait.sh, coordinator only)
133
+ cd /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/presentations/2026-09-30--paper-summary--r00
134
+ # shared helpers, not run directly: style.py, sec03_common.py, scsemi_results.py, fold_sizes.py
135
+ for f in sec01_overview sec02_backbone sec03_width_loss sec03_width_bench sec03_panel \
136
+ sec04_metrics_overview sec04_sle_benchmark sec05_condition_space sec05_cells_offmanifold \
137
+ sec05_behcet_direction sec05_shift_cohorts sec06_finetune_method sec07_ft_modes \
138
+ sec07_k_aug sec07_rank_sweep sec08_pairs_needed sec08_cross_cohort sec09_paired_validation sec09_extra_metrics \
139
+ sec09_time_to_apply sec09_scsemi_representative sec09_cat_curves sec10_paired_subset_cohorts \
140
+ secA_scsemi_readout sec07_no_pretraining sec08_cross_scratch sec09_same_pairs \
141
+ secS_scratch_rare_states secS_deconvolution fig3_time_days fig4_disease fig23_healthy fig5_rare_states sec10_other_tissues figure_plan; do # keep this order (sec10 reads secS; figure_plan last)
142
+ python3 "tools/$f.py" || break
143
+ done
144
+ python3 tools/restructure_figure_order_20261006.py # order the slides by data/figure_plan.json
145
+ python3 tools/sync_sec09_text.py # copy every generated slide text (sec09_index / text_source) into the spec
146
+ python3 generate_deck.py # -> PBISC-Diffusion_paper_summary_20260930.pptx
147
+ soffice --headless --convert-to pdf --outdir render PBISC-Diffusion_paper_summary_20260930.pptx
148
+ pdftoppm -jpeg -r 70 render/PBISC-Diffusion_paper_summary_20260930.pdf render/slide
149
+ cp render/PBISC-Diffusion_paper_summary_20260930.pdf .
150
+ ```
151
+
152
+ `generate_deck.py` stops with an error if a figure is missing, a title does not fit on one line, a footnote needs
153
+ more than 2 lines (1 line when the slide has references), the reference line needs more than 1 line, or any text
154
+ contains Korean or placeholder words. `tools/restructure_20261002.py` is the one-off script that produced the current
155
+ slide order and the references (it refuses to run twice).
156
+
157
+ ## Notes
158
+
159
+ - **No "all" label (2026-10-02).** The 5-fold arm trains each fold model on the other four folds minus 7–8
160
+ inner-validation donors; its test fold is never trained on (RUN.json `test_rows_never_loaded_for_training`). Figures
161
+ label it "5-fold CV (other 4 folds)" and learning-curve ticks show the training-pair count per fold (78–79 ImMicro,
162
+ 58–59 sepsis), read by `tools/fold_sizes.py`.
163
+ - **Learning curve x = 0 uses no pairs (2026-10-02).** It shows the zero-shot model fed the real bulk as measured
164
+ and after exon-length correction (counts / Ensembl union-exon kb, then the same fixed-depth arithmetic;
165
+ `plans/.../tools/build_tpm_zeroshot.py`, scored in `scores/<ds>/zeroshot_tpm_20261002/pooled`). The old x = 0
166
+ calibration point, whose alpha used every training pair of the fold, is gone; calibration appears only fitted on the
167
+ same n pairs as the LoRA point (squares; `cal_budget_20261001`).
168
+ - **Disease metrics (2026-10-02).** Next to Pearson logFC r and the Welch top-50 DEG overlap: Spearman r, the
169
+ split-half ceiling (observed vs observed, Spearman–Brown), limma-voom top-50 DEG, each arm's chance overlap, and
170
+ CAT curves with the k / 2G chance line (`plans/.../scores_contrast/`, tools/contrast_extra.py; every Pearson r and
171
+ Welch count reproduced exactly). Repeated samples of one patient (Imperial, Giroux, Ji) count as separate samples in
172
+ both DE tests, as in the scorer (footnote).
173
+ - Section 9 text is generated: `tools/sec09_paired_validation.py`, `sec09_extra_metrics.py`, `sec07_rank_sweep.py`,
174
+ `sec09_time_to_apply.py`, `sec09_scsemi_representative.py`, `sec09_cat_curves.py` write slide text JSON; sync copies
175
+ it. Hand-written: the keywords of the two "Pairs needed" slides (section 8) and of every slide in sections 1–7 and 10.
176
+ - Giroux's disease metrics exclude 196 sex-linked genes (severity is confounded with sex), from
177
+ `plans/.../scores_nosex/`. The calibration comparator is "Zero-shot + calibration" (user decision 2026-10-01).
178
+ - Story rule (user decision 2026-09-30): no PBISC-VAE and no reference calibration (refcal). The exon-length-corrected
179
+ input is used only as the no-pair x = 0 point of the learning curve (user decision 2026-10-02).
180
+ `tools/sec04_immicro.py` (refcal vs scSemiProfiler on ImMicro) is kept but is not part of the deck or the rebuild.
181
+ - scSemiProfiler 5-fold and equal-budget results are picked up automatically when they appear (`tools/scsemi_results.py`;
182
+ arm `scsemi__raw` in `scores/<cohort>/scsemi_cv_20261002/pooled*/`, `scsemi_n{5,10,20,40}__raw` in
183
+ `scores/<cohort>/scsemi_budget_20261002/pooled*/`; same donors and reference cells as the main pooled call only).
184
+ Then rerun sections 8 and 9, sync, recheck the section 8 keywords and rebuild.
185
+ - Earlier versions: `_archive/2026-09-30_before_no_vae_refcal/`, `_archive/2026-10-01_before_extra_metrics/`,
186
+ `_archive/2026-10-02_before_time_to_apply/`, `_archive/2026-10-02_before_restructure/` (pptx, PDF, spec; their
187
+ figures are in the paper archive). `DRAFT_1150_*`: the copy shown at the 2026-09-30 12:00 meeting.
188
+
189
+ - Added 2026-10-03 (user decision: the cross-cohort experiment is reported at K = 1000 only and is the figure that explains
190
+ why PBISC fits LoRA on a few pairs of each cohort): slides 25-26 in section 8, `tools/sec08_cross_cohort.py`.
191
+ - Slide 25 "Pairs from other cohorts do not transfer": per held-out cohort, composition L1 / coverage / disease logFC r of
192
+ zero-shot, calibration fitted on the other cohorts, LoRA r16 / r64 / full fine-tune trained on the other cohorts
193
+ (+ Liu 2021) at step saturation, and LoRA on the cohort's own pairs (5-fold pooled).
194
+ - Slide 26 "Longer training on other cohorts" (": gap stays" since 2026-10-06): the same metrics at every 20k-step
195
+ milestone.
196
+ - Source plan: `plans/paired_crosscohort_20261002/` (README; same-reference and same-sample checks in the script).
197
+ Agenda item 8 now reads "How many pairs, and do other cohorts' pairs transfer". The deck has 37 slides.
198
+ Pre-update copy: `_archive/2026-10-03_before_cross_cohort/`.
199
+
200
+ ## Sources
201
+
202
+ Final model: `runs/f01_6k_1x_seed20260627` (epoch 16, EMA). Scores and receipts come from
203
+ `plans/utility_studies_final6k_20260925/`, `plans/paired_finetune_intradataset_20260927/`,
204
+ `plans/immicro_scsemi_comparison_20260927/`, `plans/floor01_campaign_20260923/`,
205
+ `analysis/scsemi_benchmark_diffusion_20260913/` and the run folders named in each `data/sec*.csv`. Reference PDFs:
206
+ `/home/sj_server_1/PBISC/paper-release-20260928/reference-papers/` (INDEX.md). Manuscript:
207
+ `/home/sj_server_1/PBISC/paper-release-20260928/manuscript/`.
208
+ - 2026-10-04 appendix (user decision: supplementary, appendix only, because it changes scSemiProfiler's official
209
+ output). Slide 38 is the divider "Appendix" and slide 39 is "Appendix: scSemiProfiler without output threshold"
210
+ (`tools/secA_scsemi_readout.py`, `data/secA_scsemi_readout{.csv,_slide_text.json}`).
211
+ - Inputs: `plans/paired_finetune_intradataset_20260927/scsemi/analysis/output_variants_20261003/`. The script checks
212
+ that its LoRA-5 and official scSemiProfiler values equal the section 9 slide data draw by draw.
213
+ - Result: without upstream's output threshold, scSemiProfiler's coverage rises in 5/5 cohorts, and 23/23 LoRA-5
214
+ comparisons (coverage, precision, composition, logFC r, DEG) keep their winner.
215
+ - The outline keeps its 10 sections (the builder requires 10). The pre-change copy is in
216
+ `_archive/2026-10-04_before_appendix/`. The deck has 39 slides.
217
+ - 2026-10-05 update (user request: put the results so far into the deck). Pre-change copy: `_archive/2026-10-05_before_scratch_cv/`.
218
+ - New slide 23, "No pretraining: same cohort, from scratch" (`tools/sec07_no_pretraining.py`). Pilot on sepsis fold 0
219
+ (17 donors). Reads `fold0_scratch_20261005/` and the runs' RUN.json. The donor composition r is recomputed from
220
+ per_donor.csv and reproduces ablation_extra_donor.csv.
221
+ - New slide 28, "No pretraining: other cohorts, from scratch" (`tools/sec08_cross_scratch.py`). Held-out sepsis pilot.
222
+ Every arm is read from `paired_crosscohort_20261002/scores_masked/`: genes no training cohort measured are zeroed
223
+ in all arms, because the unmasked scratch arm puts 91–94 % of its UMI there (read from the generated_masked logs
224
+ since 2026-10-06).
225
+ - New slide 38, "Same training pairs: LoRA vs scSemiProfiler" (`tools/sec09_same_pairs.py`). scSemiProfiler 5-fold
226
+ CV with LoRA's own training pairs, plus GPU hours per fold from the receipts on either host. Cohorts that are still
227
+ running show "in progress"; rerun the script as they finish.
228
+ - These two slides now draw the scSemiProfiler CV / budget runs automatically:
229
+ - Slide 24, "Pairs needed" (diamonds; ImMicro so far): keyword 2 reworded, footnote extended.
230
+ - Slide 37, "5-fold CV" (yellow bar; ImMicro and Ji so far).
231
+ - `tools/sec09_paired_validation.py` reads the scSemiProfiler CV arm's Spearman / limma values from
232
+ `scores_contrast/<cohort>/scsemi_cv_20261002/pooled/` (contrast_extra.py --design scored). Pearson r and the Welch
233
+ DEG must match the scorer; the values stay blank until computed. Cohorts not yet run say "in progress".
234
+ - Agenda item 7 now reads "LoRA: compute, rank, K; training from scratch". The deck has 42 slides.
235
+ - New helper: `tools/grouped_bars.py`.
236
+ - 2026-10-06 update (user request: check that the cross-cohort LoRA / full FT, cross-cohort from-scratch and
237
+ same-cohort from-scratch (+ recipes) results, with benchmarks and training times, and the scratch-vs-pretrained rare
238
+ states are in the deck; user decision: the from-scratch results go to the paper's Supplementary and the Discussion
239
+ presents them as a route to other tissues). Pre-change copy: `_archive/2026-10-06_before_supplementary/`.
240
+ - **Supplementary block (new divider, slides 40-43).**
241
+ - "No pretraining: same cohort, from scratch" and "No pretraining: other cohorts, from scratch" moved here from
242
+ sections 7 and 8. Their content is unchanged; slide 42's notes now name the cross-cohort slides by title.
243
+ - New "Rare states: from scratch vs pretrained" (`tools/secS_scratch_rare_states.py`).
244
+ - It reads the rare-state screen (`plans/rare_states_screen_20261004/out/sepsis_fold0_*` and
245
+ `sepsis_loco_masked_*`).
246
+ - The cross-cohort arms use the masked scoring (46 never-measured genes zeroed in every arm).
247
+ - The donor bootstrap reproduces the verified analysis in `out/scratch_vs_lora_20261005/REPORT.md`.
248
+ - **Section 10 "Next steps".**
249
+ - New "Next: other tissues from a few dozen pairs" (`tools/sec10_other_tissues.py`): a comparison table, pretrained
250
+ + LoRA vs from scratch.
251
+ - Every value is read from the deck's own source tables. The say text is the user's Discussion framing.
252
+ - **Slide 26 "Longer training on other cohorts".** The first keyword is now training minutes to saturation (RUN.json
253
+ wall seconds), with per-cohort minutes and steps in the notes (`tools/sec08_cross_cohort.py`).
254
+ - **Slide 34 "5 donors: time to apply".**
255
+ - The pretraining hours are read from `data/sec06_ft_method.csv`, no longer hard-coded.
256
+ - The note names the 'Fine-tuning with paired bulk + sc' slide by title. Its old "slide 15" pointed at the wrong
257
+ slide.
258
+ - Agenda items 7 and 10 updated. Spec change: `tools/restructure_20261006.py` (refuses to run twice). The deck has 45
259
+ slides; no Korean text.
260
+ - **Review pass (same day).** An independent 5-agent review of the changed slides confirmed 39 issues; all are
261
+ fixed. Pre-review copies of the touched scripts and the spec: `_archive/2026-10-06_before_supplementary/*.pre_review`.
262
+ - Slide 39: pretraining now reads 33.1 M train cells (`train_split_cells`; the 41.4 M corpus includes val/test).
263
+ The rare-state row follows the bootstrap verdicts on both sides (closer on ISG-high T / on DN2 B; labels and
264
+ states both arms miss by > 4-fold are not counted). "No corpus" became "come close": the scratch runs still took
265
+ the panel, value scaler and z-score constants from the PBMC checkpoint (RUN.json `kept_from_checkpoint`, now in
266
+ the notes). The say text carries the one-fold pilot qualifier; the footnote names both pilots.
267
+ - Slide 43: "no significant difference on average" (not "no difference"). Keyword 2 is the cycling T/NK count
268
+ (8 of 8 comparisons). The notes add the ISG-high T split by panel, the scratch-closer states (DN2 B, MS1), the
269
+ 52-call tally, the fold-0 caveat (fold 0 is the own-pair LoRA's best fold for C1Q-high and cycling T/NK,
270
+ computed from `folds.csv`), label states unthinned, and "8 of 13 states shown".
271
+ - Slide 26: title "...: gap stays" and "drifts in Sepsis and Ji" are computed from the milestones (gap = no milestone
272
+ reaches the own-cohort coverage; drift = full fine-tune L1 up by >= 0.05). Minutes are in
273
+ `data/sec08_cross_cohort.csv` (wall_seconds, minutes, run_receipt) and in the numbers list.
274
+ - Slide 42: UMI share (94 %, 91–94 % across milestones), the observed share (0.014 %, from `cells_panel6k.npz`)
275
+ and both arms' stopping settings are read from the receipts; the "none" label sits inside the axes.
276
+ - Slide 34: keywords use the cohort means of the figure (17–59×, 57 min–4.1 h); the per-draw range 11–63× is in the
277
+ notes. The right panel shares the bars' rows and has a title.
278
+ - Talk text and pointers: slides 23, 25, 26, 45 (say), 22 (recipes description), 32 and 36 (slide pointers by
279
+ title), slide 1 subtitle "updated 2026-10-06".
280
+ - 2026-10-08 update (user request: put the BayesPrism, CIBERSORTx and scSemiProfiler 5-fold results into the deck).
281
+ Pre-change copy: `_archive/2026-10-08_before_deconvolution/`.
282
+ - **Two new Supplementary slides** (`tools/secS_deconvolution.py`, `data/secS_deconvolution{.csv,_slide_text.json}`):
283
+ "Deconvolution with the same pairs: composition" and "...: disease signal".
284
+ - Source: `plans/bayesprism_paired_20261006/` (README, `results/RESULTS_full.md`, `RESULTS_cibersortx.md`).
285
+ - BayesPrism (recommended genes) and official CIBERSORTx (Fractions S-mode + HiRes) use the same paired donors
286
+ as the reference and the test samples' real bulk as the mixture, with the benchmark's own truth and scorer.
287
+ - Keywords and notes are computed from the tables.
288
+ - **Supplementary plan.** The planned "Bulk deconvolution methods" row is replaced by the two Ready slides.
289
+ `tools/figure_plan.py` now takes an optional per-slide note (`supplementary.notes`) and drops "Planned:" when
290
+ nothing is planned.
291
+ - **New scSemiProfiler results picked up (server_1):**
292
+ - Sepsis and Giroux 5-fold CV. Giroux was finalized on server_1 from sha-checked copies of its fold NPZs, and
293
+ rescored without sex-linked genes in `scores_nosex/giroux2022/scsemi_cv_20261002/pooled`.
294
+ - Sepsis equal-budget n = 5/10/20/40.
295
+ - Imperial 5-fold: finished on server_2 at 13:45 and was finalized on server_1 from sha-checked fold copies.
296
+ scSemiProfiler 5-fold now covers all five cohorts.
297
+ - Spearman/limma extras for sepsis, Giroux and Imperial; realism extras for all five cohorts.
298
+ - **Text changes from the new results:**
299
+ - "Same training pairs": keywords are data-driven. LoRA leads on coverage and precision in 5/5 cohorts;
300
+ composition 4/5 and logFC r 3/4, where scSemiProfiler leads in Giroux. The GPU-time ratio is 19–62×.
301
+ - sec09_same_pairs.py now reads the sepsis fold-0 pilot queue tag (`sep_f0`). For Giroux it quotes DEG from
302
+ scores_nosex, and for older pooled LoRA calls from pooled_deg.
303
+ - "5-fold CV" keyword: logFC r 3/4.
304
+ - "Pairs needed" (hand-written): scSemiProfiler coverage 0.04 / 0.10. On sepsis disease logFC r,
305
+ scSemiProfiler at 5–40 pairs (0.52–0.58) is above LoRA (0.29–0.48), while its top-50 DEG stays at 2–6.
306
+ - 2026-10-08, new figure split (user decision; supersedes the 2026-10-06 split; pre-change copy
307
+ `_archive/2026-10-08_before_new_figure_plan/`).
308
+ - Fig. 2: LoRA fine-tuning with no disease metrics.
309
+ - Fig. 3: PBISC vs scSemiProfiler on healthy donors, with time as a main result.
310
+ - Fig. 4: disease benchmarks on the paired cohorts (PBISC versions, scSemiProfiler, and BayesPrism / CIBERSORTx
311
+ labelled as cell-type deconvolution; the deconvolution slides moved here from the Supplementary).
312
+ - Fig. 5: rare-cell fractions and detection.
313
+ - Fig. 6: new findings from the bulk-only sepsis and COVID samples (K = 1,000 and 4,000).
314
+ - The cross-cohort transfer slides moved to the Supplementary; their placement is open.
315
+ - New slide "Time: days for scSemiProfiler, minutes for LoRA" (`tools/fig3_time_days.py`, Fig. 3d).
316
+ - Inputs: GPU hours per 5-fold experiment from the receipts (`data/sec09_same_pairs.csv`, checked against
317
+ the scSemiProfiler event logs on both hosts), the 5-donor draws (`data/sec09_time_to_apply.csv`) and the
318
+ one-time pretraining (`data/sec06_ft_method.csv`).
319
+ - Results: ImMicro 24 h vs 1.2 h, sepsis 38 h vs 37 min. All runs: scSemiProfiler 184 h (7.7 days) vs PBISC
320
+ 22 h including pretraining.
321
+ - The equal-budget scSemiProfiler runs are excluded: they reuse the 5-fold run's representative models.
322
+ - Panel status: Build / Run marks new slides or analyses still to do; Adapt marks slides to re-scope (healthy-only
323
+ Fig. 2-3, disease columns into Fig. 4).
324
+ - 2026-10-08, comparison rules (user decision; memory feedback_paper_comparison_rules):
325
+ - **Time.** Only per-cohort GPU work counts: no PBISC pretraining, no GPU queue waits. The time slide now shows the
326
+ 5-donor draws (main) next to the 5-fold runs (separate). All runs: 7.7 GPU-days vs 5.7 h.
327
+ - **No bulk-broadcast baseline.** It is removed from the SLE benchmark, CAT, deconvolution and "Pairs needed"
328
+ figures.
329
+ - The "Bulk broadcast baseline" slide is gone. Its partial r panel is now on the SLE benchmark slide
330
+ (0.21 vs 0.17).
331
+ - Still to rebuild in their own phases: Fig. 2e (ImMicro only) and Fig. 6a.
332
+ - **Main comparison = 5 pairs** (LoRA-5 vs scSemiProfiler-5); 5-fold is reported separately. Partial r is
333
+ emphasised (bold panel titles).
334
+ - **New `tools/fig4_disease.py`**, which checks all 200 logFC r / DEG values against the section-9 tables:
335
+ - "Disease signal with 5 pairs: LoRA-5 vs others" (4b);
336
+ - "5-fold CV: disease signal" (4c);
337
+ - "Sepsis: fine-tuning variants" (details).
338
+ - The old "5 donors: LoRA vs scSemiProfiler — disease signal" slide is retired. `tools/sync_sec09_text.py` lists it
339
+ in RETIRED.
340
+ - The deconvolution slides are retitled "Cell-type deconvolution, same pairs: ...".
341
+ - 2026-10-08, healthy-only Figs 2-3 (`tools/fig23_healthy.py`).
342
+ - Eight ImMicro-only slides, re-plotted from the deck's own data tables; nothing is re-scored.
343
+ - Fig. 2 (no disease metrics):
344
+ - cells, realism, full / LoRA / condition encoder, pairs needed, rank and K;
345
+ - 5 donors (main) shown next to 5-fold (separate).
346
+ - Fig. 3 (vs scSemiProfiler):
347
+ - LoRA-5 vs scSemiProfiler-5 on 6 cell metrics: LoRA ahead on 6 of 6;
348
+ - the same pairs, 5 to all;
349
+ - scSemiProfiler copies its representative;
350
+ - time.
351
+ - The earlier all-cohort slides moved to the Supplementary (note "all five cohorts").
352
+ - "5-fold CV: train on the other 4 folds" is retired (it carried the broadcast; its content is now in Fig. 4c and
353
+ the healthy slides). It is listed in RETIRED of `tools/sync_sec09_text.py`.
354
+ - 2026-10-08, Fig. 5 rare cells (`tools/fig5_rare_states.py`).
355
+ - Source: new plan `plans/rare_states_paired_20261008` (README). It covers 4 paired disease cohorts, the 5-donor
356
+ draws and 5-fold, and the arms zero-shot, calibration, scSemiProfiler and LoRA. Each NPZ is sha-checked and the
357
+ benchmark's Poisson read-out and labels are reproduced cell by cell.
358
+ - Three slides:
359
+ - fraction (5a);
360
+ - donors and disease direction (5b);
361
+ - 5-fold, separate (5c).
362
+ - Results over 56 state × cohort pairs, 5 donors:
363
+ - LoRA-5 closer to the observed fraction than scSemiProfiler-5 in 51/56;
364
+ - within 2-fold: 19 vs 5;
365
+ - better donor ranking: 43/56;
366
+ - disease direction kept: 73% vs 61%.
367
+ - Fig. 6a no longer mentions the broadcast. No slide text mentions it now.
368
+ - 2026-10-10, last broadcast mention removed from a figure (found while rewriting the manuscript from this deck).
369
+ - Fig. 2d "How we score generated cells" (`tools/sec04_metrics_overview.py`) still listed "broadcast; split-half
370
+ ceiling" as the comparator of logFC r inside the table image. It now reads "zero-shot; partial r (vs bulk)".
371
+ - Old tool, CSV and figure: `_archive/2026-10-10_metrics_overview_broadcast/`. The deck was rebuilt (76 slides); a
372
+ text search of every slide, the notes and the PDF twin of every figure a slide uses finds no "broadcast". Three
373
+ figure files of retired slides still contain it and are not used: `sec04_sle_broadcast`, `sec09_fewpair_disease`,
374
+ `sec09_fivefold`.
375
+ - The manuscript was rewritten from this deck on 2026-10-10 (`paper-release-20260928/manuscript/`,
376
+ `editorial/rewrite_20261010.md`); its figures are copies of this folder's figure PDFs.
377
+ - 2026-10-10, LoRA rank figure key (`tools/sec07_rank_sweep.py`): "LoRA rank r = 16 (used in the deck)" now reads
378
+ "(used throughout)", because the same panel is Supplementary Fig. 12a of the manuscript. Old files:
379
+ `_archive/2026-10-10_rank_sweep_label/`. Deck rebuilt (76 slides).