Fix publication OPE support with experiment cross-fitting - #70
Merged
Conversation
vtavakkoli
marked this pull request as ready for review
August 19, 2026 12:04
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.
Summary
Fix the publication blocker exposed by the corrected independent evaluation: the earlier configuration-level policy/OPE split left only ~1% seen and ~6% unseen evaluator support for proposed actions. This PR replaces that partition with experiment-level role-swapped cross-fitting and constrains all counterfactual methods to common policy/OPE action support.
Scientific fix
Experiment-level role swap
For each COMMAG experiment:
tr0–tr11from that experiment;tr0–tr11from the opposite experiment(s);With two experiments this is:
This preserves all training configurations on both evidence roles instead of sacrificing action coverage by holding out whole configurations.
Positivity/common-support constraint
Before calibration/evaluation,
OfflinePolicyBundle.actions_by_sliceis restricted to the intersection of actions observed in policy-fit and OPE-fit data for each slice. The same support restriction therefore automatically applies to:The primary statistics can no longer contain counterfactual actions unsupported by the independent evaluator.
Readiness now also requires:
This prevents a trivial one-action collapse from falsely satisfying the support gate.
Correct scientific framing
The report now explicitly limits claims when evidence is weak:
A new
tradeoff_summary.jsonexports utility delta, churn reduction, SLA delta, and clustered effects for each baseline.HTML report
The self-contained
report.htmlnow adds:No external assets are introduced.
Tests
The synthetic publication integration test now executes the production cross-fit path and verifies:
Run
The full COMMAG benchmark must be rerun after this PR. Previous numerical results must not be reused because the evidence partition, action support, and final counterfactual estimates change.