Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Diagnosing Kinetic Model Misfit

RNA Velocity · Tutorial 405 of 700

Diagnosing Kinetic Model Misfit

Use complementary graphical and numerical diagnostics to identify when an RNA velocity kinetic model does not adequately describe the observed spliced and unspliced expression patterns.

Advanced 12 min read

What You'll Learn

  • State the kinetic assumptions behind steady-state and dynamical phase portraits.
  • Derive the steady-state relationship between unspliced and spliced abundance.
  • Interpret structured residuals as evidence that a fitted model misses systematic patterns.
  • Check whether parameter estimates are plausible and stable across subsets of cells.
  • Distinguish an influential outlier from evidence of a separate regime or broader model failure.
  • Use multiple diagnostics without treating any single plot or statistic as definitive.

Why Diagnose Kinetic Model Misfit?

An RNA velocity estimate is conditional on a kinetic model: it describes how unspliced and spliced RNA are assumed to change over time. A fitted curve may look plausible overall while systematically missing a subset of cells, a phase of the trajectory, or a change in transcriptional behavior. When that happens, the inferred rates and velocity directions can be misleading even if an optimizer has returned precise numerical estimates.

This tutorial focuses on diagnosing that mismatch. The central idea is to compare the model’s implications with the observed phase portrait, the residuals left by the fit, and the fitted parameter values. These are complementary checks: a pattern in one may be difficult to see in another. A diagnostic is evidence to investigate, not automatic proof of a particular biological mechanism.

Model Assumptions and Diagnostic Residuals

For a gene, let \(u(t)\) and \(s(t)\) denote unspliced and spliced RNA abundance at time \(t\), respectively. A common kinetic model is

$$ \frac{du}{dt}=a(t)-\beta u(t), \qquad \frac{ds}{dt}=\beta u(t)-\gamma s(t). $$

Here \(a(t)\) is the transcription rate, \(\beta\) is the splicing rate, and \(\gamma\) is the spliced-RNA degradation rate. The model assumes nonnegative rates, a specified form for how transcription changes over time, and constant splicing and degradation rates over the fitted trajectory. A steady-state phase portrait additionally assumes that the relevant observations are adequately described by equilibrium under a constant transcription rate. A dynamical fit instead allows the abundance to change over time according to the specified transcriptional history, often with a switch between transcriptional regimes.

These assumptions concern the mean behavior represented by the model. Observed counts or normalized abundances vary around that behavior. Accordingly, a residual is a discrepancy between an observation and the model’s prediction; it can reflect model failure, observation variability, or both. For a fitted phase-portrait curve \(s=f(u;\theta)\), where \(\theta\) denotes its parameters, a useful vertical residual is

$$ r_i=s_i-f(u_i;\hat{\theta}). $$

A positive residual means the observed spliced abundance is above the fitted curve at that unspliced abundance; a negative residual means it is below. For a time-indexed dynamical fit, residuals can instead be defined separately for unspliced and spliced abundance by subtracting the fitted trajectory at the assigned time. These definitions are not interchangeable: vertical residuals in a phase portrait describe distance in the \(s\)-direction, while trajectory residuals compare both coordinates with predictions at a specified time.

Definition: Kinetic model misfit is a systematic discrepancy between the observed expression pattern and the pattern predicted by a stated kinetic model. A residual pattern is systematic when its sign or size varies with an explanatory feature—such as abundance, trajectory time, or a cell group—instead of fluctuating around zero without a discernible structure.

What a Steady-State Phase Portrait Implies

At equilibrium with constant transcription, both derivatives in the kinetic equations equal zero. The first equation gives \(a=\beta u^*\), and the second gives \(\beta u^*=\gamma s^*\), where \(u^*\) and \(s^*\) are equilibrium abundances. Thus, when the rates are positive, the steady-state phase portrait has a linear relationship through the origin:

$$ s^*=\frac{\beta}{\gamma}u^*. $$

The slope is a ratio of rates, not a direct measure of either rate alone. This relationship is a useful reference, but points departing from it do not by themselves establish that the steady-state model is wrong: cells changing expression over time are not necessarily at equilibrium. A departure may instead reflect transient dynamics, a different regime, an influential observation, or variability in the measurements.

A short derivation also clarifies why residual structure matters. Suppose a model correctly describes the conditional mean of the observed spliced abundance at each \(u_i\), so that \(s_i=f(u_i;\theta)+\epsilon_i\), with \(E(\epsilon_i\mid u_i)=0\). If the parameters were known, then

$$ E\{s_i-f(u_i;\theta)\mid u_i\} =E(\epsilon_i\mid u_i)=0. $$

