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/sections/introduction.tex +17 -0
- paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/methods.tex +137 -0
- paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/overview_figure.tex +12 -0
- paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/results.tex +55 -0
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/introduction.tex
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section*{Introduction}
|
| 2 |
+
|
| 3 |
+
Bulk RNA sequencing describes immune differences across large cohorts, but each profile mixes cell types and states. A disease-related change can come from different cell proportions, from different expression inside a cell type, or from both, and single-cell sequencing is what separates these sources\cite{nehar2020mapping}. Many cohorts have bulk data and no material left for single-cell work. A model that proposes cell-level expression from a bulk profile would extend those cohorts, and several families of methods now claim to do so. What a user of such a model needs to know is simpler than how it is built: whether the cells it produces reflect the bulk it was given, whether it accepts bulk measured in a clinic rather than the pseudobulk it was trained on, and what bounds its accuracy.
|
| 4 |
+
|
| 5 |
+
Existing approaches answer these questions only in part. Reference-based deconvolution estimates cell proportions or cell-type expression from bulk, and its accuracy follows the reference, the assay and the biological setting\cite{avilacobos2020benchmarking,newman2019cibersortx,chu2022bayesprism}; it does not produce cells. Semi-profiling uses single-cell data from part of a cohort to estimate profiles for the rest\cite{wang2024scsemiprofiler}. Generative models learn the cell distribution itself: variational autoencoders compress single-cell expression into a latent space and decode from it\cite{lopez2018scvi}, and diffusion models generate by removing noise in steps\cite{ho2020ddpm,song2021ddim}, usually inside a space learned by another model\cite{luo2024scdiffusion}. Every method of this last group is validated on pseudobulk, that is, on bulk formed by summing the very single cells it is scored against. Whether the generated cells reflect the bulk rather than a cohort average, and whether separately measured bulk works at all, has not been tested at the level of generated cells.
|
| 6 |
+
|
| 7 |
+
We present \method{}, which writes peripheral blood mononuclear cells directly in gene space from one bulk profile (Fig.~\ref{fig:architecture}). Following sparse data diffusion\cite{ostheimer2025sparse}, the model denoises every gene's expression value together with a support variable that says whether the gene is detected, so a measured zero is evidence of absence and an unmeasured gene is not. It receives a bulk vector, depth features, the fraction of cells whose assay measured each gene and the output assay mask; it receives no cell-type labels, no target proportions and no term that forces generated counts to sum to the bulk. Unlike the latent-space generators above, there is no separately trained encoder--decoder: the diffusion runs in the $2G$ gene coordinates at every noise level, which is what makes the support variable available to be read out at the end.
|
| 8 |
+
|
| 9 |
+
Bulk expression does not define a unique set of cells, so a generated cell is a proposal, not a recovered cell. We therefore evaluate generated populations, on a held-out lupus cohort, by three scores under one frozen annotator: the correlation of donor-level disease effects across cell types, the overlap of top differential genes, and cell-type composition. Around those scores we ask three questions.
|
| 10 |
+
|
| 11 |
+
\textbf{Does the generated signal come from the bulk?} Replacing each donor's bulk with a bulk from the opposite disease group inverts the recovered effect, from $r=+0.24$ to $-0.27$; a permuted bulk removes the differential genes entirely; and a cohort-mean bulk leaves no donor-specific signal. Forty of 42 generated populations resemble the donor whose bulk they were given.
|
| 12 |
+
|
| 13 |
+
\textbf{Does it accept separately measured bulk?} We generate cells from the raw clinical bulk of two paired cohorts and compare them with the same donors' single cells. From 89 donors measured before and after influenza exposure, the exposure effect is recovered at $r=0.64$ from uncorrected bulk, at least as well as from the training-style pseudobulk. Donor identity is not recovered in any arm, including the pseudobulk one, so what transfers is the condition-level biology and not the individual.
|
| 14 |
+
|
| 15 |
+
\textbf{What bounds the scores?} Not capacity: a $2\times2$ factorial over denoiser and conditioning width lowers the training loss by 31\% and moves no biological score beyond the run-to-run resolution. The read-out does. The support head is trained with a binary cross-entropy, so its output is a detection probability; the inherited sampler cuts it at one half, which discards every gene the model considers possible but unlikely. Drawing each gene from its probability instead raises differential-gene overlap from 57 to 73 and improves composition, with no free parameter, and it explains why a hand-tuned threshold had looked like the largest effect in the study.
|
| 16 |
+
|
| 17 |
+
Two applications then show what the generated object is good for and where it stops: a 107-donor healthy reference cohort with paired bulk and single cells, and a subset-level question inside monocytes in Beh\c{c}et disease, answered from bulk alone. Throughout, secondary experiments---gene-panel size, sampler steps, loss variants and the evaluation panel---are summarized in one paragraph each and reported in full in the Supplementary Information.
|
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/methods.tex
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section*{Methods}
|
| 2 |
+
\label{sec:methods}
|
| 3 |
+
|
| 4 |
+
\subsection*{Study design}
|
| 5 |
+
\method{} is a conditional diffusion model that generates individual gene-expression profiles from a bulk vector, a cell-count setting and the genes an assay measured. The main experiments are: (i) a held-out lupus benchmark with a condition-replacement experiment that tests what the generated disease signal is built from; (ii) generation from the separately measured bulk of two paired cohorts, in three arms that differ only in the expression vector handed to the conditioner; (iii) two applications, a healthy reference cohort and a subset-level question in Beh\c{c}et disease; (iv) three read-outs of the support head on the same checkpoints; and (v) a $2\times2$ width factorial on the 6,000-gene panel. Secondary experiments---nested gene panels at matched early exposure, sampler steps and seeds, a value-loss ablation, the evaluation panel and condition-level calibration with ten paired donors---are described below and reported in the Supplementary Information. Experiments (i), (iii)--(v) score saved checkpoints on the held-out split of the evaluation cohort; the panel experiment uses the 44-donor split described below. The evaluation workflow and rules were fixed before the diffusion experiments and are not tuned on them.
|
| 6 |
+
|
| 7 |
+
\subsection*{Training data and cell groups}
|
| 8 |
+
The registered data contained 41,395,184 cells from 22 datasets and 432 count files. It covered 10x, Parse, ScaleBio and Seq-Well platforms, 3,199 donors and 6,507 samples; Supplementary Note~S1 and Supplementary Fig.~S1 describe the datasets, conditions and cell types. We aligned counts to a fixed list of 20,097 genes. We split the data by dataset and donor. We used sample identifiers when donor identifiers were missing. The planned train, validation and test fractions were 0.8, 0.1 and 0.1. The training set contained 33,141,380 cells from 5,232 registered samples. Each count file supplied a binary mask that marked which genes the assay measured. This kept a measured zero separate from a gene that the assay did not measure.
|
| 9 |
+
|
| 10 |
+
Training reused a fixed set of 131,072 pseudobulk recipes across 16 schedule slots, with 8,192 recipes per slot. A recipe lists the cells used to form a bulk. Recipe sizes were $K\in\{250,500,1000,2000,4000\}$, with relative weights $1:2:3:4:1$. We set each platform's share from the square root of its cell count. All $K$ cells in a recipe became separate training targets in random order. Each target was paired with the bulk from the full recipe, including that target. The denoiser did not receive cell-type labels.
|
| 11 |
+
|
| 12 |
+
A coverage check found 1,995,930 training cells missing from the original recipes. We placed each missing cell once in 3,658 added groups, each from a single sample and containing at most 4,000 cells. We added each group to the least-filled of the 16 slots, based on added cell count. The planned schedule then contained 134,730 groups and 195,639,930 target occurrences. A target occurrence means that a cell is used once as a training target. The full schedule included every registered training cell. A cell could belong to several recipes. Neither a slot nor the full schedule lists every possible cell combination. A slot also does not pass through every training cell. The tested first, second and third slots contained 12,227,262, 12,227,227 and 12,227,009 target occurrences, respectively. The full 16-slot schedule provides complete cell coverage. The earlier checkpoints tested here do not.
|
| 13 |
+
|
| 14 |
+
\subsection*{Gene sets chosen from training data}
|
| 15 |
+
We chose gene sets using 32,768 cell occurrences from 256 training recipes. We sampled 128 cells without replacement within each recipe, using seed 20260627. We normalized counts to 10,000 across the fixed gene list, then applied $\log(1+x)$. For each gene $g$, we counted measured occurrences $M_g$ and positive detections $D_g$. We also summed expression and squared expression using only measured entries. Genes needed finite statistics, $M_g\geq3276$ and $D_g\geq327$. Both thresholds were based on the total number of sampled occurrences.
|
| 16 |
+
|
| 17 |
+
We used population variances and means to calculate $\log(1+\mathrm{var}_g/\max(\mathrm{mean}_g,10^{-8}))$. This score measures expression spread relative to the mean. We divided genes that met the rules into 20 quantile bins by mean expression. We merged repeated bin boundaries. Within each bin, we standardized the score with a standard-deviation floor of $10^{-3}$. Immune or interferon marker genes that met the rules came first. Other genes followed in decreasing score order. Ties followed the fixed gene order. The 2,000- and 6,000-gene sets took the first genes in this ranking. The 11,589-gene set included every gene that met the rules. Model tensors kept the fixed gene order. Thus, 11,589 came from the expression rules, not a search for the best performance. We tested the full 20,097-gene list only in a separate 128-update pilot. Larger gene sets changed the condition width, output width and parameter count together. This comparison did not test input width alone.
|
| 18 |
+
|
| 19 |
+
\subsection*{Bulk inputs and measurement masks}
|
| 20 |
+
For recipe $r$, let $b_{rg}=\sum_{i\in r}x_{ig}$ be the summed raw counts across the full gene list. Let $K_r$ be the number of cells and $L_r=\sum_gb_{rg}$ be the total count. Before standardization, each gene's conditioning feature was
|
| 21 |
+
\begin{equation}
|
| 22 |
+
u_{rg}=\log\left(1+\frac{b_{rg}}{\max(L_r/K_r,\epsilon)}\right),\qquad \epsilon=10^{-6}.
|
| 23 |
+
\end{equation}
|
| 24 |
+
Six scalar features summarized the bulk. They were $\log(1+L_r)$, $\log(1+L_r/K_r)$ and the fraction of bulk genes with positive counts. They also included the mean and population standard deviation of $\log(1+b_{rg})$. The last feature was the fraction of counts in the highest-count 1\% of genes in the fixed list. We standardized gene and scalar features using saved means and standard deviations from training data only. We then clipped them to $[-8,8]$. We normalized over the full gene list before selecting the model's $G$ genes. All six scalar features stayed unchanged.
|
| 25 |
+
|
| 26 |
+
We added two vectors that describe which genes were measured. The first was the fraction $f_{rg}$ of recipe cells whose assay measured gene $g$. The second was the binary mask $m_{ig}$ for the output assay. Both were mapped to $[-1,1]$, giving
|
| 27 |
+
\begin{equation}
|
| 28 |
+
c_{ri}=[\operatorname{standardize}(u_{r,\mathcal G}),\;\operatorname{standardize}(a_r),\;2f_{r,\mathcal G}-1,\;2m_i-1]\in\mathbb R^{3G+6},
|
| 29 |
+
\end{equation}
|
| 30 |
+
where $a_r$ contains the six scalars. The masks stayed fixed during diffusion. Cells generated from the same bulk shared its features and output-assay mask. Each cell started from a different Gaussian noise draw. Disease labels, cell types and target cell proportions were not inputs. The model used no loss to force generated counts to sum to the bulk. It also used no cell-type quotas or final adjustment to enforce $\sum_i\hat x_{ig}=b_{rg}$.
|
| 31 |
+
|
| 32 |
+
\subsection*{Diffusion of expression values and positive-expression flags}
|
| 33 |
+
Following sparse-data diffusion~\cite{ostheimer2025sparse}, we used separate values for expression and detection support in the original gene space. Detection support marks whether a measured gene has positive expression. It differs from the assay mask, which marks whether the gene was measured. For a measured entry, define
|
| 34 |
+
\begin{equation}
|
| 35 |
+
v_{ig}=2\operatorname{clip}\!\left(\frac{\log(1+x_{ig})}{8},0,1\right)-1,
|
| 36 |
+
\qquad s_{ig}=2\mathbb I(x_{ig}>0)-1.
|
| 37 |
+
\end{equation}
|
| 38 |
+
The clean state was $z_{i0}=[m_i\odot v_i,m_i\odot s_i]\in\mathbb R^{2G}$. Unmeasured entries had neutral filler values and did not enter either loss. Measured zeros had support $-1$. Measured positive values had support $+1$.
|
| 39 |
+
|
| 40 |
+
We sampled continuous times $t_i\sim\mathcal U(0,1)$ and Gaussian noise $\varepsilon_i\sim\mathcal N(0,I_{2G})$ independently. The forward process was
|
| 41 |
+
\begin{equation}
|
| 42 |
+
z_{it}=\alpha(t)z_{i0}+\sigma(t)\varepsilon_i,\qquad \alpha(t)^2+\sigma(t)^2=1.
|
| 43 |
+
\end{equation}
|
| 44 |
+
We used the normalized cosine schedule with offset 0.008. We clipped its log signal-to-noise ratio to $[-20,20]$ to avoid unstable values near the endpoints. Training drew noisy states directly without running every forward step~\cite{ho2020ddpm}.
|
| 45 |
+
|
| 46 |
+
The denoiser predicted clean expression $\hat v_i$ and support logits $\ell_i$. These logits are scores for positive expression and can take any real value. With $a_{ig}=\mathbb I(x_{ig}>0)$, the loss for each batch was
|
| 47 |
+
\begin{equation}
|
| 48 |
+
\mathcal L=\frac{\sum_{i,g}m_{ig}(\hat v_{ig}-v_{ig})^2}{\max(1,\sum_{i,g}m_{ig})}
|
| 49 |
+
+\frac{\sum_{i,g}m_{ig}\operatorname{BCEWithLogits}(\ell_{ig},a_{ig})}{\max(1,\sum_{i,g}m_{ig})}.
|
| 50 |
+
\end{equation}
|
| 51 |
+
Both terms had weight one. The expression term included measured zeros. Training predicted the clean state rather than the noise. With probability 0.5 per batch, an extra prediction supplied self-conditioning. This extra prediction did not track gradients. We converted support logits to the signed continuous expectation $\tanh(\ell/2)$ for self-conditioning and reverse steps.
|
| 52 |
+
|
| 53 |
+
\subsection*{Model structure, training and sampling}
|
| 54 |
+
The denoiser was a multilayer perceptron with skip connections. Its layer widths first decreased through 1,024, 1,024, 512 and 256. A matching path then increased the widths. Skip connections added features between layers of the same width. Each block applied an affine map to the hidden features. It also applied SiLU and an affine map to the context, then added the results. Layer normalization and SiLU followed. The model used a 128-dimensional sinusoidal time embedding and a learned 512-dimensional bulk-condition embedding. It mapped these separately, added them and mixed them into a 512-dimensional context. The input joined the noisy state and the self-conditioning state. A final 1,024-wide shared layer fed separate $G$-dimensional value and support heads. Dropout was zero. The three tested gene sets used 23,457,184, 54,185,184 and 97,119,882 parameters, and the full-gene pilot used 162,478,338. On the 6,000-gene panel the width factorial multiplies the trunk widths by four, giving 4,096, 4,096, 2,048 and 1,024, and sets the conditioning embedding to 512 or 2,048. The four arms hold 54,185,184, 102,136,608, 239,955,168 and 312,633,376 parameters; a $16\times$ trunk with a 8,192-dimensional condition holds 2.79 billion. These hidden layers did not form a separately trained encoder--decoder latent space.
|
| 55 |
+
|
| 56 |
+
Training used AdamW with learning rate $2\times10^{-4}$, weight decay zero and batch size 256. We used gradient accumulation one, gradient-norm clipping at 5, BF16 autocasting and seed 20260627. Four data workers used a prefetch factor of one. We updated exponential-moving-average (EMA) weights after every optimizer step with decay 0.999. Validation always used the same 192 recipes with 64 target cells per recipe. It used fixed validation slot zero and diffusion seed 20260726. We computed validation losses with EMA weights. Each epoch checkpoint saved the model, EMA weights, optimizer, conditioner, gene order and random state. It also saved which recipes and target cells had been used.
|
| 57 |
+
|
| 58 |
+
Generation used EMA weights and 50 deterministic DDIM steps ($\eta=0$)~\cite{song2021ddim}. Steps were equally spaced from time one toward zero. The final step returned the predicted clean state. We clipped predicted values to $[-1,1]$ and converted them back to nonnegative log counts. In the inherited read-out, a value stayed positive only if the support logit exceeded zero and the output mask allowed the gene, and was set to exactly zero otherwise; the read-outs compared in this paper are defined under ``Support read-out'' below. We used $\operatorname{expm1}$ to obtain continuous count-like values, not observed integer counts. For the 44-donor evaluation, cell $j$ of donor $d$ used seed $20260908+100003d+j$. Indices started at zero in the fixed manifest. Batch size was 256. Cells were sampled independently given the bulk. Changing their order did not change the modeled distribution of the cell set.
|
| 59 |
+
|
| 60 |
+
\subsection*{Evaluation and cell labeling in pediatric SLE}
|
| 61 |
+
We used GSE135779~\cite{nehar2020mapping}, with 33 pediatric SLE donors and 11 pediatric healthy-control donors. We found no matching study or donor identifiers in the registered training index. This cohort had been used during development. It was not a final test kept separate from development. The saved evaluation set kept accepted cells with labels. We ranked them by a fixed cell-identifier hash using seed 20260907. We kept at most 5,000 cells per donor, giving 204,925 cells. For each donor, every model generated the same number of cells as the selected real set. Its condition used that set's summed counts across the full gene list and $K$. An earlier evaluation of this cohort used a different set of 190,744 cells; its exact cell list and original labeling model were unavailable, so the set above was rebuilt from the raw archive.
|
| 62 |
+
|
| 63 |
+
The main model comparison used 1,945 shared Ensembl genes measured by the assay. Each model's own gene set contained 1,945, 5,851 and 11,352 measured genes, respectively. We excluded unmeasured genes instead of treating them as measured zeros. We labeled real and generated cells with the same rule. We chose the top-1 match by cosine similarity to five fixed AIFI reference centroids, or class-average profiles. These came from 1,000 external reference cells, with 200 cells per class. We scaled each cell's total to 10,000 within the shared gene set. We added one to each gene value and then took the natural log. The classes were T cells, B cells, monocytes, natural killer cells and dendritic cells. This rule replaced the unavailable original scANVI labeling model. It did not rerun that model. Generated cells with zero expression across the shared genes stayed in the data as Unknown. This included cells that expressed only genes outside the shared set but inside the model's own set. Unknown cells counted toward all population totals but had no biological cell-type group for DEG analysis.
|
| 64 |
+
|
| 65 |
+
\subsection*{Donor-level gene tests and gene modules}
|
| 66 |
+
We summed cells within each donor and assigned cell type. For each type, we used the same donors in the real data and all five checkpoints. Every source needed at least 20 cells in each donor--type group and at least four donors in each disease group. This kept 33 cases and 11 controls for T, B and NK cells. It kept 32 cases and 10 controls for monocytes. Dendritic cells did not meet these rules. Donors, not cells, were the independent units.
|
| 67 |
+
|
| 68 |
+
The main procedure followed the saved manuscript's donor-pseudobulk analysis. We scaled each unrounded summed expression profile to a total of 10,000. We added one to each gene value and then took the natural log. Effects were the case mean minus the control mean on this scale. We used two-sided Welch tests followed by Benjamini--Hochberg (BH) correction~\cite{benjamini1995fdr}. We corrected across the shared genes separately for each source and cell type. DEG calls required FDR below 0.10. Genes also had to pass a rule based only on real data. The case and control mean normalized-log expressions had to sum to more than 0.01. We used the same gene mask for generated DEG calls, effect comparisons and rankings.
|
| 69 |
+
|
| 70 |
+
As an added check, we used edgeR~\cite{robinson2010edger}. We selected genes with \texttt{filterByExpr} on real data and used exactly the same genes for generated pseudobulks. We then used TMM normalization, dispersion estimation and quasi-likelihood tests. We rounded generated counts only after summing them, using NumPy's ties-to-even rule. Significant genes needed FDR below 0.05 and absolute log$_2$ fold change above one. Shared genes with zero generated counts in every sample stayed in the tested set with effect zero and $p=1$. This count-based test is an approximation because the generator produces continuous values.
|
| 71 |
+
|
| 72 |
+
We reported Pearson and Spearman effect correlations, RMSE, sign agreement and Jaccard overlap of all DEGs. We also measured overlap among up to 50 significant genes ranked by absolute effect. For edgeR, we also ranked overlap by FDR. Overlap was undefined when both sets were empty. The IFN-core and B/plasmablast modules contained 24 and 17 genes from the fixed gene list, respectively. We recovered these lists from the saved pSS analysis in the related manuscript. We could not independently confirm that they matched the unavailable original SLE lists. Module scores were mean normalized-log donor-pseudobulk expression across available module genes. We reported disease-effect differences, paired-donor correlations and disease AUC, together with the number of available genes. Analyses on each model's own gene set used totals from that set for library normalization. These were secondary results. We did not directly rank their RMSE against results from the shared gene set.
|
| 73 |
+
|
| 74 |
+
\subsection*{Cell-space coverage, cell proportions and bulk agreement}
|
| 75 |
+
To compare cell-space structure, we selected 128 cells per donor and source. This gave 5,632 real cells and 5,632 cells per checkpoint. We fitted gene selection and all transforms on real cells only. Within the shared set, genes needed mean normalized-log expression above 0.01 and positive variance. We ranked them by variance/mean and kept all 1,464 available genes under a maximum of 2,000. We divided expression by each gene's real-data standard deviation without subtracting the mean. We then used truncated singular-value decomposition fitted on real data to produce 50 components. UMAP~\cite{mcinnes2018umap} used 30 neighbors, minimum distance 0.35, Euclidean distance and seed 20260910. We mapped every generated set through this same reference. We did not remove donor or source means.
|
| 76 |
+
|
| 77 |
+
We measured coverage and precision in the 50-dimensional reference space, not in UMAP coordinates. Each real cell's radius was its distance to its 15th other real neighbor. Coverage was the fraction of real cells with a generated neighbor inside this radius. Precision was the fraction of generated cells inside the radius of their nearest real cell. We reported their harmonic mean. Cell-proportion errors used total variation, base-2 Jensen--Shannon divergence and RMSE across five biological classes plus Unknown. Bulk agreement used normalized-log expression correlation and RMSE. We also measured the generated/real total-count ratio and relative count-space $L_1$ error. We did not rescale the outputs.
|
| 78 |
+
|
| 79 |
+
\subsection*{Repeated-seed cell-proportion check and statistical limits}
|
| 80 |
+
A separate check used every original cell from one $K=1000$ validation recipe. We built a fixed ten-class cosine-centroid classifier on 1,974 shared measured genes. It used 18,182 reference cells from 18 other training donors, capped at 200 cells per donor--class. We checked label errors with five-fold cross-validation that kept donors separate. We also counted assigned labels against true labels for the target cells. The target's 1,000 original labels defined the main cell-proportion reference. This included NK labels corrected after an error in the saved label mapping. We also tested a reference based on classifier-assigned labels for real cells. The main rule assigned Unknown to zero profiles or profiles without a positive cosine match. An added check also assigned Unknown when the top-two similarity difference was below 0.05.
|
| 81 |
+
|
| 82 |
+
For each E1 model and the 2,000-gene E3 model, ten seed streams each generated 1,000 cells. We tested the first 64, 256 and 1,000 cells to check how sample size changed the results. The input bulk and $K$ stayed fixed. Seed $r\in\{0,\ldots,9\}$ was $20260910+1000003r$. Total variation, MAE, RMSE and base-2 Jensen--Shannon divergence included Unknown. We also tested ideal independent sampling with 10,000 multinomial draws for each population size and reference composition. These draws used seed 20290909. Means and sample standard deviations across generation seeds describe sampling variation for this case. They do not measure variation across training seeds or performance across cohorts.
|
| 83 |
+
|
| 84 |
+
For the 44-donor experiment, cell-proportion intervals used 2,000 donor-bootstrap repeats and seed 20260910. Each repeat sampled the same donor indices across models. Percentile 95\% intervals measure donor variation with the classifier, training seed and sampling stream held fixed. They were not model-comparison tests adjusted for multiple comparisons. Gene-wise disease tests did not compare one model against another. We also did not treat averages across cell types as independent experimental repeats.
|
| 85 |
+
|
| 86 |
+
\subsection*{Held-out benchmark, annotator and reported metrics}
|
| 87 |
+
Experiments (ii) and (iii) use a held-out split of GSE135779 with 42 donors (30 cases, 12 controls) and 1,500 generated cells per donor, conditioned on that donor's pseudobulk. Every compared method is restricted to the same 2,980 genes. Cell types come from one frozen scANVI annotator rebuilt on the AIFI immune atlas (L2 accuracy 0.880, macro-F1 0.860 on held-out donors) and are gated to the six types shared by all scored sets; unassigned cells stay in every composition denominator. We report three scores: the mean Pearson correlation of case-minus-control differences in $\log(1+10^4\,\mathrm{counts}/\mathrm{library})$ across cell types; the summed overlap of the top 50 significant genes by absolute effect, per cell type, using two-sided Welch tests with Benjamini--Hochberg FDR $<0.05$; and the per-donor $L_1$ distance between generated and observed cell-type fractions, averaged over donors. scSemiProfiler\cite{wang2024scsemiprofiler} is scored on the same donors, genes, annotator and gate. [TODO: deconvolution references on composition for the same donors.]
|
| 88 |
+
|
| 89 |
+
\subsection*{Width factorial and its resolution}
|
| 90 |
+
The four arms differ only in trunk width and conditioning width. Data, gene panel, seed, batch size, learning rate, schedule and loader settings are identical, and each arm ran the full 16-part schedule. In the main table the arms are compared as means over parts 14--16 under each read-out, with every part re-sampled from the same checkpoint, conditions, seed and step count and only the last-step rule changed. In the Supplementary Information they are compared within schedule part and averaged over parts 6--16, after every arm has left its warm-up; part-wise differences are reported with their standard deviation and the mean divided by its standard error over the eleven paired parts. The response of an arm to the read-out is the change in mean detected genes per cell on the scoring panel when the support threshold is lowered by one unit, measured at part 16 between $\tau=-2.0$ and the threshold that matches the observed detection rate for that arm, or between $-2.0$ and $-3.5$ where no matching threshold was reached. Two models supply the run-to-run resolution: the base arm and a second run that differs only by nine extra conditioning inputs carrying predicted cell-type proportions. The model does not use that input --- replacing predicted with true proportions moves every score by less than 0.001 --- so the two runs differ effectively by training run alone. Paired over all 16 parts they differ by $0.009\pm0.018$ in effect correlation, $-1.6\pm7.2$ in top-50 overlap and $0.038\pm0.023$ in composition $L_1$. We treat 0.018 and 7 as the smallest interpretable differences in the first two scores.
|
| 91 |
+
|
| 92 |
+
\subsection*{Condition replacement}
|
| 93 |
+
From one checkpoint (base arm, part 16) we regenerated the 42-donor cohort three more times, replacing only the bulk counts and bulk measurement fractions that condition each donor; the output assay mask, cell counts, sampler, step count and seed are unchanged. Because sampling is deterministic ($\eta=0$) and each cell's noise is seeded from the donor index and cell index, cell $i$ starts from the same noise in all four sets, so differences are attributable to the condition alone. The replacements are: a bulk from the opposite disease group for every donor, drawn round-robin so that no donor keeps its label; a random derangement of donor bulks; and the cohort-mean bulk for every donor. We scored the three variants with the metrics above, and additionally, per donor, whether the generated pseudobulk is nearest by Pearson correlation to the donor itself or to the donor whose bulk it received, and, per cell, the correlation to the matched cell of the true-condition set.
|
| 94 |
+
|
| 95 |
+
\subsection*{Sampler steps and sampling resolution}
|
| 96 |
+
Sampling used 50 deterministic DDIM steps throughout. To fix the resolution of a single score we regenerated one checkpoint at 10, 25, 50, 100 and 200 steps at the benchmark seed, and at 50 steps with four further seeds spaced by $1{,}000{,}000{,}007$; the sampler seeds each cell's noise as $\mathrm{seed}+10{,}000{,}019\,d+j$ for donor $d$ and cell $j$, so smaller spacings would reuse most of the noise. A re-drawn 50-step set reproduced the published set exactly (maximum absolute difference 0). Detection rates compare the fraction of the 2,980-gene panel left at zero, computed on the same panel and the same cells that the metrics use: 0.9155 in the observed target cells against 0.9246, 0.9259, 0.9344 and 0.9360 for the four arms at part 16. Within-type variance ratios use total within-group variance on $\log$ CP10K for donor--cell-type groups with at least 30 cells in both sets.
|
| 97 |
+
|
| 98 |
+
\subsection*{Support read-out}
|
| 99 |
+
The denoiser's support head is trained with a binary cross-entropy against the detected/not-detected state of each measured gene, so its logit $\ell_{ig}$ is a per-gene detection log-odds and $p_{ig}=\mathrm{sigmoid}(\ell_{ig})$ a detection probability. The read-out is the rule that turns $p_i$ into a sparsity pattern at the final sampling step; it enters after the last denoising update and changes neither the weights nor the predicted values. Three read-outs are compared on the same checkpoints, conditions, seed and step count. (a) The inherited default keeps gene $g$ when $\ell_{ig}>0$, that is, $p_{ig}>0.5$. (b) A threshold $\tau$ keeps it when $\ell_{ig}>\tau$; we regenerated the 42-donor cohort from the base arm at part 16 at $\tau\in\{+0.5,0,-0.5,-1.0,-1.5,-2.0,-2.5,-3.0,-3.5,-4.0\}$ and report the sweep in the Supplementary Information, with $-2.0$ as the setting that maximizes $r$ and $-1.55$ as the setting that matches the observed mean detection rate on the scoring panel. (c) The drawn read-out keeps gene $g$ when $u_{ig}<p_{ig}$ for $u_{ig}\sim\mathcal U(0,1)$ drawn per cell and gene from a CPU generator seeded by the donor and cell index, so it is reproducible and independent of batch size; it has no parameter, and its expected number of detected genes per cell is $\sum_g p_{ig}$ over the allowed genes. Under every read-out the output mask is applied afterwards. The drawn read-out is implemented in the standalone sampler that generated every set scored in this paper; the sealed training code is unchanged.
|
| 100 |
+
|
| 101 |
+
Detection rates are measured on the same 2,980-gene panel and the same cells as the scores, as the mean and median number of genes with a positive value per cell; the observed cells give a mean of 251.9 and a median of 229 (zero fraction 0.9155). The distribution of $p$ over gene slots was read from the saved logits of the part-16 base arm on the allowed genes of each donor. The response of an arm to the threshold is defined under ``Width factorial'' above. Coverage of the observed cell space uses the fifteenth-neighbour radius defined above.
|
| 102 |
+
|
| 103 |
+
\subsection*{Variability of the observed detection rate}
|
| 104 |
+
To ask whether a rule that matches the observed detection rate has a fixed target, we counted detected genes per cell on the 2,980-gene panel in observed cells only, grouped by donor and by disease group in the 42 lupus donors, and by donor, author-assigned pool and sequencing library in the 401,325 baseline cells of the 107 ImMicro donors, keeping groups of at least 50 cells. We report the range of group means, its ratio and its coefficient of variation. The same counts on generated cells, grouped by donor and disease group, give the generated structure; the pooled mean of a generated set is set by the read-out and the donor-to-donor structure by the condition.
|
| 105 |
+
|
| 106 |
+
\subsection*{Value-loss ablation}
|
| 107 |
+
One further arm is identical to the base arm except that the value term of the loss is restricted to genes expressed in the target cell, instead of every measured gene. Data, panel, widths, seed, schedule and sampler are unchanged, and the arm ran the full 16-part schedule. Its validation loss is not comparable with the other arms because the loss definition differs, so the arm is judged only on the three reported scores.
|
| 108 |
+
|
| 109 |
+
\subsection*{Scoring on the model's own panel}
|
| 110 |
+
The observed cells of the benchmark are stored in the baseline panel, so genes outside it have no observed values. We rebuilt an observed matrix on the model's panel from the raw cohort archive, selecting the same cells by barcode and the same genes by the raw gene indices recorded in the saved file. Of the model's 6,000 genes, 149 are absent from this cohort's gene annotation and are dropped rather than matched by symbol, and four more are removed because two symbols carry duplicate identifiers, leaving 5,847 genes. The rebuild reproduces the saved observed matrix exactly on the 2,980 shared genes: 748,513,420 entries compared across all 42 donors with none differing. Cells on this panel are labelled by a second frozen scANVI annotator trained on the same atlas and the model's panel. To separate the panel from the annotator, the shared 2,980 genes were also rescored with that second annotator.
|
| 111 |
+
|
| 112 |
+
\subsection*{Subset-level audit in Behçet disease}
|
| 113 |
+
Bulk profiles for 19 donors (9 Behçet, 10 control) come from GSE198533 and were mapped to the fixed 20,097-gene list by exact identifier, with genes absent from the assay marked unmeasured rather than zero (19,842 of 20,097 measured). We generated 5,000 cells per donor from the base arm at part 16, at the inherited read-out and at the swept threshold $\tau=-2.0$, with the sampler settings above. [TODO: regenerate under the drawn read-out.] Observed cells are the 41,824 PBMC cells of 8 donors (4 Behçet, 4 control) in GSE198616, rebuilt from the raw archive. Both sides were labelled by the same frozen annotator and scored on the 5,762 genes their panels share; generated rates were converted to integers by one Poisson read-out, and the same integer matrix supplied both the labels and the scores.
|
| 114 |
+
|
| 115 |
+
C1Q-high-like monocytes are the monocytes whose mean normalized-log expression of the C1Q genes exceeds the 95th percentile of the pooled control monocytes of the same cohort. Four modules were frozen before any set was scored: interferon-$\gamma$ response and inflammatory response from the hallmark collection, the union of the phagocytosis and antigen-processing gene-ontology sets as the pre-registered primary, and a narrower MHC-II and Fc$\gamma$-receptor set as a secondary. The narrow set is secondary because its genes also define the population that the C1Q rule selects. No C1Q gene appears in any scored module.
|
| 116 |
+
|
| 117 |
+
The reported difference is depth-free. Within each sample the C1Q-high-like monocytes and the other monocytes are summed into two pseudobulks, each normalized to counts per million; the module score is the mean over module genes of $\log_2$ of the ratio of the two, with a pseudocount of one. Pseudobulking removes the per-cell depth term. Because the two sides hold very different cell counts, the shallower side reaches zero on more low-expression genes, which offsets every module; we remove that offset by binning all genes into 25 bins by their expression on the reference side and subtracting each bin's mean fold change. Group summaries report the mean, a $t$-based 95\% confidence interval, the standard deviation, the range and the number of samples with a positive difference. With four samples per observed group no signed-rank test can fall below $p=0.125$, so direction consistency and the interval are the reported evidence.
|
| 118 |
+
|
| 119 |
+
\subsection*{Generating cells from separately measured bulk}
|
| 120 |
+
The two paired cohorts described in the next subsection supply, for every sample, the clinical bulk, the observed pseudobulk and the measured-gene mask of each assay, in the fixed 20,097-gene order. From these we built three condition sets per cohort that differ only in the expression vector: the bulk as reported (raw); the same bulk multiplied gene by gene by $\alpha_g=\bar P_g/\bar B_g$, the ratio of pseudobulk to bulk means over ten calibration donors on the $10^6$-normalized scale, estimated only where both means reach one unit and set to one elsewhere (calibrated); and the observed pseudobulk (ceiling). Calibration donors were drawn once per held-out group (the seven ImMicro pools and the fifteen Randolph experimental days) from the donors outside that group, seed 20260922, so no evaluated sample contributed to its own correction; the estimator is the one that performed best at the condition level (Supplementary Note~S8). Every arm used the depth policy of the condition-level experiments, $K=1000$ cells and a fixed per-cell depth of $3869.603120208939$, so the three arms of a cohort differ in expression shape alone; the output mask was the single-cell assay's mask in every arm. Unmeasured coordinates, which both sources mark with a missing value, were set to zero and flagged unmeasured. We generated 1,500 cells per sample from the base arm at part 16 with the drawn read-out and the sampler settings above (seed 20260922), 160,500 cells for ImMicro and 267,000 for Randolph.
|
| 121 |
+
|
| 122 |
+
Scoring uses the genes both assays measure in every sample of the cohort, 5,832 for ImMicro and 5,771 for Randolph, within the model's panel. Each sample's generated cells are summed and normalized to $10^6$ with $\log(1+x)$, as is its observed pseudobulk. Donor recovery is the fraction of samples whose generated profile has its highest Pearson correlation, among all observed profiles of the cohort, with its own; chance is one over the number of samples. The condition effect in Randolph is the mean over donors of the within-donor difference in normalized-log expression between the influenza-exposed and the mock sample, in $\log_2$ units, computed on generated and on observed profiles; we report the Pearson correlation over all scored genes and over the 200 genes with the largest observed absolute effect, and the slope of generated on observed. A cohort-average control assigns every sample the mean observed profile. The same donor-recovery statistic was computed on the lupus benchmark set generated from pseudobulk under the drawn read-out. Randolph single cells are not resolved to donors in the public release, so Randolph is scored at the pseudobulk level only; ImMicro observed cells (401,325 at baseline with author labels) support composition scoring. [TODO: composition scoring of the ImMicro arms under the frozen annotator, and the arms regenerated with each donor's own cell count and depth.]
|
| 123 |
+
|
| 124 |
+
\subsection*{Using paired samples to correct bulk inputs within a study}
|
| 125 |
+
We tested whether ten paired bulk and single-cell measurements could correct conditions for other donors in the same study, before any cell was generated. The model stayed fixed. ImMicro supplied baseline PBMC measurements from 107 healthy donors in GSE314922 and GSE314416\cite{babdor2026immicro}. Randolph supplied 89 donors whose PBMC samples were split between mock-control (NI) and influenza-exposure (IAV) conditions outside the body. This gave 178 samples from GSE162632\cite{randolph2021genetic}. These studies provided paired assays. They were not two cohorts of patients with immune disease. Randolph pseudobulks were the authors' published UMI sums\cite{randolph2021scripts}. The barcode-to-donor mapping was unavailable, and we did not reconstruct it. We used processed expression files and checked donor and experimental-group identifiers. We did not reprocess sequencing reads.
|
| 126 |
+
|
| 127 |
+
We divided ImMicro bulk read counts by Ensembl release 95 union-exon gene lengths. We summed single-cell counts over all four retained captures per donor without dividing by gene length. Randolph bulk values were published kallisto--tximport ScaledTPM abundances, which already account for length. We did not correct their length again. Calibration used a fixed set of genes measured by both assays in each study. We normalized each expression vector to a total of $10^6$. Missing entries kept false measurement flags. The pseudobulk reference kept its original set of measured single-cell genes, including genes unavailable in bulk.
|
| 128 |
+
|
| 129 |
+
We fitted expression corrections to normalized linear expression, before creating log features. We then passed the corrected values through the fixed conditioning pipeline. This kept the saved standardization, clipping and learned encoder unchanged. We evaluated the resulting condition vectors. We did not use those vectors to fit the expression corrections. The mean-condition baseline used only pseudobulk conditions from the calibration samples. It did not fit a mapping from each donor's bulk condition to that donor's pseudobulk condition.
|
| 130 |
+
|
| 131 |
+
For each study, 100 fixed selections supplied exactly ten calibration donors and ten measurement pairs. Randolph selections used five NI and five IAV pairs, with one pair per donor. We excluded both conditions of every calibration donor from evaluation. We evaluated the remaining 97 ImMicro donors or 79 Randolph donors (158 samples). No test pseudobulk supplied a fitting target, donor-specific depth, cell count or prediction scale. We also tested pair budgets of 5, 20 and 40, with 30 selections each. A separate analysis held out each of seven ImMicro pools or 15 Randolph experimental days. It used ten calibration selections from outside each held-out group. Selections overlap within the two studies. They are not independent cohorts.
|
| 132 |
+
|
| 133 |
+
The primary candidate fitted a slope and an offset for each gene in normalized linear expression: $\widetilde P_{ig}=a_gB_{ig}+b_g$. Slopes had to be nonnegative. A penalty pulled them toward the calibration mean ratio. Offsets had no penalty. For each calibration selection, we chose one penalty strength from $\{0,0.1,1,10,100\}$. We left out each calibration donor in turn and chose the strength with the lowest log-transformed expression error. Each inner fit recomputed all expression statistics and prior slopes using only its training donors. We clipped negative predictions to zero and normalized each prediction by its own total. The applied correction was therefore not a free affine map of physical raw counts. Supplementary Methods give the formula, the rule for near-zero variance and the comparison methods.
|
| 134 |
+
|
| 135 |
+
The main fixed checkpoint was 2K E3 with EMA weights. We tested 6K E1 and 11,589-gene E1 on the first 20 ten-pair selections. We rebuilt the full $3G+6$ condition and its learned 512-dimensional encoding using the saved training scaler and clipping rules. Predicted and reference profiles both used $K=1000$ and a fixed per-cell depth of $3869.603120208939$. This gave a total input sum of $3869603.120208939$. Two depth scalars therefore matched by design. This tested agreement at a shared depth. It did not test recovery of the original count depth. We did not sample cells or train the model in this calibration experiment.
|
| 136 |
+
|
| 137 |
+
We compared several corrections. These were uncorrected bulk, restricting bulk to the shared measured genes, mean-ratio multiplication and offset-only correction. We also tested mean-ratio multiplication followed by an offset fitted to the remaining error after renormalization. Further comparisons used least squares with nonnegative slopes, the calibration-mean pseudobulk with all its measured genes, and the mean reference condition. We measured paired mean squared error (MSE), correlation and exact-sample or donor matching. Every method and selection used the same full-cohort pseudobulk reference set for matching. Euclidean distance was the main matching rule. Correlation-based matching was secondary. We reported input-gene, scalar and mask errors separately. For Randolph, we first averaged the two test conditions within each donor. Normalized error divided the overall method MSE by the overall calibration-mean-condition MSE. Means and 2.5th--97.5th percentiles across selections show how results vary with the chosen calibration donors. They are not confidence intervals across independent studies. Condition agreement does not show that generated cells are accurate or that the conditions are exactly equal. We did not test corrections fitted directly in condition space with the same calibration pairs.
|
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/overview_figure.tex
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\begin{figure}[p]
|
| 2 |
+
\centering
|
| 3 |
+
% Both parts are authored at the 180 mm double-column width, so one scale keeps their type
|
| 4 |
+
% sizes equal; 1.05 keeps panels a-c and the legend on one float page with about one caption line to spare.
|
| 5 |
+
\makebox[\textwidth][c]{\includegraphics[width=1.05\textwidth]{figures/fig01_architecture.pdf}}\\[0.8mm]
|
| 6 |
+
\makebox[\textwidth][c]{\includegraphics[width=1.05\textwidth]{figures/fig01_corpus.pdf}}
|
| 7 |
+
\caption{\textbf{\method{}: diffusion of gene values and zero/nonzero states, pretrained on 41 million blood cells.}
|
| 8 |
+
\textbf{a}, Model and training. Fixed transforms turn raw counts into expression values and zero/nonzero states and back; diffusion acts on this joint state in $2G$ gene coordinates at every noise level. The network $f_\theta$ estimates the clean state, with self-conditioning on its own earlier estimate, and every block receives the fixed bulk condition (expression, depth features and measured-gene mask) with the time step. A final hard zero/nonzero choice and the output gene mask give nonnegative values with exact zeros (Methods).
|
| 9 |
+
\textbf{b}, Generating cells. A bulk sample, its depth, the cell count $K$ and the gene mask define one condition; $K$ independent noise draws give $K$ different cells. Cell types are labelled afterwards: the sampler receives no cell-type labels or target shares and does not force totals or shares to match the input. The cells are examples, not measurements.
|
| 10 |
+
\textbf{c}, Pretraining corpus: share of cells by assay (Other: Seq-Well and 10x of unreported chemistry), condition shares within each assay by disease family (Healthy includes CMV-seropositive donors, post-vaccination draws and cultured healthy-donor cells) and cell-type shares from each dataset's labels. The model never receives condition or cell-type labels.}
|
| 11 |
+
\label{fig:architecture}
|
| 12 |
+
\end{figure}
|
paper-releases/pbisc-diffusion/updates/20261010T153319Z-manuscript-rewrite-from-deck/diffusion/dataset/server_1/manuscript/archive/pre_rewrite_20261010/sections/results.tex
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section*{Results}
|
| 2 |
+
|
| 3 |
+
\subsection*{Generated cells carry the disease effect of the bulk they receive}
|
| 4 |
+
|
| 5 |
+
The generated disease signal is built from the conditioning bulk, not from a cohort average learned in training. We show this on a held-out split of a childhood lupus cohort\cite{nehar2020mapping} (42 donors: 30 cases, 12 controls; 1,500 generated cells per donor), scored on the 2,980 genes shared by every compared method under one frozen scANVI annotator with a six-type gate (Methods). Three scores are reported throughout: the mean Pearson correlation of donor-level log fold changes across cell types ($r$), the summed top-50 differential-gene overlap (Welch, Benjamini--Hochberg FDR $<0.05$) and the per-donor composition $L_1$.
|
| 6 |
+
|
| 7 |
+
\textbf{Condition swap.} From one trained model we regenerated the cohort three more times, replacing only the bulk that conditions each donor; with deterministic sampling, cell $i$ starts from the same noise in every arm, so every difference is due to the condition (Table~\ref{tab:benchmark}). Conditioning each donor on a bulk from the opposite disease group inverts the recovered effect, from $r=+0.241$ to $-0.272$, and cuts the differential-gene overlap from 57 to 16. Conditioning on another donor's bulk removes the overlap entirely, 0 of 200. Giving every donor the cohort-mean bulk leaves no donor-specific signal ($r=-0.041$), which is the null a model that ignored its condition would produce. At the level of populations, 40 of 42 flipped donors and all 42 permuted donors resemble the donor whose bulk they were given rather than themselves.
|
| 8 |
+
|
| 9 |
+
\textbf{Scale of the change.} The matched cells move by the amount the biology requires and no more: median correlation between a cell and its counterpart in the true-condition run is 0.972 after the swap, against 0.996 for a fourfold change in sampler steps and 0.778 for independent noise. The conditioning path is therefore used, and it is used for the disease effect specifically.
|
| 10 |
+
|
| 11 |
+
\textbf{Absolute scores.} At the read-out we recommend below, the model reaches $r=0.287$, 73 top-50 genes and composition $L_1$ 0.225 at part 16, and $0.286$, 67.7 and 0.197 averaged over parts 14--16. The semi-profiling baseline, scored on the same donors, genes, annotator and gate, reaches 0.243, 52 and 0.249\cite{wang2024scsemiprofiler}. [TODO: deconvolution references (CIBERSORTx, BayesPrism) scored on composition for the same 42 donors.] Five sampling seeds resolve 0.005 in $r$, 4.7 in overlap and 0.002 in composition, and two independently trained copies of the same model resolve 0.018, 7 and 0.023 (Methods); every comparison below is read against those two resolutions.
|
| 12 |
+
|
| 13 |
+
\input{tables/results_benchmark}
|
| 14 |
+
|
| 15 |
+
\subsection*{Separately measured bulk transfers the condition effect but not the donor}
|
| 16 |
+
|
| 17 |
+
A model trained on pseudobulk is only usable if it accepts bulk measured on its own, and this had not been tested at the level of cells: earlier work, including ours, compared condition vectors (Supplementary Note~S8). We generated cells from the clinical bulk of two paired cohorts, ImMicro (107 healthy donors, GSE314922/GSE314416\cite{babdor2026immicro}) and Randolph (89 donors, each measured mock-treated and after influenza exposure, GSE162632\cite{randolph2021genetic}), and compared them with the same donors' single cells. Three arms differ only in the expression vector handed to the conditioner: the bulk as the assay reports it (raw), the same bulk after a ten-pair gene-wise correction fitted with the donor's whole batch held out (calibrated), and the donor's own pseudobulk, which is the input the model was trained on and therefore the ceiling (Methods).
|
| 18 |
+
|
| 19 |
+
\textbf{The condition effect transfers.} Randolph's within-donor influenza effect is a real biological contrast with an observed answer. From raw bulk, the generated cells recover it at $r=0.635$ across genes and 0.785 over the 200 genes the observed contrast moves most; from calibrated bulk, 0.644 and 0.789; from the pseudobulk ceiling, 0.573 and 0.736 (Table~\ref{tab:realbulk}). Clinical bulk therefore performs at least as well as the training-style input, and the correction the earlier condition-level analysis had motivated is not needed for this endpoint. The effect sizes are compressed: the slope of generated on observed log fold change is 0.36--0.44, so directions and rankings transfer and magnitudes do not.
|
| 20 |
+
|
| 21 |
+
\textbf{The donor does not.} Whether a donor's generated cells, summed, are closer to that donor's observed pseudobulk than to any other donor's is near chance in every arm: 0.6\%, 1.7\% and 2.8\% of 178 Randolph samples (chance 0.56\%) and 0.9\%, 2.8\% and 3.7\% of 107 ImMicro donors (chance 0.93\%), for raw, calibrated and pseudobulk respectively. The same statistic on the lupus benchmark, where the model is conditioned on pseudobulk of a cohort that resembles its training data, is 31\% against 2.4\% chance, so the measure itself works. Two things follow. Calibration moves donor recovery in the expected direction, three times chance in both cohorts, but the pseudobulk ceiling is barely higher, so the loss of the individual is not an assay-gap problem. And a cohort-average profile correlates with each donor's observed pseudobulk more closely (median 0.961 and 0.988) than any generated arm does (0.77 and 0.87): the generated cells carry a systematic shape difference from observed cells, which is the subject of the read-out section below.
|
| 22 |
+
|
| 23 |
+
\textbf{Why the donor is lost.} A setting inherited from the condition-level experiments was the first candidate. Those experiments fixed every donor's depth to one anchor and its cell count to 1,000, which removes depth, a quantity that varies twofold across the donors of a single cohort (below), while the lupus benchmark, where donor recovery works, uses each donor's own cell count and depth. We rebuilt the ImMicro conditions with each donor's observed cell count (1,111--6,549) and pseudobulk total and regenerated all three arms. Recovery rises and does not close the gap: 2.8\% to 4.7\% for calibrated bulk and 3.7\% to 4.7\% for the pseudobulk ceiling, against 31\% on the lupus benchmark. Depth standardization therefore costs about two percentage points and is not what separates the two cohorts. The remaining difference is what there is to recover: the lupus split contrasts cases with controls, whereas ImMicro is 107 healthy adults at baseline, among whom the between-donor differences that a profile could be matched on are small. Donor recovery measures how much individual signal a cohort contains as much as how much the model keeps.
|
| 24 |
+
|
| 25 |
+
\input{tables/results_realbulk}
|
| 26 |
+
|
| 27 |
+
\subsection*{Two uses: a healthy reference cohort and a subset question in disease}
|
| 28 |
+
|
| 29 |
+
\textbf{A reference cohort from bulk.} ImMicro pairs bulk with CITE-seq for 107 healthy adults, whose observed cells (401,325 at baseline) carry author-assigned labels. This is the setting in which a bulk-to-cell model is most likely to be used: a large bulk cohort, a small paired subset, and the question of whether the generated cells reproduce each donor's cell-type composition. [TODO: per-donor composition $L_1$ of the three arms against observed cells under the frozen annotator; comparison with deconvolution on the same donors; both after the native-depth run.]
|
| 30 |
+
|
| 31 |
+
\textbf{A subset-level question from bulk alone.} A cell-by-gene object supports questions that a cell-type average cannot answer. We tested one: within each sample, do C1Q-high-like monocytes differ from the other monocytes of that sample? We generated 5,000 cells for each of 19 Beh\c{c}et and control donors from separately measured bulk\cite{zheng2022c1qbehcet}, labelled them with the frozen annotator, and compared them with observed single cells from a second study of the same disease under one frozen set of module definitions and one gene space (Table~\ref{tab:behcet}). The generated cells contain the population: relative to the other monocytes of the same sample, generated C1Q-high-like cells carry FCGR3A $+2.92$, MS4A7 $+1.72$, HLA-DPA1 $+1.68$ and CX3CR1 $+1.03$ against S100A8 $-3.16$, VCAN $-2.48$ and CD14 $-1.75$, a stronger version of the observed contrast ($+1.63$, $+0.96$, $+1.07$, $+0.28$ against $-2.36$, $-1.46$, $-1.02$). Two of three programmes follow: the interferon-$\gamma$ response is higher in C1Q-high-like cells and the pro-inflammatory module lower, in the observed cells and in the generated ones. The phagocytosis and antigen-presentation module, which the observed cells carry in all eight samples, is not recovered. The generated object is therefore enough to pose the question and to find the population, and not yet enough to answer it in full. Two rules had to change before this analysis could be run on generated cells at all, one for selecting the subset and one for scoring it (Supplementary Note~S9).
|
| 32 |
+
|
| 33 |
+
\input{tables/results_behcet}
|
| 34 |
+
|
| 35 |
+
\subsection*{The read-out of the support head, not capacity, bounds the scores}
|
| 36 |
+
|
| 37 |
+
The largest effect in this study is not an architecture. It is how the model's support head is turned into a sparsity pattern at the last step of sampling.
|
| 38 |
+
|
| 39 |
+
\textbf{What the support head is.} The denoiser ends in two linear heads, one that predicts each gene's expression value and one that predicts a support logit per gene. The support head is trained with a binary cross-entropy against whether the gene is detected in the target cell (Methods), so its output is a per-gene detection probability. The inherited sampler keeps a gene when that probability exceeds one half. That is the decision rule that maximizes per-gene accuracy; it is not the rule that reproduces how many genes a cell expresses. On the lupus panel the head puts 64\% of gene slots below $p=0.01$ and 6\% above $p=0.8$, and the 9\% of slots in between carry a fifth of the expected detections. A cut at one half throws that fifth away, and the generated cells come out with a median of 177 detected genes per cell where the observed cells have 229.
|
| 40 |
+
|
| 41 |
+
\textbf{Drawing from the probability.} Sampling each gene from its own probability has no parameter and follows the condition from cell to cell. It brings the detection rate to 228 genes per cell (observed 252, means over cells) and, averaged over parts 14--16 of the same checkpoints, raises $r$ from 0.245 to 0.286, the top-50 overlap from 59.7 to 67.7 and composition $L_1$ from 0.199 to 0.197 (Table~\ref{tab:readout}). The gain in $r$ is 2.3 times the run-to-run resolution. Every headline score in this paper uses this read-out.
|
| 42 |
+
|
| 43 |
+
\textbf{What a tuned threshold buys, and why we do not use it.} Lowering the cut is the other way to keep more genes, and a swept threshold reaches $r=0.326$ at $\tau=-2.0$ (Supplementary Note~S5). But that setting produces 286 detected genes per cell, 13\% more than observed, and $r$ keeps rising to 0.327 at $\tau=-3.0$, where the cells carry 1.7 times the observed detections and composition has worsened to 0.243. The correlation is rewarded for cells that are denser than real ones, because denser pseudobulks give the Welch test less noise. The threshold that matches the observed detection rate is $\tau=-1.55$, and there $r$ is 0.291, close to the drawn read-out. A threshold is therefore either wrong by 13\% or tuned on the score, and the drawn read-out is neither.
|
| 44 |
+
|
| 45 |
+
\textbf{The observed detection rate is not a constant.} Any rule that matches it needs a reference, and that reference moves: across the 42 lupus donors the mean detected genes per cell ranges from 191 to 385, a factor of 2.02; disease raises it by 16\% (266 in cases, 230 in controls); across the 28 sequencing libraries of ImMicro it ranges 248 to 393; and the two cohorts differ by 23\% (252 and 309). The model reproduces this structure from the bulk alone: with the drawn read-out, cases sit 7\% above controls and donors span a factor of 1.56, both compressed relative to the observed 16\% and 2.02 but in the right order. A read-out that sets one level for a cohort therefore leaves the donor-to-donor structure to the condition, which is where it should come from.
|
| 46 |
+
|
| 47 |
+
\input{tables/results_readout}
|
| 48 |
+
|
| 49 |
+
\textbf{Capacity does not move the biology.} Four models differ only in the width of the denoiser trunk ($1\times$ or $4\times$) and of the conditioning embedding (512 or 2,048), with data, seed, batch size, learning rate and schedule fixed (Table~\ref{tab:architecture}). Trunk width sets the training objective, 0.1355 against 0.1968 validation loss, a 31\% reduction; conditioning width leaves it unchanged to within 0.0001. Read at the default cut, the four arms sit within the run-to-run resolution of one another in $r$ (0.245 to 0.265 over parts 14--16). Read at a fixed threshold of $-2.0$, the smallest model comes first at 0.326 and the widest last at 0.262. [TODO: the four arms under the drawn read-out; benchmarks running.] Two arms respond to the read-out and two do not: lowering the threshold by one unit adds 77 and 79 detected genes per cell in the two $1\times$ arms and 10 and 6 in the two $4\times$ arms, whose support head is saturated, and their scores move by less than the resolution across read-outs. Widening the trunk therefore lowers the loss and removes the control that the read-out gives over the output. Conditioning width does one thing: it improves composition at the $1\times$ trunk (0.158 against 0.208) and degrades it at the $4\times$ trunk, so the best composition belongs to the narrow trunk with the wide condition and the worst to the largest model. A $16\times$ trunk reached $r=0.154$ and 0.130 in its first two schedule parts and was not continued. Paired part-by-part differences are in Supplementary Note~S4.
|
| 50 |
+
|
| 51 |
+
\input{tables/results_architecture}
|
| 52 |
+
|
| 53 |
+
\subsection*{The objective, the sampler and the panel}
|
| 54 |
+
|
| 55 |
+
Four secondary experiments locate the remaining error and are reported in full in the Supplementary Information. \textbf{Loss.} The value term of the loss covers every measured gene, so most of its weight falls on measured zeros; restricting it to expressed genes, with nothing else changed, gives $r=0.187$, 18 overlapping genes and composition $L_1$ 1.325 at part 16, so the zeros are what hold the cell-type structure together (Supplementary Note~S6). \textbf{Sampler.} Differential genes and composition are flat from 25 deterministic steps upward; $r$ drifts from 0.258 at 50 steps to 0.240 at 200, so the 50-step setting used throughout is stable for gene sets and composition and not converged for the correlation (Supplementary Note~S3). \textbf{Gene panel.} Nested panels of 2,000, 6,000 and 11,589 genes trade coverage of the observed cell space (0.918 to 0.636) against precision (0.765 to 0.944) at matched early exposure, and broader panels did not improve disease effects on the common genes; the 6,000-gene panel is used for every experiment above (Supplementary Note~S2). [TODO: 2,000- and 11,589-gene panels retrained to part 16 with the base architecture and scored on the common panel.] \textbf{Evaluation panel.} The 2,980 shared genes are the most variable genes of this cohort and carry 3.1 times the donor-to-donor variance of the model's other genes; rescoring on the model's own 5,847 genes lowers $r$ by 0.03 to 0.06 for every set and preserves the ordering by $r$ (Spearman $\rho=0.964$), which is the ordering the conclusions above rest on (Supplementary Note~S7).
|