This release is a pre-release and may not be stable for production use.
Hi Prof 👋: High-Probability Falsifier
We formalize verification in causal graphical models: deciding whether a given observational formula identifies a target interventional distribution. This opens a problem complementary to identification, asking not whether any identifying formula exists, but whether the given formula is identifying. We show that even sound and complete solutions to identification do not solve verification. We propose a falsifier as a first practical route forward, prove that it induces an almost-surely correct verifier for regular exponential-family models, and describe the gateway test, a natural application of the resulting verifier that finds all sets admissible for use in a front-door formula.
If you publish research using hiprof, please cite
our paper introducing verification:
@article{hiprof2026,
author = {Francesco Freni and Leonard Henckel and Sebastian Weichwald},
title = {{Verifying formulas for interventional distributions}},
journal = {{arXiv preprint arXiv:2607.13883}},
year = {2026}
}
Feedback very welcome!
⚙️ Installation
Install hiprof from PyPI using pip:
# create virtual environment (optional)
python -m venv venv_hiprof
source venv_hiprof/bin/activate
# install hiprof
python -m pip install hiprof
Alternatively, using uv:
# create virtual environment (optional)
uv venv
# install hiprof
uv pip install hiprof
Two optional feature gates provide additional functionality:
identificationinstallsy0and enablesIDAlgorithm, which derives an identifying formula when one is available;nonidentifiabilityinstallsananke-causaland enables verification of non-identifiability claims.
Install optional features individually:
python -m pip install "hiprof[identification]"
python -m pip install "hiprof[nonidentifiability]"
or install all optional features:
python -m pip install "hiprof[all]"
The same requirement strings can be used with uv pip install.
🚀 Quick start
from hiprof import HPFalsifier
falsifier = HPFalsifier(
graph="T -> M; M -> Y; T <-> Y",
treatments="T",
outcomes="Y",
)
formula = """
sum_{M} {
p(M | T)
sum_{T'} { p(Y | M, T') p(T') }
}
"""
falsifier.check(formula)
# Output:
# True
# False-acceptance bound: 5.421e-18
Adjacency matrices can be translated as follows (numpy arrays and pandas DataFrames are accepted as well):
from hiprof import adjacency_to_graph
adjacency = [
[0, 1, 1],
[0, 0, 1],
[1, 0, 0],
]
graph = adjacency_to_graph(
adjacency,
nodes=["T", "M", "Y"],
edge_direction="from row to column",
)
# T -> M
# T <-> Y
# M -> Y
📚 Examples
For a concise introduction, see
notebooks/demo.ipynb.
After cloning and installing the repository, the standalone examples in
examples/
can be run from the repository root:
python examples/frontdoor.py
python examples/napkin.py
python examples/cross_graph_verification.py
cross_graph_verification.py uses IDAlgorithm and therefore requires the
identification feature.
🛠️ Local development
Clone the repository and install it in editable mode:
git clone git@github.com:francescofreni/hiprof.git
cd hiprof
python -m pip install -e ".[dev]"
To include all optional features as well as the development tools:
python -m pip install -e ".[dev,all]"
Run the test suite with
pytest
Metadata
Release files for hiprof 0.1.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hiprof-0.1.0rc1.tar.gz | 40.7 kB | With provenance | Details for hiprof-0.1.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hiprof-0.1.0rc1-py3-none-any.whl | Python 3 | none | any | Details for hiprof-0.1.0rc1-py3-none-any.whl |
Total release size: 80.4 kB
Release files / hiprof-0.1.0rc1.tar.gz
| Download URL | hiprof-0.1.0rc1.tar.gz |
|---|---|
| Size | 40.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75ed594636c52c3b783d1efa7d078739b08bab634abaeabc77f2ac5098c8f05c
|
|
BLAKE2b-256 checksum How to use checksums |
ed399f4268758d47c62d45fa8eb0989f900b858ad2b304c5b2a5561515654174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logRelease files / hiprof-0.1.0rc1-py3-none-any.whl
| Download URL | hiprof-0.1.0rc1-py3-none-any.whl |
|---|---|
| Size | 39.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd86f6935aefa1af0641e8213da94e838a825a9b40a4c1c4fdc045c1d610502f
|
|
BLAKE2b-256 checksum How to use checksums |
8749c6e2585c0349a6fc975a32f257d48ff71608ac3f5181e4bde83a2382c80f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logSecurity for hiprof 0.1.0rc1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hiprof-0.1.0rc1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.