Series BIO-MED-02 · Version 1.0.0 · May 2026

COREX

Causal Origin Resolution and Empirical eXamination
An Autonomous Multi-Stage Framework for Robust Causal Discrimination in Data-Driven AI Systems
"Causality is not assumed, inferred, or interpreted —
it is survived or rejected under systematic perturbation tests."
↗ View on GitHub 📦 PyPI Package 🔬 Zenodo DOI 📄 Documentation
PyPI Downloads Python DOI OSF ORCID License Website
4
Evaluation Modules
1,500
Benchmark Datasets
0.91
Causal Precision
0.07
False Causal Rate
11
Distribution Platforms
Decision Logic
Three-Class Causal Classification
Every relationship evaluated by COREX receives a calibrated score and a categorical label with full technical justification.
≥ 0.80
🟢 CAUSAL
Survives all four evaluation axes. Intervention consistency confirmed. Strong evidence of a genuine causal mechanism.
0.50 – 0.79
🟡 SPURIOUS
Breaks under domain shift or intervention instability. Statistical association exists without causal mechanism.
< 0.50
🔴 ARTIFACT
Representation invariance fails. The relationship exists only as a function of the data encoding choice — not reality.
Four-Axis Robustness Architecture
No prior causal graph required. COREX operates as a meta-evaluation layer atop any learned relationship.
MODULE 01
Statistical Stability
S
Evaluates whether P(Y|X) remains invariant across independently drawn subpopulations using KL divergence and KS tests.
S = 1 − mean KL[P(Y|X,D₁) ‖ P(Y|X,D₂)]
MODULE 02
Representation Invariance
R
Tests stability under linear projections, nonlinear embeddings, noise injection, feature dropout, and PCA compression.
R = 1 − (1/|Φ|) Σ ‖P(Y|X) − P(Y|φ(X))‖₁
MODULE 03
Intervention Consistency
I
Simulates causal interventions via propensity-score matching, counterfactual generation, and direct feature perturbation.
I = Consistency(do(X=x₁)→Y₁, do(X=x₂)→Y₂)
MODULE 04
Domain Robustness
D
Evaluates cross-environment generalization using coefficient of variation across distinct distributional regimes.
D = 1 − CV(P(Y|X, e)) over e ∈ E
Scoring Function
COREX Causal Score
COREX = w₁·S + w₂·R + w₃·I + w₄·D
w₁ = 0.25
Statistical Stability
w₂ = 0.25
Representation Invariance
w₃ = 0.30
Intervention Consistency
w₄ = 0.20
Domain Robustness
Quick Start
Up and Running in 60 Seconds
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)
Available on 11 Platforms
COREX is distributed across code hosts, package registries, and research archives for maximum accessibility.
🐙
GitHub
Primary · Source code, issues, PRs
↗ github.com/gitdeeper12/COREX
🦊
GitLab
Mirror · CI/CD pipeline
↗ gitlab.com/gitdeeper12/COREX
🪣
Bitbucket
Mirror · Enterprise access
↗ bitbucket.org/gitdeeper-12/COREX
🏔️
Codeberg
Mirror · Open-source community
↗ codeberg.org/gitdeeper12/COREX
🐍
PyPI
Python Package · pip install corex-causal
↗ pypi.org/project/corex-causal-causal
🔬
Zenodo
Paper & Data · Citable DOI
↗ doi.org/10.5281/zenodo.20351233
📋
OSF Project
Research project registry
↗ osf.io/xxxxx
📝
OSF Preregistration
Pre-registered study protocol
↗ doi.org/10.17605/OSF.IO/XXXXX
🌐
Website
Live docs & dashboard
↗ corex-causal.netlify.app
🧑‍🔬
ORCID
Researcher identity profile
↗ 0009-0003-8903-0029
🗄️
Internet Archive
Permanent archival copy
↗ archive.org
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
Citation
Cite COREX in Your Research
If COREX contributes to your research, please use one of the citation formats below.
@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