From 9e529d3951ebf77512e883bb0ab6852c87ff473e Mon Sep 17 00:00:00 2001 From: dog Date: Thu, 9 Jul 2026 18:10:49 +0800 Subject: [PATCH] docs: record empirical rejection of Heun sampling in spec Co-Authored-By: Claude Fable 5 --- .../2026-07-09-mouse-postprocess-quality-design.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/superpowers/specs/2026-07-09-mouse-postprocess-quality-design.md b/docs/superpowers/specs/2026-07-09-mouse-postprocess-quality-design.md index ce42ff7..e1b122b 100644 --- a/docs/superpowers/specs/2026-07-09-mouse-postprocess-quality-design.md +++ b/docs/superpowers/specs/2026-07-09-mouse-postprocess-quality-design.md @@ -63,7 +63,7 @@ New order (steps run in this sequence): Function signatures, the `generate()` API, and the exact-endpoint guarantee are preserved. -### 2. Sampling: Euler → Heun (`mouse.py`) +### 2. Sampling: Euler → Heun (`mouse.py`) — REJECTED during implementation Replace the 10-step first-order Euler loop with 10-step Heun (predictor-corrector): per step, evaluate v at x and at the Euler @@ -72,6 +72,16 @@ d_model=128 transformer (~1-2 ms CPU), total latency stays ~40 ms. Seed reproducibility unaffected (randomness is only in the init noise and duration sampling, both unchanged). +**Outcome (2026-07-09, implementation):** Heun was implemented, measured, +and reverted. Per-stage probing showed Heun's raw ODE output contains +40-51 direction changes >90° per trace vs Euler's 2-11; a t-clamped +variant was equally bad and Euler-20 gave no meaningful gain. The trained +flow field is only self-consistent along its own Euler-discretized paths, +so second-order integration injects noise instead of reducing error. The +shipped code keeps the original 10-step Euler loop; the new +post-processing pipeline alone meets the quality gates (max tail turn +32-58° vs the old pipeline's 53-135°, zero jagged-chain artifacts). + ### 3. Tests and acceptance 1. **Golden regression re-capture** — `tests/unit/data/golden_mouse.npz`