ParallelPC: an R package for efficient constraint based causal exploration

Thuc Duy Le, Tao Hoang, Jiuyong Li, Lin Liu, Shu HuarXiv 2015

Abstract

The ParallelPC R package provides a high-performance computing framework for causal discovery, enabling researchers to identify cause-and-effect relationships in high-dimensional datasets using standard multi-core hardware. By parallelizing the computationally intensive conditional independence (CI) tests within popular algorithms such as PC, FCI, and IDA, the package achieves significant speedups while maintaining the accuracy of sequential implementations.

Introduction

In domains like genomics and social science, identifying causal relationships—where variable A directly influences variable B—is a primary research goal. Constraint-based causal discovery algorithms, such as the PC algorithm, are widely used for this purpose. However, these methods face a "curse of dimensionality": as the number of variables increases, the number of required conditional independence (CI) tests grows exponentially. This often renders analysis of high-dimensional "big data" (e.g., gene expression sets) impractical on standard workstations.

Methodology

ParallelPC addresses these computational challenges by parallelizing a suite of causal discovery and inference algorithms, including PC, Stable-PC, FCI, RFCI, IDA, and Joint-IDA.

Parallelization Strategy

The core innovation lies in parallelizing the CI tests at each level of the algorithm. To ensure consistency, the package utilizes the "Stable-PC" approach, which is order-independent. Since the results of CI tests at a specific level do not depend on one another, they can be distributed across multiple CPU cores simultaneously. This ensures that the parallelized version produces the exact same causal graph as the sequential version.

Memory Management

Parallel processing can be memory-intensive. ParallelPC includes a memory-efficient mode that monitors available RAM and manages task distribution to prevent system crashes during the analysis of massive datasets.

Experimental Evaluation

The package was evaluated using two primary datasets:

  1. BR51 (Breast Cancer Gene Expression): A high-dimensional dataset with 50 samples, 92 miRNAs, and 1,500 messenger RNAs, representing a typical "small N, large P" challenge.
  2. UCI Adult Dataset: A census dataset with over 48,000 samples and 100 binary variables, used to test the PC-simple algorithm's performance on large sample sizes.

Results

The empirical results demonstrate dramatic performance improvements. On the BR51 dataset, the sequential PC algorithm required approximately 65 minutes. With ParallelPC utilizing 12 cores, the runtime was reduced to roughly 8 minutes.

Runtime performance of ParallelPC across various algorithms and core counts on the BR51 and adultAll datasets.

As shown in Figure 1, runtime decreases almost linearly as the number of CPU cores increases across all tested algorithms (FCI, RFCI, IDA, etc.). The memory-efficient versions exhibited only a marginal performance overhead compared to the standard parallel versions, confirming the efficiency of the safety mechanisms. Crucially, the causal graphs generated by ParallelPC were identical to those produced by the standard pcalg package.

Conclusion

ParallelPC democratizes high-dimensional causal analysis by allowing researchers to perform complex computations on modern laptops or desktops that previously required supercomputer clusters. By providing a unified interface for 12 different CI tests and ensuring order independence, the package offers a robust and scalable solution for causal exploration. Future work may involve integrating additional CI tests to handle non-linear relationships and further optimizing algorithms like RFCI for extreme dimensionality.

Availability: The package is open-source and available on CRAN at https://cran.r-project.org/web/packages/ParallelPC/index.html.

Summary updated

BibTeX
@misc{le2015parallelpc,
  author = {Thuc Duy Le and Tao Hoang and Jiuyong Li and Lin Liu and Shu Hu},
  title = {{ParallelPC: an R package for efficient constraint based causal exploration}},
  year = {2015},
  eprint = {1510.03042},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1510.03042},
}
Figure