Tutorials › Statistical Genetics › Kernel Tests For High-Dimensional Interaction Effects

Gene–Gene Interaction · Tutorial 823 of 989

Kernel Tests For High-Dimensional Interaction Effects

Learn how to build and calibrate an omnibus kernel test for a collection of genotype interactions, and how the chosen kernel determines which patterns of effects receive emphasis.

Advanced 11 min read

What You'll Learn

  • Encode pairwise genotype interactions as products of centered genotype dosages.
  • Construct a positive-semidefinite interaction kernel from those product features.
  • Derive the kernel score statistic from a random-effects variance-component model.
  • Calibrate a test using the weighted chi-square null distribution.
  • Compare linear, weighted, polynomial, and Gaussian interaction kernels.
  • Interpret an omnibus result without claiming it identifies a particular causal interaction.

Why Aggregate Interaction Evidence?

With many genetic variants, a study may consider a large collection of pairwise interactions. Testing every product term separately can produce a long list of noisy estimates and requires a separate multiple-testing strategy. A kernel test instead asks an omnibus question: is there evidence that the collection of interaction features, taken together, contributes to variation in the outcome? It compresses those features into a matrix of subject-to-subject similarities while retaining a specified pattern of weighting across interaction effects.

This is not a test of one particular pair of variants. Its result depends on which interaction features are included and how the kernel weights them. The model and kernel must therefore be stated before interpreting the test.

Interaction Features and the Kernel Matrix

Suppose \(n\) unrelated subjects have a quantitative outcome \(y_i\), and \(p\) genotype dosages are available. Let \(x_{ij}\) be the centered dosage for subject \(i\) at variant \(j\). For each included pair \((j,k)\), form the product feature \(z_{i,jk}=x_{ij}x_{ik}\). Centering the dosages makes the product encode departure from the product of the centered single-variant values; it does not, by itself, remove every possible dependence among features.

