ChihHsuan-Yang commited on
Commit
5c5c8b4
·
verified ·
1 Parent(s): 2706e3f

Document the confidence scale and null handling; correct the fallback-row statement; note AUPRC tie sensitivity

Browse files
Files changed (5) hide show
  1. README.md +8 -0
  2. docs/schema.md +40 -7
  3. registry/checksums.sha256 +4 -4
  4. registry/schema.json +25 -6
  5. validate.py +38 -3
README.md CHANGED
@@ -250,6 +250,14 @@ and is injection-hardened — it marks the problem text and the baseline answer
250
  enumerates what the model does not have. It ships verbatim at
251
  [`docs/confidence_probe_prompt.txt`](docs/confidence_probe_prompt.txt).
252
 
 
 
 
 
 
 
 
 
253
  **Join the probe predictions on `example_id`, never on `problem_uid_run`.** The
254
  Gemma and gpt-oss runs use different native identifier schemes for the same
255
  problems. Joining on the native id gives *zero* overlap for all three Gemma
 
250
  enumerates what the model does not have. It ships verbatim at
251
  [`docs/confidence_probe_prompt.txt`](docs/confidence_probe_prompt.txt).
252
 
253
+ **`confidence` is 0-100, not 0-1**, in both probe files, and the pre-answer file
254
+ leaves it **empty for all 222 fallback rows** rather than filling in a value. The
255
+ documented gate treats an empty confidence as *escalate*. Get either convention
256
+ wrong and you get a plausible, wrong number: on the 423 test problems the correct
257
+ reading reproduces the published **78.0%**, while misreading the scale gives
258
+ 60.76% and treating empties as "stay" gives 73.76%. See
259
+ [`docs/schema.md`](docs/schema.md).
260
+
261
  **Join the probe predictions on `example_id`, never on `problem_uid_run`.** The
262
  Gemma and gpt-oss runs use different native identifier schemes for the same
263
  problems. Joining on the native id gives *zero* overlap for all three Gemma
docs/schema.md CHANGED
@@ -215,13 +215,25 @@ cells are `nan` where per-problem cost accounting was missing for Gemma settings
215
 
216
  ### `data/confidence/six_setting_confidence_metrics.csv` — 6 rows
217
  Post-answer, pre-collaboration failure-risk metrics: parse rate, failure AUROC,
218
- ECE, Brier, and mean confidence split by outcome, each with a bootstrap CI.
 
 
219
 
220
  ### `data/confidence/failure_and_protocol_value_targets.csv` — 24 rows
221
  The same failure score scored against four increasingly protocol-specific
222
  targets. This is the paper's central negative result: the score that predicts
223
  failure well does not predict *which* protocol pays off.
224
 
 
 
 
 
 
 
 
 
 
 
225
  ### `data/costs/omnimath_per_protocol_costs.csv` — 4,155 rows
226
 
227
  Per-problem cost accounting: total tokens and model calls for each of the four
@@ -339,12 +351,33 @@ prober `openai/gpt-oss-120b`, temperature 0, prompt version
339
  problem text. The column was renamed from `question` so that neither a reader nor
340
  an automated text-leakage scan mistakes it for one.
341
 
342
- `status` is `ok` or `fallback_after_failure`; `used_fallback` is true for
343
- 113/423 test and 109/416 dev rows, where JSON parsing failed after up to three
344
- attempts. Those rows still carry a `confidence_probability`, produced by the
345
- fallback path rather than a clean parse. The 0.7329 test coverage rate in the
346
- run's own summary counts only the `ok` rows. Do not treat fallback rows as clean
347
- measurements.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
 
349
  ### `data/aggregate/*.csv` — 8 files
350
  The paper's ancillary aggregate tables, reproduced verbatim from the camera-ready
 
215
 
216
  ### `data/confidence/six_setting_confidence_metrics.csv` — 6 rows
217
  Post-answer, pre-collaboration failure-risk metrics: parse rate, failure AUROC,
218
+ ECE, Brier, and mean confidence split by outcome, each with a bootstrap CI. The
219
+ AUROC values are tie-invariant and reproduce exactly; see the AUPRC note below
220
+ before recomputing any average-precision figure.
221
 
222
  ### `data/confidence/failure_and_protocol_value_targets.csv` — 24 rows
