/CISan

Primary LanguagePythonApache License 2.0Apache-2.0

CISAN

license last-commit repo-top-language repo-language-count

This is a research artifact for paper "Enabling Runtime Verification of Causal Discovery Algorithms with Automated Conditional Independence Reasoning" (ICSE 2024).

Python


πŸ“ Overview

Welcome to the repository for CISan, a suite of tools and utilities designed for runtime verification of causal discovery algorithms through automated conditional independence reasoning. This repository contains the Python implementation and dataset resources necessary for conducting experiments and validating the performance of various causal discovery algorithms.

πŸ“‚ Repository Structure

└── CISan/
    β”œβ”€β”€ Chisq.py
    β”œβ”€β”€ DataUtils.py
    β”œβ”€β”€ EDSanPC.py
    β”œβ”€β”€ GraphUtils.py
    β”œβ”€β”€ IndependenceSolver.py
    β”œβ”€β”€ Kendall.py
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ OpAblation.py
    β”œβ”€β”€ PC.py
    β”œβ”€β”€ ParallelSolver.py
    β”œβ”€β”€ README.md
    β”œβ”€β”€ Rules.py
    β”œβ”€β”€ Utility.py
    └── data
        β”œβ”€β”€ alarm-10k.csv
        β”œβ”€β”€ cancer-10k.csv
        β”œβ”€β”€ earthquake-10k.csv
        β”œβ”€β”€ insurance-10k.csv
        β”œβ”€β”€ sachs-10k.csv
        └── survey-10k.csv

🧩 Modules

File Summary
OpAblation.py Contains ablation studies for evaluating the impact of various components in the algorithms.
Rules.py Encodes Pearl's axioms and other rules used in conditional independence reasoning.
Kendall.py Implements Kendall’s tau test for assessing conditional independence.
EDSanPC.py Executes causal discovery algorithms with runtime verification for error detection.
ParallelSolver.py Provides parallelized solvers to enhance performance of conditional independence testing.
Utility.py General utility functions used across different modules.
GraphUtils.py Functions for graph manipulation and visualization.
Chisq.py Implements chi-squared tests for evaluating conditional independence.
DataUtils.py Utility functions for data preprocessing and manipulation.
IndependenceSolver.py Core solver for conditional independence reasoning using SMT.
PC.py Implementation of the PC algorithm for causal discovery.

πŸš€ Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • Python: version 3.9.7

βš™οΈ Installation

  1. Clone the CISan repository:
git clone https://github.com/pckennethma/CISan
  1. Change to the project directory:
cd CISan
  1. Install the dependencies:

Currently, requirements.txt is not available. We will prepare it shortly. Apologize for any inconvenience!

pip install -r requirements.txt

πŸ€– Running CISan

Use the following command to run CISan:

python PC.py # run P-CISan
python EDSanPC.py # run ED-CISan
python OpAblation.py # run ablation experiments

🀝 Contributing

We welcome contributions from the community. If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request. For major changes, please discuss them via an issue first to ensure a smooth collaboration.

πŸ“š Citation

If you find this repository useful in your research, please cite our paper:

@inproceedings{ma2024enabling,
  title={Enabling Runtime Verification of Causal Discovery Algorithms with Automated Conditional Independence Reasoning},
  author={Ma, Pingchuan and Ji, Zhenlan and Yao, Peisen and Wang, Shuai and Ren, Kui},
  booktitle={Proceedings of the 46th IEEE/ACM International Conference on Software Engineering},
  pages={1--13},
  year={2024}
}

For more details, you can access the full paper here.

Feel free to reach out if you have any questions or need further assistance regarding the citation or usage of this repository.