Consequently, a persistent sequence of positive residuals at high abundance, for example, is not what this mean model predicts. It suggests the curve may be missing structure. In practice, parameters are estimated from the same observations, so residuals are not independent and the argument is a diagnostic principle rather than a formal test. Correlated observations and uneven variability also make simple residual thresholds unreliable.

Worked Example: A Residual Pattern Across Abundance

Suppose a hypothetical steady-state fit gives \(\hat{s}=1.5u\), with abundances measured in the same normalized units. Four cells have \((u,s)\) values \((2,3.1)\), \((4,5.8)\), \((6,14)\), and \((8,18)\). Calculate the vertical residuals and assess the pattern.

For each cell, \(r_i=s_i-1.5u_i\). The calculations are \(3.1-1.5(2)=0.1\), \(5.8-1.5(4)=-0.2\), \(14-1.5(6)=5\), and \(18-1.5(8)=6\), all in normalized abundance units.

The first two residuals are close to zero, while both observations at the larger \(u\) values lie well above the fitted curve. The mean residual for the first two cells is \((0.1-0.2)/2=-0.05\); for the last two it is \((5+6)/2=5.5\). This abundance-related pattern is more concerning than one large residual with no accompanying structure. It indicates that the single fitted line may not describe the full range well. Possible explanations include transient dynamics or distinct regimes; these numbers alone cannot identify which explanation is correct.

Reading Residuals From a Dynamical Fit

For a dynamical model, inspect discrepancies in both abundance coordinates and in the order of the fitted trajectory. If the observations are assigned times \(t_i\), define \(r_{u,i}=u_i-\hat{u}(t_i)\) and \(r_{s,i}=s_i-\hat{s}(t_i)\). Plot these residuals against fitted time, fitted abundance, and any relevant cell grouping. A run of residuals with the same sign over part of the trajectory may indicate a missed switch, a poorly specified transcriptional history, or a rate that is not adequately represented as constant.

The differential equations also provide an instantaneous check. At a given state and transcription rate, the model predicts the velocity components \(a-\beta u\) and \(\beta u-\gamma s\). If locally estimated changes repeatedly disagree with those predictions, the assumed dynamics deserve scrutiny. Such local estimates can be noisy, particularly when cells are not observed repeatedly over time; a discrepancy in one location should therefore be checked against the full trajectory and the uncertainty of the fit.

Worked Example: Checking a Local Dynamical Prediction

Consider a hypothetical fitted regime with \(a=8\) abundance units per hour, \(\beta=0.4\) per hour, and \(\gamma=0.2\) per hour. At a state with \(u=10\) and \(s=15\) abundance units, calculate the predicted derivatives. Suppose a local trajectory estimate at comparable states is \(du/dt=3.8\) and \(ds/dt=-2.0\) abundance units per hour.

The model predicts \(du/dt=8-0.4(10)=4.0\) units per hour and \(ds/dt=0.4(10)-0.2(15)=1.0\) unit per hour. Define local discrepancies as estimated derivative minus predicted derivative. They are \(3.8-4.0=-0.2\) for unspliced RNA and \(-2.0-1.0=-3.0\) for spliced RNA, in abundance units per hour.

The unspliced discrepancy is small in this example, but the spliced discrepancy is substantial and has the opposite sign from the predicted derivative. If the local estimate is reliable and similar discrepancies recur, the fitted dynamics may be missing a feature of the trajectory. A single comparison is not conclusive: uncertainty in the local derivative, an incorrect time or regime assignment, or a transcriptional switch near the state could also account for it.

Parameter Estimates and Multiple Regimes

Parameter estimates are another diagnostic, not merely the final output of a fit. Estimates should be interpreted in the units used for time and abundance. Rates \(\beta\) and \(\gamma\) should be nonnegative and have units of inverse time; a negative estimated rate contradicts the model’s biological rate interpretation. Extremely large or small rates, a switch time outside the observed time range, or estimates that change markedly when a small set of cells is removed can signal weak information in the data or a poor fit. These signs do not alone establish which parameter or assumption is responsible.

A single regime can also conceal several systematic patterns. For example, cells from two groups may follow different phase-portrait relationships, or one part of the trajectory may follow a transient path that a steady-state line cannot represent. Compare residuals across groups and trajectory regions. If a pattern is concentrated in one group, investigate whether the grouping is scientifically meaningful and whether a shared-rate assumption is tenable. Do not infer separate biological mechanisms just because a more flexible fit can reduce residuals: added flexibility can fit random variation as well as real structure.

Worked Example: Influence of One Phase-Portrait Observation

