Tutorials › Multi-Omics Data Integration › Sensitivity Analysis for Block Weights

Preprocessing, Scaling and Block Weighting · Tutorial 48 of 597

Sensitivity Analysis for Block Weights

You will learn to design a block-weight sensitivity analysis, quantify how distances and principal directions change, and report which conclusions remain robust across plausible weights.

Intermediate 12 min read

What You'll Learn

  • Define a planned weight range and keep preprocessing fixed while assessing sensitivity.
  • Recalculate weighted sample distances and identify when pairwise rankings change.
  • Compare principal directions using aligned signs, subspace similarity, and eigenvalue gaps.
  • Distinguish stable conclusions from those that depend on a particular weight choice.
  • Diagnose weight-grid, scaling, and near-tied-eigenvalue problems.
  • Separate sensitivity to chosen weights from sampling uncertainty.

Why Vary the Block Weights?

In a multi-omics analysis, a block weight determines how strongly one modality contributes relative to another. A weight chosen from reliability, noise, or another rationale is still a modeling choice. If a sample pairing, principal direction, or scientific summary changes substantially under other plausible choices, that dependence is important to report. Sensitivity analysis makes it visible rather than hiding it behind a single selected weighting scheme.

The goal is not to search for a weight that produces a preferred result. Instead, specify a scientifically plausible range in advance, hold the other analysis choices fixed, and assess which features of the result persist throughout that range. This is a deterministic assessment of dependence on weights, not a confidence interval or a test of whether a conclusion is true.

Definition: Let \(X_b\) be the centered, preprocessed data matrix for block \(b\), with the same \(n\) matched samples in every block. For nonnegative block weights \(w_b\), form the weighted matrix \(Z(w)=[\sqrt{w_1}X_1,\ldots,\sqrt{w_B}X_B]\). A block-weight sensitivity analysis evaluates selected results from \(Z(w)\) over a prespecified set or range of weights, while keeping the samples, feature processing, and analysis rules fixed.

The square root in \(Z(w)\) ensures that block \(b\)'s contribution to a squared Euclidean distance is multiplied by \(w_b\). For samples \(i\) and \(j\), write \(x_{ib}\) for the row of \(X_b\) belonging to sample \(i\). Their weighted squared distance is

$$ d_{ij}^2(w)=\sum_{b=1}^{B} w_b\lVert x_{ib}-x_{jb}\rVert^2. $$

This analysis assumes that the samples are aligned across blocks, that the blocks have already been transformed and scaled appropriately for the intended analysis, and that those preprocessing choices are held fixed during the weight sweep. Weights must be nonnegative. The range should reflect plausible relative influence, not arbitrary extremes added after seeing the results. If the weights are constrained to sum to one, that constraint must be maintained throughout the sweep.

Designing and Interpreting a Weight Sweep

For two blocks, a simple planned sweep is \(w_A=\lambda\) and \(w_B=1-\lambda\), for \(\lambda\) in a chosen interval. For more blocks, vary one weight over a range while stating how the others are adjusted, or specify a grid of weight vectors satisfying the intended constraints. A weight vector multiplied by the same positive constant for every block scales all squared distances by that constant, but does not change PCA directions. Thus the relative weights, not their arbitrary common scale, determine the balance between blocks.

For each planned weight vector, recalculate the outputs that matter to the scientific question. These may include selected pairwise distances, nearest-neighbor or clustering assignments under a fixed rule, and PCA scores or directions. Record changes over the full range, not just at its endpoints: a ranking can change and then change back. If a conclusion uses a threshold or classification rule, define that rule before the sweep and apply it consistently.

Worked Example: Finding a Pairwise Distance Ranking Change

Suppose three hypothetical samples P, Q, and R have already been processed in two one-feature blocks. Their values are A: \(0,2,5\) and B: \(0,1,1\), respectively, in the order P, Q, R. Let \(w_A=\lambda\) and \(w_B=1-\lambda\). The blockwise squared differences are \(4,1\) for P–Q; \(25,1\) for P–R; and \(9,0\) for Q–R.

For P–Q, the weighted squared distance is

$$ d_{PQ}^2(\lambda)=4\lambda+1(1-\lambda)=1+3\lambda. $$