223
  The same failure score scored against four increasingly protocol-specific
224
  targets. This is the paper's central negative result: the score that predicts
225
  failure well does not predict *which* protocol pays off.
226
 
227
+ **AUPRC columns are precise to about two decimals, not four.** The probe emits
228
+ integer confidences, so scores are heavily tied (for example 30 distinct values
229
+ across 4,151 rows in one setting), and the original average-precision
230
+ implementation did not handle ties. Recomputing with a standard estimator will
231
+ not match the published digits; for the worst low-prevalence target the value
232
+ spans roughly 0.147-0.280 depending on tie ordering, with the published figure
233
+ inside that range. **Every AUROC is tie-invariant and reproduces exactly.** Full
234
+ analysis: `docs/provenance/auprc_tie_handling.md` in the code repository
235
+ (<https://github.com/ChihHsuan-Yang/EMNLP_Cost-Aware-Protocol-Routing>).
236
+
237
  ### `data/costs/omnimath_per_protocol_costs.csv` — 4,155 rows
238
 
239
  Per-problem cost accounting: total tokens and model calls for each of the four
 
351
  problem text. The column was renamed from `question` so that neither a reader nor
352
  an automated text-leakage scan mistakes it for one.
353
 
354
+ **`confidence_probability` is on a 0-100 integer scale, not 0-1.** Despite the
355
+ name, observed values run from **7.0 to 99.0** across 41 distinct values. A
356
+ threshold of `70` means 70 percent. Reading the column as a 0-1 probability and
357
+ applying `>= 0.70` selects nearly every parsed row and silently produces a wrong
358
+ number that looks plausible — see the worked example below.
359
+
360
+ **Fallback rows carry NO confidence value.** `status` is `ok` or
361
+ `fallback_after_failure`; `used_fallback` is true for **222 rows** (113/423 test,
362
+ 109/416 dev), where JSON parsing failed after up to three attempts. For every one
363
+ of those 222 rows `confidence_probability` is **empty** — the probe produced no
364
+ usable number. Exactly 617 rows carry a value. The 0.7329 test coverage rate in
365
+ the run's own summary is the parsed fraction.
366
+
367
+ **What a consumer should do with the 222 empty rows.** The documented
368
+ confidence-gate policy treats a **missing confidence as escalate** — no evidence
369
+ of safety is not evidence of safety. Dropping them, or treating them as "stay",
370
+ changes the answer. Measured on the 423 test problems, Baseline-or-escalate-to-
371
+ Single:
372
+
373
+ | reading of the column | test solve rate |
374
+ |---|---|
375
+ | **0-100 scale, `>= 70`, empty = escalate** | **78.01%** — matches the published 78.0 |
376
+ | 0-100 scale, `>= 70`, empty = stay | 73.76% — wrong |
377
+ | misread as a 0-1 probability, `>= 0.70` | 60.76% — wrong |
378
+
379
+ Only the first row reproduces `data/aggregate/main_routing_heldout.csv`. Do not
380
+ treat fallback rows as clean measurements, and do not silently drop them.
381
 
382
  ### `data/aggregate/*.csv` — 8 files
383
  The paper's ancillary aggregate tables, reproduced verbatim from the camera-ready
registry/checksums.sha256 CHANGED
@@ -3,7 +3,7 @@
3
  be06f3a4e4d079f7a34cf319636f88050fca605ca7c3f02c595e36daabd214c4 CITATION.cff
4
  fe34eb7ac34537c21249e1ff6c9cf7b863eb611f844c0cb212ea358576e32887 LICENSE
5
  37d5e9d642d6684659d096bd8ebb5ea2de7ccc487fcdb2e4479dfa073c322f23 NOTICE
6
- 21c6b96d7c4aa71df28a5019391eb4a4775c2eda0d3d342d100a3e6838045770 README.md
7
  b90a94d23b3a9d7ad2338acd0cac76aaaea6aaeed6b4cdc85a93dd517cc12d1c TODO.md
8
  aad9af7b8ae8cbee7a7d73ecb7393cbb5adcb6ded6d5ec924dc8d1487e34c045 data/aggregate/failure_and_protocol_value_targets.csv
9
  ff064f045fcfab7e352d58f56070d98c3d1461e6cf44d3dfa0c5b108713c3fa9 data/aggregate/heldout_router_evaluation.csv
@@ -35,12 +35,12 @@ e1b90366deb1815c19748a53c30845c2285d1a20610c647afbf070ff1f2b6543 data/router/si
35
  4069d4aaf1975279342af805c24b28c9c92617ae85c4e1d3ee6f6f37636e91bc docs/primary_confidence_probe_prompt.txt
36
  ed185d33b56a0f86afb2fa120e3cdc13631803d4e0da2f22b2d883204c9e95ea docs/provenance.md
37
  abcfeff67504846bd853c573170fa2650761ebc6356b241b1149bffa34417c01 docs/reconstruction.md
38
- 4f09b8708d46a03faf369e3b14d0497bdff3c7519c0fd750ddbe6c26904ac956 docs/schema.md
39
  964edfed0886c1fc54ef447ed6adf8592b5b42063356bf5a8ba7097f82548798 registry/benchmarks.csv
40
  0c68fa11540032199e42f3d3802e97885ec7728130c8a30e57870f54899c2130 registry/example_id_crosswalk.csv
41
  1a97156270d9fcec83019bef45e7ce9f7eaf61befd1cbcc736f6f27800bb2187 registry/experiments.csv
42
  0b27a71a1bc8ce61efeadec7722cabc566286e5a335cf213fa21b05fcdc4d3c4 registry/models.csv
43
  e263c1473f08b37726726ee8b7c206f6799fa79e4fd1a128ee121ec3197c8ca5 registry/protocols.csv
44
  bc320aef5d23bd813da31bcea4345982fc8ae257802be3ee1446796b367f1b9c registry/release_manifest.json
45
- 4c771f1f38b0d2433b61141be08bf61076524b61baf9e6ac1035d8f9fe73bd25 registry/schema.json
46
- 3b3f133bc05bb42f3afbf3710de78483b33354fc16c54e75200e35f55f2ceb90 validate.py
 
3
  be06f3a4e4d079f7a34cf319636f88050fca605ca7c3f02c595e36daabd214c4 CITATION.cff
4
  fe34eb7ac34537c21249e1ff6c9cf7b863eb611f844c0cb212ea358576e32887 LICENSE
5
  37d5e9d642d6684659d096bd8ebb5ea2de7ccc487fcdb2e4479dfa073c322f23 NOTICE
6
+ 32e6270c5c4f3159a464d849a77900aca20cd32bc88bc73696c99b81e249fb5b README.md
7
  b90a94d23b3a9d7ad2338acd0cac76aaaea6aaeed6b4cdc85a93dd517cc12d1c TODO.md
8
  aad9af7b8ae8cbee7a7d73ecb7393cbb5adcb6ded6d5ec924dc8d1487e34c045 data/aggregate/failure_and_protocol_value_targets.csv
9
  ff064f045fcfab7e352d58f56070d98c3d1461e6cf44d3dfa0c5b108713c3fa9 data/aggregate/heldout_router_evaluation.csv
 
35
  4069d4aaf1975279342af805c24b28c9c92617ae85c4e1d3ee6f6f37636e91bc docs/primary_confidence_probe_prompt.txt
36
  ed185d33b56a0f86afb2fa120e3cdc13631803d4e0da2f22b2d883204c9e95ea docs/provenance.md
37
  abcfeff67504846bd853c573170fa2650761ebc6356b241b1149bffa34417c01 docs/reconstruction.md
38
+ 869838a59adf5ece35a1a8f0c80e177c38c171321714f0e104c8e4fbaba2b257 docs/schema.md
39
  964edfed0886c1fc54ef447ed6adf8592b5b42063356bf5a8ba7097f82548798 registry/benchmarks.csv
40
  0c68fa11540032199e42f3d3802e97885ec7728130c8a30e57870f54899c2130 registry/example_id_crosswalk.csv
41
  1a97156270d9fcec83019bef45e7ce9f7eaf61befd1cbcc736f6f27800bb2187 registry/experiments.csv
42
  0b27a71a1bc8ce61efeadec7722cabc566286e5a335cf213fa21b05fcdc4d3c4 registry/models.csv
43
  e263c1473f08b37726726ee8b7c206f6799fa79e4fd1a128ee121ec3197c8ca5 registry/protocols.csv
44
  bc320aef5d23bd813da31bcea4345982fc8ae257802be3ee1446796b367f1b9c registry/release_manifest.json
45
+ 3aea6a2d356a1809b69c3e8b0aaf9c54dfe05cbf73d5e2368f06e9f47c90aa70 registry/schema.json
46
+ 8e69d6584f3d059969eeb8a6515aa621305f1e223ebd4ffc501731b9f14c20b2 validate.py
registry/schema.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "schema_version": "emnlp-protocol-routing-dataset-v1.0.0",
3
- "generated_utc": "2026-09-23T23:53:47.663212+00:00",
4
  "conventions": {
5
  "join_key_cross_solver": "problem_id",
6
  "join_key_within_setting": "source_problem_id",
@@ -76,7 +76,9 @@
76
  },
77
  {
78
  "name": "auprc",
79
- "type": "number"
 
 
80
  }
81
  ]
