Tutorials › Stochastic Differential Equations in Pharmacokinetics › Initial State Distributions and Diffuse Initialization

Kalman Filter and Extended Kalman Filter · Tutorial 64 of 100

Initial State Distributions and Diffuse Initialization

Specify and propagate finite or diffuse initial-state uncertainty, then see how each changes the first concentration updates.

Advanced 12 min read

What You'll Learn

  • Distinguish an informative Gaussian initial state from an exact diffuse initialization.
  • Propagate finite and diffuse covariance components through a linear state transition.
  • Derive the scalar exact diffuse measurement update and identify when it applies.
  • Calculate early concentration updates under informative and diffuse initial assumptions.
  • Diagnose unresolved diffuse directions and the limitations of large-variance approximations.

Why the Initial State Matters

A Kalman filter begins with a distribution for the state before it uses the first observation. In pharmacokinetics, that state might contain compartment amounts, concentrations, or latent effects. If its initial mean or uncertainty is poorly specified, the first concentration updates can reflect the chosen starting assumption as much as the data. This matters especially when observations begin soon after a dose, when the model has not yet had time to reduce uncertainty through state evolution.

An informative initialization assigns finite uncertainty to every state direction. A diffuse initialization represents a direction whose initial level is not assigned a proper finite variance. Diffuse initialization is not a claim that the state has literally infinite variance; it is a limiting device that lets the data determine an initially unknown level without choosing an arbitrary, very large variance.

Definition: An informative initial state has a proper distribution, commonly \(x_0\sim N(a_0,P_0)\), where \(a_0\) is the initial mean and \(P_0\) is a finite positive semidefinite covariance matrix. An exact diffuse initialization represents the initial covariance in the limiting form \(P_0(\kappa)=\kappa P_{\infty,0}+P_{*,0}\) as \(\kappa\to\infty\). Here \(P_{\infty,0}\) is positive semidefinite and identifies diffuse directions, while \(P_{*,0}\) is the finite covariance component. The limiting representation is a computational and inferential convention, not a proper Gaussian distribution at \(\kappa=\infty\).

This tutorial uses a linear Gaussian state transition \(x_{k+1}=A_kx_k+b_k+w_k\), with \(w_k\sim N(0,Q_k)\), and a linear concentration observation \(y_k=H_kx_k+\varepsilon_k\), with \(\varepsilon_k\sim N(0,R_k)\). The observation errors are independent of the state and process errors, and \(R_k>0\) for the scalar observations considered below. The known input \(b_k\), including a known dose contribution, changes the predicted mean but not the covariance. For a concentration obtained by scaling a central amount \(x_k\), for example, \(H_k\) can include the reciprocal of the relevant volume.

Propagating Initial Uncertainty

The state prediction carries both parts of the initial covariance forward. If the current mean is \(a_k\), the predicted mean is \(a_{k+1|k}=A_ka_k+b_k\). For an informative covariance \(P_k\), the predicted covariance is \(P_{k+1|k}=A_kP_kA_k^{\mathsf T}+Q_k\). For a diffuse representation, apply the same linear transformation separately to its two components:

$$ P_{\infty,k+1|k}=A_kP_{\infty,k}A_k^{\mathsf T}, \qquad P_{*,k+1|k}=A_kP_{*,k}A_k^{\mathsf T}+Q_k. $$

The distinction is important: process noise adds to the finite component, not to the diffuse component. A state transition may also change the rank of the diffuse component. For example, if a transition maps an initially unknown direction to zero, that uncertainty no longer appears in the next state; if the transition preserves the direction, the uncertainty remains diffuse.

Result: Under the linear Gaussian transition above, if the current covariance is \(P(\kappa)=\kappa P_\infty+P_*\), then the predicted covariance is exactly \(\kappa(AP_\infty A^{\mathsf T})+(AP_*A^{\mathsf T}+Q)\) for every finite \(\kappa\). Thus the displayed diffuse and finite propagation equations follow by collecting the coefficient of \(\kappa\) and the terms independent of \(\kappa\).

Worked Example: Propagating an Informative Amount Distribution

Suppose a one-compartment amount state has a one-interval transition coefficient \(A=0.5\), and the process variance over that interval is \(Q=3\). Before the transition, let \(x\sim N(20,16)\). A known input of 4 amount units is added during the interval. Find the predicted mean and variance.

The predicted mean is \(0.5(20)+4=14\). The deterministic input contributes to the mean. The predicted variance is \(A^2P+Q=(0.5)^2(16)+3=4+3=7\). Therefore the predicted state is \(N(14,7)\). The variance is not \(16+3\): the transition scales the initial uncertainty by \(A^2\) before process variance is added.

Exact Diffuse Measurement Updates

Consider one scalar observation \(y=Hx+\varepsilon\), where \(H\) is a row vector and \(\varepsilon\sim N(0,R)\). Suppose the predicted state has mean \(a\) and covariance \(\kappa P_\infty+P_*\). Define the innovation \(v=y-Ha\), the diffuse innovation variance \(F_\infty=HP_\infty H^{\mathsf T}\), and the finite innovation variance \(F_*=HP_*H^{\mathsf T}+R\). The following update applies when \(F_\infty>0\), so this observation contains information about at least one diffuse direction.

$$ K_\infty=\frac{P_\infty H^{\mathsf T}}{F_\infty}, \qquad a^+=a+K_\infty v, $$
$$ P_\infty^+=P_\infty- \frac{P_\infty H^{\mathsf T}HP_\infty}{F_\infty}, \qquad P_*^+=P_*-K_\infty HP_*-P_*H^{\mathsf T}K_\infty^{\mathsf T} +K_\infty F_*K_\infty^{\mathsf T}. $$

Here \(a^+\), \(P_\infty^+\), and \(P_*^+\) denote the updated mean and covariance components. The finite covariance formula accounts for the first finite-order contribution to the ordinary Gaussian update; it is not obtained by simply applying an ordinary Kalman update to \(P_\infty\).

1
Write the finite-\(\kappa\) update.
The ordinary gain is \(K(\kappa)=(\kappa P_\infty H^{\mathsf T}+P_*H^{\mathsf T})/(\kappa F_\infty+F_*)\). The updated mean is \(a+K(\kappa)v\).
2
Take the mean limit.
For \(F_\infty>0\), division of numerator and denominator by \(\kappa\) gives \(K(\kappa)\to K_\infty\). Hence the limiting mean is \(a+K_\infty v\).
3
Separate covariance orders.
Apply \(P^+=P-K(\kappa)HP\), with \(P=\kappa P_\infty+P_*\), and collect the coefficient of \(\kappa\) and the finite term. The coefficient gives \(P_\infty^+\); the finite term gives the displayed \(P_*^+\).

For completeness, set \(U=P_\infty H^{\mathsf T}\) and \(W=P_*H^{\mathsf T}\). The gain expansion is \(K(\kappa)=U/F_\infty+\kappa^{-1}(W/F_\infty-UF_*/F_\infty^2)+O(\kappa^{-2})\). Substituting this and \(P=\kappa P_\infty+P_*\) into \(P^+=P-K(\kappa)HP\), the coefficient of \(\kappa\) is \(P_\infty-UU^{\mathsf T}/F_\infty\). The finite term simplifies to \(P_*-K_\infty HP_*-P_*H^{\mathsf T}K_\infty^{\mathsf T}+K_\infty F_*K_\infty^{\mathsf T}\), as stated. This proves the scalar-observation update formulas. \(\square\)

Worked Example: One Observation Resolves a Scalar Diffuse State

Let the scalar state have predicted mean \(a=10\), \(P_\infty=2\), and \(P_*=3\). The observation is \(y=24\), with \(H=2\) and \(R=1\). Calculate the updated mean and both covariance components.

The innovation is \(v=24-2(10)=4\). The diffuse innovation variance is \(F_\infty=HP_\infty H^{\mathsf T}=2(2)(2)=8\). Thus \(K_\infty=P_\infty H^{\mathsf T}/F_\infty=(2\cdot2)/8=0.5\), and the updated mean is \(10+0.5(4)=12\).

The updated diffuse component is \(P_\infty^+=2-(2\cdot2)(2\cdot2)/8=2-16/8=0\). The finite innovation variance is \(F_*=2(3)(2)+1=13\). Therefore \(P_*^+=3-(0.5)(2)(3)-(3)(2)(0.5)+(0.5)(13)(0.5)=3-3-3+3.25=0.25\). The observation removes the scalar diffuse direction, leaving finite posterior variance \(0.25\).

What the First Concentration Data Can—and Cannot—Resolve

A concentration observation only reduces diffuse uncertainty in directions that affect the observed concentration. For a scalar observation, \(F_\infty=HP_\infty H^{\mathsf T}\) measures the diffuse contribution to its uncertainty. If \(F_\infty=0\), this particular observation has no diffuse component in its prediction. The update above is then inapplicable: it cannot be used with division by zero, and it cannot claim to resolve a diffuse direction. The measurement may still update finite uncertainty through \(F_*\).

Worked Example: A Single Concentration Leaves a Diffuse Contrast

Consider two state components with \(P_\infty=\begin{bmatrix}4&0\\0&9\end{bmatrix}\) and one observation with \(H=\begin{bmatrix}1&1\end{bmatrix}\). Find the diffuse covariance after this observation.

First, \(F_\infty=HP_\infty H^{\mathsf T}=4+9=13\), and \(P_\infty H^{\mathsf T}=\begin{bmatrix}4\\9\end{bmatrix}\). Therefore \(P_\infty^+=\begin{bmatrix}4&0\\0&9\end{bmatrix}-\frac{1}{13}\begin{bmatrix}16&36\\36&81\end{bmatrix} =\frac{1}{13}\begin{bmatrix}36&-36\\-36&36\end{bmatrix}\).