To illustrate sensitivity, consider five hypothetical points: \((2,3)\), \((4,6)\), \((6,9)\), \((8,12)\), and \((10,30)\), in normalized abundance units. Fit a line through the origin by least squares solely as a diagnostic summary. Its slope is \(\hat{b}=\sum_i u_i s_i/\sum_i u_i^2\).

Using all five points, the numerator is \(2(3)+4(6)+6(9)+8(12)+10(30)=480\), and the denominator is \(2^2+4^2+6^2+8^2+10^2=220\). Therefore \(\hat{b}=480/220=2.182\) to three decimal places. The last point’s residual from this line is \(30-2.182(10)=8.18\) normalized units.

Using only the first four points, the numerator is \(6+24+54+96=180\), and the denominator is \(4+16+36+64=120\), giving slope \(180/120=1.5\). The large change from 1.5 to 2.182 shows that the fitted slope is sensitive to the last observation. That observation may be an outlier, but it could instead represent another regime or a departure from the line. The diagnostic conclusion is to investigate its influence and context, not to delete it automatically.

A Practical Diagnostic Sequence

1
Check the fitted object.
Confirm which model was fitted, what assumptions it makes about transcription and rates, and whether the abundances and time units used in fitting match the interpretation of its parameters.
2
Inspect the phase portrait and trajectory.
Look for curvature, separated bands, abrupt changes, or observations lying consistently on one side of the fitted pattern. A visual deviation is a prompt for further checks, not a diagnosis by itself.
3
Plot residuals against relevant features.
Check their signs and sizes against abundance, fitted time, and cell groups. Patterns can reveal where the model fails even when an overall summary appears acceptable.
4
Check estimates and sensitivity.
Assess whether the rates and switch times are compatible with their definitions and observed range. Refit after omitting a suspicious point or changing a subset, as a sensitivity analysis rather than a rule for removal.
5
Compare explanations cautiously.
Ask whether the mismatch is isolated, group-specific, or spread across the trajectory. Consider plausible alternative assumptions and seek supporting evidence before interpreting the pattern biologically.

Diagnostics, Alternatives, and Limits

A phase-portrait check is quick and communicates geometry; residual plots make systematic deviations easier to locate; parameter and sensitivity checks reveal instability that may be hard to see visually. None replaces the others. A formal goodness-of-fit procedure, when its assumptions are justified, can summarize discrepancy relative to a specified variability model. But a single test statistic does not show where the model fails, and calibration can be unreliable if the observations are dependent or the variability model is wrong. A more flexible model may capture multiple regimes, but it also adds assumptions and parameters. Comparing alternatives should therefore include the structure of residuals and parameter stability, not only whether one fit looks better.

A particularly common mistake is to treat every point away from a steady-state line as a bad observation. That reasoning assumes all cells are at equilibrium, even though a dynamic trajectory can depart from equilibrium while following the kinetic equations. The correction is to ask whether the deviation is consistent with the model’s predicted dynamics and whether it is isolated or systematic. Likewise, a large residual is not proof that a cell should be discarded. It may be a measurement issue, a genuine distinct regime, or evidence that the fitted model is incomplete.

These diagnostics have limits. Residual patterns can be hard to distinguish from variability, fitted parameters may be weakly determined, and conclusions depend on how cells are assigned to a trajectory or regime. A good fit does not prove that the biological assumptions are true; it shows only that the model has not displayed an obvious mismatch under the checks used. When diagnostics disagree, report the uncertainty and avoid presenting a single fitted velocity as an unquestionable description of the dynamics.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Under constant transcription at equilibrium, what phase-portrait slope does the kinetic model predict?
  2. A group of high-abundance cells has mostly positive vertical residuals. What does this pattern suggest, and what does it not establish?
  3. Why is a negative estimate of \(\gamma\) a warning sign under the stated model?
  4. A single observation changes a fitted slope substantially when included. What is an appropriate conclusion and next step?

Solutions. (1) Setting both derivatives to zero gives \(\beta u^*=\gamma s^*\), so \(s^*=(\beta/\gamma)u^*\) and the slope is \(\beta/\gamma\). (2) The fitted curve may systematically underpredict spliced abundance in that range, but the pattern does not identify its cause or prove a separate biological regime. Check other residual patterns and the fit assumptions. (3) \(\gamma\) is a degradation rate and is assumed nonnegative; a negative estimate conflicts with that interpretation and may indicate misfit or weak estimation. (4) The slope is sensitive to that observation, so investigate its data and context and perform sensitivity checks. The change alone does not justify deleting the point or labeling it an error.

Clinical Biostats