Paper: https://arxiv.org/abs/2607.10456
Website: https://matyasch.github.io/bk
This is the official code repository for Integrating Background Knowledge for Scalable Causal Discovery (NeurIPS 2026) by Mátyás Schubert, Theofanis Aslanidis, Tom Claassen and Sara Magliacane.
Note
This branch contains a minimal and portable implementation of the algorithms. Check out the neurips2026 branch to reproduce all results presented in the paper.
All algorithms are implemented in the algorithms/ directory:
-
algorithms/pc.py:pc, the PC-BK algorithm -
algorithms/snap.py:snap, the SNAP($\infty$ )-BK algorithm -
algorithms/load.py:load, the LOAD-BK algorithm -
algorithms/mb_by_mb.py:mb_by_mb_plus, the MB-by-MB-BK algorithm, extended with the checks needed to return adjustment sets for a pair of targets -
algorithms/ldecc.py:ldecc_plus, the LDECC-BK algorithm, extended with the checks needed to return adjustment sets for a pair of targets -
algorithms/orient.py: Shared orientation steps (v-structures, Meek's rules, and applying BK to a CPDAG), not an algorithm itself
Each algorithm takes the data matrix, a CI test ci_test(x, y, S) that returns a p-value, a significance level alpha, and the background knowledge as a matrix bk where:
bk[i, j] = -1andbk[j, i] = -1indicates adjacency:i - j.bk[i, j] = -1andbk[j, i] = 1indicates orientation:i -> j.bk[i, j] = 1andbk[j, i] = 1indicates gap:i -/- j.bk[i, j] = 0andbk[j, i] = 0indicates no knowledge aboutiandj.
The local algorithms snap, load, mb_by_mb_plus and ldecc_plus also take the targets (a pair of nodes for load, mb_by_mb_plus and ldecc_plus).
All dependencies are listed in requirements.txt:
pip install -r requirements.txt@inproceedings{schubert2026integrating,
title={Integrating Background Knowledge for Scalable Causal Discovery},
author={M{\'a}ty{\'a}s Schubert and Theofanis Aslanidis and Tom Claassen and Sara Magliacane},
booktitle={The Fortieth Annual Conference on Neural Information Processing Systems},
year={2026}
}