EBMF versus cNMF: scores, loadings and reproducibility
Source:vignettes/articles/ebmf-cnmf-comparison.Rmd
ebmf-cnmf-comparison.RmdCompare scores and loadings separately before calling a program reproducible. The first half uses 180 PBMC3k cells and 300 selected genes. The second half uses simulated counts with planted programs, so its statements hold for that simulation only. It illustrates a comparison workflow; it does not establish a method winner.
Which factorization are we comparing?
Write the approximation as . Rows of describe cell activities. Rows of describe gene effects.
| Model | Cell-score prior | Gene-effect prior | Allowed interpretation |
|---|---|---|---|
| Signed EBMF | normal | point-Laplace | Signed activities and opposing gene effects |
| Semi-nonnegative EBMF | point-exponential | point-Laplace | Positive activities with opposing gene effects |
| Nonnegative EBMF | point-exponential | point-exponential | Additive positive activities and gene effects |
| cNMF | Nonnegative optimization | Nonnegative spectra | Additive positive usages and spectra |
The nonnegative EBMF arm is the closest support control against cNMF. Its shrinkage, likelihood and optimizer still differ from cNMF. Point-Laplace has a prior spike at zero. That does not guarantee many exact zeros in posterior means, or fewer selected genes than point-normal.
Raw scores in both methods need not sum to one. cNMF’s
load_results normally returns normalized usages. Use raw
usages with their corresponding spectra when checking reconstruction.
Avoid comparing normalized usages with raw EBMF scores as though their
amplitudes had the same meaning.
An explicit feature intercept gives . Then signed effects describe changes in transformed coordinates, conditional on the baseline and other factors. They are not negative abundances. The fitted results below have no explicit intercept. Adding one is a separate sensitivity; it changes component capacity and program allocation.
Keep the data comparison explicit
The common-input experiment fits all methods to the same nonnegative
matrix: the same cells, 300 genes and variance-scaled normalized counts.
The EBMF baseline supplies S=1 and estimates pooled
additional variance. All EBMF fits use greedy addition, backfitting and
nullchecking.
We set EBMF Kmax=12 and supply cNMF K=12.
These are supplied limits, not evidence that either method selected an
optimal rank. Each EBMF run is an individual fit. Each cNMF run is a
five-start consensus, with five independent runs per method. cNMF uses
max_NMF_iter=300 and density_threshold=2.0,
which excludes no spectral outliers. This reduced cNMF configuration is
a diagnostic pilot.
A production cNMF analysis should inspect its K and distance
diagnostics. Use a justified density threshold and more consensus
starts, such as 50–100. The example threshold 0.01 is not
universally suitable. See the upstream cNMF workflow.
| track | model | fits | qualified | rank_min | rank_max | SSE_min | SSE_max |
|---|---|---|---|---|---|---|---|
| common | Nonnegative EBMF | 5 | 5 | 12 | 12 | 0.6578 | 0.6603 |
| common | Semi-nonnegative EBMF | 5 | 5 | 12 | 12 | 0.6558 | 0.6623 |
| common | Signed EBMF | 5 | 5 | 12 | 12 | 0.6457 | 0.6457 |
| common | cNMF | 5 | 5 | 12 | 12 | 0.6200 | 0.6244 |
Training SSE measures reconstruction of the fitting matrix. It does not measure held-out prediction, biological coherence or uncertainty calibration. Do not compare SSE across different transformed input matrices.
Match factors without inventing agreement
Factor order and reciprocal scaling are arbitrary. Normalize each loading vector to length one and multiply its scores by the removed length. Find a one-to-one assignment using loading cosine similarity. Retain weak matches, inactive factors and unmatched factors.
A simultaneous score/loading sign flip is legal for fully signed EBMF. It is not legal for a nonnegative score vector. Apply any valid orientation change to both scores and loadings before comparing them.
For each matched pair, assess loading cosine, score correlation and score amplitude differences on shared cells. Also check the full reconstructed matrix. Two models can reconstruct similarly using split or rotated factors. Joint-span coverage detects some of those relationships. It does not show that a nonnegative-score model can express every algebraic combination.
Starts and cell subsampling answer different questions
Five starts yield ten unordered within-method comparisons. These measure initialization sensitivity on unchanged data. Five paired 80% cell subsamples measure sensitivity to changing the cells. Each subsample is compared with the full-data seed14 fit, using scores from the shared cells.
Genes, normalization and scaling stay fixed across these subsamples. The results therefore condition on full-data preprocessing. The cells have no independent donor labels for this analysis. These are neither donor replication nor leakage-free predictive evaluations.
| track | kind | model | Loading cosine | Score correlation | Relative score difference |
|---|---|---|---|---|---|
| Common-input counts | initialization | cNMF | 0.999 | 0.998 | 0.055 |
| Common-input counts | subsample | cNMF | 0.981 | 0.987 | 0.161 |
| Common-input counts | initialization | Nonnegative EBMF | 1.000 | 1.000 | 0.000 |
| Shifted log: gene variance + S | initialization | Nonnegative EBMF | 0.993 | 1.000 | 0.028 |
| Common-input counts | subsample | Nonnegative EBMF | 0.808 | 0.798 | 0.685 |
| Shifted log: gene variance + S | subsample | Nonnegative EBMF | 0.968 | 0.968 | 0.158 |
| Common-input counts | initialization | Semi-nonnegative EBMF | 1.000 | 1.000 | 0.000 |
| Shifted log: gene variance + S | initialization | Semi-nonnegative EBMF | 0.999 | 1.000 | 0.013 |
| Common-input counts | subsample | Semi-nonnegative EBMF | 0.823 | 0.925 | 0.516 |
| Shifted log: gene variance + S | subsample | Semi-nonnegative EBMF | 0.882 | 0.970 | 0.309 |
| Common-input counts | initialization | Signed EBMF | 1.000 | 1.000 | 0.000 |
| Shifted log: gene variance + S | initialization | Signed EBMF | 1.000 | 1.000 | 0.000 |
| Common-input counts | subsample | Signed EBMF | 0.962 | 0.979 | 0.196 |
| Shifted log: gene variance + S | subsample | Signed EBMF | 0.983 | 0.990 | 0.127 |
The signed-score model agrees almost exactly across common-input starts. Its cell-subsampling agreement is lower. The nonnegative-score models also contain weak factor counterparts despite strong median start agreement. A high median cannot establish reliability for every program. One cNMF subsample run reports an iteration-limit warning in its underlying NMF fits. Its comparisons remain in the table and have black rings. These unqualified rows must not be mistaken for converged-fit evidence.
| track | kind | model | pairs | matched | reference_slots | unmatched_reference | unmatched_target |
|---|---|---|---|---|---|---|---|
| Common-input counts | initialization | Nonnegative EBMF | 10 | 120 | 120 | 0 | 0 |
| Common-input counts | initialization | Semi-nonnegative EBMF | 10 | 120 | 120 | 0 | 0 |
| Common-input counts | initialization | Signed EBMF | 10 | 120 | 120 | 0 | 0 |
| Common-input counts | initialization | cNMF | 10 | 120 | 120 | 0 | 0 |
| Common-input counts | subsample | Nonnegative EBMF | 5 | 60 | 60 | 0 | 0 |
| Common-input counts | subsample | Semi-nonnegative EBMF | 5 | 60 | 60 | 0 | 0 |
| Common-input counts | subsample | Signed EBMF | 5 | 60 | 60 | 0 | 0 |
| Common-input counts | subsample | cNMF | 5 | 60 | 60 | 0 | 0 |
| Shifted log: gene variance + S | initialization | Nonnegative EBMF | 10 | 97 | 104 | 7 | 11 |
| Shifted log: gene variance + S | initialization | Semi-nonnegative EBMF | 10 | 120 | 120 | 0 | 0 |
| Shifted log: gene variance + S | initialization | Signed EBMF | 10 | 80 | 80 | 0 | 0 |
| Shifted log: gene variance + S | subsample | Nonnegative EBMF | 5 | 53 | 55 | 2 | 2 |
| Shifted log: gene variance + S | subsample | Semi-nonnegative EBMF | 5 | 57 | 60 | 3 | 0 |
| Shifted log: gene variance + S | subsample | Signed EBMF | 5 | 40 | 40 | 0 | 5 |

