Why Specify a Generative Model?
A snapshot of cells contains observed expression counts, not a direct record of each cell’s developmental history. A tree-structured generative model makes the proposed history explicit: it describes how developmental progress and lineage choices could produce an expression state, and how that state could produce the observed counts. This separates three ideas that are easy to conflate: where a cell is along development, which lineage path it follows, and how noisy measurements represent its underlying state.
The model is a set of assumptions, not a claim that a computationally inferred tree must be the true biological lineage. It is useful because each layer has a distinct meaning and can be questioned separately. For example, an apparent branch in expression could reflect a true developmental choice, an unmodeled cell-cycle effect, or measurement noise.
Latent Progress, Lineage Choices, and States
Represent the proposed developmental structure by a rooted tree. The root is the shared starting state; internal nodes are possible branchpoints; leaves represent terminal paths or fates. For cell \(i\), let \(T_i\) denote latent developmental progress on a scale such as \([0,1]\). Progress is not necessarily observed time: it can be a model coordinate that increases along a trajectory.
At each branchpoint \(v\) encountered by cell \(i\), let \(C_{iv}\) be its discrete choice among the child branches. The collection of choices determines a path \(P_i\) through the tree. A terminal fate \(F_i\) can be represented by the leaf reached by that path. If branch choices have probabilities \(q_{v,k}\) for child \(k\), then the probability of a particular complete path is the product of its successive conditional choice probabilities, provided those probabilities are defined conditional on reaching their corresponding nodes. This describes a generative choice; it does not imply that the eventual fate is directly observed in a snapshot.
For gene \(g\), let \(X_{ig}\) be the cell’s latent log expression intensity. A simple state model gives \(X_{ig}\) a path- and progress-dependent mean \(m_g(T_i,P_i)\), with possible cell-to-cell deviations. Before a branchpoint, the proposed mean functions for its descendant paths should agree if the model asserts a shared trunk. After the branchpoint, they may diverge. This constraint gives “shared trunk” a precise statistical meaning rather than treating it as a visual impression.
For a concrete count layer, suppose counts are conditionally independent negative-binomial observations given the latent expression states and exposures. Use the mean-and-size parameterization: \(Y_{ig}\) has mean \(\mu_{ig}=s_i\exp(X_{ig})\), size \(r_g>0\), and variance \(\mu_{ig}+\mu_{ig}^2/r_g\). The extra variance allows more variability than a Poisson count with the same mean. Conditional independence means that, after conditioning on the modeled states and exposures, the count observations have no remaining dependence; it is a substantive assumption, not a mathematical necessity.
This factorization is a statement of the proposed data-generating order. It does not say that the latent quantities are known, or that the factors can be estimated separately from one snapshot. Nor does it prescribe a particular distribution for progress or expression states; those choices must be made and justified for the application.
What the Factorization Means
The factorization follows from the chain rule for joint probabilities together with the model’s conditional-independence assumptions. First, the joint probability of the latent variables and observations can always be written in the chosen order as a product of conditional distributions. The model then asserts that the count distribution for gene \(g\), given all latent quantities, depends on them through \(X_{ig}\) and \(s_i\); and that, given those quantities, the gene counts factor across genes.
The first equality is the chain rule in the order \(T_i,C_i,X_i,Y_i\). The second equality imposes the count-layer assumption: conditional on the latent expression states and exposures, the joint count distribution is a product over genes. If counts remain correlated after conditioning, that product is not an adequate description. For example, technical effects shared across genes might require additional latent variables or a different observation model.
Draw \(T_i\) from a stated distribution over the developmental range. Its support and shape should reflect the sampling design, not be chosen solely for computational convenience.
At each node reached, draw a discrete child choice according to the specified conditional probabilities. The choices define \(P_i\) and, if the path reaches a leaf, its terminal fate.
Draw a latent state from the path- and progress-dependent state distribution, then draw counts using the count model and the cell’s exposure.
This order is a convenient way to define the model, not necessarily the chronological order of every biological event. A fate may be selected before it becomes observable, and a snapshot may contain cells at many developmental positions. The key requirement is that the assumed dependencies be clear enough to generate a complete hypothetical data set.
Worked Generative Examples
Worked Example: Counts at Two Known Branch-Specific States
Consider a hypothetical two-branch tree with a shared trunk ending at \(T=0.6\). At progress \(T=0.8\), suppose a gene has latent log intensities \(X= \log(3)\) on branch A and \(X=\log(1)\) on branch B. Let the exposure be \(s=1\), and use a negative-binomial count distribution with size \(r=2\). The branch and progress are treated as known for this forward-generation calculation; no branch assignment is being inferred.
On branch A, \(\mu=s\exp(X)=1\times3=3\). For this parameterization,
Substituting \(r=2\) and \(\mu=3\) gives \(P(Y=2)=3(2/5)^2(3/5)^2=3(4/25)(9/25)=108/625=0.1728\). Thus, under this specified branch-A state, the probability of observing exactly two counts for this gene in the cell is 0.1728.
On branch B, \(\mu=1\times1=1\). The same calculation gives \(P(Y=2)=3(2/3)^2(1/3)^2=12/81\approx0.1481\). The branch-specific states imply different count distributions, but the probabilities are not deterministic: either count value can occur under either branch. The calculation illustrates the observation layer, not evidence that a real cell belongs to one path.
Worked Example: Probability of a Specified Tree-and-Count Event
Consider a hypothetical cell for which \(P(T_i\text{ is in an early interval})=0.40\), and whose conditional probability of choosing branch B given that interval is \(0.10\). For illustration, suppose five conditionally independent gene counts each follow a Poisson distribution with mean \(\log(3/2)\) under this early-interval, branch-B state. What is the probability that the cell is in the interval, chooses B, and all five counts are zero?
For a Poisson variable with mean \(\lambda\), \(P(Y=0)=e^{-\lambda}\). Here \(e^{-\log(3/2)}=2/3\), so the probability of five zero counts, conditional on the stated progress and branch, is \((2/3)^5=32/243\). By the specified conditional sampling order, the joint event probability is
The probability is about 0.005267, or 0.5267%, for this fully specified hypothetical model. The factors represent the interval probability, the conditional branch-choice probability, and the conditional count probability, respectively. Multiplying them is justified by that conditioning structure; it would not be justified to multiply marginal probabilities if the count distribution changed with branch or progress.
Worked Example: Shared Trunk Versus Divergent Branch States
Suppose a hypothetical gene has the same latent log intensity \(X=\log(2)\) on both branches before the split, with exposure \(s=1\). The expected count on either path is \(1\times\exp(\log(2))=2\). If the model imposes a shared trunk, its expected counts before the split are therefore identical across descendant paths.
After the split, suppose the branch-A log intensity is \(\log(4)\) and branch-B log intensity is \(\log(1.5)\). The expected counts are \(1\times4=4\) and \(1\times1.5=1.5\), respectively. The expected difference is \(4-1.5=2.5\) counts per cell at the specified exposure and progress. This is a difference between model-implied means, not a causal effect of branch choice. If the observed data show a substantial difference before the stipulated split, the shared-trunk constraint may be implausible, the progress scale may be wrong, or a relevant covariate may be missing.
Assumptions, Diagnostics, and Alternatives
A generative model is interpretable only relative to its assumptions. Common assumptions include a biologically plausible tree topology; a meaningful progress coordinate; branch choices that occur at stated nodes; expression states that are shared or divergent where specified; and an observation distribution appropriate to the counts. If the model treats cells as conditionally independent, their remaining dependence must be negligible after the included latent variables and covariates.
Useful diagnostics examine implications of the whole model rather than only its branch diagram. Check whether predicted count means and variability resemble the observed counts across genes and cells; whether the proposed shared trunk is consistent with cells assigned to early progress; and whether residual patterns remain associated with library size, cell cycle, donor, or other measured factors. A large number of zeros, extreme counts, or residual correlation can indicate that the count layer is inadequate. A tree that requires implausible reversals in progress or abrupt state changes at unsupported locations may indicate a poor trajectory structure.
Several alternatives emphasize different assumptions. A single continuous trajectory without discrete choices is simpler when there is no evidence for a fate split. A hard-label analysis treats each cell’s path as already known, which can be useful when labels come from an independent source but understates uncertainty if labels are uncertain. A Poisson observation model is simpler than a negative-binomial model, but it fixes the conditional variance equal to the mean; the negative-binomial model allows additional dispersion. These choices are not interchangeable: each changes the distributions that can be generated and therefore the patterns the model can represent.
A tree model also has limits. Development may involve convergent paths, asynchronous or reversible changes, continuous fate probabilities rather than discrete choices, or unobserved intermediate states. A scalar progress coordinate may fail to order cells when development is multidimensional. The topology, branch probabilities, state curves, and count distribution can also be difficult to distinguish from a single cross-sectional data set. The generative specification clarifies these issues but does not by itself resolve them.
The central practical benefit is conceptual discipline: every observed count is connected to a latent state through an explicit probability model, and every proposed lineage path has a defined role. This makes it possible to ask whether a biological story is coherent with the measurements, while keeping assumptions visible rather than embedding them silently in a visualization or a hard assignment.
Check Your Understanding
Answer each question using the model definitions above. Brief solutions follow.
- What is the distinction between developmental progress \(T_i\) and path \(P_i\)?
- Under a shared-trunk assumption, what constraint applies to the expected expression of a gene before a branchpoint?
- A Poisson count has mean \(\log(2)\). What is its probability of zero counts?
- Why does a product over genes in the count factorization require an assumption?
- Name one reason that two expression clusters do not, by themselves, establish two distinct cell fates.
Solutions. (1) \(T_i\) locates the cell along developmental progress; \(P_i\) records its discrete route through the lineage tree. (2) Descendant paths must have the same mean latent log intensity before their stipulated split; this does not generally imply equal expected expression intensity or expected counts. (3) \(P(Y=0)=e^{-\log(2)}=1/2\). (4) It assumes gene counts are conditionally independent given the modeled states and exposures. (5) Clusters can also arise from technical variation, cell-cycle differences, sampling, or a misspecified continuous trajectory.