Each synthetic patient carries three linked omics layers — genomics (10 features), transcriptomics (12) and proteomics (8) — generated from a shared low-dimensional biology plus per-layer batch noise:
Z (patient latent state) → X_layer = ReLU(Z · H_true_layer) + batch noise
patients cluster around S=4 hidden "true" disease subtypes in Z-space
The model never sees Z or the true subtypes — only the concatenated non-negative matrix X (patients × all 30 features). Joint non-negative matrix factorization (NMF) recovers a low-rank approximation shared across all three layers:
minimize ‖X − W·H‖² subject to W ≥ 0, H ≥ 0
Lee–Seung multiplicative updates, run every frame:
H ← H ⊙ (Wᵀ X) / (Wᵀ W H + ε)
W ← W ⊙ (X Hᵀ) / (W H Hᵀ + ε)
W (patients × K) is the joint latent profile. The scatter panel plots any two chosen columns of W against each other — pick which two with the "Scatter Projection" sliders, and drag/scroll on the panel to pan and zoom. The heatmap panel shows the raw data matrix X itself, rows sorted by fitted cluster so the block structure the factorization is trying to explain becomes visible. The bottom chart tracks convergence live. K-means (Lloyd's algorithm) then groups patients in the full K-dim W-space into candidate disease subtypes.
Silhouette: s(i) = (b(i) − a(i)) / max(a(i), b(i))
a(i) = mean distance to own cluster, b(i) = mean distance to nearest other cluster
Purity: for each fitted cluster, take its most common true subtype and
sum those majority counts over the cohort, divided by N.
- Latent factors K — the rank of the factorization. Too low under-fits (layers get mashed together); too high starts fitting per-layer batch noise instead of shared biology.
- Batch noise — per-layer measurement noise, the same nuisance ComBat/Harmony correct for upstream; push it up and watch purity collapse even as reconstruction error stays low.
- Clusters to fit — how many disease subtypes k-means looks for in the learned W-space; compare against the true count of 4 via the purity readout.
- Horizontal / vertical factor — 2D can only show two of the K learned columns at once; switch which pair is plotted to inspect how subtypes separate along different factor pairs.
This is the same mechanic behind real multi-omics subtyping pipelines (e.g. iCluster, MOFA, joint-NMF cancer subtyping): fuse heterogeneous omics matrices into one shared latent space, then cluster patients in that space to discover molecular subtypes no single layer reveals alone.