Loading agreement versus score agreement under five paired cell subsamples. Black rings mark the capped cNMF run. Points are dependent; they are not independent confidence-interval replicates.
Change the noise model deliberately
The flashier single-cell tutorial uses size-factor-normalized shifted-log counts. It supplies a small noise floor and estimates gene-wise residual variance. We follow that recipe, with backfitting enabled. Libraries use all 7,832 genes in the frozen count object; the analysis then keeps the same 300 selected genes.
# counts: cells x genes, before selecting the analysis genes.
size_factors <- rowSums(counts) / mean(rowSums(counts))
Y <- log1p(counts / size_factors)[, selected_genes, drop = FALSE]
set.seed(3)
s1 <- sd(log1p(rpois(1e7, 1 / nrow(Y))))
initializer <- function(flash) flashier::flash_greedy_init_default(
flash, sign_constraints = c(1, 0), seed = 14
)
fit <- flashier::flash_init(as.matrix(Y), S = s1, var_type = 2)
fit <- flashier::flash_greedy(fit, Kmax = 12,
ebnm_fn = list(ebnm::ebnm_point_exponential, ebnm::ebnm_point_laplace),
init_fn = initializer, maxiter = 500)
fit <- flashier::flash_backfit(fit, maxiter = 500)
fit <- flashier::flash_nullcheck(fit, remove = TRUE)Change both priors and initializer constraints for the other arms.
Use c(1,1) for the fully nonnegative arm and
c(0,0) for the signed arm. Save each native fit and its
diagnostics rather than selecting the nicest run.
var_type |
Estimated variance structure |
|---|---|
0 |
One pooled value |
1 |
One value per cell |
2 |
One value per gene |
c(1,2) |
Separable cell-by-gene structure |
NULL |
No estimated component; supplied S supplies all
noise |
For estimated-variance models, flashier adds the learned variance to
S^2. Thus S=1, var_type=0 is not fixed unit
variance. For this shifted-log dataset, the simulated floor is
s1=0.051502549432030469. It is tied to this transform and
sample size. Do not transfer that number unchanged to another
measurement scale. See the native
variance contract.
| model | variance | S | requested | completed | failed | capped | rank_min | rank_max |
|---|---|---|---|---|---|---|---|---|
| Nonnegative EBMF | v0 | floor | 2 | 2 | 0 | 0 | 12 | 12 |
| Semi-nonnegative EBMF | v0 | floor | 2 | 2 | 0 | 0 | 12 | 12 |
| Signed EBMF | v0 | floor | 2 | 2 | 0 | 0 | 12 | 12 |
| Nonnegative EBMF | v0 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Semi-nonnegative EBMF | v0 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Signed EBMF | v0 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Nonnegative EBMF | v1 | floor | 2 | 2 | 0 | 0 | 12 | 12 |
| Semi-nonnegative EBMF | v1 | floor | 2 | 2 | 0 | 0 | 12 | 12 |
| Signed EBMF | v1 | floor | 2 | 2 | 0 | 0 | 12 | 12 |
| Nonnegative EBMF | v1 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Semi-nonnegative EBMF | v1 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Signed EBMF | v1 | none | 2 | 2 | 2 | 0 | NA | NA |
| Nonnegative EBMF | v12 | floor | 2 | 2 | 2 | 0 | NA | NA |
| Semi-nonnegative EBMF | v12 | floor | 2 | 2 | 1 | 0 | 12 | 12 |
| Signed EBMF | v12 | floor | 2 | 2 | 0 | 0 | 7 | 7 |
| Nonnegative EBMF | v12 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Semi-nonnegative EBMF | v12 | none | 2 | 2 | 0 | 0 | 7 | 7 |
| Signed EBMF | v12 | none | 2 | 2 | 0 | 0 | 6 | 6 |
| Nonnegative EBMF | v2 | floor | 5 | 5 | 0 | 0 | 9 | 12 |
| Semi-nonnegative EBMF | v2 | floor | 5 | 5 | 0 | 0 | 12 | 12 |
| Signed EBMF | v2 | floor | 5 | 5 | 0 | 0 | 8 | 8 |
| Nonnegative EBMF | v2 | none | 2 | 2 | 0 | 0 | 9 | 11 |
| Semi-nonnegative EBMF | v2 | none | 2 | 2 | 0 | 0 | 12 | 12 |
| Signed EBMF | v2 | none | 2 | 2 | 0 | 0 | 8 | 8 |
Both signed-score cell-wise/no-floor starts failed in the EBNM optimizer. Some separable-variance runs with the supplied floor also failed. Keep these failures in the denominator. They are numerical outcomes for these recipes, not proof that an entire prior family or variance structure is invalid.
The shifted-log models use different observation coordinates from the common-input experiment. Compare their native loadings within that track. For a cross-scale comparison, derive gene-association profiles from each model’s scores against one common observed matrix. Label those profiles as associations; they are not interchangeable native gene effects.
Does either method discover a missing program?
The earlier comparison used EBMF K12 against cNMF K4. The HLA/CD74 loading direction had 86–88% of its squared loading mass outside the cNMF span. With cNMF K12, that gap dropped to 16–20%. Rank accounted for much of the apparent difference. The remaining gap does not establish novelty.
Some HLA/CD74 factors in the common-input nonnegative-score models are concentrated on roughly two effective cells. Their poor subsampling matches persist even though the highest-scoring cell remains in all five subsets. Concentration is a warning about support; it is not a complete causal explanation for the instability. Inspect both loading geometry and score distribution before assigning a biological label.
A candidate private program needs a stable signature, support across independent biological samples and evidence beyond an unmatched axis. Review the joint target span, residual genes and possible split programs. Treat positive and negative signatures separately for signed gene effects. The previous constrained-loading metric had a sign-handling defect; its old cone-coverage numbers are excluded from this case study.
Planted truth: what each method can and cannot represent
The sections above have no ground truth. This section adds one. Five simulated datasets (300 cells, 400 genes, seeds 1 to 5) plant seven programs with known cell memberships and gene sets: three overlapping shared blocks, one private program in 12 cells, one bipolar program with 25 up and 25 down genes, and a collinear pair of programs whose memberships correlate at about 0.9. Counts are Poisson; 170 genes carry no program. All four methods fit cNMF’s own prepared matrix of all 400 genes at the true rank K = 7, with K = 11 as the single overspecified sensitivity. Thresholds were frozen before fitting: a program is recovered when the fitted factor’s top-20 genes overlap its planted up-genes by at least 0.5 and its activity has Spearman correlation at least 0.5 with the planted membership.
| K | Program type | Method | Recovered | Gene overlap | Activity rho | Activity AUC |
|---|---|---|---|---|---|---|
| 7 | bipolar | cNMF | 1.00 | 1.00 | 0.76 | NA |
| 7 | bipolar | Nonnegative EBMF | 0.40 | 0.05 | 0.19 | NA |
| 7 | bipolar | Semi-nonnegative EBMF | 1.00 | 1.00 | 0.91 | NA |
| 7 | bipolar | Signed EBMF | 1.00 | 1.00 | 0.95 | NA |
| 7 | collinear | cNMF | 0.50 | 0.25 | 0.34 | NA |
| 7 | collinear | Nonnegative EBMF | 0.30 | 0.00 | 0.00 | NA |
| 7 | collinear | Semi-nonnegative EBMF | 0.40 | 0.03 | -0.03 | NA |
| 7 | collinear | Signed EBMF | 0.50 | 0.28 | 0.93 | NA |
| 7 | private | cNMF | 0.00 | 1.00 | 0.34 | 1 |
| 7 | private | Nonnegative EBMF | 0.00 | 1.00 | 0.34 | 1 |
| 7 | private | Semi-nonnegative EBMF | 0.00 | 1.00 | 0.34 | 1 |
| 7 | private | Signed EBMF | 0.00 | 1.00 | 0.34 | 1 |
| 7 | shared | cNMF | 1.00 | 1.00 | 0.86 | 1 |
| 7 | shared | Nonnegative EBMF | 1.00 | 1.00 | 0.87 | 1 |
| 7 | shared | Semi-nonnegative EBMF | 1.00 | 1.00 | 0.87 | 1 |
| 7 | shared | Signed EBMF | 0.67 | 1.00 | 0.87 | 1 |
| 11 | bipolar | cNMF | 0.80 | 0.95 | 0.68 | NA |
| 11 | bipolar | Nonnegative EBMF | 0.80 | 1.00 | 0.90 | NA |
| 11 | bipolar | Semi-nonnegative EBMF | 0.40 | 0.40 | 0.14 | NA |
| 11 | bipolar | Signed EBMF | 1.00 | 1.00 | 0.95 | NA |
| 11 | collinear | cNMF | 0.50 | 0.55 | 0.54 | NA |
| 11 | collinear | Nonnegative EBMF | 0.30 | 0.00 | 0.00 | NA |
| 11 | collinear | Semi-nonnegative EBMF | 0.50 | 0.32 | 0.49 | NA |
| 11 | collinear | Signed EBMF | 0.50 | 0.28 | 0.93 | NA |
| 11 | private | cNMF | 0.00 | 1.00 | 0.34 | 1 |
| 11 | private | Nonnegative EBMF | 0.00 | 1.00 | 0.34 | 1 |
| 11 | private | Semi-nonnegative EBMF | 0.00 | 1.00 | 0.34 | 1 |
| 11 | private | Signed EBMF | 0.00 | 1.00 | 0.34 | 1 |
| 11 | shared | cNMF | 1.00 | 1.00 | 0.87 | 1 |
| 11 | shared | Nonnegative EBMF | 1.00 | 1.00 | 0.87 | 1 |
| 11 | shared | Semi-nonnegative EBMF | 1.00 | 1.00 | 0.87 | 1 |
| 11 | shared | Signed EBMF | 0.67 | 1.00 | 0.87 | 1 |