82
  },
@@ -573,7 +575,9 @@
573
  },
574
  {
575
  "name": "AUPRC_using_failure_score",
576
- "type": "number"
 
 
577
  }
578
  ]
579
  },
@@ -618,11 +622,17 @@
618
  },
619
  {
620
  "name": "confidence",
621
- "type": "number"
 
 
 
622
  },
623
  {
624
  "name": "confidence_norm",
625
- "type": "number"
 
 
 
626
  },
627
  {
628
  "name": "repair_attempts",
@@ -680,7 +690,16 @@
680
  },
681
  {
682
  "name": "confidence_probability",
683
- "type": "number"
 
 
 
 
 
 
 
 
 
684
  },
685
  {
686
  "name": "status",
 
1
  {
2
  "schema_version": "emnlp-protocol-routing-dataset-v1.0.0",
3
+ "generated_utc": "2026-09-24T02:18:59.281412+00:00",
4
  "conventions": {
5
  "join_key_cross_solver": "problem_id",
6
  "join_key_within_setting": "source_problem_id",
 
76
  },
77
  {
78
  "name": "auprc",
79
+ "type": "number",
80
+ "precision": "approximately 2 decimals, not 4",
81
+ "caveat": "Scores are heavily tied (integer confidences) and the original average-precision implementation did not handle ties, so a standard estimator will not match the published digits. AUROC is tie-invariant and reproduces exactly. See docs/provenance/auprc_tie_handling.md in the code repository."
82
  }
83
  ]
84
  },
 
