Tutorials › Quantitative Systems Pharmacology (QSP) › Sensitivity of Threshold, Crossing-Time, and Event Outcomes

Sensitivity Analysis and Model Reduction · Tutorial 672 of 799

Sensitivity of Threshold, Crossing-Time, and Event Outcomes

Distinguish discontinuous event indicators from probability summaries, derive when crossing-time derivatives are valid, and assess sensitivity estimates near thresholds.

Advanced 13 min read

What You'll Learn

  • Define threshold exceedance and first-crossing outcomes for a simulated trajectory.
  • Derive the crossing-time sensitivity formula and its conditions of validity.
  • Explain why an event indicator can jump even when the underlying trajectory varies smoothly.
  • Calculate event probabilities and their sensitivities in a simple uncertain-parameter model.
  • Recognize boundary effects that destabilize rankings and Monte Carlo estimates.
  • Compare direct event indicators, crossing times, and probability-based summaries.

Why Event Outcomes Need Special Care

Many QSP questions are framed as events: does a biomarker exceed a safety threshold, does receptor occupancy reach a target, or how long does it take a response to cross a specified level? These outputs are clinically interpretable, but their dependence on model parameters can behave differently from the dependence of a smooth time-course summary such as an average concentration.

A small parameter change may barely alter a trajectory while changing a binary answer from “no exceedance” to “exceedance.” A crossing time can be more informative than that binary answer, but its sensitivity is meaningful only when the crossing is well-defined and stable. Probability-based summaries can sometimes provide a smoother view across parameter uncertainty, though they have their own assumptions and sampling error.

Definition: Let \(y(t,\theta)\) be a model output over an observation interval \([0,T]\), where \(\theta\) is a parameter vector, and let \(c\) be a fixed threshold. The threshold-exceedance indicator is \(I(\theta)=1\) if \(y(t,\theta)>c\) for at least one \(t\in[0,T]\), and \(I(\theta)=0\) otherwise. If \(y(t,\theta)\) is continuous in \(t\), the first crossing time is \(\tau(\theta)=\inf\{t\in[0,T]:y(t,\theta)=c\}\), when this set is nonempty. The indicator records whether an event occurs; the crossing time records when the threshold is first reached.

The strict inequality in the exceedance definition matters: a trajectory that only touches \(c\) without exceeding it has \(I(\theta)=0\). Other event definitions are possible, but the convention must be stated because equality at the boundary can change the event label. The crossing-time definition is likewise specific: it uses the first equality with the threshold, not the time of a later peak or a downward recrossing.

When a Crossing-Time Derivative Is Valid

Suppose one parameter, \(\theta_j\), varies while the other parameters remain fixed. A crossing time is locally differentiable if the equation \(y(\tau,\theta)=c\) defines a unique, stable root near the parameter value of interest. A nonzero time slope at the crossing is essential: if the trajectory merely touches the threshold, a small perturbation can remove the crossing or create multiple nearby crossings.

For a first crossing on a restricted interval, a transverse root alone is not sufficient. The crossing must lie in the interior of the observation interval, and nearby parameter values must retain that root as the first crossing. One useful set of sufficient conditions at the nominal parameter value is: \(y\) is continuously differentiable near \((\tau,\theta)\); \(0<\tau<T\); \(y(\tau,\theta)=c\); \(y_t(\tau,\theta)\ne0\); and \(y(t,\theta)<c\) for every \(t<\tau\). In addition, choose a small neighborhood of \(\tau\) contained in \((0,T)\) where the time slope keeps one nonzero sign. On the earlier compact interval outside this neighborhood, the trajectory must remain strictly below \(c\). Continuity then preserves that earlier gap for sufficiently small parameter changes, while the nonzero time slope gives a unique nearby root. These conditions ensure the continued root remains the first crossing and stays inside \([0,T]\).

$$ y(\tau(\theta),\theta)=c $$

Differentiate this identity with respect to \(\theta_j\), holding the other parameters fixed. The chain rule gives \(y_t\,\partial\tau/\partial\theta_j+y_{\theta_j}=0\), evaluated at the crossing. Since \(y_t\ne0\), solving for the derivative yields the local sensitivity formula.

$$ \frac{\partial \tau}{\partial\theta_j} = -\frac{y_{\theta_j}(\tau,\theta)}{y_t(\tau,\theta)} $$

The units are time per unit of \(\theta_j\). The formula also gives a useful interpretation: a parameter that raises the output at the crossing tends to advance an upward crossing, while a steep trajectory reduces the time shift caused by a given output perturbation. The derivative can become very large when \(y_t\) is close to zero. That is a warning of a nearly tangential crossing, not evidence of a robustly estimated large effect.

Worked Example: Sensitivity of an Interior Upward Crossing

Consider the hypothetical trajectory \(y(t,\theta)=2(1+\theta)t\) in mg/L, with \(t\) in hours, threshold \(c=2\) mg/L, and parameter \(\theta\) near 0. The observation interval is \([0,2]\) hours. Find the first crossing and its local sensitivity at \(\theta=0\).

For \(\theta\) near 0, the trajectory increases from zero, so the first crossing solves \(2(1+\theta)\tau=2\). Thus \(\tau(\theta)=1/(1+\theta)\) hours. At \(\theta=0\), the crossing is at 1 hour, strictly inside the observation interval. The trajectory is below threshold before that time, and the slope is \(y_t=2(1+\theta)\), which is positive near 0. The crossing therefore persists as the first crossing for sufficiently small changes in \(\theta\).

At \(\theta=0\), \(y_{\theta}=2t=2\) mg/L per unit \(\theta\) at \(t=1\), and \(y_t=2\) mg/L per hour. Applying the formula gives

$$ \left.\frac{\partial\tau}{\partial\theta}\right|_{\theta=0} =-\frac{2\ \text{mg/L per unit }\theta}{2\ \text{mg/L per hour}} =-1\ \text{hour per unit }\theta. $$

As a check, increasing \(\theta\) from 0 to 0.01 changes the crossing time from 1 hour to \(1/1.01=0.9901\) hours, a change of about \(-0.00990\) hour. This is consistent with the local derivative of \(-1\) hour per unit \(\theta\).

Why Binary Event Sensitivity Can Be Unstable

The trajectory may change smoothly with \(\theta\), but \(I(\theta)\) is discontinuous at a genuine event boundary, where event and no-event outcomes occur arbitrarily nearby. Merely reaching the threshold does not establish that a parameter value is such a boundary. Consequently, a derivative of the binary indicator is generally not an ordinary finite quantity at the boundary. Away from a boundary, the indicator is locally constant and its derivative is zero, which can also conceal important changes elsewhere in the parameter range.

This behavior affects local finite differences. If a perturbation crosses the event boundary, the difference quotient can be large and depend strongly on the perturbation size. If it does not cross the boundary, the quotient is zero. A single local estimate can therefore be uninformative about how event status changes across plausible parameter values.

Worked Example: A Finite Difference Across an Event Boundary

Suppose a hypothetical peak response is \(M(\theta)=0.98+0.05\theta\) mg/L and the event is \(M(\theta)>1.00\) mg/L. At \(\theta=0\), the event does not occur; at \(\theta=0.50\), the peak equals 1.005 mg/L, so it does occur. Calculate the forward difference quotient for the indicator using a step of 0.50.

The event boundary solves \(0.98+0.05\theta=1.00\), giving \(\theta=0.40\). Thus \(I(0)=0\), while \(I(0.50)=1\). The quotient is

$$ \frac{I(0.50)-I(0)}{0.50} = \frac{1-0}{0.50} =2\ \text{per unit }\theta. $$

This number is not a stable local derivative of the indicator. A smaller step that remains below the boundary would give a quotient of zero, while a step that crosses it would produce a nonzero quotient whose size depends on that step. The underlying peak response has a well-defined slope of 0.05 mg/L per unit \(\theta\); the instability arises from converting it into a binary label at a fixed threshold.

Probability-Based Summaries Across Parameter Uncertainty

When parameters are represented by an uncertainty distribution, the probability of an event can be more informative than the indicator at one parameter vector. Let \(\Theta\) be a random parameter vector and define \(p=P(I(\Theta)=1)\). This quantity answers how often the model predicts the event under the specified parameter uncertainty. It is not the probability that the event will occur in a patient unless the model, uncertainty distribution, and interpretation support that clinical claim.

A probability can vary smoothly as a model feature changes, even though each individual indicator remains discontinuous. For example, if a scalar uncertain input \(X\) has cumulative distribution function \(F\), and an event occurs when \(a+X>c\), then

$$ p(a)=P(X>c-a)=1-F(c-a). $$

If \(X\) has a density \(f\) that is continuous at \(c-a\), differentiating gives \(dp/da=f(c-a)\). This result requires the stated distributional and differentiability conditions. It says that the probability is most sensitive to a shift in \(a\) where substantial probability density lies near the event boundary. It does not make the individual event indicator differentiable.

Worked Example: Probability and Sensitivity of Exceedance

Let \(X\) be a hypothetical uncertain baseline response, uniformly distributed from 0 to 1 mg/L. The peak response is \(M=a+X\), and an event occurs if \(M>1\) mg/L. Calculate the event probability and its sensitivity at \(a=0.40\) mg/L, where \(0<a<1\) mg/L.

The event requires \(X>1-a\). A uniform distribution on this interval has density 1 per mg/L, so the event probability is the length of the interval from \(1-a\) to 1 mg/L divided by the full interval length of 1 mg/L:

$$ p(a)=\frac{1-(1-a)}{1}= \frac{a}{1\ \text{mg/L}} \qquad (0<a<1\ \text{mg/L}). $$

At \(a=0.40\) mg/L, \(p=0.40\). The derivative is \(dp/da=1/(1\ \text{mg/L})=1\) per mg/L. Thus, locally, increasing \(a\) by 0.01 mg/L increases the event probability by about 0.01, or one percentage point. This derivative is valid within the stated range; outside it, the probability is capped at 0 or 1 and the derivative changes.

For illustration, ten hypothetical draws of \(X\) are 0.05, 0.16, 0.27, 0.38, 0.49, 0.60, 0.71, 0.82, 0.93, and 0.99 mg/L. At \(a=0.40\), the strict event condition is \(X>0.60\); four draws meet it, giving the Monte Carlo estimate \(4/10=0.40\). At \(a=0.41\), the condition is \(X>0.59\); five draws meet it, giving \(5/10=0.50\). The exact probability rises only to 0.41. The finite-sample jump illustrates why estimated probability differences can be noisy even when the true probability changes smoothly.

Diagnostics, Rankings, and Alternatives

Sensitivity analysis of event outcomes should examine the event boundary, not just report a ranked list. For crossing times, inspect whether crossings are interior, transverse, and consistently first; compare analytic or solver-based derivatives with finite perturbations in both directions. For exceedance indicators, inspect how many sampled parameter sets lie near the threshold and how often small perturbations change their event label. For probability estimates, report the number of parameter draws, the estimated event frequency, and its Monte Carlo uncertainty. With \(N\) independent draws and event probability \(p\), the sample proportion has standard error approximately \(\sqrt{p(1-p)/N}\); in practice \(p\) is replaced by the estimated proportion.

A ranking can be unstable when only a few simulations lie near the event boundary. Small changes in sample, parameter perturbation, or threshold can then alter which parameter appears most influential. If the event never occurs or always occurs in the sampled range, the indicator has zero sample variance, so variance-based indices for that indicator cannot be estimated meaningfully from those data. A zero estimate in this situation does not establish that the parameter is irrelevant outside the sampled range.

Outcome choiceWhat it answersMain caution
Binary event indicatorWhether the threshold is exceeded for a specified parameter setDiscontinuous at the event boundary; local differences can depend on step size
First-crossing timeWhen the threshold is first reachedUndefined if there is no crossing; unstable near tangencies or interval endpoints
Event probabilityHow often the event occurs under a specified parameter distributionDepends on that distribution and can have appreciable Monte Carlo error
Continuous margin, such as peak minus thresholdHow far a trajectory lies above or below the event boundaryRetains magnitude but is not itself a binary event probability

These outcomes are alternatives, not interchangeable versions of the same sensitivity target. A continuous margin can help diagnose proximity to a boundary, but it does not answer whether the event occurs. A crossing time is appropriate only for trajectories that cross and satisfy the regularity conditions. An event probability summarizes uncertainty over parameter draws, so its interpretation changes if the input distribution changes. The choice should follow the scientific question and be stated alongside any sensitivity ranking.

Common pitfall: “The crossing is transverse, so its first-crossing time is differentiable on the observation interval.” This is incomplete: a transverse root at an interval endpoint may disappear from the interval after a small parameter change, and another earlier crossing could invalidate the root as the first crossing. Require an interior root and conditions that preserve its status as the first crossing. Only then use the implicit-function formula.

A second practical warning is to interpret a large crossing-time derivative in light of the local trajectory slope. The denominator \(y_t\) is small near a grazing contact, so small output changes can produce large changes in crossing time or eliminate the crossing altogether. In that regime, reporting only a derivative can overstate precision; show the trajectory, threshold, crossing status, and nearby perturbation behavior.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A trajectory first reaches its threshold at \(t=0.2\) hours on an observation interval \([0,4]\) hours. Is an interior crossing condition satisfied? Name one other condition needed to justify a local first-crossing derivative.
  2. At a valid crossing, \(y_{\theta_j}=0.12\) mg/L per unit parameter and \(y_t=0.30\) mg/L per hour. Calculate \(\partial\tau/\partial\theta_j\) and state its units.
  3. Why can a finite-difference sensitivity of a binary event indicator be zero for one step size and nonzero for another?
  4. If \(p(a)=1-F(c-a)\), and \(F\) has a continuous density \(f\), what is \(dp/da\)? What does that derivative describe?
  5. What does it mean if no sampled parameter set produces an event when estimating variance-based sensitivity of the event indicator?

Solutions. (1) Yes, \(0<0.2<4\). One also needs a transverse root, \(y_t\ne0\), and conditions ensuring the continued root remains the first crossing, including no earlier threshold contact and a preserved margin below threshold before the crossing. (2) The formula gives \(-0.12/0.30=-0.400\) hour per unit parameter. The negative sign means increasing the parameter locally advances the crossing. (3) The indicator is constant on either side of its event boundary but jumps across it. A perturbation that does not cross the boundary gives zero change; one that does gives a jump divided by the chosen step. (4) \(dp/da=f(c-a)\), with units inverse to those of \(a\). It describes the local change in event probability under the stated distribution, not the derivative of an individual binary outcome. (5) The indicator has zero observed variance in that sample, so variance-based indices cannot be meaningfully estimated there. The result does not show that the event is impossible or that the parameters are irrelevant outside the sampled region.

Clinical Biostats