Testing conditional independence in supervised learning algorithms

David S. Watson, Marvin N. Wright · DOI

TL;DR

This paper introduces the Conditional Predictive Impact (CPI), a new, general, and robust method for testing conditional independence between features and an outcome in supervised learning. It leverages the "knockoff" framework to provide a powerful tool for feature selection and causal discovery, outperforming existing methods in various simulations and real-world datasets.

What Problem Does This Paper Address?

In machine learning and statistics, understanding which features are truly important for predicting an outcome is crucial. This is often framed as testing for conditional independence – determining if a feature still matters for prediction after accounting for other relevant features. Traditional methods often struggle with high-dimensional data, correlated features, or are tied to specific algorithms. This paper addresses the need for a universally applicable, statistically sound, and computationally efficient method to test conditional independence, especially in the presence of feature correlations, which can mislead simpler "marginal" importance measures.

Methods

The core of the paper is the Conditional Predictive Impact (CPI). It builds upon the knockoff framework (Candès et al., 2018), which generates "knockoff" variables that are statistically similar to original features but are designed to have no true association with the outcome.

Here's how it works:

  1. Knockoff Generation: For a set of features $X_S$, corresponding "knockoff" features $\tilde{X}_S$ are generated. These are designed to be exchangeable with the original features and conditionally independent of the outcome $Y$, given the other features $X_R$.
  2. Predictive Performance Comparison: A supervised learning model is trained twice: once with the original features ($X_S, X_R$) and once with the knockoff features replacing the original ones ($( \tilde{X}_S, X_R)$).
  3. Loss Function: A pre-selected loss function (e.g., Mean Squared Error for regression, Cross-Entropy for classification) is used to evaluate the model's predictive performance in both cases.
  4. CPI Calculation: The CPI is defined as the expected difference in loss between predictions made using the knockoff features and the original features. A positive CPI suggests the original features $X_S$ are important for prediction, even after accounting for $X_R$.
  5. Inference: The paper develops statistical inference procedures (paired t-tests for large samples, Fisher exact tests for small samples) to assess the significance and construct confidence intervals for the CPI.

The key novelty lies in using the knockoff framework to create a "negative control" for feature importance, allowing for model-agnostic and algorithm-agnostic testing of conditional independence.

Datasets

The paper uses a variety of datasets for evaluation:

  • Simulated Data: Generated under four scenarios combining linear/nonlinear outcomes and independent/correlated predictors. This allows for controlled testing of Type I and Type II errors and power.
  • Boston Housing Dataset: A classic dataset for regression, used to test the CPI on a low-dimensional, real-world problem.
  • Breast Cancer Gene Expression Data: A high-dimensional dataset used to test the CPI's ability to identify biologically meaningful gene sets associated with cancer subtypes.

The paper does not introduce new benchmark datasets but rather applies the CPI to existing ones and compares its performance against established methods.

Key Insights and Ideas

  • Universality of CPI: The CPI is remarkably general. It can be applied with any supervised learning algorithm, any valid knockoff sampler, and any loss function. This makes it a powerful, one-size-fits-all tool for feature importance.
  • Conditional Importance is Key: The paper strongly emphasizes that conditional importance is often more relevant than marginal importance, especially when features are correlated. The CPI directly addresses this by conditioning on a set of other covariates.
  • Knockoffs as Negative Controls: The knockoff framework provides a principled way to create a baseline for comparison, ensuring that the observed importance is not due to chance or spurious correlations.
  • No Sparsity Constraints: Unlike some other methods, the CPI can be efficiently computed for high-dimensional data without requiring sparsity assumptions on the underlying feature relationships.
  • Bridging the Gap: The CPI effectively bridges the gap between traditional frequentist/Bayesian methods and modern machine learning, offering statistically rigorous inference for complex models.

Key Results

  • Type I and Type II Error Control: Simulations show that the CPI's inference procedures successfully control Type I error (false positives) at the nominal level (e.g., $\alpha = 0.05$) across various learners and data types.
  • High Power: The CPI demonstrates competitive statistical power, often outperforming alternative methods, especially in scenarios with correlated predictors or nonlinear relationships.
  • Superior Performance on Complex Data: In simulations with nonlinear outcomes and correlated predictors, the CPI consistently outperformed other methods like ANOVA, LOCO, and GCM, achieving higher power while maintaining Type I error control.
  • Real-World Applicability: The CPI successfully identified important features in the Boston Housing dataset and biologically meaningful gene sets in the breast cancer data, demonstrating its utility on real-world problems.
  • Comparison to Knockoff Filter: The CPI generally shows higher power than the original knockoff filter for detecting true positives, especially when autocorrelation is low, while both methods control the False Discovery Rate (FDR).

Limitations and Future Work

  • Computational Complexity: While the CPI is efficient, generating knockoffs for very high-dimensional datasets can still be computationally intensive (e.g., 49 hours for the gene expression data in their experiments). The authors note that knockoff sampling is an active research area, and future advances are expected to speed this up.
  • Model Misspecification/Loss Function Choice: The CPI's performance is contingent on the chosen loss function and the appropriateness of the supervised learning model. If the loss function ignores higher-order moments, the CPI might not capture the full Markov blanket.
  • Knockoff Quality: The method's effectiveness relies on the quality of the generated knockoffs. Poorly constructed knockoffs can lead to inflated errors or reduced power.
  • Future Work:
    • Localized CPI: Developing localized versions of the CPI to detect feature importance for specific predictions.
  • Model-Specific Methods: Implementing model-specific CPI variants to potentially speed up computation.
  • Causal Discovery: Extending the CPI for applications in causal discovery and inference.

Summary updated

BibTeX
@article{watson2021testing,
  author = {David S. Watson and Marvin N. Wright},
  title = {{Testing conditional independence in supervised learning algorithms}},
  journal = {Machine Learning},
  year = {2021},
  doi = {10.1007/s10994-021-06030-6},
}
Figure