pip install corex-causal
from corex import CausalEvaluator # Initialize the evaluator evaluator = CausalEvaluator() # X: features (n_samples, n_features) | Y: target (n_samples,) result = evaluator.evaluate(X, Y) print(result.label) # "CAUSAL" | "SPURIOUS" | "REPRESENTATION_ARTIFACT" print(result.corex_score) # float in [0, 1] print(result.breakdown) # {"S": 0.91, "R": 0.88, "I": 0.85, "D": 0.90} print(result.failure_modes) # list of detected failure modes
from corex import CausalEvaluator evaluator = CausalEvaluator( weights={ "statistical": 0.25, "representation": 0.25, "intervention": 0.30, # highest: closest to true causality "domain": 0.20 } ) result = evaluator.evaluate(X, Y, environments=env_labels) print(result.corex_score, result.label)
from corex import CausalEvaluator from corex.learnable import MetaScorer # Load pre-trained adaptive weight estimator meta = MetaScorer.from_pretrained("default") evaluator = CausalEvaluator(meta_scorer=meta) # Meta-scorer calibrates weights based on dataset properties result = evaluator.evaluate(X, Y) print(result.meta_confidence) # P(Causal | score_vector)
git clone https://github.com/gitdeeper12/COREX.git
git clone https://gitlab.com/gitdeeper12/COREX.git
git clone https://bitbucket.org/gitdeeper-12/COREX.git
git clone https://codeberg.org/gitdeeper12/COREX.git
@software{baladi2026corex_pypi,
author = {Baladi, Samir},
title = {{COREX}: Causal Origin Resolution and Empirical eXamination},
year = {2026},
version = {1.0.0},
publisher = {Python Package Index},
url = {https://pypi.org/project/corex-causal-causal-causal},
note = {Python package, MIT License}
}
@dataset{baladi2026corex_zenodo,
author = {Baladi, Samir},
title = {{COREX}: Causal Origin Resolution and Empirical eXamination},
year = {2026},
publisher = {Zenodo},
version = {1.0.0},
doi = {10.5281/zenodo.20351233},
url = {https://doi.org/10.5281/zenodo.20351233},
series = {BIO-MED-02}
}
@misc{baladi2026corex_osf,
author = {Baladi, Samir},
title = {{COREX} Framework: Pre-registered Study Protocol},
year = {2026},
publisher = {Open Science Framework},
doi = {10.17605/OSF.IO/XXXXX},
url = {https://doi.org/10.17605/OSF.IO/XXXXX},
note = {OSF Preregistration}
}
@article{baladi2026corex,
author = {Baladi, Samir},
title = {{COREX}: An Autonomous Multi-Stage Framework for Robust
Causal Discrimination in Data-Driven {AI} Systems},
year = {2026},
month = {May},
series = {BIO-MED-02},
version = {1.0.0},
doi = {10.5281/zenodo.20351233},
url = {https://doi.org/10.5281/zenodo.20351233}
}
Baladi, S. (2026). COREX: An Autonomous Multi-Stage Framework for Robust Causal Discrimination in Data-Driven AI Systems (Version 1.0.0, Series BIO-MED-02). Zenodo. https://doi.org/10.5281/zenodo.20351233