Why the Difference Matters
A pathway database can influence a multi-omics analysis in fundamentally different ways. A model may declare that an effect outside a pathway is impossible, assigning it probability zero. Alternatively, it may regard the effect as less plausible while allowing the data to support it. These choices are not simply different degrees of shrinkage: a zero-probability rule removes possibilities from the model, whereas a soft prior keeps them possible.
That distinction affects both interpretation and estimation. A hard constraint can make a smaller model identifiable by eliminating coefficients, but conclusions then depend on the excluded effects truly being absent. A soft prior can stabilize noisy estimates while preserving the possibility of effects that conflict with pathway knowledge. It cannot, however, make the data distinguish effects that the design does not distinguish.
Model and Definitions
Consider \(n\) matched samples with an outcome \(y_i\) and \(p\) molecular features drawn from one or more omics layers. Let \(x_{ij}\) be feature \(j\) for sample \(i\), and let \(\beta_j\) be its coefficient. For clarity, assume the features have been put on stated, comparable scales and the outcome is continuous. A standard working model is
This model assumes the conditional mean is linear in the included features, the errors are independent with common variance \(\sigma^2\), and their normal distribution is appropriate for the likelihood-based calculations below. The design matrix is treated as fixed. These assumptions do not establish that a coefficient is causal: coefficients describe conditional associations under the model.
For example, a pathway-supported feature might receive a broader zero-centered normal prior than a feature with little pathway support:
A larger \(\tau_j^2\) allows a wider range of coefficients; a smaller but positive \(\tau_j^2\) expresses stronger shrinkage toward zero. This zero-centered construction describes relative plausibility of coefficient magnitude, not a preferred positive direction. The sign of a coefficient remains data-dependent. If the scientific knowledge instead specifies a direction, that requires a different prior distribution.
A hard constraint is the limiting case only in a narrow mathematical sense: a normal prior with variance tending to zero concentrates at zero. In actual modeling, setting \(\beta_j=0\) is a model restriction, not an estimate obtained by observing a very small nonzero variance. A hard constraint may also be expressed through a linear restriction such as \(A\boldsymbol{\beta}=0\), but the examples here use individual feature effects.
How a Soft Prior Changes an Estimate
The simplest calculation uses a one-coefficient likelihood summary. Suppose the data provide an estimate \(z\) with standard error \(s_z\), so that the likelihood for \(\beta\) is proportional to the density of \(z\mid\beta\sim N(\beta,s_z^2)\). Suppose also that the prior is \(\beta\sim N(0,\tau^2)\), with \(s_z^2>0\) and \(\tau^2>0\). Completing the square in the likelihood times prior gives
The final term does not depend on \(\beta\). Therefore, the posterior distribution is normal, with mean and variance
The posterior mean is a weighted version of the data estimate. When the prior variance is small relative to the squared standard error, the estimate is pulled strongly toward zero. When the data are precise relative to the prior, the posterior mean is closer to \(z\). In contrast, a hard constraint sets the coefficient to zero regardless of the observed \(z\); there is no data-to-prior compromise for that coefficient.
Worked Example: A Pathway-Supported Effect With a Soft Prior
Suppose a standardized metabolite has a pathway-supported association with a molecular outcome. A regression summary gives \(z=2.0\) outcome units per one standard-deviation increase in the metabolite, with \(s_z=1.0\) outcome units. Use a soft prior \(\beta\sim N(0,2^2)\). The normal likelihood summary and prior are the assumptions for this calculation; the prior variance is positive, so nonzero effects remain possible.
Here \(s_z^2=1\) and \(\tau^2=4\). The posterior mean and variance are
Thus \(\beta\mid z\sim N(1.6,0.8)\), where the second argument is the variance. The posterior standard deviation is \(\sqrt{0.8}=0.8944\) outcome units per standard deviation of the metabolite. The data estimate of \(2.0\) is shrunk toward zero, but the posterior does not force the effect to zero. A hard constraint would instead set \(\beta=0\), irrespective of this observed estimate. Neither calculation alone establishes a causal effect.
Pathway Membership as Relative Prior Support
A pathway can distinguish features by assigning them different prior spreads. For illustration, suppose coefficients are conditionally independent a priori, with variance \(\tau_{\mathrm{in}}^2\) for pathway-supported features and \(\tau_{\mathrm{out}}^2\) for other features, where both variances are positive. Choosing \(\tau_{\mathrm{in}}^2>\tau_{\mathrm{out}}^2\) allows larger effects more readily among supported features without declaring other effects impossible. This setup is one modeling choice, not a universal interpretation of pathway membership.
In the next example, each coefficient has an independent likelihood summary with known standard error. This orthogonal-summary assumption makes each update separate; it would not generally hold for correlated features in an ordinary regression.
Worked Example: Supported and Less-Supported Features
Suppose a gene feature has estimate \(z_1=1.5\) outcome units and standard error \(s_1=0.5\), while a second, less-supported feature has \(z_2=-0.4\) outcome units and the same standard error. Use independent normal priors with variances \(\tau_1^2=1\) for the pathway-supported feature and \(\tau_2^2=0.04\) for the less-supported feature. Assume both likelihood summaries are normal and the features' summaries are independent. Both prior variances are positive, so neither coefficient is excluded.
For the first feature, the posterior mean is \(\frac{1}{1+0.25}(1.5)=1.2\) outcome units, and the posterior variance is \(\frac{1(0.25)}{1+0.25}=0.20\) outcome units squared.
For the second feature, the posterior mean is \(\frac{0.04}{0.04+0.25}(-0.4)=-0.05517\) outcome units, and the posterior variance is \(\frac{0.04(0.25)}{0.04+0.25}=0.03448\) outcome units squared. Its estimate is pulled much closer to zero because the prior variance is smaller, but it is not fixed at zero. These numerical differences follow from the stated prior spreads and likelihoods; they are not evidence that the pathway classification is correct.
Constraints, Estimability, and Data Information
A coefficient is identifiable from a likelihood when different values of that coefficient cannot be exchanged with other parameters while leaving the distribution of the observations unchanged. In the linear model, full column rank of the design matrix is a sufficient condition for identifying all regression coefficients (given the stated model). If two feature columns are identical, the data can identify their combined contribution but not their separate effects.
A hard constraint can make the reduced model identifiable by removing a redundant coefficient. The resulting estimate is conditional on that restriction. A soft prior can produce a proper posterior distribution even when the likelihood does not identify every coefficient, but the parts not distinguished by the data are then determined by the prior. A proper posterior is not the same as data-based identification.
Worked Example: Two Indistinguishable Omics Features
Suppose two standardized omics features have exactly the same values in every sample, so their regression columns are identical. The data provide a likelihood summary for their sum \(q=\beta_1+\beta_2\): \(z_q=3.0\) outcome units with standard error \(0.5\) outcome units. Thus \(z_q\mid q\sim N(q,0.25)\). The likelihood depends on the coefficients only through \(q\); it contains no information separating \(\beta_1\) from \(\beta_2\).
First use independent priors \(\beta_1,\beta_2\sim N(0,1)\). Their sum \(q\) has prior variance \(2\), while their difference \(d=\beta_1-\beta_2\) is independent of \(q\) and also has variance \(2\). The normal update for \(q\) gives
The data do not update \(d\), so \(d\mid z_q\sim N(0,2)\). Since \(\beta_1=(q+d)/2\) and \(\beta_2=(q-d)/2\), both posterior means are \(2.667/2=1.333\) outcome units. Each posterior variance is \((0.2222+2)/4=0.5556\), and their posterior covariance is \((0.2222-2)/4=-0.4444\). The finite posterior uncertainty comes partly from the priors: the data have learned about the sum, not the division of that sum between features.
Now impose the hard constraint \(\beta_2=0\). Then \(q=\beta_1\), and the likelihood summary estimates the remaining coefficient as \(3.0\) outcome units with standard error \(0.5\). This is a change in the model's allowed explanations, not new information in the data. The model can attribute the signal to feature 1 only because it ruled out feature 2 in advance.
Choosing and Checking the Formulation
A useful decision is not simply whether pathway knowledge is “used,” but whether a biological claim is strong enough to rule out effects. Use a hard constraint only when zero is a defensible structural restriction for the specific feature, outcome, tissue, and experimental context. If pathway membership is uncertain or incomplete, a soft prior usually represents that uncertainty more honestly. An unconstrained likelihood analysis is another useful comparator when the aim is to show what the data estimate without pathway-based regularization.
| Approach | Allowed coefficient values | What drives the estimate? | Main risk |
|---|---|---|---|
| Hard constraint | Only zero for a constrained coefficient | The restriction; other coefficients are estimated within the reduced model | Omitting a real effect or forcing attribution to correlated features |
| Soft prior | Nonzero values remain possible | Both the likelihood and the prior distribution | Prior influence can be mistaken for information supplied by the data |
| Unconstrained likelihood fit | All coefficient values allowed | The likelihood and design matrix | Unstable estimates when predictors are weakly identified or highly correlated |
Diagnostics should focus on whether the assumed distinction between “impossible” and “less plausible” is defensible, and whether the design contains information about the coefficients being reported. Check the rank and conditioning of the design matrix, inspect correlations among features across omics layers, and identify coefficients whose uncertainty remains large. Compare the fitted effects under the hard, soft, and unconstrained formulations; large changes indicate that knowledge assumptions materially affect the result. In particular, a coefficient that moves only because of a hard exclusion should not be described as independently established by the data.
A common mistake is to say, “The data estimate for this out-of-pathway feature is near zero, so a hard constraint is harmless.” That reasoning is incorrect: a hard constraint sets the coefficient to zero even if later data would favor a nonzero value, and correlated predictors may receive its attributed signal. The correction is to distinguish the likelihood evidence from the imposed restriction, and to use a positive-variance soft prior when effects are disfavored but not impossible.
Check Your Understanding
Answer the questions, then compare your reasoning with the solutions.
- A feature has a zero-centered normal prior with variance \(0.01\). Is its effect impossible, or merely strongly shrunk?
- Two omics features have identical design columns. What combination of their coefficients can the likelihood identify?
- A hard constraint sets one coefficient to zero in a pair of correlated features. Why might the other coefficient change?
- In the normal update, what happens to the posterior mean as the prior variance approaches zero while the likelihood estimate stays fixed?
Solutions. (1) It is strongly shrunk, not impossible: the positive variance assigns positive probability to nonzero values. (2) The likelihood can identify the sum of their coefficients, but not their separate values. (3) The remaining coefficient may absorb signal previously shared between the correlated features; that attribution follows from the restriction and is not new evidence. (4) The multiplier \(\tau^2/(\tau^2+s_z^2)\) approaches zero for \(s_z^2>0\), so the posterior mean approaches zero. The coefficient is not exactly constrained unless the model assigns it a point mass at zero.