Skip to content
causality-labPublic

About

Skewness-Robust Causal Discovery in Location-Scale Noise Models

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Venue

SKEWD

Code for Skewness-Robust Causal Discovery in Location-Scale Noise Models

Project Structure

In the following, we provide the general project structure.

skewd/
├── data # benchmark datasets
├── example_plots # exemplary plots of skew-noise pairs
├── experiments # skewd experimental code: scripts and results for all benchmarks
├── skewDGP 
│   └── generate_skewed_LSNMs.R # generates skew-LSNM benchmarks
├── src # source code for skewd
├── environment.yaml # .yaml for environment generation
├── full_kde_dict.pkl # prevent repeated computation in KDE_analysis.ipynb
├── KDE_analysis.ipynb # KDE evaluation
├── MV_analysis.ipynb # multivariate evaluation
├── MV_F1.ipynb # multivariate F1 metrics
├── plot_examples.ipynb # generates figures in example_plots
└── requirements.txt # requirements file 

Installation Instructions

Create a Conda Environment

To ensure compatibility, use the ``environment.yaml'' file to create an environment:

conda env create -f environment.yaml

To run our code, activate the Conda environment:

conda activate skewd-env

Alternatively, we provide the ``requirements.txt'' file for environment creation.

Running SKEWD

Reproduce Results

For replicating the experiments, see the README.md inside the experiments folder.

Random Dataset

Run SKEWD with a randomly generated dataset:

import numpy as np
from src.skewd import skewd
from sklearn.preprocessing import StandardScaler

np.random.seed(42)

x = np.random.randn(300).reshape(-1, 1)
eps = np.random.randn(300).reshape(-1, 1)
y = x**3 + (x**2) * eps

indep_score, indep_dir, lik_score, lik_dir, _, _, _, _  = skewd(x, y, cma_iter=200, ecm_max_iter=200)
print(f"SKEWD-IT infers direction {indep_dir}")
print(f"SKEWD-LL infers direction {lik_dir}")

The inferred direction is given by indep_dir and lik_dir for independence testing and likelihood scoring, respectively. If the direction is 1 x -> y is inferred, while if it is 0 y-> x is inferred. Another example for a single pair is provided in "src/example.py", showing how to execute SKEWD on a skew-noise pair.

Citation

@inproceedings{klippert:26:skewness-robust,
    title={Skewness-Robust Causal Discovery in Location-Scale Noise Models},
    author={Anonymous},
    booktitle={Forty-third International Conference on Machine Learning},
    year={2026},
    url={https://openreview.net/forum?id=mXn4ueFKnQ}
}

About

Skewness-Robust Causal Discovery in Location-Scale Noise Models

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages