# Certified stopping on a bounded learned sparse index

Status: prospective design, before real-query search outcomes. This file will be hashed with the runner, query cohort manifest and dependency lock before scoring.

## Question and source boundary

Can a top-k overlap certificate reduce arithmetic work while preserving at least 9 of the exact top 10 results on every query? The central paper is Mallia, Suel and Tonellotto, *Faster Learned Sparse Retrieval with Block-Max Pruning*, SIGIR 2024, DOI 10.1145/3626772.3657906. This is a bounded extension of its block-max pruning mechanism. It is neither a reproduction of the paper's full-corpus timings nor a claim of a new general retrieval algorithm.

Use the authors' Apache-2.0 BMP Rust index construction at commit `67ad8c683fbc0c30145d1ee42c1dffbed8b12332`. Retain original quantized impacts and document IDs from the first 100,000 BP-ordered documents of the released uniCOIL-TILDE CIFF file. The source identity and non-commercial MS MARCO terms are in ACQUISITION_PLAN.md. This prefix is a genuine, intentionally bounded corpus; it is not a random or representative sample of all MS MARCO. Do not compute or advertise full-corpus relevance metrics on it.

## Input and cohort freeze

- Decode the exact pinned source in one pass. Verify monotone delta-decoded posting IDs, document order, impact range 0–255, unique vocabulary entries and vocabulary size at most 65,536. Retain every vocabulary entry, including entries with no posting in the prefix.
- Preserve original query IDs and repeated tokens from the released `dev.pisa`. Aggregate repeated token counts, scaling counts above 32 with integer ceiling `ceil(count * 32 / max_count)`. Keep all in-vocabulary terms; beta is 1.0 throughout. Remove out-of-vocabulary terms before bound generation: no bound products are executed or counted for those terms. Unknown terms contribute zero.
- Before search, rank unique query IDs by SHA-256 of `torsten-suel-bmp-v1:<id>`. The first 200 are development queries and the next 800 are held out. Reject duplicate query IDs before this selection; do not replace queries after outcomes. Empty, out-of-vocabulary and zero-positive queries remain in the denominator and receive deterministic exact zero-score tie handling.
- The official development file supplies both disjoint cohorts. “Held out” refers to this local prospective split, not the dataset's hidden official evaluation set.
- Preflight may inspect sizes, ranges, schema and source counts, but not per-query results, overlap, work reductions or latency. Any feasibility change before scoring gets an amendment and a new freeze; any change after outcomes is labeled post hoc.

## Shared engine and correctness controls

Build one native BMP index with block size 64 and uncompressed block-max arrays. Use that same resident index for every arm. Construct a safe audited search driver around the native hybrid block-forward data. Use u32 scores and upper bounds, canonical score-descending/document-ID-ascending ordering, all-block handling, and strict inequalities at stopping boundaries. The secondary key is the integer internal BP-order document ID (0–99,999), not the external collection ID. At most 65,536 distinct terms, query weights at most 32 and impacts at most 255 imply a maximum possible score/bound of 534,773,760, within u32. This wider accumulator and driver are shared by every arm.

The released main-branch search loop appears to omit an exhausted iterator's final block, can panic on no candidate block, and compares ties without a document-ID secondary key. These are source-inspection observations to be checked on authored fixtures, not evidence that the published paper is wrong. Preserve the upstream source unchanged. Keep its original search as an explicitly labeled diagnostic only; the study's exact and approximate arms all use the same corrected driver. Report the resulting source-level boundary prominently.

Authored fixtures cover an empty query, one block, final-block winner, score ties, fewer than k positive scores, a partial final block, repeated terms, a >65,535 dot product and premature-stop counterexamples. An independent exhaustive scorer must agree with the exact driver and must verify every returned score. Before real scoring, test the certificate on deterministic generated fixtures; generated inputs never become empirical dataset evidence.

For every real selected query, an independent exhaustive postings scorer computes all 100,000 document scores and the canonical exact top 10. Exact BMP must match this result byte for byte. The independent checker reads the retained CIFF postings rather than reusing the block-scoring function or the candidate ordering.

## Frozen arms

1. **Exact BMP control:** process blocks by descending upper bound, block ID ascending on ties; stop only when the current kth exact score is strictly greater than the next remaining upper bound. Exhaustion is exact.
2. **Fixed alpha controls:** alpha in `{0.25, 0.50, 0.75, 0.90, 0.95, 1.00}`. With a full heap, stop when kth score is strictly greater than alpha times the next bound. Use exact rational comparisons, not floating-point boundary decisions. These are paper-style alpha controls in the audited driver, not the paper's original executable or reported result.
3. **Certified 90% overlap:** with a full top-10 heap, stop when the 9th score is strictly greater than the next remaining upper bound. At least those nine exact-scored documents then belong to the corpus-wide exact top 10. This is a deterministic set-overlap guarantee under the checked integer-score/index assumptions; it does not certify relevance, answer correctness or rank preservation. At exhaustion return the exact result.

Use the development cohort to select the fixed alpha with the fewest mean total integer products among controls whose *every* development query has at least 90% exact-set overlap. If no approximate alpha qualifies, select alpha 1.00. Break equal work by larger alpha. Freeze this single choice before opening held-out summaries. Show all alpha arms as prespecified secondary comparisons rather than concealing stronger controls.

## Endpoints, units and decision

The primary unit is a query (800 held-out units). Primary quality is exact-set overlap at 10, with denominator 10 even for all-zero queries; canonical tie ordering defines the exact set. Count certificate violations below 0.9 individually. Do not average away a failing query.

The primary efficiency endpoint is the mean number of integer score products: block-bound products plus scored-posting products. Include bound generation for every query term and block, including zero entries. Also report blocks evaluated, documents scored, scoring products, bound products, block ordering comparisons and certificate/threshold checks. The product counter is an arithmetic proxy, not a complete CPU-instruction or energy measure. Sorting, heaps, allocation and certificate overhead remain inside separately measured latency.

Success requires (a) no observed certificate violation, and (b) at least 20% fewer mean products than exact BMP. Evaluate the 20% boundary with exact integer sums (`5 * certificate_sum <= 4 * exact_sum`), avoiding floating-point classification at equality. Report the paired difference and percent reduction versus the development-selected alpha as a separate fairness comparison; a slower certificate is a valid result. Compute query-paired bootstrap 95% percentile intervals with 2,000 resamples, seed 20261128. If the observed exact mean is zero, relative reduction and the primary efficiency decision are undefined/inconclusive. If any bootstrap denominator is zero, report its count and leave that relative interval undefined instead of discarding draws or substituting a zero reduction. These intervals describe this fixed cohort and do not prove generalization to other corpora.

Latency is secondary. After one explicit untimed warm-up pass, execute three measurement repeats of exactly the same query sequences. Repeats rotate policy order deterministically, and query order is the same hash order within each cohort. Start timing before query term lookup/aggregation, bound generation, sorting and scoring; stop after canonical result construction. Exclude offline index loading and the independent validation oracle for all arms. Report per-query median of three repeats, cohort p50/p95 and paired bootstrap intervals over queries. Do not treat 2,400 repeated observations as independent queries. Record machine, compiler, thread count and uncontrolled shared-Mac background workload. At the pre-score freeze, an unrelated Sanmi Koyejo CPU replay is already running on this shared Mac, and a brief authored Qwen float32 MPS preflight has been reported by the coordinator. No isolation is claimed; record these known concurrent workloads with the results. The integer-product primary endpoint is independent of scheduling contention, while latency remains a secondary shared-machine observation. No speedup comparison with the paper's Xeon benchmark is valid.

## Application and publication boundary

Build a distinct “Postings Console” around actual per-query numeric traces: block-bound skyline, scored-versus-unseen blocks, top-10 membership certificate, work/overlap frontier and policy comparison. Save complete traces for the first four hash-ordered queries in each cohort, eight cases total, across all policies. Capture those traces after every timed repeat has finished, so the extra extraction cannot warm an upcoming timed request. A request-budget control can select saved policies/traces; it must not imply live full-corpus search. Explain that the application is a replay of real bounded-index measurements. If a readable toy query is needed, label its authored fixture separately from dataset queries.

Keep raw CIFF, query vectors/text, decoded document vectors, source PDFs, upstream checkout, local paths and private outreach out of the public package. Publish own code with upstream notices, immutable source acquisition instructions, derived numeric outcomes, aggregate figures, freeze hashes, independent validation and honest failure cases after root privacy review. Contact remains on hold under the professor's published prospective-MS policy. No email is authorized by this study.
