Adaptive Structural Dependency Learning for Non-Stationary Dynamical Systems
Project description
CausalNerve
CausalNerve: online causal graph adaptation for streaming non-stationary systems.
Core Capabilities
- Real-time causal structure revision without retraining (see Section 6 benchmarks).
- Intervention simulation via Pearl's do-calculus (native) (demonstrated in Turbofan demo).
- Structural isolation guarantee: do(X) only affects descendants (formalized in PAPER.md).
Installation
pip install causalnerve
pip install causalnerve causalnerve-observe # for dashboard
Quickstart
from causalnerve import CausalNerve
from causalnerve.datasets import SyntheticStreamGenerator
nerve = CausalNerve(nodes=6, state_dim=32)
nerve.fit(SyntheticStreamGenerator.stable(n_cycles=200), epochs=20)
nerve.watch(SyntheticStreamGenerator.with_drift(drift_at=100))
Expected output:
CausalNerve Summary
────────────────────────────────────────
Cycles processed: 200
Structural alarms: 3
Edits accepted: 1 (edge 4->2, conf=0.71)
Edits rejected: 2
Final leakage: 0.031
Causal equilibrium: reached at cycle 147
────────────────────────────────────────
Run nerve.why(4) for root cause analysis.
Run nerve.what_if({2: 0.5}) to simulate interventions.
What CausalNerve Is Not
- CausalNerve is not a causal discovery algorithm (use PCMCI for that).
- CausalNerve is not a replacement for physics simulations.
- CausalNerve is not validated for safety-critical deployment without domain expert review of its structural revisions.
Scientific Benchmarks
Evaluated on NASA C-MAPSS FD001 (Engines 81-100).
| Method | SHD ↓ | Det. Delay ↓ | Runtime ↑ | Online? |
|---|---|---|---|---|
| CausalNerve | 0.0 ± 0.0 | 221.7 ± 60.3 | 83 ms | Yes |
| PCMCI | 105.8 ± 9.3 | N/A (offline) | 4613 ms | No |
| VAR-LiNGAM | 20.0 ± 0.0 | N/A (offline) | 1 ms | No |
| Granger | 158.9 ± 13.7 | N/A (offline) | 780 ms | No |
Note: CausalNerve is structurally self-repairing (via automated dual-world validation), which incurs an ~80ms overhead compared to static architectures. It trades offline causal discovery accuracy for online adaptability; specifically, CausalNerve loses to PCMCI on Structural Hamming Distance (SHD) for stationary chain graphs.
Examples
We provide three definitive demonstrations of the autonomous capabilities:
- Real-time Causal Self-Repair in Turbofan Engines
- Tracking Changing Brain Connectivity During Seizure
- Detecting Cascading Failures in Distributed Systems
Documented Limitations
CausalNerve is bound by constraints in scalability, expected calibration error (ECE) under rapid distribution shifts, and sensitivity to highly correlated sensor noise. For a rigorous audit of system boundaries and known failure modes, please read FAILURES.md.
Citation
If you use CausalNerve in your research, please cite our technical paper:
@software{causalnerve2026,
author = {CausalNerve Core Team},
title = {CausalNerve: Adaptive Structural Dependency Learning},
year = {2026},
url = {https://github.com/guru-s/CausalNerve}
}
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file causalnerve-1.0.1.tar.gz.
File metadata
- Download URL: causalnerve-1.0.1.tar.gz
- Upload date:
- Size: 224.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
857dfa571233eee8dfbbe1fcebd87a93fd0670201bbd4932814a388089eb0080
|
|
| MD5 |
8a6036b73f4a4f8b01a9ecb2bd4601f5
|
|
| BLAKE2b-256 |
f82049bd4dac7af2d1630c8423f7a4adc45b2611e5c70c39d22337a645bd35b0
|
Provenance
The following attestation bundles were made for causalnerve-1.0.1.tar.gz:
Publisher:
publish.yml on GURU1001S/CausalNerve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
causalnerve-1.0.1.tar.gz -
Subject digest:
857dfa571233eee8dfbbe1fcebd87a93fd0670201bbd4932814a388089eb0080 - Sigstore transparency entry: 1652872634
- Sigstore integration time:
-
Permalink:
GURU1001S/CausalNerve@b8f48d48249eb92b8f44ecfcc9faddfd12300233 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/GURU1001S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8f48d48249eb92b8f44ecfcc9faddfd12300233 -
Trigger Event:
push
-
Statement type:
File details
Details for the file causalnerve-1.0.1-py3-none-any.whl.
File metadata
- Download URL: causalnerve-1.0.1-py3-none-any.whl
- Upload date:
- Size: 222.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8dd8902a65d873b141909fbaecfc05f496dab45f7bb085001a7add847797a68
|
|
| MD5 |
58603269af126db484dd047c36d03241
|
|
| BLAKE2b-256 |
700580e9f42c8f571370ed4088531872ae21c3144d3a4a6fd268e728bd07b4bb
|
Provenance
The following attestation bundles were made for causalnerve-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on GURU1001S/CausalNerve
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
causalnerve-1.0.1-py3-none-any.whl -
Subject digest:
f8dd8902a65d873b141909fbaecfc05f496dab45f7bb085001a7add847797a68 - Sigstore transparency entry: 1652872750
- Sigstore integration time:
-
Permalink:
GURU1001S/CausalNerve@b8f48d48249eb92b8f44ecfcc9faddfd12300233 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/GURU1001S
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8f48d48249eb92b8f44ecfcc9faddfd12300233 -
Trigger Event:
push
-
Statement type: