Repository navigation
feat(research): apply #206 review to the four-arm pilot - #248
Conversation
Implements the scoring, sampling and intervention-control proposals from the mirror29#226 review on mirror29#206 (comment 6181500755). No paid calls. Materials (opt-in; defaults reproduce the 2026-10-12 packet, tau 3.79538%): - --benchmark-dividends adds benchmark cash dividends with ex-date in (entry, exit] to the benchmark return. - --tau-windows N estimates tau from the trailing N eligible windows. - Protocol records tau_calibration_windows, benchmark_return and the calibration-window climatology. Scoring: - Invalid runs are scored strictly (Brier 2.0, action 0); uniform and climatology fallbacks are reported as ITT sensitivity. - Uniform and climatology reference Brier, Brier skill vs climatology, per-class reliability. - B-mean variant (mean of completed B sample probabilities) with a paired B-mean minus B interval, plus B sample action disagreement. Sampling: optional sample_temperature applies only to B samples (default 0.2, unchanged). Intervention controls: - Deleted contributions are omitted from model-visible history instead of carrying a removal marker. - Conclusion flips keep the original rationale verbatim; no meta text. - The replacement control uses digit-free neutral prose (neutral-prose-v1) under a neutral message key. Tests: 25 pilot tests pass (5 new); research suite 244 passed, 3 skipped (dedicated Postgres). Ruff clean; mypy unchanged from main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi Qiming, Thanks for the focused follow-up. I reviewed The main changes listed in this PR are covered: reference forecasts and strict ITT, B-mean, B-only sampling temperature, opt-in material adjustments, and the contribution-control changes. Before merging, please address two points:
These can be linked follow-ups; they do not need to expand this PR into the full formal experiment. Next, please propose a short protocol revision in #206 covering the primary metric and ITT rule, dividend convention, calibration window, B temperature, budget design, and formal sample/intervention selection. Once the reporting definitions are agreed, the remaining reporting work and regression tests can proceed offline. Existing saved outputs can also be rescored into a separate report, preserving the originals. However, the previous paid pilot does not validate the new sampling temperature or intervention stimuli; those require a separately agreed configuration and budget. I will continue coordinating #208’s supporting data and provenance work. Exact token matching, blinded human review, formal sample separation, and model revision/cutoff limitations remain open. Merging this development improvement does not freeze the formal protocol or close #206/#208. |
…ew scope Align four-arm-pilot.md with the strict invalid-run rule (uniform and climatology fallbacks are sensitivity analyses only) and record mirror29#206 review items 2b (budget dispersion) and 3d (formal intervention selection and per-intervention counts) as not yet covered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Addressed in 60480bc:
No code changes since ef78328; tests unchanged (25 pilot / 266 suite). |
Summary
Concrete implementation of the #226 review posted on #206 (comment), offered for discussion. Nothing here needs to merge before the protocol choices are agreed. Data changes are opt-in, and every default except invalid-run scoring keeps current behaviour. No paid calls were made.
Related: #206, #208.
Changes
Materials (opt-in; defaults reproduce the 2026-10-12 packet, τ = 3.79538%)
--benchmark-dividends: benchmark cash dividends whose ex-date falls in (entry, exit] are added to the benchmark return.--tau-windows N: τ is estimated from the trailing N eligible windows instead of all of them.tau_calibration_windows,benchmark_returnand the calibration-windowclimatology(UP/FLAT/DOWN base rates).Scoring (
report.py)itt_sensitivity_brier. This is the only default behaviour change; development results are unaffected because no run was invalid.B-mean: the mean of the completed B sample probabilities, with argmax action and neutral on ties. It reuses the same calls, so it is a scoring variant, not a separately budgeted arm. Reported with a paired B-mean − B interval, plus B's pairwise sample action disagreement.build_report(..., climatology=...); the CLIreportcommand reads it fromcampaign.json.Sampling (
experiment.py,campaign.py)sample_temperatureapplies only to B's independent samples. The default 0.2 is unchanged; 0.8 is the proposal for the formal arm definition. Every other call, including B's aggregation, stays at 0.2, and the temperature is recorded per call in the ledger sampling metadata.Intervention controls (
report.py,experiment.py){"removed": true}marker.p_up/p_downand the action, and keeps the original rationale verbatim. It no longer adds the"Intervention: …"text.neutral-prose-v1), cut at a word boundary, under a neutralmessagekey. It replaces the repeated filler and theunrelated_replacementkey. Matching is still by characters, not provider tokens.Validation
tests/test_four_arm_pilot.py: 25 passed (5 new tests covering the dividend window and opt-in default, τ window and climatology, flip/replacement stimuli, B-only temperature, and references/skill/B-mean/strict ITT). The two existing tests were updated for strict ITT and the omitted-turn marker.ruff checkis clean.mypyonpilot/reports the same 3 errors as current main (artifacts.py,__main__.py), and no new ones.--benchmark-dividends--tau-windows 252Open for agreement
Exact tokenizer-matched controls and blinded human process review remain open as before.
🤖 Generated with Claude Code