From a fitted branch model to uncertainty about fate
A fitted branching model can provide a lineage proportion and a preferred branch label for each cell. Those summaries do not, by themselves, show how uncertain the proportions or assignments are. Bayesian inference makes that uncertainty explicit by placing distributions on unknown quantities and updating those distributions with the observed data. The result is a posterior distribution for lineage proportions and branch parameters, rather than only a single fitted value.
Here, a lineage fate probability means the model-based probability that a cell from the specified starting population belongs to a particular terminal lineage. It is conditional on the model, the observed data, and the sampling context. It is not a guarantee about an individual cell’s biological destiny. The introductory material on generative models for tree-structured cell fates and the earlier material on soft lineage assignment and latent branch labels provide the model context: a cell can have an unobserved branch label, while its measured features have branch-specific distributions.
A standard Bayesian specification gives the lineage proportions a Dirichlet prior, \(\boldsymbol{\pi}\sim\operatorname{Dirichlet}(\alpha_1,\ldots,\alpha_K)\), with each \(\alpha_k>0\). The prior mean of \(\pi_k\) is \(\alpha_k/\alpha_0\), where \(\alpha_0=\sum_k\alpha_k\). The \(\alpha_k\) values express prior weight for each lineage; \(\alpha_0\) controls concentration. Larger total concentration means less prior spread around the prior mean. Branch parameters also receive prior distributions, chosen to reflect the parameter scale and the likelihood for the branch-specific features.
Posterior updating and the role of latent labels
First consider observed labels. If \(n_k\) cells are known to have label \(k\), and the labels are conditionally independent draws from the same lineage proportions, the likelihood for \(\boldsymbol{\pi}\) is proportional to \(\prod_k\pi_k^{n_k}\). Multiplication by the Dirichlet prior gives a posterior that is also Dirichlet. This conjugacy gives a direct way to quantify uncertainty about the lineage proportions.
When labels are unknown, they cannot simply be treated as observed counts. For cell \(i\), let \(y_i\) denote its measured features and let \(f_k(y_i\mid\theta_k)\) be the likelihood of those features under branch \(k\). A typical conditional-independence model has likelihood contribution \(\pi_k f_k(y_i\mid\theta_k)\) if \(z_i=k\). The posterior for proportions, labels, and branch parameters is proportional to the joint likelihood times the prior distributions. Uncertainty about labels therefore contributes to uncertainty about both \(\boldsymbol{\pi}\) and \(\boldsymbol{\theta}\).
Conditional on a particular allocation \(\mathbf{z}\), the posterior for \(\boldsymbol{\pi}\) has the Dirichlet update above. But with latent labels, the marginal posterior is a mixture over possible allocations. In general, plugging fractional label responsibilities from an EM fit into the observed-count formula does not produce the exact Bayesian posterior: those responsibilities are estimates, not observed labels, and the posterior must account for uncertainty in the allocations. Computation may use sampling or other numerical approximations to represent that uncertainty.
Worked posterior calculations
Worked Example: A Two-Lineage Fate Probability
Suppose 15 hypothetical cells have known lineage labels: 10 are assigned to lineage A and 5 to lineage B. Let \(q=\pi_A\), so \(\pi_B=1-q\), and use the uniform prior \(q\sim\operatorname{Beta}(1,1)\). The binomial sampling model is appropriate here because, under the stated model, each cell has an independent label with the same probability \(q\).
The beta-binomial conjugate update gives \(q\mid\text{data}\sim\operatorname{Beta}(11,6)\). Its posterior mean is
The posterior mean estimates the lineage A proportion as about 0.647, but it does not describe all the uncertainty. For a probability statement about the proportion exceeding one-half, use the beta-binomial identity \(P(q>x)=P(B\leq a-1)\) for \(q\sim\operatorname{Beta}(a,b)\) and \(B\sim\operatorname{Binomial}(a+b-1,x)\). With \(a=11\), \(b=6\), and \(x=0.5\), this gives
Thus the posterior probability that lineage A accounts for more than half of the modeled population is about 0.895. This is a probability statement about \(q\) under the specified prior and model, not a probability that the null hypothesis is true. The uniform prior and known labels make the calculation transparent; a different prior or uncertain labels could change the result.
Worked Example: Posterior Proportions Across Three Lineages
Consider 25 hypothetical cells with known labels: 12 in lineage A, 8 in lineage B, and 5 in lineage C. Assume independent labels from a common lineage-proportion vector and choose the symmetric prior \(\boldsymbol{\pi}\sim\operatorname{Dirichlet}(1,1,1)\). The prior gives equal means to the three lineages and contributes one unit of prior concentration to each.
The posterior is \(\operatorname{Dirichlet}(13,9,6)\), with total concentration 28. Its posterior means are
These means sum to one and summarize the posterior center. Each marginal proportion has a beta distribution: for example, \(\pi_A\mid\mathbf{z}\sim\operatorname{Beta}(13,15)\), since the second parameter is the sum of the other two Dirichlet parameters. A credible interval for \(\pi_A\) can therefore be obtained from the corresponding beta quantiles. Reporting only 0.4643 would omit that interval’s uncertainty; the posterior distribution, not just its mean, is the relevant inferential result. This update is justified only if these 25 labels are treated as independent draws from the same population proportions.
Worked Example: Updating a Branch Parameter
Suppose a hypothetical quantitative feature follows a Normal distribution within lineage A, with unknown mean \(\mu_A\) and known variance \(\sigma^2=0.25\). Two cells with known lineage A labels have feature values 1.2 and 1.6. Use the prior \(\mu_A\sim N(0,1)\). This conjugate model assumes independent Normal observations conditional on \(\mu_A\), a common known variance, and a Normal prior on the mean.
The posterior variance is the reciprocal of prior precision plus data precision; the posterior mean is the precision-weighted average of the prior mean and the observed values:
Therefore \(\mu_A\mid\text{data}\sim N(1.244,1/9)\), with posterior standard deviation \(\sqrt{1/9}=0.3333\) feature units. A central 95% credible interval is approximately \(1.244\pm1.96(0.3333)\), or \((0.591,1.897)\) feature units. Under this model and prior, the interval contains 95% of the posterior probability for the branch mean. It is not a frequentist confidence interval, and it does not account for uncertainty in the assumed variance.
Cell assignment must average over uncertainty
For a cell with features \(y\), the conditional probability of assignment to lineage \(k\), given proportions and branch parameters, is
When \(\boldsymbol{\pi}\) and \(\boldsymbol{\theta}\) are uncertain, the posterior assignment probability averages this conditional probability over their joint posterior distribution. This is not generally equal to substituting posterior means into the formula, because the ratio is nonlinear. Branch parameters can be integrated through their posterior distributions, producing branch-specific marginal likelihoods for the observed features; the averaging must also retain dependence between parameters when the posterior induces it.
Worked Example: Averaging a Cell’s Branch Assignment
For illustration, suppose posterior computation for a hypothetical two-lineage model is summarized by a discrete approximation to the posterior for \(q=\pi_A\): \(q=0.4,0.6,0.8\) have posterior weights \(0.2,0.5,0.3\), respectively. For a particular cell, suppose the branch-specific likelihoods after accounting for branch-parameter uncertainty are \(L_A=0.7\) and \(L_B=0.3\). These are relative likelihood values for this cell’s features under the two branches.
At each posterior value of \(q\), the conditional probability of lineage A is \(qL_A/[qL_A+(1-q)L_B]\). The three values are
Averaging with the posterior weights gives \(P(z=A\mid y,\text{data})\approx0.2(0.6087)+0.5(0.7778)+0.3(0.9032)=0.7816\). In contrast, substituting the posterior mean \(E(q)=0.62\) first gives \(0.62(0.7)/[0.62(0.7)+0.38(0.3)]\approx0.7920\). The difference illustrates why posterior averaging is the principled assignment calculation. The reported 0.7816 is approximate because the posterior itself was represented by a discrete approximation.
Computation, diagnostics, and alternatives
A practical Bayesian analysis must check whether the posterior calculations are numerically stable and whether the model is plausible for the data. For a latent-label model, useful diagnostics include checking convergence and mixing of the computation used to explore the posterior, comparing estimates from multiple initial values, and verifying that the reported assignment probabilities do not depend strongly on arbitrary starting labels. Sensitivity to the Dirichlet concentration and to branch-parameter priors is important when the number of cells is modest or branch likelihoods overlap substantially.
Also examine whether the assumed branch distributions are credible for the features used to assign cells. A branch model that fits poorly, or branches whose feature distributions are nearly indistinguishable, cannot support sharply identified assignments merely because a computation returns precise numbers. In that situation, posterior assignment probabilities should tend to remain diffuse or be sensitive to modeling choices. A concentrated posterior can still be wrong if the likelihood omits relevant structure or the sampling assumptions fail.
| Approach | What it provides | Important distinction |
|---|---|---|
| Maximum likelihood or EM | Point estimates of proportions, parameters, and often soft label responsibilities | Does not by itself provide a full posterior distribution; uncertainty requires additional methods. |
| Bayesian posterior inference | Distributions for proportions and branch parameters, with uncertainty propagated to assignments | Results depend on the likelihood, prior, and computational adequacy. |
| Plug-in assignment | A cell probability calculated at fixed fitted parameter values | Can understate uncertainty because it omits parameter uncertainty and is not generally equal to posterior averaging. |
The Bayesian approach is useful when uncertainty in proportions, branch parameters, and labels needs to be propagated together. It does not remove the need to define the target population or to assess the model. The simple Dirichlet update is not appropriate without modification when proportions vary across groups, cells are dependent in ways the model ignores, or labels are uncertain. These issues should be represented in the model rather than hidden by treating cells as independent evidence. A posterior assignment is a measure of uncertainty under that model, not evidence of causation or a guarantee that the inferred trajectory is biologically correct.
A short justification of the conjugate update
For known labels, the multinomial likelihood kernel is \(\prod_k\pi_k^{n_k}\). The Dirichlet prior density kernel is \(\prod_k\pi_k^{\alpha_k-1}\). Multiplying them gives \(\prod_k\pi_k^{\alpha_k+n_k-1}\), which has the form of a Dirichlet density with parameters \(\alpha_k+n_k\). The posterior mean follows from the Dirichlet mean formula, so each observed label adds one count to its lineage’s prior parameter. This derivation depends on known labels; with latent labels, the likelihood must sum or integrate over their uncertainty instead of substituting a single allocation without justification.
Check Your Understanding
Answer each question using the assumptions stated in the tutorial.
- With a \(\operatorname{Dirichlet}(2,3)\) prior and 4 observed labels in lineage A and 6 in lineage B, what is the posterior distribution and its mean for lineage A?
- Why is an EM responsibility of 0.7 not automatically an observed count of 0.7 in the exact Dirichlet posterior update?
- For a two-lineage cell assignment, explain why averaging the conditional assignment probability over the posterior can differ from evaluating it at the posterior mean proportion.
- In the Normal branch-mean example, what assumption permits the stated Normal posterior update, and what uncertainty was excluded by treating the variance as known?
Solutions. (1) The posterior is \(\operatorname{Dirichlet}(2+4,3+6)=\operatorname{Dirichlet}(6,9)\). Its lineage A marginal is \(\operatorname{Beta}(6,9)\), with mean \(6/15=0.4000\). (2) The responsibility represents uncertainty about a latent label; replacing that label by a fractional count does not generally integrate over possible allocations and their parameter uncertainty. (3) The assignment formula is a nonlinear ratio in the proportion and branch likelihoods, so the expectation of the ratio need not equal the ratio evaluated at expectations. (4) The update assumes conditionally independent Normal observations with known common variance and a Normal prior on the mean. It excludes uncertainty about the variance itself.