Recovery rate by planted program type. Each point is five seeds; points are not independent replicates of a population.
Four results, read against the frozen rules. Every cNMF fit hit the 300-iteration cap of this pilot configuration (0 of 10 fits qualified), so the cNMF rows describe an under-converged cNMF and may understate what cNMF can recover.
Shared blocks are easy for every method except signed EBMF. Gene overlap is 1.0 and median activity AUC is above 0.99 everywhere. Signed EBMF scores 0.67: in 4 of 5 seeds at least one shared block has no matching factor (seed 4 misses 2). In the archived fits the missing blocks sit in contrast factors that pair one block’s genes against another’s with opposite signs; the shipped tables do not record factor sign structure, so this reading is not checkable here. A signed prior admits rotations of the planted basis, as the prior comparison rotation example shows.
The private 12-cell program is found by every method, and the frozen rule fails it anyway. Gene overlap is 1.0 and member-versus-non-member AUC has median 1.0 for all four methods at both ranks. Spearman correlation against 288 tied zeros is capped near 0.34 whenever the fitted activity is small but nonzero outside the program. The AUC column was added after seeing this and is labelled post-hoc; the recovery decision keeps the frozen rule, so the table shows 0. Prespecify a tie-robust activity metric for rare programs.
| K | Method | Recovered (up genes) | One signed factor | Split up/down | |
|---|---|---|---|---|---|
| 1 | 7 | cNMF | 1.0 | 0.6 | 1.0 |
| 2 | 7 | Nonnegative EBMF | 0.4 | 0.2 | 0.8 |
| 3 | 7 | Semi-nonnegative EBMF | 1.0 | 1.0 | 0.2 |
| 4 | 7 | Signed EBMF | 1.0 | 1.0 | 0.0 |
| 17 | 11 | cNMF | 0.8 | 0.6 | 1.0 |
| 18 | 11 | Nonnegative EBMF | 0.8 | 0.6 | 0.8 |
| 19 | 11 | Semi-nonnegative EBMF | 0.4 | 0.4 | 0.6 |
| 20 | 11 | Signed EBMF | 1.0 | 1.0 | 0.0 |
Only signed-effect models hold a bipolar program in one factor with opposite signs. At K = 7 signed and semi-nonnegative EBMF recover it as a single factor carrying the up genes positive and the down genes negative in every seed. Signed EBMF never splits it; semi-nonnegative EBMF also yields a separate down factor in 1 of 5 seeds. cNMF and nonnegative EBMF cannot represent a down direction. cNMF splits the program in 5 of 5 seeds. Nonnegative EBMF splits it in 4 of 5 seeds and recovers the up genes in only 2. Their nonzero one-factor entries only mean the down genes were the least-loaded genes of the up factor. Splitting is not failure, but a downstream analysis that treats the two halves as independent programs would be wrong. At K = 11 the semi-nonnegative arm holds the program in one factor in only 2 of 5 seeds, so overspecified rank erodes this advantage.
Collinear programs merge in 30 to 50 percent of cases at K =
7, for every method. The planted memberships correlate at 0.886
to 0.910, above the preregistered 0.85 target (a logged deviation), so
the pair is harder than planned. One fitted factor often carries both
gene sets and the other planted program is missed; the
merged_rate column of the summary CSV marks those cases.
Methods differ in what the merged factor tracks: its activity correlates
with the planted membership at median 0.93 for signed EBMF and near zero
for both nonnegative arms. No method separates the pair reliably at this
correlation; do not read two correlated programs from one factor without
a residual check.