This matrix is not zero: the observation reduces the two diffuse directions to one remaining diffuse contrast. Indeed, multiplying by \(\begin{bmatrix}1\\1\end{bmatrix}\) gives zero, while the vector \(\begin{bmatrix}1\\-1\end{bmatrix}\) is an eigenvector with eigenvalue \(72/13\). The measured sum is no longer diffuse, but the unmeasured contrast remains uncertain without a finite bound.

In a pharmacokinetic application, whether an initial amount is identifiable from an early concentration depends on the observation mapping and state dynamics, not just on how many measurements are collected. Repeated observations can resolve additional directions if their observation mappings or intervening transitions provide new information. Repeating an observation that is insensitive to a remaining diffuse direction does not, by itself, make that direction finite.

Informative, Exact Diffuse, and Large-Variance Choices

InitializationInterpretationMain strengthImportant limitation
Informative finite covarianceA proper prior distribution for the initial stateUses genuine prior information and ordinary Kalman updatesAn overly confident or poorly chosen prior can dominate early data
Exact diffuseA limiting representation for initially unbounded uncertainty in specified directionsAvoids selecting an arbitrary large variance and tracks unresolved directionsRequires diffuse-specific updates when \(F_\infty>0\); it is not a proper prior distribution
Large finite varianceA proper covariance such as \(\kappa P_\infty+P_*\) for a chosen large \(\kappa\)Can use standard finite-covariance softwareResults depend on \(\kappa\), and numerical conditioning can be poor

An exact diffuse update is a principled alternative to setting an extremely large initial variance. For a finite but large \(\kappa\), an ordinary update remains mathematically valid, but computations can lose precision when large covariance terms are combined or when the filter is implemented with limited numerical accuracy. Conversely, exact diffuse initialization is not a substitute for a genuinely informative prior: if prior knowledge supports a finite uncertainty, encoding that information in \(P_*\) is more appropriate than declaring the direction diffuse.

A useful diagnostic is to inspect the rank and scale of \(P_\infty\) after each early observation. A decrease in rank indicates that some diffuse uncertainty has been resolved; directions left in the null space of the observation mapping may remain diffuse. Also check that the finite covariance remains symmetric and positive semidefinite up to numerical tolerance. A negative variance, an unexplained increase in diffuse rank, or a division by a near-zero \(F_\infty\) can indicate a coding or conditioning problem. When \(F_\infty\) is zero or numerically tiny, do not apply the diffuse scalar formula as if the observation resolved diffuse uncertainty.

Common pitfall: Replacing an exact diffuse covariance by a huge number and then interpreting the first ordinary Kalman update as if it were independent of that number is incorrect. The gain and posterior covariance at finite \(\kappa\) still depend on \(\kappa\), and the arithmetic may be unstable. Use a stated finite prior when one is intended, or use an exact diffuse update when the initial uncertainty is genuinely treated as diffuse.

Check Your Understanding

Work through the questions, then compare your calculations with the solutions below.

  1. An informative scalar state has variance 16, transition coefficient 0.5, and process variance 3. What is its predicted variance?
  2. For \(P_\infty=2\) and \(H=2\), calculate \(F_\infty\) and the updated diffuse covariance after one scalar observation.
  3. For \(P_\infty=\begin{bmatrix}4&0\\0&9\end{bmatrix}\) and \(H=\begin{bmatrix}0&1\end{bmatrix}\), does the observation remove all diffuse uncertainty?
  4. Why does a known dose input affect the predicted mean but not the predicted covariance in the linear state model?
  5. Give one reason to prefer exact diffuse initialization to a very large finite initial variance, and one limitation of exact diffuse initialization.

Solutions. 1. The predicted variance is \(0.5^2(16)+3=4+3=7\). 2. \(F_\infty=2(2)(2)=8\), and \(P_\infty^+=2-(2\cdot2)(2\cdot2)/8=2-16/8=0\), so this scalar diffuse direction is resolved. 3. No. Here \(F_\infty=9\), and the update removes the second component's diffuse variance: \(P_\infty^+=\begin{bmatrix}4&0\\0&9\end{bmatrix}-\begin{bmatrix}0&0\\0&9\end{bmatrix}=\begin{bmatrix}4&0\\0&0\end{bmatrix}\). The first component remains diffuse because the observation does not measure it. 4. A known dose is a deterministic additive term in the state mean, while covariance depends on random uncertainty; adding a constant does not change variance. 5. Exact diffuse initialization avoids choosing an arbitrary large \(\kappa\), but it is not a proper probability distribution and requires diffuse-specific updates when the observation contains diffuse uncertainty.

Clinical Biostats