Abstract
We investigate the problem of testing whether $d$ possibly multivariate random variables, which may or may not be continuous, are jointly (or mutually) independent. Our method builds on ideas of the two-variable Hilbert–Schmidt independence criterion but allows for an arbitrary number of variables. We embed the joint distribution and the product of the marginals in a reproducing kernel Hilbert space and define the d-variable Hilbert–Schmidt independence criterion dHSIC as the squared distance between the embeddings. In the population case, the value of dHSIC is 0 if and only if the $d$ variables are jointly independent, as long as the kernel is characteristic. On the basis of an empirical estimate of dHSIC, we investigate three non-parametric hypothesis tests: a permutation test, a bootstrap analogue and a procedure based on a gamma approximation. We apply non-parametric independence testing to a problem in causal discovery and illustrate the new methods on simulated and real data sets.
Introduction
In statistical analysis, determining whether variables are independent is a fundamental task. While testing pairwise independence (e.g., $X \perp Y$) is well-established, testing for joint independence among $d$ variables—where $d > 2$—presents significant challenges. It is a common misconception that pairwise independence implies joint independence; complex hidden structures can link multiple variables even when every pair appears independent.
Existing methods for joint independence testing often face limitations: they may be restricted to simple Euclidean data, lack rigorous consistency proofs, or suffer from prohibitive computational costs. This paper introduces the d-variable Hilbert-Schmidt Independence Criterion (dHSIC), a non-parametric framework designed to work for any number of variables, whether they are continuous, discrete, or multivariate.
The d-variable Hilbert-Schmidt Independence Criterion (dHSIC)
The core of this research is the dHSIC metric, which leverages kernel embeddings in Reproducing Kernel Hilbert Spaces (RKHS).
- Kernel Embeddings: The method maps probability distributions into an RKHS. Specifically, it embeds both the joint distribution of the $d$ variables and the product of their marginal distributions.
- Distance Metric: dHSIC is defined as the squared distance between these two embeddings. If the variables are jointly independent, the joint distribution is equal to the product of the marginals, resulting in a dHSIC value of zero. This property holds as long as the chosen kernel is "characteristic."
The dHSIC estimator can be computed in $O(dn^2)$ time, where $d$ is the number of variables and $n$ is the number of observations, making it significantly more efficient than traditional methods like the Beran-Millar-Romano (BMR) test.
Hypothesis Testing Procedures
To utilize dHSIC in a practical setting, the authors developed three procedures for calculating p-values. These methods provide a spectrum of options depending on the researcher's needs for theoretical guarantees versus speed.
- Permutation Test: This approach is guaranteed to maintain a valid error rate even for small sample sizes. However, it is computationally intensive.
- Bootstrap Test: This method is proven to be "consistent" (meaning it will reliably detect dependencies as the sample size grows) and is asymptotically valid.
- Gamma Approximation: A fast heuristic that approximates the test statistic's distribution using a Gamma curve. While it lacks the formal guarantees of the other two, it performs well in practice, particularly for smaller sets of variables.
Applications in Causal Discovery
A significant contribution of this work is demonstrating how joint independence testing serves as a "missing link" for verifying causal models. In additive noise models, the correct causal direction is identified as the one where the resulting noise variables (residuals) are jointly independent.
The authors validated this using both simulated and real-world data:
- Simulated Data: Synthetic scenarios involving linear and non-linear structural equation models (SEMs) and various Directed Acyclic Graph (DAG) structures were used to evaluate power and error rates.
- Real-world Data: A dataset of 349 measurements of Altitude, Temperature, and Sunshine was analyzed. dHSIC correctly identified the most plausible causal model (Altitude $\rightarrow$ Temperature and Altitude $\rightarrow$ Sunshine) by rejecting alternative models where residuals failed the joint independence test.
Key Results and Performance
The experimental results highlight several advantages of the dHSIC framework:
- Higher Statistical Power: dHSIC consistently outperformed "multiple pairwise" HSIC tests (using Bonferroni correction) in detecting complex dependencies.
- Robustness: The permutation test maintained a valid 5% error rate even with a very low number of permutations ($B=25$), offering utility even under computational constraints.
- Versatility: Because it is kernel-based, dHSIC can be applied to non-Euclidean data such as graphs, strings, or images, provided a suitable kernel is available.
Limitations and Future Directions
Despite its strengths, dHSIC faces certain challenges. As the number of variables ($d$) increases, the Gamma approximation can become "anti-conservative," potentially leading to an inflated rate of false positives. Additionally, the performance of the test is sensitive to kernel selection and bandwidth parameters. While the "median heuristic" is a reliable default, future research could explore optimal kernel selection for specific dependency types. Finally, while $O(dn^2)$ is efficient, the resampling steps for permutation and bootstrap tests remain a bottleneck for very large datasets ($n > 10,000$).
The implementation of these methods is available in the R package dHSIC.
Summary updated