Collect the pairwise product features into an \(n\)-by-\(m\) matrix \(Z\), where \(m\) is the number of selected variant pairs. The interaction kernel is a positive-semidefinite \(n\)-by-\(n\) matrix. A common construction is \(K=ZWZ'\), where \(W\) is a positive-semidefinite matrix of feature weights. With diagonal \(W\), each pair receives a nonnegative weight. The entry \(K_{i\ell}\) summarizes similarity between subjects \(i\) and \(\ell\) in the weighted interaction-feature space.

Definition: A pairwise interaction kernel is a positive-semidefinite matrix \(K\) whose entries encode similarity between subjects based on a specified set of pairwise genotype-product features. For the weighted linear kernel, \(K=ZWZ'\), with \(W\) positive semidefinite. This kernel corresponds to a covariance model in which the interaction coefficients have covariance proportional to \(W\).

Worked Example: Building a Linear Interaction Kernel

Consider four hypothetical subjects and three centered genotype variables, with coded values shown below. The values are chosen for illustration; they are not observations from a real study.

Subject\(x_1\)\(x_2\)\(x_3\)\(x_1x_2\)\(x_1x_3\)\(x_2x_3\)
11-1-1-1-11
2-1-111-1-1
3-11-1-11-1
4111111

The interaction-feature row for subject 1 is \((-1,-1,1)\), and for subject 2 it is \((1,-1,-1)\). With equal weights, \(W=I\), their kernel entry is the inner product \(K_{12}=(-1)(1)+(-1)(-1)+(1)(-1)=-1\). Subject 1's diagonal entry is \(K_{11}=(-1)^2+(-1)^2+1^2=3\). Computing every row inner product gives

$$ K=ZZ'= \begin{pmatrix} 3&-1&-1&-1\\ -1&3&-1&-1\\ -1&-1&3&-1\\ -1&-1&-1&3 \end{pmatrix}. $$

This calculation illustrates kernel construction, not a usable association test: four subjects cannot support a reliable model with an intercept and several main-effect covariates. In an analysis, the nuisance model and residual degrees of freedom must be considered before testing.

Model and Score Test

For a quantitative trait, let \(C\) contain the intercept and prespecified nuisance covariates, including the single-variant main effects when testing interactions under the usual hierarchical model. Assume the subjects are independent and \(y=C\gamma+Z\beta+\varepsilon\), where \(\varepsilon\sim N(0,\sigma^2 I)\). For the variance-component formulation, assume the interaction coefficients have mean zero and covariance \(\operatorname{Var}(\beta)=\tau W\), independently of \(\varepsilon\). Here \(\tau\geq0\) measures the overall interaction-component variance. The null hypothesis is \(H_0:\tau=0\); the alternative is \(H_a:\tau>0\). Under this model, the marginal covariance of \(y\) is \(\sigma^2 I+\tau K\), with \(K=ZWZ'\).

The following exact calibration assumes \(\sigma^2\) is known. Let \(M=I-C(C'C)^{-1}C'\), the projection onto the space orthogonal to the columns of \(C\), assuming \(C\) has full column rank. The score for \(\tau\), evaluated at its null value, is proportional to the residualized quadratic form. A convenient nonnegative test statistic is \(Q=y'MKM y/\sigma^2\). This is the kernel score statistic in this simple Gaussian setting.

Theorem: Under \(H_0\), the stated independent normal-error model, and known \(\sigma^2\), let \(\lambda_1,\ldots,\lambda_n\) be the eigenvalues of \(MKM\), including zero eigenvalues. Then \(Q\) has the distribution \(\sum_{r=1}^{n}\lambda_r\chi^2_{1,r}\), where the \(\chi^2_{1,r}\) are independent chi-square random variables with one degree of freedom. The upper-tail probability under this distribution is the kernel-test p-value.

Why the Test Is a Variance-Component Test

The connection follows directly from the likelihood score. With nuisance fixed effects projected out, the null covariance is \(\sigma^2 I\) on the observation space. Differentiating the normal log likelihood with respect to \(\tau\) at zero gives the score

$$ U(0)=\frac{1}{2}\left\{ \frac{y'MKM y}{\sigma^4} -\frac{\operatorname{tr}(MK)}{\sigma^2} \right\} =\frac{Q-\operatorname{tr}(MK)}{2\sigma^2}. $$

Thus, the score is a centered version of \(Q\). Its expectation under the null is zero: since \(M C=0\) and \(y=C\gamma+\varepsilon\), \(M y=M\varepsilon\), and \(E(y'MKM y)=\sigma^2\operatorname{tr}(MKM)=\sigma^2\operatorname{tr}(MK)\). The second equality uses \(M^2=M\) and the cyclic property of the trace.

For the null distribution, write \(M y=M\varepsilon\). The vector \(M\varepsilon/\sigma\) is normal with covariance matrix \(M\). Diagonalize \(MKM\) in an orthonormal eigenbasis. In each direction with eigenvalue \(\lambda_r\), the squared normal coordinate contributes \(\lambda_r\) times a one-degree-of-freedom chi-square variable; summing those contributions yields the theorem. This also explains why the null is generally a mixture of chi-square distributions, rather than a single chi-square distribution with degrees of freedom equal to the number of product terms.

1
Specify the feature set.
Choose the variants and pairwise genotype products to be tested, along with the genotype coding.
2
Specify the nuisance model and kernel.
Include the intercept and appropriate covariates in \(C\); define \(K\) from the interaction features and their weights.
3
Calculate the score statistic.
Residualize with \(M\) and calculate \(Q=y'MKM y/\sigma^2\), or use the corresponding fitted variance-component score procedure when nuisance parameters are estimated.
4
Calibrate and interpret.
Use the null mixture determined by the eigenvalues, or a suitable approximation or resampling procedure, and interpret the result as evidence about the chosen interaction component.

Worked Example: Calibrating a Two-Direction Kernel Test

Suppose a hypothetical analysis has known residual variance \(\sigma^2=8\). After accounting for nuisance covariates, the kernel has two nonzero eigenvalues, both equal to 1. In the corresponding orthonormal directions, the observed residual outcome coordinates are 8 and 8. These are stipulated summary values for this example.

The quadratic form in the numerator is the sum of the squared coordinates, so \(y'MKM y=8^2+8^2=64+64=128\). Therefore,

$$ Q=\frac{128}{8}=16. $$

With eigenvalues 1 and 1, the null distribution is \(\chi^2_2\). For a chi-square variable with two degrees of freedom, the upper-tail probability at 16 is \(\exp(-16/2)=\exp(-8)\). Numerically, \(\exp(-8)=0.0003354626\ldots\), or approximately \(0.000335\) to three significant figures. Under the specified null model, a statistic at least this large is rare; this p-value is not the probability that the null hypothesis is true.

Kernel Choices Change the Alternative

The kernel determines which patterns of interaction effects are emphasized. The linear kernel \(K=ZZ'\) gives equal weight to the included product features. A weighted linear kernel \(K=ZWZ'\) can give greater weight to pairs selected using prespecified biological or design information. The weights must be chosen independently of the outcome being tested, or the testing procedure must account for how they were selected.

A polynomial kernel applied to interaction-feature vectors can represent nonlinear functions of those features; it therefore tests a broader pattern than a random effect on the original pairwise coefficients alone. A Gaussian radial-basis kernel, based on \(\exp\{-\lVert z_i-z_\ell\rVert^2/(2h^2)\}\), can capture flexible similarity patterns, with bandwidth \(h\) controlling how local the similarities are. These choices may improve sensitivity to some alternatives while reducing it for others. They do not make a test uniformly more powerful.

For a fixed kernel, multiplying \(K\) by a positive constant rescales both \(Q\) and its null-distribution eigenvalues by that constant, so the calibrated p-value is unchanged. Changing relative weights, changing the included pairs, or changing the kernel's shape changes the alternative being tested and can change the p-value.

Worked Example: Equal and Unequal Feature Weights

Consider two orthonormal, nuisance-adjusted interaction-feature directions and a hypothetical residual score vector \(s=(3,1)'\). Set \(\sigma^2=1\). For a linear kernel with equal weights, \(W=I\), so the statistic is

$$ Q_{\mathrm{equal}}=s'Ws=3^2+1^2=10. $$

Now use \(W=\operatorname{diag}(0.25,1.75)\), which keeps the total weight equal to 2 but emphasizes the second direction more. The statistic becomes

$$ Q_{\mathrm{weighted}}=s'Ws =0.25(3^2)+1.75(1^2) =2.25+1.75=4. $$

The observed score is larger in the first direction, so emphasizing the second direction reduces the quadratic form. The equal-weight null distribution is \(\chi^2_2\); the weighted null distribution is \(0.25\chi^2_1+1.75\chi^2_1\), with independent terms. The statistics alone do not establish which kernel gives stronger evidence: each must be compared with its own null distribution.

Assumptions, Interpretation, and a Common Pitfall

The exact mixture result relies on the Gaussian independent-error model, the specified fixed-effect nuisance design, and known \(\sigma^2\). In practice, \(\sigma^2\) and other nuisance parameters are usually estimated. Implementations then use an appropriate variance-component score procedure, a mixture approximation, or calibration by resampling under the fitted null model. Related issues arise for non-Gaussian outcomes; the normal-theory formula should not be applied to them without a suitable model and calibration.

An omnibus rejection supports evidence against the null that the specified interaction component has zero variance. It does not identify which pair drives the evidence, establish that every included interaction is nonzero, or show that the association is causal. The interpretation is conditional on the genotype coding, covariates, feature set, weights, and outcome model used.

  • Mistake: Treating \(Q\) as an ordinary chi-square statistic with degrees of freedom equal to the number of product terms. Correction: The null law is determined by the eigenvalues of the residualized kernel; it is generally a weighted chi-square mixture.
  • Mistake: Reading an omnibus kernel rejection as proof that a particular variant pair interacts. Correction: The test aggregates evidence across the kernel's feature space and does not, by itself, identify a particular pair.
  • Mistake: Comparing raw \(Q\) values from different kernels as if they had the same calibration. Correction: Each kernel has its own eigenvalue-based null distribution, and a change in kernel changes the alternative under test.
Key takeaway: A kernel test turns a chosen collection of pairwise genotype products into a variance-component test. Its validity depends on the outcome model and null calibration; its scientific meaning depends on the interaction features and kernel weights specified in advance.

Check Your Understanding

Use the model assumptions and kernel definitions in this tutorial to answer the following questions.

  1. For centered genotype dosages \(x_{ij}\), what feature is used for the pair of variants \(j\) and \(k\), and what does \(K_{i\ell}\) summarize?
  2. In the variance-component model, state the null hypothesis for the interaction variance parameter \(\tau\).
  3. Why is the null distribution of \(Q\) usually not a chi-square distribution with degrees of freedom equal to the number of pairwise features?
  4. If every entry of a fixed kernel is multiplied by the same positive constant, what happens to the statistic and its null eigenvalues?
  5. What can a significant omnibus kernel test establish, and what does it not establish about an individual variant pair?
Clinical Biostats