Guen commited on
Commit
8a0b7e9
·
verified ·
1 Parent(s): 7478a86

Add retrieval-determinism section; correct the regeneration instructions

Browse files
Files changed (1) hide show
  1. v1.0.1-addendum.md +46 -5
v1.0.1-addendum.md CHANGED
@@ -88,14 +88,55 @@ functional subset (1,429/1,743 test questions), and the interval × stale cell
88
 
89
  ---
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  ## Regeneration
92
 
93
- From the code release, `code/` directory, CPU-only:
 
 
94
 
95
  ```
96
- python camera_ready_tables.py --leak # leak mechanism + EM with/without interval
97
- python camera_ready_tables.py --neg # negative-hit-rate + BM25-tie analysis
98
- python eval_negatives_ranking.py # rebuilds the negatives-ranking artifact (~4 min)
 
 
 
 
 
 
 
 
 
 
99
  ```
100
 
101
- Split counts derive from the `split` field of `benchmark_labelled.jsonl`.
 
 
 
 
 
 
88
 
89
  ---
90
 
91
+ ### 3. Retrieval determinism: two rules a reimplementation must match
92
+
93
+ Neither of these changes any published number, but both are load-bearing if you
94
+ rebuild the reference retriever and expect to reproduce our figures.
95
+
96
+ - **Tie-breaking is decided by rule, not by score.** As §2 records, 1,429/1,429
97
+ (100.0%) of functional stale pairs are *exact* BM25 ties, because the validity
98
+ window is not a lexical feature. The tie-break rule therefore decides every
99
+ stale-versus-gold ordering on its own. Ours breaks ties
100
+ **reverse-lexicographically on the rendered evidence line**, everywhere. An
101
+ earlier version of the metric scripts instead used a stable sort that preserved
102
+ candidate-pool (CSV) load order; the two paths were reconciled to the deployed
103
+ behaviour, and the reverse-lexicographic rule is what produced every number in
104
+ the paper and in `baselines/`.
105
+
106
+ - **The non-oracle anchor linker is deterministic.** The simple
107
+ longest-substring linker over KG entity labels (gold-anchor recall 60.2%) was
108
+ previously sensitive to `PYTHONHASHSEED` through set-iteration order. It is now
109
+ deterministic. The published non-oracle 2-hop 3+-hop CCR moves **0.077 →
110
+ 0.070** as a result. This is the same method made reproducible, **not** a
111
+ correction to a result: no claim, comparison or conclusion depends on it.
112
+
113
+ ---
114
+
115
  ## Regeneration
116
 
117
+ **The benchmark itself is fully regenerable** from the code release (`code/`,
118
+ stdlib-only, CPU-only). See `code/README.md`; you will need
119
+ `tkgl-smallpedia_edgelist.csv` from TGB 2.0, which we do not redistribute.
120
 
121
  ```
122
+ python build_benchmark.py --kg_path <tgb-csv> --output_dir ./out/ \
123
+ --target_n 10000 --seed 42
124
+ ```
125
+
126
+ **The interval leak (§1) is checkable directly from the shipped data**, with no
127
+ retriever and no extra scripts — for every interval question, `t_query` equals
128
+ the gold answer year:
129
+
130
+ ```python
131
+ import json
132
+ rows = [json.loads(l) for l in open("benchmark/benchmark_labelled.jsonl", encoding="utf-8")]
133
+ iv = [r for r in rows if r["operator_type"] == "interval"]
134
+ print(len(iv), sum(str(r["t_query"]).startswith(str(r["answer"])) for r in iv))
135
  ```
136
 
137
+ **The retrieval-side numbers (§2, §3, and the paper's tables) are *not*
138
+ regenerable from this release.** They require the reference retriever and
139
+ generator, which are not included here. They are instead shipped as *outputs*:
140
+ every figure behind those claims is in `baselines/`, so each is checkable
141
+ without re-running anything. Split counts derive from the `split` field of
142
+ `benchmark_labelled.jsonl`.