Repository navigation
Lag-0 explanation families under weaker adjacency faithfulness - #17
Merged
Merged
Conversation
Autoplectic
force-pushed
the
lag0-families
branch
from
November 14, 2026 19:03
58a0561 to
bcf147c
Compare
Autoplectic
marked this pull request as ready for review
November 14, 2026 20:02
The PC-style lag-0 layer reads adjacencies from dependence, so it cannot see a link whose dependence shows only jointly: for a lag-0 XOR every pair is independent and the layer reports nothing. contemporaneous_families (and infer_multiplex(contemporaneous="family")) instead reports, per component of at most five processes, every DAG that is Markov, weakly adjacency faithful (Marx, Gretton & Mooij 2021) and SGS-minimal with respect to a table of conditional-independence decisions, following Hourican & Quax 2026. - infoflow/families.py: CIDecisions, explanation_family, ExplanationFamily and decisions_from_distribution (exact decisions for a dit distribution). Every DAG on up to five nodes is enumerated once, with vectorised d-separation tables. - Decisions are tested at alpha / m for a component's m statements. One false rejection removes the true DAG, so uncorrected decisions leave many families empty; corrected ones recovered the population family in 20 of 20 samples of each motif (XOR, XOR with a descendant, OR, chain). - Components that are too large, or whose tables are too sparse to test, keep the PC-style entries. The contemporaneous matrix marks only what every explanation shares; contemporaneous_possible marks what any has. - Docs: a lag-0 families page, literature review, interpretation and API.
Autoplectic
force-pushed
the
lag0-families
branch
from
November 14, 2026 20:07
bcf147c to
88d3319
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The PC-style lag-0 layer reads adjacencies from dependence, so it cannot see a link whose dependence shows only jointly. For a lag-0 XOR,
Z_t = X_t xor Y_t xor E_t, every pair is independent and the layer reports nothing;test_contemporaneous_xor_leaves_no_pairwise_linkspins this behaviour. Keeping links that become dependent given a third variable does not fix it either: the XOR becomes a triangle, and OR gains a false edge induced by its collider.Change
contemporaneous_families, also available asinfer_multiplex(contemporaneous="family"), reports every explanation that weaker adjacency faithfulness allows (Marx, Gretton & Mooij, UAI 2021; Hourican & Quax, arXiv:2610.31724):convention="neither"or"not_both"), SGS-minimal, and consistent with anytiersorforbiddenarcs.Outputs:
network.contemporaneous_families: oneExplanationFamilyper component, with statuscomplete,empty,too_largeorunavailable.dataset["contemporaneous"]: marks only what every explanation shares.dataset["contemporaneous_possible"]: marks what any explanation has.Components that are too large, or too sparse to test, keep the PC-style entries.
contemporaneous=Truestill means the PC-style layer.The new module
infoflow.familiesprovidesCIDecisions,explanation_family,ExplanationFamilyanddecisions_from_distribution(exact decisions for a dit distribution). It builds vectorised DAG and d-separation tables; the 5-node table takes about 1.4 s.Validation
Tests and docs
tests/test_families.py: 42 tests plus a slow Monte Carlo. Full suite: 317 passed, 13 skipped. ruff, ty and sphinx-Ware clean.Marx2021weaker,Hourican2026,Spirtes2000.Rebased onto main after #16 and #15 merged. The only conflict was the new
MultiplexNetworkfields;backbone(#15) andcontemporaneous_familiesare both kept.