Why Vary Biological Priors?
A pathway or interaction prior encodes choices about biological knowledge: which genes belong together, which interactions are credible, and how strongly that information should influence estimates. Those choices may be reasonable without being uniquely determined. Sensitivity analysis asks whether the results of a knowledge-informed model are robust to plausible alternatives. It does not ask which prior is biologically true, and it does not replace evaluation of the likelihood or model assumptions.
The introductory material on prior predictive checks concerns whether a prior implies plausible data before observing the data. Sensitivity analysis addresses a different question: after fitting the model, how much do the estimates and conclusions change when defensible prior specifications change? The data, outcome definition, likelihood, covariates, and computational settings should be held fixed while prior choices are varied, so that differences can be attributed to the prior rather than to simultaneous changes in the analysis.
Specify the Comparison Before Refitting
Let \(y\) denote the observed data and \(\beta\) the model parameters of interest, such as effects for molecular features or latent loadings. A useful general representation is a likelihood \(p(y\mid\beta)\) and a prior \(p(\beta\mid\lambda,G,S)\). Here \(\lambda\) indexes prior strength, \(G\) denotes a pathway definition, and \(S\) denotes an interaction source or weighted network. The posterior distribution is proportional to the likelihood times the prior.
For example, in a Gaussian linear model with known covariance \(V\), suppose \(y\mid\beta\sim N(X\beta,V)\) and \(\beta\sim N(m_0,Q_0^{-1})\), where \(X\) is the design matrix, \(m_0\) is the prior mean, and \(Q_0\) is a positive-definite prior precision matrix. The posterior is Gaussian with precision and mean
A knowledge-informed prior may change \(Q_0\), \(m_0\), or both. In a strength analysis, one common construction is \(Q_0(\lambda)=\lambda Q_K\), where \(Q_K\) represents the structure supplied by a fixed pathway or network and \(\lambda>0\) controls its precision. Increasing \(\lambda\) increases the prior precision relative to the likelihood precision. It need not have the same effect in every model parameter, especially when the prior is structured.
This Gaussian formula is available only under its stated Gaussian assumptions and with a proper prior precision matrix. Other models can be compared in the same planned way, but each specification must be refitted using the model’s appropriate inference method. In all cases, use the same data and likelihood, define the set of alternatives in advance, and record convergence and uncertainty summaries for every fit. Prior predictive checks can help identify implausible alternatives before fitting.
Expanding the terms that depend on \(\beta\) gives \(-\tfrac12\beta^\mathsf{T}Q_{\text{post}}\beta+\beta^\mathsf{T}(X^\mathsf{T}V^{-1}y+Q_0m_0)\). Completing the square yields a Gaussian posterior with the precision and mean above. Thus changing the prior precision or structure changes the posterior weighting of data and prior information; it is not merely a change in how results are described.
Worked Examples of Prior Sensitivity
Worked Example: Varying the Strength of a Scalar Prior
Suppose a hypothetical omics effect \(\theta\), measured in log-expression units per treatment unit, has an estimated likelihood \(Y\mid\theta\sim N(\theta,0.16)\), with observed value \(y=1.20\). Consider the prior \(\theta\sim N(0.50,0.64/\lambda)\), and compare \(\lambda=0.25,1,\) and \(4\). Assume the normal likelihood and prior are appropriate, the likelihood variance is treated as known, and only prior strength changes.
For a normal likelihood and prior, posterior variance is the reciprocal of the sum of precisions, and posterior mean is the precision-weighted average:
The likelihood precision is \(1/0.16=6.25\), and its contribution to the mean numerator is \(1.20/0.16=7.50\). At \(\lambda=0.25\), the prior precision is \(0.25/0.64=0.3906\). Therefore \(v_{\text{post}}=1/(6.25+0.3906)=0.1506\), and \(m_{\text{post}}=(7.50+0.3906(0.50))/6.6406=1.159\). A 95% posterior interval is \(1.159\pm1.96\sqrt{0.1506}\), or approximately \(0.398\) to \(1.919\) log-expression units.
At \(\lambda=1\), the posterior variance is \(1/(6.25+1.5625)=0.1280\), and the mean is \((7.50+1.5625(0.50))/7.8125=1.060\). The corresponding 95% interval is approximately \(0.359\) to \(1.761\). At \(\lambda=4\), the posterior variance is \(1/(6.25+6.25)=0.0800\), and the mean is \((7.50+6.25(0.50))/12.50=0.850\); the 95% interval is approximately \(0.296\) to \(1.404\).
As the prior becomes stronger, the posterior mean moves toward the prior mean of \(0.50\), and the posterior variance decreases. The estimated effect remains positive in all three fits, and all three intervals exclude zero. Under this set of assumptions, the sign conclusion is stable across these prior strengths, although the estimate and uncertainty change. The intervals are posterior intervals conditional on each model and prior, not frequentist confidence intervals.
Worked Example: Changing Pathway Membership
Consider two hypothetical feature effects with observed estimates \(y=(1.0,-0.4)^\mathsf{T}\). Suppose their likelihood is \(y\mid\theta\sim N(\theta,0.25I)\). Compare an independent prior \(\theta\sim N(0,I)\) with a prior that treats the features as members of the same pathway:
Assume the likelihood variance is known and the correlation of \(0.8\) is a specified, proper representation of shared prior variation. The comparison changes pathway grouping only; the data model and marginal prior variances remain fixed.
With the independent prior, each feature has posterior mean \(1/(1+0.25)=0.8\) times its observed estimate, giving \((0.80,-0.32)^\mathsf{T}\). Under the grouped prior, the shared component and the feature-to-feature contrast are the eigen-directions of \(\Sigma\). Their prior variances are \(1.8\) and \(0.2\), respectively. For either direction with prior variance \(a\), the posterior mean is the observed component multiplied by \(a/(a+0.25)\). Thus the shared component is multiplied by \(1.8/2.05=0.8780\), while the contrast is multiplied by \(0.2/0.45=0.4444\).
The observed shared component is \((1.0-0.4)/\sqrt{2}=0.4243\), and the contrast component is \((1.0-(-0.4))/\sqrt{2}=0.9899\). After shrinkage these are \(0.3725\) and \(0.4400\). Transforming back gives posterior means \(((0.3725+0.4400)/\sqrt{2},(0.3725-0.4400)/\sqrt{2})^\mathsf{T}\), or approximately \((0.575,-0.048)^\mathsf{T}\). The grouped prior substantially shrinks the opposing feature effects toward one another. A pathway membership choice can therefore alter feature-level estimates even when the prior variances for individual features are unchanged.
Worked Example: Changing an Interaction Source
Suppose two hypothetical molecular features have observed values \(y=(1,0)^\mathsf{T}\), with independent likelihood errors of variance 1. Use the prior precision \(Q_0=0.5I+L\), where for a single undirected edge of weight \(w\),
The term \(0.5I\) ensures a proper prior; the edge term encourages connected features to have similar effects. Compare two hypothetical interaction sources that assign the edge weights \(w=1\) and \(w=0.25\). Assume both are represented by this same model and that the weights are specified before fitting.
With unit likelihood precision, posterior precision is \(I+Q_0\), and posterior mean solves \((I+Q_0)m_{\text{post}}=y\). For \(w=1\), this equation is
The determinant is \(2.5(2.5)-1=5.25\), so the solution is \((2.5/5.25,1/5.25)^\mathsf{T}=(0.476,0.190)^\mathsf{T}\). For \(w=0.25\), the equation becomes
Its determinant is \(1.75(1.75)-0.25^2=3.00\), yielding \((1.75/3,0.25/3)^\mathsf{T}=(0.583,0.0833)^\mathsf{T}\). The stronger edge weight transfers more of the first feature’s positive estimate to the second. The estimate change is a consequence of the assumed interaction structure, not evidence that the interaction source has been validated by the observed data.
A Practical Sensitivity Workflow
A disciplined comparison varies prior choices while keeping the inferential target and data analysis coherent. One-at-a-time comparisons help identify which choice is associated with a change; a small set of joint alternatives can then reveal whether choices interact. The set of alternatives should be biologically defensible and computationally feasible rather than chosen after seeing which version gives the preferred conclusion.
Specify the effects, contrasts, predictions, or pathway summaries to report, and state the reference prior. Include an unstructured or weak-prior fit when it is a meaningful comparison.
Set a range of prior strengths, alternative pathway definitions, and suitable interaction sources or weights. Keep data, outcome, likelihood, covariates, and preprocessing fixed.
Fit every specification using the same inference approach where possible. Verify convergence and numerical stability, and retain uncertainty summaries rather than comparing point estimates alone.
Summarize effect shifts, interval changes, signs or threshold-based conclusions, rankings, and predictions. State explicitly which findings are stable and which depend on the prior choice.
For a scalar target \(\psi\), a simple comparison with a baseline specification \(b\) is \(\Delta_j=E(\psi\mid y,\text{specification }j)-E(\psi\mid y,\text{specification }b)\). This difference should be reported in the units of \(\psi\). For a multivariate target, report feature-level changes as well as summaries that match the scientific question. If conclusions are defined by a threshold, such as a posterior probability exceeding a prespecified cutoff, apply the same rule in every fit and report the probability itself where useful.
Diagnostics include checking that every fit converged, that reported intervals or posterior summaries are available for all alternatives, and that observed changes are not artifacts of different coding or scaling. A large change in a pathway summary can result from changed membership or changed feature weights; report which changed. If predictions are part of the target, compare predictions on the same observations or validation folds. Sensitivity analysis describes conditional results under the fitted models; it does not establish causality, validate a database, or guarantee generalization.
Comparing Sensitivity Analysis With Alternatives
| Approach | What it answers | Important distinction |
|---|---|---|
| Single-prior analysis | What follows under one specified prior? | Does not reveal dependence on other plausible prior choices. |
| Sensitivity analysis | How do results vary across a planned set of priors? | Compares conditional fits; it does not assign probabilities to the alternatives. |
| Prior/model averaging | What follows after combining alternatives with stated weights? | Requires a defensible weighting scheme and answers a different question from reporting across-specification stability. |
| Data-driven prior selection | Which specification is selected by a criterion or predictive procedure? | Selection is not a substitute for showing how conclusions vary across plausible specifications. |
Sensitivity analysis is especially useful when pathway membership or interaction evidence is uncertain, but it has limitations. The chosen alternatives may omit important sources of uncertainty, and results can look stable simply because all alternatives are similar. Conversely, an unstable feature-level estimate need not imply that a broader prediction or pathway-level summary is unstable. Report the target and scale of comparison, the alternatives examined, and any specifications excluded, rather than presenting only the most favorable fit.
Common Pitfall
A second frequent error is changing the pathway definition, interaction source, data filtering, and likelihood at once, then attributing the result to one of those choices. Separate the axes where possible, and label joint changes as joint comparisons. A sensitivity analysis is informative only when the comparison is interpretable.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In a Gaussian prior with precision \(Q_0(\lambda)=\lambda Q_K\), what does increasing \(\lambda\) change, and what should remain fixed in a prior-strength comparison?
- In the scalar worked example, why did the posterior mean move toward \(0.50\) as \(\lambda\) increased?
- Why did the correlated pathway prior pull the two feature effects closer together in the second worked example?
- In the interaction example, what does the increase in the second feature’s posterior mean under \(w=1\) indicate, and what does it not establish?
- Name two quantities, beyond a point estimate, that can be compared across prior specifications.
Solutions. (1) Increasing \(\lambda\) increases prior precision relative to the likelihood precision. Keep the data, likelihood, outcome, covariates, and other model choices fixed. (2) The prior mean was \(0.50\); increasing its precision increases its weight in the posterior precision-weighted average, moving the mean toward \(0.50\). (3) The prior assigns greater variance to the shared direction than to the contrast direction, so the contrast is more strongly shrunk. (4) The stronger edge prior transfers more of the first feature’s positive estimate to its connected feature under the stated model; it does not validate the edge source or show that the features causally influence one another. (5) Examples include interval width, posterior probability of a prespecified effect direction, pathway-level summaries, and predictions on a fixed validation set.