Least-Squares Independence Test

Masashi Sugiyama, Taiji Suzuki

Introduction

Determining whether two random variables are statistically independent is a fundamental challenge in data science, with applications ranging from feature selection to causal inference. While traditional methods like the Pearson correlation coefficient are effective for linear relationships, they often fail when faced with complex, non-linear dependencies or non-Gaussian distributions. Modern kernel-based methods, such as the Hilbert-Schmidt Independence Criterion (HSIC), offer more flexibility but suffer from a significant drawback: their performance is highly sensitive to the choice of hyperparameters, such as kernel width, which are typically set using unreliable heuristics like the "median heuristic."

The Least-Squares Independence Test (LSIT) addresses these limitations by providing a robust, non-parametric framework that automatically tunes its parameters through a principled, data-driven cross-validation procedure.

Methodology

LSIT is built upon the concept of Squared-loss Mutual Information (SMI). SMI is a non-negative measure of dependency that equals zero if and only if the variables $X$ and $Y$ are independent. The core technical innovation of LSIT lies in its approach to estimating SMI and determining statistical significance.

Direct Density Ratio Estimation

Instead of the computationally difficult and error-prone task of estimating individual probability densities $p(x, y)$, $p(x)$, and $p(y)$ to compute their ratio, LSIT estimates the density ratio $r(x, y) = \frac{p(x, y)}{p(x)p(y)}$ directly. This is achieved using a least-squares approach known as Least-Squares Mutual Information (LSMI). This method results in an analytic, closed-form solution that is both computationally efficient and theoretically optimal in terms of non-parametric convergence rates.

Automated Parameter Tuning

Because LSMI is formulated as a least-squares problem, it allows for the use of standard cross-validation to optimize kernel width and regularization parameters. This removes the need for manual "magic number" selection, making the test significantly more reliable across diverse and complex datasets.

Statistical Significance via Permutation

To determine if the estimated SMI indicates a true dependency, LSIT employs a permutation test. By randomly shuffling the data to simulate the null hypothesis of independence, the method generates a distribution of SMI values under $H_0$ and calculates a p-value to assess statistical significance.

Experimental Evaluation

The authors evaluated LSIT across several scenarios, including high-dimensional benchmarks and controlled toy datasets designed to test both regression and classification relationships.

Toy 1D datasets used for evaluating LSIT, covering both regression and classification scenarios with independent and dependent variables.

As shown in the figure above, the evaluation included:

  • Regression Scenarios: Continuous variables with linear or non-linear relationships.
  • Classification Scenarios: Relationships between a continuous predictor and a discrete label.
  • Rotation Datasets: 2D points rotated to introduce varying degrees of dependency.
  • MNIST Handwritten Digits: Testing dependencies between high-dimensional image pixels and digit labels.

Key Results

LSIT demonstrated superior performance compared to traditional and heuristic-based kernel methods. A primary advantage of LSIT is its ability to maintain high sensitivity to dependencies without increasing false positive rates.

Error rate analysis for LSIT across different sample sizes. The 'ind' cases (circles) show the stability of the test under the null hypothesis, while the 'dep' cases (crosses) demonstrate the rapid decrease in Type II error as sample size increases.

Key findings from the experiments include:

  • Lower Error Rates: In rotation experiments, LSIT maintained a low Type-I error (false positives) while achieving a significantly lower Type-II error (false negatives) than HSIC. As seen in the performance plots, the Type II error for dependent cases (crosses) drops rapidly as the sample size $n$ increases.
  • Robustness to Heuristics: While HSIC's performance often degraded when using the standard "median heuristic," LSIT's automated tuning consistently provided near-optimal results without manual intervention.
  • High-Dimensional Performance: On the MNIST dataset, LSIT successfully identified dependencies between image patterns and labels, even in the presence of label noise, demonstrating its applicability to complex, real-world data.

Conclusion

The Least-Squares Independence Test represents a significant advancement in non-parametric dependency testing. By replacing manual parameter tuning with a robust cross-validation framework, LSIT offers a "distribution-free" solution that is both flexible and reliable. While the permutation test can be computationally intensive for very large datasets, the method's accuracy and automated nature make it a powerful tool for modern data analysis and a promising candidate for integration into automated causal discovery pipelines.

Summary updated

BibTeX
@article{sugiyama2011least,
  author = {Masashi Sugiyama and Taiji Suzuki},
  title = {{Least-Squares Independence Test}},
  journal = {IEICE Trans. Information and Systems},
  year = {2011},
  doi = {10.1587/transinf.e94.d.1333},
}
Figure