Back to the Home hub

· Supporting progress note · Johan–Manus dialogue

From Intuition to Tested Controls

We have made a limited but useful step: an observation about missing histories has become a testable safeguard. We built a synthetic student-retention example that reconstructs what was available at a past decision, challenges that reconstruction with forbidden later records, and checks whether independent random outcomes produce a repeatable predictive advantage.

  1. 16 passed

    Runnable Python regression tests. Warnings retained.

  2. 20 replicates

    Fresh synthetic fixtures and fitted pipelines, two arms per seed.

  3. Not run

    Production streaming adaptation and citizen-benefit evaluation.

What has moved forward

Our starting question was whether a snapshot misses relationships, membership changes and the history behind a decision. That question is worth investigating, but adding history also creates a danger: later knowledge can quietly enter an earlier prediction.

The progress reported here is not that histories have been shown to improve decisions. It is that one important evaluation boundary now has executable checks. A feature can be accurately measured today and still be unavailable at the decision we are pretending to evaluate. Scikit-learn defines leakage in terms of unavailable prediction-time information and recommends training-only fitting of preprocessing and feature selection. 1

The two clocks

An event has an occurrence time. Each immutable version also has an availability time: when that exact information became accessible to the feature pipeline. A September absence entered in November cannot legitimately change an October prediction merely because the absence itself happened earlier.

Our extractor first removes versions unavailable at the decision. It then chooses the latest eligible version of each event, and only afterwards checks occurrence time and the historical window. This preserves the older version that was actually known rather than replacing it with today's corrected record.

The synthetic fixture uses separate students in a September training cohort and an October test cohort. Training outcomes are available before the frozen model date of 10 October 2025; the test decisions follow on 15 October. These dates are invented diagnostic settings, not observed college data.

Extracted safe path from known_versions; comments shortened and the deliberately unsafe switch omitted. This example supports one decision per student and assumes trustworthy, immutable availability metadata.

Inspect the timestamp filter · Python
e = events.merge(
    decisions[["student_id", "decision_time"]],
    on="student_id", how="inner", validate="many_to_one"
)

# Availability FIRST: select only versions known at this decision.
e = e.loc[e["available_at"] <= e["decision_time"]].copy()
e = e.sort_values(
    ["student_id", "event_id", "available_at", "version"]
)
e = e.drop_duplicates(["student_id", "event_id"], keep="last")

# Only then apply occurrence time and the lookback window.
eligible = (
    (e["event_time"] <= e["decision_time"])
    & (e["event_time"] >= e["decision_time"] - pd.Timedelta(days=90))
    & e["kind"].eq("activity")
)
e = e.loc[eligible].sort_values(
    ["student_id", "event_time", "event_id"]
)

What we actually ran

Mean held-out ROC AUC · 20 synthetic replicates

AUC measures score ranking, not the fraction of students helped. Both bars use the full 0–1 scale; 0.5 is the independence reference.

Availability-filtered pipeline0.495903

Random legal histories · p = 0.705 · no declared flag

Deliberately broken pipeline1.000000

Outcome-encoded late correction · p = 0.001 · flag triggered

The perfect score is the engineered failure signal. It is not measured performance on real students. “Availability-filtered” describes this arm, not a general leakage-free certification.

Sixteen Python regression tests passed. The mutation check preserved all 240 diagnostic feature rows exactly after unavailable records were edited or appended. The measured maximum feature change and frozen-model probability change were both zero. The event-time-only extractor failed that same invariance check, as intended.

We then generated twenty independent synthetic datasets using all fixed seeds, 1000–1019. Each had 600 training students and 400 later, disjoint test students. Legal histories contained 32 daily observations in four serially correlated channels; the retention outcomes were generated independently with probability 0.7. Missingness was independent of outcomes too.

The entire example pipeline was rebuilt for each dataset: version selection, history summaries, imputation, scaling, supervised feature selection, fitting and scoring. It produced 39 candidate features. The availability-filtered pipeline's mean held-out ROC AUC was 0.495903. Individual runs ranged from 0.425482 to 0.572696. A single favourable run could therefore have been misleading.

The deliberately broken pipeline admitted a later correction whose payload encoded the synthetic outcome. Its mean AUC was 1.000000. That perfect score is an engineered demonstration of leakage, not evidence of excellent student prediction.

A secondary fixed-score permutation calculation used 999 draws per aggregate comparison. The one-sided p-values were 0.705 for the availability-filtered pipeline and 0.001 for the known-leak pipeline. The declared engineering flag required p ≤ 0.01 and mean AUC ≥ 0.55; only the known-leak arm triggered it. These are demonstration settings, not universal acceptance thresholds. A smaller statistically unusual excess would still deserve investigation.

