Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/board/EPIPHANIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2026-07-08 — E-OCR-SKIP-GATE-1 — the go/no-go gate rules the skip cascade MARGINAL with a number (30.1%, far below the 60% proceed bar): probe-first discipline stops a research swamp before a line of cascade is built
**Status:** FINDING (measured; `tesseract-rs` `skip_fraction` instrument; PR #24)

**The operator hardening that produced this:** the "Morton-tile-pyramid-CAM-PQ recognizes tokens" idea was correctly RESCOPED — not "replace the LSTM" (segmentation-free CTC + font-invariance are load-bearing) but "AVOID LSTM invocations" via a skip/escalate cascade: cheap coarse descriptor → empty (skip) / trivial-known-token (CAM-PQ fast-path) / ambiguous (ESCALATE to the exact LSTM). CAM-PQ/VSA = a CONFIDENCE GATE, never the OCR engine; the LSTM stays the truth oracle for the hard tail (always-escalate preserves byte-parity). And the iron discipline: **first task is instrumentation ONLY** — measure the skippable fraction before building anything; abort < 30%, proceed >= 60%.

**The measurement (instrumentation only, recognizes nothing):** `skip_fraction.rs` over the 10 committed pages counts, within each line-band ink span, the pure-blank interior column fraction (the safely-skippable floor for a blank-run gate; preserved under the front-end 2× maxpool so it proxies blank LSTM timesteps; same Otsu+binarize as the real path). **Aggregate 30.1% (6772/22522), per-page ~21-41% → MARGINAL** (30-60%, far below the 60% PROCEED bar). On dense typeset text the easy skip is barely there. (First cut read 28.3% by omitting the recognizer's blank 4px x-padding from the tally — codex P1; counting the ACTUAL fed crop raised it to 30.1% and flipped the LABEL ABORT→MARGINAL. CONCLUSION unchanged: 30% << 60%, cascade still not a clear win, batching stays the lever — reported faithfully.)

**The convergence — two independent probes name the SAME lever:** (1) the arithmetic-intensity estimate — eng.lstm forward runs at ~0.1% of AVX-512-VNNI peak, i.e. the int8 GEMM is STARVED by per-tiny-op glue (pack_contig, dispatch, requant), not saturated arithmetic; and (2) this 28.3% skip fraction. Both point to **BATCHING the forward** (width-bucket lines → batch-across-lines-per-timestep so the recurrence holds → fill the tiles → fewer, larger cache-friendly kernel calls → scatter), NOT skipping it and NOT more SIMD. The "AMX-Ferrari bekommt Pixelkrümel mit der Pinzette" diagnosis is confirmed: the kernels are fast, the FEED is tiny/irregular. Batching is the developer-army-replacement — one dense feeder vs Tesseract's thousand hand-tuned micro-heuristics.

**Transferable:** the probe-first gate is the anti-research-swamp mechanism — a one-hour instrument that says NO with a number is worth more than a month of visionary cascade-building. Corpus caveat: dense text is the skip worst-case; the instrument re-runs on any corpus (sparse forms/tables would score far higher — the cascade's real home). Composes with E-OCR-PARALLEL-1: rayon spreads work across cores (outer), batching fills each core's tiles (inner) — multiplicative, and the measured next lever. Branch `claude/happy-hamilton-0azlw4`.

## 2026-07-08 — E-OCR-PARALLEL-1 — page-chunk rayon closes the throughput gap losslessly: 3.34× on 4 cores, byte-identical to serial (the operator-pinned topology, not whole-doc lanes / not a global crop pool)
**Status:** FINDING (measured; tesseract-rs `ocr-pdf`, determinism-gated; PR forthcoming)

Expand Down