For Q–R, it is \(d_{QR}^2(\lambda)=9\lambda\). Their ranking changes when \(1+3\lambda=9\lambda\), so \(1=6\lambda\) and \(\lambda=1/6\). Below \(1/6\), P–Q is farther apart than Q–R; above \(1/6\), P–Q is closer than Q–R.

At \(\lambda=0.10\), \(d_{PQ}^2=1.30\) and \(d_{QR}^2=0.900\), giving distances \(1.14\) and \(0.949\), respectively. At \(\lambda=0.25\), the squared distances are \(1.75\) and \(2.25\), giving distances \(1.32\) and \(1.50\). Thus, over a planned range from 0.10 to 0.25, the closest pair switches from Q–R to P–Q. This ranking is weight-dependent, even though the sample data have not changed.

The remaining pair has \(d_{PR}^2=25\lambda+(1-\lambda)=1+24\lambda\). Its distance is greater than both other distances throughout this range. Therefore, the finding that P–R is the farthest pair is robust over this particular range, while the closest-pair finding is not.

Principal Directions Need Separate Diagnostics

PCA directions can change in ways that a distance summary does not reveal. PCA on the centered weighted matrix uses the sample Gram matrix \(K(w)=Z(w)Z(w)^\mathsf{T}=\sum_b w_bX_bX_b^\mathsf{T}\). Its leading eigenvector gives the first sample-space direction, and the corresponding eigenvalue measures variance along that direction, up to the common covariance divisor \(n-1\). A principal direction is a property of the weighted matrix, so it must be recalculated at each weight vector.

When comparing directions, account for the fact that an eigenvector and its negative describe the same axis. One simple comparison is the absolute cosine between unit-length directions, \(\lvert v_1^\mathsf{T}v_2\rvert\): values near one indicate similar axes, and values near zero indicate nearly orthogonal axes. For a leading subspace with more than one direction, compare the subspaces rather than matching individual vectors, especially when their eigenvalues are close.

A small gap between the first and second eigenvalues is a warning: small changes in weights may rotate or switch the leading direction substantially. A large change in a single vector is not always evidence of a meaningful change in the represented subspace. Conversely, agreement in distances alone does not establish that PCA directions are stable.

Worked Example: A Principal Direction Switch at a Weight Tie

Consider three hypothetical centered samples and two one-feature blocks. Let block A have sample values \(u=(1,-1,0)^\mathsf{T}/\sqrt{2}\), and block B have values \(v=(1,1,-2)^\mathsf{T}/\sqrt{6}\). These vectors are centered, have unit length, and are orthogonal: \(u^\mathsf{T}v=0\). Use weights \(w_A=\lambda\) and \(w_B=1-\lambda\).

The sample Gram matrix is \(K(\lambda)=\lambda uu^\mathsf{T}+(1-\lambda)vv^\mathsf{T}\). Because \(u\) and \(v\) are orthonormal, multiplying by either vector gives

$$ K(\lambda)u=\lambda u,\qquad K(\lambda)v=(1-\lambda)v. $$

The eigenvalues for these directions are therefore \(\lambda\) and \(1-\lambda\). At \(\lambda=0.40\), they are 0.40 and 0.60, so the leading direction is \(v\). At \(\lambda=0.60\), they are 0.60 and 0.40, so the leading direction is \(u\). At \(\lambda=0.50\), the eigenvalues tie, and no unique first direction is determined within this two-dimensional sample space.

The first direction therefore switches across the planned range \(0.40\) to \(0.60\), despite the input blocks being unchanged. This is not a sign reversal: \(u\) and \(v\) are orthogonal, so their absolute cosine is zero. Near the tie, it would be misleading to report a uniquely stable first component; the two-dimensional subspace is the more appropriate object to describe.

Track the Conclusions That Matter

A sensitivity analysis is most useful when its outputs are tied to a defined scientific interpretation. For example, a team may ask whether a fixed pair of sample groups remains separated under a weighted distance, or whether a predeclared cluster assignment is preserved. Such a rule is an analysis convention, not automatically a statistical test. It should not be described as evidence of statistical significance unless a separate inferential procedure justifies that claim.

Worked Example: A Threshold-Based Summary Is Weight-Dependent