575
  },
576
  {
577
  "name": "AUPRC_using_failure_score",
578
+ "type": "number",
579
+ "precision": "approximately 2 decimals, not 4",
580
+ "caveat": "Scores are heavily tied (integer confidences) and the original average-precision implementation did not handle ties, so a standard estimator will not match the published digits. AUROC is tie-invariant and reproduces exactly. See docs/provenance/auprc_tie_handling.md in the code repository."
581
  }
582
  ]
583
  },
 
622
  },
623
  {
624
  "name": "confidence",
625
+ "type": "number",
626
+ "unit": "percent",
627
+ "scale": "0-100 integer, NOT 0-1",
628
+ "description": "P(the Baseline final answer is correct), integer percent 0-100."
629
  },
630
  {
631
  "name": "confidence_norm",
632
+ "type": "number",
633
+ "unit": "proportion",
634
+ "scale": "0-1",
635
+ "description": "The same value as `confidence`, rescaled to 0-1."
636
  },
637
  {
638
  "name": "repair_attempts",
 
690
  },
691
  {
692
  "name": "confidence_probability",
693
+ "type": "number",
694
+ "unit": "percent",
695
+ "scale": "0-100 integer, NOT 0-1",
696
+ "observed_min": 7.0,
697
+ "observed_max": 99.0,
698
+ "observed_distinct": 41,
699
+ "nullable": true,
700
+ "null_meaning": "the probe produced no parseable confidence (used_fallback=true, status=fallback_after_failure); 222 of 839 rows are null",
701
+ "null_handling": "the documented confidence gate treats a null as ESCALATE. Threshold 70 means 70 percent. Reading the column as a 0-1 probability, or treating nulls as 'stay', silently yields a wrong solve rate (60.76% and 73.76% respectively, against the published 78.0%).",
702
+ "description": "P(the model solves this problem in one pass), integer percent 0-100. Empty when unparseable."
703
  },
704
  {
705
  "name": "status",
validate.py CHANGED
@@ -136,10 +136,17 @@ def abbreviate(items: "list[str]", limit: int = MAX_LISTED_OFFENDERS) -> str:
136
  return shown
137
 
138
 
139
- def ok(label: str, passed: bool, detail: str = "") -> bool:
140
- print(f" [{'PASS' if passed else 'FAIL'}] {label}" + (f" -- {detail}" if detail else ""))
 
 
 
 
 
 
 
141
  if not passed:
142
- FAILS.append(f"{label}: {detail}" if detail else label)
143
  return passed
144
 
145
 
@@ -332,6 +339,34 @@ def main() -> int:
332
  ok("post-answer example_id is unique", len(set(post_eids)) == len(post_eids),
333
  f"{len(post_eids) - len(set(post_eids))} duplicates")
334
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  xw = read_csv(os.path.join(root, "registry/example_id_crosswalk.csv"))
336
  xw_keys = {(r["setting_id"], r["example_id"], r["problem_id"]) for r in xw}
337
  resolved = sum(1 for r in post
 
136
  return shown
137
 
138
 
139
+ def ok(label: str, passed: bool, detail: str = "", fail_detail: str = "") -> bool:
140
+ """Report one check.
141
+
142
+ `detail` is a factual measurement and prints either way. `fail_detail`
143
+ explains what went wrong and prints ONLY on failure -- a check must never
144
+ print a reason that contradicts its own verdict.
145
+ """
146
+ shown = detail if passed else (fail_detail or detail)
147
+ print(f" [{'PASS' if passed else 'FAIL'}] {label}" + (f" -- {shown}" if shown else ""))
148
  if not passed:
149
+ FAILS.append(f"{label}: {shown}" if shown else label)
150
  return passed
151
 
152
 
 
339
  ok("post-answer example_id is unique", len(set(post_eids)) == len(post_eids),
340
  f"{len(post_eids) - len(set(post_eids))} duplicates")
341
 
342
+ # Scale and null semantics: a "probability"-named column on a 0-100 scale is
343
+ # the kind of thing a reader gets silently wrong, so assert it rather than
344
+ # only document it.
345
+ post_conf = [float(r["confidence"]) for r in post if r["confidence"].strip() != ""]
346
+ post_hi = max(post_conf) if post_conf else 0.0
347
+ ok("post-answer `confidence` is on the documented 0-100 scale", post_hi > 1.0,
348
+ detail=f"range {min(post_conf)}-{post_hi} over {len(post_conf)} parsed rows",
349
+ fail_detail=f"max is {post_hi}: the column looks like a 0-1 probability, "
350
+ f"not the documented 0-100 scale")
351
+ ok("post-answer `confidence` is blank exactly where parse_ok is false",
352
+ sum(1 for r in post if r["confidence"].strip() == "")
353
+ == sum(1 for r in post if r["parse_ok"].strip().lower() == "false"))
354
+ pre_vals = [float(r["confidence_probability"]) for r in pre
355
+ if r["confidence_probability"].strip() != ""]
356
+ pre_hi = max(pre_vals) if pre_vals else 0.0
357
+ ok("pre-answer `confidence_probability` is on the documented 0-100 scale",
358
+ pre_hi > 1.0,
359
+ detail=f"range {min(pre_vals)}-{pre_hi} over {len(pre_vals)} parsed rows",
360
+ fail_detail=f"max is {pre_hi}: the column looks like a 0-1 probability, "
361
+ f"not the documented 0-100 scale")
362
+ fb = [r for r in pre if r["used_fallback"].strip().lower() == "true"]
363
+ fb_with_value = sum(1 for r in fb if r["confidence_probability"].strip() != "")
364
+ ok("pre-answer fallback rows carry NO confidence value (documented as null)",
365
+ fb_with_value == 0, f"{fb_with_value} of {len(fb)} fallback rows have a value")
366
+ print(f" {len(fb)} fallback rows are null; treat a null as ESCALATE "
367
+ f"(see docs/schema.md -- other readings give 73.76% or 60.76% "
368
+ f"against the published 78.0%)")
369
+
370
  xw = read_csv(os.path.join(root, "registry/example_id_crosswalk.csv"))
371
  xw_keys = {(r["setting_id"], r["example_id"], r["problem_id"]) for r in xw}
372
  resolved = sum(1 for r in post