This scoring calculation is not a pipeline-refitting permutation test. The end-to-end challenge comes from regenerating independent labels and rebuilding the example pipeline across datasets. A small permutation p-value on ordinary real labels only establishes exploitable association; it does not tell us whether that association was available legitimately. 2

The exact code, all seeds, predictions, feature selections, hashes and dependency versions are preserved in the downloadable archive. Warnings are retained rather than hidden: three fixed-length count features were constant, and the installed library combination reported an ignored optimiser option. Neither was a test failure. They remain reasons to remove noninformative features and align supported library versions before production use.

Why the failure controls matter

Changing forbidden information should not change a historical feature vector. The same frozen model should therefore produce the same probabilities. The first assertion compares features exactly; it catches the known broken extractor before the prediction comparison is reached.

This matters because an insensitive model could ignore a contaminated feature, and a probability shift could occur without changing a thresholded class. We check the information boundary directly, not only whether a headline score looks plausible.

The result supports a narrow claim: the suite detected the deliberately introduced backfill route and did not detect repeatable predictive advantage under this specified legal-history null. It does not prove that all possible leakage has been eliminated.

Inspect the invariance assertions · Python
before = extractor(events, decisions)
after_events = mutate_unavailable_records(events, decisions)
after = extractor(after_events, decisions)
assert_frame_equal(before, after, check_exact=True)

# SAME fitted model: compare probabilities, not only classes.
probabilities_before = model.predict_proba(before)
probabilities_after = model.predict_proba(after)
assert_allclose(
    probabilities_before, probabilities_after,
    rtol=0, atol=1e-12
)

# A passing fault-detection test requires the known bad path to fail.
with pytest.raises(AssertionError):
    assert_future_invariance(
        model, fixture.events, fixture.decisions,
        extractor=build_features_EVENT_TIME_ONLY_POSITIVE_CONTROL
    )

These excerpts come from the executed batch example. The broken path fails the feature assertion first; its test does not independently demonstrate a probability-comparison failure.

What the streaming extension still needs

For an incremental feature store, source availability is not enough. We must also preserve which feature version was committed and visible to the actual prediction read. An eligible source record may not yet have reached the serving store. Reconstructing every eligible record and reproducing what was actually served are different comparisons.

The proposed extension logs decision identities, immutable event versions, serving visibility, feature vectors and model versions. It would test late corrections, duplicate retries, conflicting versions, checkpoint recovery and window expiry. A correction may change a later decision after it becomes visible, but must not rewrite the earlier decision.

This streaming extension has not been implemented or run on a supplied store. Current Feast documentation explicitly describes creation-time filtering for backfills and its backend limitations. Spark's watermark and checkpoint guarantees concern processing semantics; a watermark is not permission to use information unavailable at a past decision. 3 4

What remains open

No real student dataset or institution's model was supplied. No experiment compared snapshot and history models on actual students, and no intervention trial was run. Better prediction would still not establish that acting on it improves welfare.

Retention itself is not a complete welfare measure. Completion, beneficial transfer and justified leave must not be treated automatically as failures. The public-purpose question remains whether a decision helps people, for whom, and at what cost.

The broader lesson is methodological: intuition can identify a missing dimension, while explicit controls make part of that idea answerable to evidence. This exercise does not settle a universal account of intelligence or physical time, and it contributes no proof of the Riemann hypothesis.

Sources and reproducibility

Official sources checked for this publication on 22 November 2026. They support the stated definitions and implementation cautions, not every part of our proposed framework. Numerical findings above are from the local synthetic exercise, whose code and outputs accompany the page.

  1. [1] Scikit-learn: Common pitfalls, data leakage and training-only preprocessing
  2. [2] Scikit-learn: Permutation-test independence null and finite-permutation p-value
  3. [3] Feast: Event-time joins, creation-time filtering and backfill limitations
  4. [4] Apache Spark 3.5.6: Watermarks, late-data handling and recovery conditions

Code, outputs and method notes

Download the runnable example · ZIP

The unchanged 218,300-byte archive includes the Python script, 16 tests, README, dependency versions, run results, predictions and retained warnings. Inside the archive, results/run_results.json is the numerical record, not a separate webpage.

ZIP SHA-256: 5781b05f9222ffaaaf383c4f7446e8ca3caa887797ade85fc9ffcc3fceed170e

Script SHA-256: ec5b4f29d53baef7b62b4e1406dffeadb0c6722914b067d83d899aa1a2f85011

Open the progress note · Markdown

Open the extracted assertions and unrun streaming proposal · Markdown

The Markdown links open text in a new tab; use the browser’s Save command for an offline copy. The streaming adapter in the method note is illustrative, not included as an implemented store.