Suppose two hypothetical groups have blockwise differences between their centroids of 1 unit in block A and 3 units in block B. Define the weighted squared centroid separation as \(D^2(\lambda)=\lambda(1)^2+(1-\lambda)(3)^2\). For illustration, suppose an analysis has prespecified the operational rule “call the separation large when \(D^2>5\).” This is a decision threshold for this example, not a significance test.

Substitution gives \(D^2(\lambda)=\lambda+9(1-\lambda)=9-8\lambda\). The threshold boundary satisfies \(9-8\lambda=5\), so \(4=8\lambda\) and \(\lambda=0.50\). At \(\lambda=0.25\), \(D^2=9-8(0.25)=7.00\), above the threshold. At \(\lambda=0.75\), \(D^2=9-8(0.75)=3.00\), below it.

Under the stated rule, the “large separation” summary holds for \(\lambda<0.50\), fails for \(\lambda>0.50\), and is exactly at the boundary when \(\lambda=0.50\). The conclusion is weight-dependent over a range that includes values on both sides of 0.50. The arithmetic does not establish uncertainty about the group difference or a causal effect; it only shows how this particular weighted summary changes.

Diagnostics, Alternatives, and Limitations

A compact sensitivity report can show the planned weight grid, selected distance curves or rankings, and a summary of PCA stability. For each weight vector, inspect whether the same samples remain nearest neighbors or retain the same predeclared assignment. For PCA, report eigenvalues and their gaps alongside sign-aligned vector cosines or subspace comparisons. Also inspect the actual range of each block’s contribution, \(w_b\lVert x_{ib}-x_{jb}\rVert^2\), for distances of substantive interest. This can reveal a block that dominates even within the chosen weight range.

  • Use a sufficiently informative grid. Sparse evaluation can miss a ranking change between grid points. For two blocks, solve for exact pairwise distance crossings when practical; otherwise, refine the grid near apparent changes.
  • Keep preprocessing fixed. Re-estimating scaling or filtering separately at each weight confounds weight sensitivity with changes in the data representation.
  • Check constraints and endpoints. Confirm that all weights are nonnegative and obey the planned normalization. A zero weight removes a block from the weighted analysis; it is not evidence that the block contains no biological information.
  • Watch for PCA ties. Nearly equal leading eigenvalues can make individual directions unstable. Compare the associated subspace and state the limitation rather than overinterpreting one component.

A single selected weight is simpler to present but conceals dependence on that choice. A grid or curve over a planned range is more informative about robustness to weighting, but it does not identify which weight is scientifically correct. Bootstrap resampling addresses a different question: how results vary across resampled subjects under a specified procedure. It can complement a weight sweep, but it does not replace one, and weight sensitivity alone does not quantify sampling uncertainty.

The conclusions are limited to the range and preprocessing choices assessed. A finding stable over a narrow range is not necessarily stable over all plausible weights, transformations, feature sets, or populations. Sensitivity should therefore be reported with the range, constraints, and fixed analysis choices made explicit.

Key takeaway: Vary relative block weights over a prespecified plausible range, recalculate the relevant outputs, and separate conclusions that persist across that range from those that depend on a particular weighting choice.

Check Your Understanding

Answer the questions, then compare your reasoning with the solutions.

  1. Why does multiplying all block weights by the same positive constant change distances but not PCA directions?
  2. Two blocks have squared sample-pair differences of 2 and 5. If their weights are 0.4 and 0.6, what is the weighted squared distance and distance?
  3. What does an absolute cosine near zero between two unit principal directions indicate?
  4. Why can a near-tie between the first two eigenvalues make the first principal direction difficult to interpret as stable?
  5. Does a stable conclusion across a weight sweep establish that the conclusion is statistically significant? Explain.

Solutions. (1) Multiplying every weight by \(c>0\) multiplies \(K(w)\) by \(c\) and every squared distance by \(c\). The eigenvectors of \(K(w)\) remain the same, so its PCA directions do not change. (2) The squared distance is \(0.4(2)+0.6(5)=0.8+3.0=3.8\); the distance is \(\sqrt{3.8}=1.95\) units. (3) The axes are nearly orthogonal, because their inner product in absolute value is near zero. (4) When the leading eigenvalues are close, a small weight change can alter which direction has the largest eigenvalue or rotate the leading direction substantially. (5) No. It establishes stability to the assessed weights under the fixed analysis, not statistical significance; that requires an appropriate inferential procedure and its assumptions.

Clinical Biostats