Detectors

Five categories, each a generalization of something this project proved or directly verified — not a heuristic assembled under deadline pressure. The plain-language text below is reused from SAIL_PACKAGE_README.md and the detectors' own source, not rewritten.

1 · Construction leakage

Proven by: Theorem 1 / Proposition 3

A state feature is partly defined by treatment, making it non-identifiable (or shift-colliding) with the signal it claims to measure.

Read the full explanation

Checked as two distinct, mutually exclusive shapes:

1a — full non-identifiability (Theorem 1's shape): once treatment is active, the score becomes constant with respect to the signal it's supposed to measure, across every signal value observed while treatment is active. The detector's own flagged explanation reads: "‘{signal}’ has no effect on the score once treatment is active … across N distinct active treatment level(s) tested, each spanning multiple ‘{signal}’ values, the score stayed constant."

1b — score-shift collision (Proposition 3's shape): the score still varies with the signal, but at least one signal value maps to a different score depending on treatment status alone. Checked only when 1a does not hold.

See the math — Theorem 1 (full non-identifiability) →

See the math — Proposition 3 (score-shift collision) →

2 · Reconstruction leakage

Proven by: Theorem 2

A "removed" feature is still exactly recoverable from other retained features.

Read the full explanation

A feature removed from a state definition is still exactly (or near-exactly) recoverable by subtracting the other retained component features from a retained total. The tolerance defaults to 1e-9 — Theorem 2 is an algebraic identity, not an approximation. The detector's own flagged explanation reads: "‘{target}’ is exactly recoverable from ‘{total}’ minus {components} … removing ‘{target}’ from the state does not remove the information it carries."

See the math — Theorem 2 →

3 · Temporal-overlap leakage

Proven by: Proposition 1

A feature's aggregation window overlaps a period when treatment was already active.

Read the full explanation

A feature's lookback window overlaps a period when treatment was already active, contaminating what's meant to be a clean pre-decision snapshot. The overlap fraction is computed directly from its definition for whatever window length it's given, by design: the total overlap hours are proven monotone non-decreasing as the window widens (Proposition 1), but the fraction of the window that's overlapped is not monotonic — it can rise or fall as the window grows, so the detector never assumes a direction.

See the math — Proposition 1 →

4 · Timing-violation leakage

Proven by: Direct timestamp verification

The state's window extends into or past the action being predicted — the strict sense of "leakage."

Read the full explanation

This is the strict, reserved sense of "leakage" in this project's own taxonomy: a state's window extends into or past the timestamp of the action it's meant to precede. A row is a violation only when the action's window starts strictly before the state's window ends — genuine boundary overlap; an action window that starts exactly when the state window ends is adjacent, not overlapping, and is not a violation. This project's own action label was verified to have zero overlap with the state window it follows — that verified real case is this detector's own first test.

See the verification — terminology and the zero-overlap check →

5 · Persistence-dominance flag

Proven by: Motivated directly by this project's own Variant F result

A trivial "last action repeats" baseline matches or exceeds the full state's predictive power — not leakage, but a related and equally important diagnostic.

Read the full explanation

Not leakage. A related, equally useful diagnostic this project's own Variant F result motivates directly: two purely temporal treatment-history features, with no raw treatment-dose term of any kind, out-predicted the full physiological state (action-recoverability AUROC 0.914 vs. 0.900). A package that only checked construction/reconstruction/temporal-overlap/timing-violation leakage would miss exactly the finding that made this project's own result sharper than expected: sometimes a state's predictive power is mostly ordinary treatment persistence, not any of the leakage mechanisms above. Every explanation this detector produces, flagged or not, states plainly that this is not a leakage finding.

See the evidence — the Variant F result →

Think a pattern is missing? The strongest case explains why it's provably a problem, not just that it seems suspicious.

Suggest a new detector →