Unsupported factors and missed programs per fit. Open points are the five simulation seeds (the only replication); bars are their means. Missed counts follow the frozen rule except that a bipolar program recovered as an up factor plus a down factor counts as found; the private program counts as missed for every method.
| K | Method | Mean rank | False candidates | Missed | Qualified fits |
|---|---|---|---|---|---|
| 7 | cNMF | 7.0 | 0.0 | 2.0 | 0 |
| 7 | Nonnegative EBMF | 6.8 | 1.0 | 2.6 | 5 |
| 7 | Semi-nonnegative EBMF | 7.0 | 0.8 | 2.2 | 5 |
| 7 | Signed EBMF | 6.2 | 0.2 | 3.0 | 5 |
| 11 | cNMF | 11.0 | 1.6 | 2.0 | 0 |
| 11 | Nonnegative EBMF | 7.2 | 1.0 | 2.6 | 5 |
| 11 | Semi-nonnegative EBMF | 7.8 | 1.2 | 2.0 | 5 |
| 11 | Signed EBMF | 6.2 | 0.2 | 3.0 | 5 |
Extra rank buys false candidates, not missed
programs. At K = 11, cNMF fills all eleven slots and a mean of
1.6 of them have no planted support; EBMF nullchecking stops at a mean
of 6.2 to 7.8 factors with 0.2 to 1.2 unsupported factors. Missed counts
barely move with rank for any method. An unsupported factor is not
automatically noise: inspect ebmf-cnmf-planted-recovery.csv
and the fitted effects before discarding one.
This simulation is one Poisson regime with disjoint gene sets and no donors. It shows representational limits, not method quality on real data.
Planted truth: paired held-out prediction and refit stability
Representational recovery says what a fit can express on its training cells. Two further questions were frozen in a second preregistration on 2026-10-27 and run on the same simulated counts (seeds 1 to 5) with new full-data fits (fit seed = simulation seed), not the recovery-experiment fits above, so factor labels can differ from the recovery tables: does each EBMF arm predict withheld gene expression better than a training-mean baseline, and do its factors survive refitting on cell subsamples? Both experiments use the simulated cell as the unit; the simulation has no donors.

Held-out prediction R-squared for 100 scoring genes withheld from 60 test cells per fold (5 folds by 5 simulation seeds, 25 folds per arm). Fixed programs: factors fitted on the training cells, activities inferred from the 300 activity genes only. Training mean: per-gene mean of the training cells. Each dashed segment is one fold; higher is better. Simulated Poisson counts, cell unit, no donors.
| Method | Folds scored | Folds with gain | Median R2 fixed | Median R2 mean | Min rank | Max rank |
|---|---|---|---|---|---|---|
| Nonnegative EBMF | 25 | 25 | 0.772 | 0.736 | 7 | 7 |
| Semi-nonnegative EBMF | 25 | 25 | 0.779 | 0.736 | 7 | 7 |
| Signed EBMF | 25 | 25 | 0.776 | 0.736 | 7 | 7 |
Every arm beats the baseline in 25 of 25 folds, which is the minimum
a program model must do; it does not rank the arms. The median gain is
small: held-out R-squared 0.772 to 0.779 for fixed programs against
0.736 for the training mean. The 25 folds per arm come from 5 simulated
datasets, and folds of one dataset share its generating model, so there
are 5 independent replicates, not 25. The baseline is a per-gene
training mean with no per-cell size factor. The two holdouts behind each
pair of arms share input, folds and masks, so
compare_prior_fits() accepts them as bound paired evidence
(state driver_bound_paired_evaluation_attached in all 15 pairs). That
label certifies the pairing of the evaluation, not the full-data
factors, which were fitted once on all cells.

Recovery of each full-data factor across 20 refits on 80 percent cell subsamples (Tucker congruence at or above 0.9). Each point is one reference factor from one seed, labelled by the planted program it maps to; factors with no planted match (best gene overlap below 0.25) are shown separately. Bars are means over factors. Simulated cells, no donors.
| Method | Type | Factors | Mean recovery (all requested) | Median congruence |
|---|---|---|---|---|
| Nonnegative EBMF | bipolar | 5 | 0.99 | 0.97 |
| Semi-nonnegative EBMF | bipolar | 4 | 0.71 | 0.98 |
| Signed EBMF | bipolar | 5 | 1.00 | 0.99 |
| Nonnegative EBMF | collinear | 5 | 0.93 | 1.00 |
| Semi-nonnegative EBMF | collinear | 5 | 0.94 | 0.98 |
| Signed EBMF | collinear | 8 | 1.00 | 0.98 |
| Nonnegative EBMF | no_planted_match | 5 | 0.98 | 0.95 |
| Semi-nonnegative EBMF | no_planted_match | 6 | 0.85 | 1.00 |
| Signed EBMF | no_planted_match | 3 | 0.67 | 1.00 |
| Nonnegative EBMF | private | 5 | 0.89 | 1.00 |
| Semi-nonnegative EBMF | private | 5 | 0.95 | 0.99 |
| Signed EBMF | private | 5 | 0.97 | 0.98 |
| Nonnegative EBMF | shared | 15 | 1.00 | 1.00 |
| Semi-nonnegative EBMF | shared | 15 | 1.00 | 0.99 |
| Signed EBMF | shared | 14 | 0.58 | 0.98 |
The signed arm’s shared-block factors are the least stable objects here (five simulated datasets, one start per fit). Planted programs P1 to P3 overlap in cells 80 to 120 and 180 to 200. Under the signed prior their factors recover in 1 to 20 of the 20 refits; both nonnegative arms recover every shared-block factor in every refit. One reading is rotation inside the shared subspace, which a signed prior leaves free and a nonnegativity constraint pins down. Another is that the signed arm spends fewer factors on the blocks, so per-factor congruence penalizes any reparameterization. A later subspace check on the signed arm separates the two by factor. For each unrecovered refit it measured the share of the reference factor’s squared effect norm that lies inside the span of that refit’s seven effect columns (chance level 7/400 = 0.0175). Reference factors F2 and F3 stay inside the refit span in all 54 of their failed refits (share at least 0.975), which is what rotation predicts. The lowest-variance shared factor, F7, is partly lost instead: none of its 64 failed refits reach 0.95, and the per-seed median share is 0.44 to 0.69. So “rotation” describes the larger shared factors and not all of them. This check covers one signed arm, five simulated datasets and cells as the resampling unit; its per-refit values are a table, not a figure, and are kept with the validation receipts. The semi-nonnegative arm’s bipolar factor is the next least stable. Treat both as simulation observations, not rules for real data.
Refit stability under cell subsampling is a necessary check, not evidence of biological replication: the 240-cell subsamples share the generating model with the reference. Starts were not repeated here (one start per fit, as in the recovery experiment). The 20 refits per reference sit at the low end of the tens to hundreds that the robustness checks recommend.
What remains unassessed?
The planted-truth sections establish representational recovery, held-out gene prediction against a baseline and refit stability on one simulated regime with cells as units; the following are still open. No donor-held-out prediction, donor replication or calibrated discovery uncertainty is established here. EB posterior summaries condition on the fitted model; they do not replace refitting or biological replication. The next scientific step is training-only preprocessing and fixed-signature scoring of held-out donors, plus simulations with known signed/unsigned truth.
An explicit-intercept sensitivity also remains separate. Use
fit_ebmf(..., intercept="feature", backfit=TRUE) to protect
its offset during nullchecking. Count the offset when comparing total
component budgets. Do not silently add an offset to the archived
no-intercept results.
Reproducibility and credits
Results were generated on 2026-10-25 with R 4.5.1, flashier 1.0.60,
ebnm 1.1-42 and the pinned cNMF source revision
5dbc5baaa0b9079b55bce554d801caa235a50457 in a cNMF 1.7.1
environment. Initializer seeds are 14–18. Cell-subset seeds are 101–105.
The planted-truth section was run on 2026-10-26 with the same pinned
cNMF revision, flashier through fit_ebmf(), simulation
seeds 1–5 and a preregistration frozen before fitting; its scripts and
receipts are in the local archive. The held-out prediction and refit
stability sections were run on 2026-10-27 under a second frozen
preregistration, through factor_holdout(),
factor_stability() and compare_prior_fits(),
with the same simulated counts; scripts and receipts are in the local
archive. Full fits, counts, source hashes, warnings and receipts remain
in the local scientific archive. This page carries compact derived
summaries and does not rerun either method during documentation
builds.
PBMC3k data: 10x Genomics. EBMF: Wei Wang and Matthew Stephens, JMLR (2021). flashier: Jason Willwerscheid, Peter Carbonetto, Wei Wang and Matthew Stephens. EBNM: Jason Willwerscheid, Matthew Stephens and Peter Carbonetto. cNMF: Dylan Kotliar and contributors, eLife (2019). The variance-floor workflow adapts the credited flashier single-cell tutorial. This comparison code and prose are independently written; upstream notices remain intact. See the full credits.