Angshul commited on
Commit
2c151df
·
verified ·
1 Parent(s): 522b6e9

Upload 6 files

Browse files
Files changed (6) hide show
  1. MANIFEST.md +25 -0
  2. README.md +369 -0
  3. SHA256SUMS.txt +197 -0
  4. pyproject.toml +28 -0
  5. requirements-baselines.txt +5 -0
  6. requirements.txt +6 -0
MANIFEST.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Repository manifest
2
+
3
+ - `README.md` — GitHub front page: protocol, method, speed-first tables, results, reproduction.
4
+ - `geomretrieval/` — reusable sparse geometric index plus the cleaned current top-10 RAG ranker.
5
+ - `experiments/beir/` — generic RAG runners and exact SciFact/TREC-COVID experiment-history scripts.
6
+ - `experiments/msmarco_scale/` — complete full-scale MS MARCO experimental code from the supplied scale codebase.
7
+ - `results/beir/` — exact small-dataset result JSONs, sweeps, branch-diversity and collision diagnostics.
8
+ - `results/msmarco_scale/` — full-scale MS MARCO result JSONs.
9
+ - `results/reproduced_reference/` — post-assembly checks of the cleaned runner.
10
+ - `baselines/` — local lexical reference code, full baseline policy, and MS MARCO baseline material.
11
+ - `configs/` — historical full-scale lock and current RAG-top-10 configuration.
12
+ - `docs/` — method, RAG protocol, speed/literature, baseline suite and reproducibility notes.
13
+ - `docs/images/` — result and latency figures displayed directly from the root README.
14
+ - `scripts/` — reproduction helpers.
15
+ - `manifests/` — MS MARCO corpus-shard manifest.
16
+ - `tests/` — core and RAG smoke tests.
17
+
18
+ No `.gitignore` and no `.github/` directory are included.
19
+
20
+ ## Final reconstruction additions
21
+
22
+ - `RESULTS_FINAL_6DATASETS.md`
23
+ - `RECONSTRUCTION.md`
24
+ - `results/final_100_to_10/`
25
+ - `experiments/postbenchmark_optimizations/`
README.md CHANGED
@@ -1,3 +1,372 @@
1
  ---
2
  license: fair-noncommercial-research-license
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: fair-noncommercial-research-license
3
+ language:
4
+ - en
5
+ pretty_name: SparseGeometricRAG
6
+ tags:
7
+ - information-retrieval
8
+ - retrieval-augmented-generation
9
+ - rag
10
+ - sparse-retrieval
11
+ - cpu
12
+ - low-latency
13
+ - low-resource
14
+ - beir
15
+ - msmarco
16
  ---
17
+
18
+ # SparseGeometricRAG
19
+
20
+ ## CPU-first sparse geometric retrieval for practical top-10 RAG
21
+
22
+ **No transformer inference at retrieval time. No retrieval GPU requirement. No dense document-vector dot products. No external API.**
23
+
24
+ SparseGeometricRAG is a retrieval system designed for a very specific operating point:
25
+
26
+ - **low-cost hardware**, especially ordinary multicore CPUs;
27
+ - **small structured state**, rather than dense embeddings for every chunk;
28
+ - **bounded local computation**, with only **16 residual coordinates** touched per routed membership;
29
+ - **top-10 retrieval quality**, because that is what a practical RAG generator usually consumes.
30
+
31
+ The point of the system is **not** that it dominates the strongest neural retrievers in pure effectiveness. It does not. The point is that it offers a **useful quality / cost / hardware tradeoff** when the design goal is to keep retrieval simple, cheap, and CPU-native.
32
+
33
+ ---
34
+
35
+ ## 1. Executive summary
36
+
37
+ 1. SparseGeometricRAG replaces dense document representations by a **coarse sparse location + tiny local directional code**.
38
+ 2. Each chunk stores only **F = 4** fuzzy branch memberships, branch centers use **B = 64** sparse coordinates, and each chunk-branch membership keeps only **S = 16** signed residual coordinates.
39
+ 3. Query-time local scoring is therefore **bounded and cheap**: the local geometric score is `O(CS)` with **`S = 16` fixed**.
40
+ 4. More detailed chunk-level evidence is postponed until after routing and shortlist reduction.
41
+ 5. On large-route datasets, a **small shortlist** can improve **both** speed and top-10 quality. In the frozen large-route experiments, **`P = 100`** was the best practical operating point.
42
+ 6. The selling point is simple: **credible top-10 retrieval on low-cost CPU hardware without needing a retrieval-time transformer stack.**
43
+
44
+ ---
45
+
46
+ ## 2. Why this repository matters
47
+
48
+ Most modern retrieval systems spend substantial effort on one of two tasks:
49
+
50
+ 1. learning a strong representation, and/or
51
+ 2. engineering a fast search layer for that representation.
52
+
53
+ SparseGeometricRAG asks a different question:
54
+
55
+ > **Can we reduce the representation itself so aggressively that the retrieval layer becomes cheap enough to run well on ordinary CPU hardware?**
56
+
57
+ That is the core design philosophy behind the repository.
58
+
59
+ ---
60
+
61
+ ## 3. Positioning and hardware story
62
+
63
+ ![Figure 1. Positioning and low-cost hardware story](figures/fig01_positioning_low_cost.png)
64
+
65
+ **Figure 1.** The repository is positioned around a low-cost hardware argument. The aim is not to beat the strongest dense retrievers at any cost. The aim is to **avoid the cost structure** that usually makes such retrievers operationally heavy in the first place.
66
+
67
+ ![Figure 6. Hardware story](figures/fig06_hardware_story.png)
68
+
69
+ **Figure 2.** The retriever is designed so that an ordinary multicore CPU, local disk, and system RAM are enough for the retrieval layer. A GPU may still exist elsewhere in a full RAG system—for example, for the generator—but the retriever itself does not require one.
70
+
71
+ ---
72
+
73
+ ## 4. Method overview
74
+
75
+ ### 4.1 Offline indexing
76
+
77
+ ![Figure 2. Offline indexing pipeline](figures/fig02_offline_index_pipeline.png)
78
+
79
+ **Figure 3.** The offline stage builds a compact structured index rather than a dense embedding database. The key compression step is to store only a sparse coarse location and a tiny local directional code.
80
+
81
+ ### 4.2 Query-time retrieval
82
+
83
+ ![Figure 3. Query-time pipeline](figures/fig03_querytime_pipeline.png)
84
+
85
+ **Figure 4.** The query remains real-valued and sparse. Routing is weakly expanded only to find nearby branches. The decisive local comparison touches only **16 residual coordinates** per routed membership. More detailed chunk-level evidence is extracted only after shortlist reduction.
86
+
87
+ ---
88
+
89
+ ## 5. Structured storage and complexity
90
+
91
+ ### 5.1 Storage structure
92
+
93
+ ![Figure 4. Structured storage budget](figures/fig04_storage_budget.png)
94
+
95
+ **Figure 5.** The geometric storage is controlled by small frozen structural handles. The chunk-level geometric layer is bounded by `F` and `S`; branch centers and term graphs are shared structures.
96
+
97
+ In conceptual terms, the structured storage grows as
98
+
99
+ ```text
100
+ O(N F S)
101
+ + O(M B)
102
+ + O(M (K_assoc + K_route))
103
+ + O(total binary term support)
104
+ ```
105
+
106
+ where:
107
+
108
+ - `N` = number of chunks,
109
+ - `M` = vocabulary size,
110
+ - `F = 4` fuzzy memberships,
111
+ - `B = 64` branch-center coordinates,
112
+ - `S = 16` residual coordinates retained per membership.
113
+
114
+ This is not byte-accurate accounting, but it captures the repository’s main structural claim: **the geometric layer stays small because it is sparse and fixed-size.**
115
+
116
+ ### 5.2 Query complexity
117
+
118
+ ![Figure 5. Query complexity by stage](figures/fig05_query_complexity.png)
119
+
120
+ **Figure 6.** The important algorithmic fact is that the local geometric score is bounded by `O(CS)` with **`S = 16` fixed**. The system deliberately postpones richer chunk-level work until after routing and shortlist reduction.
121
+
122
+ A concise query-time summary is:
123
+
124
+ | Stage | Complexity |
125
+ |---|---|
126
+ | Sparse query construction | `O(query tokens)` |
127
+ | Weak routing expansion | `O(Q K_r)` |
128
+ | Posting traversal | `O(C)` |
129
+ | Local geometric score | `O(C S)` with `S = 16` |
130
+ | Candidate aggregation | `O(C log C)` in the frozen Python reference path; `O(C)` in the preserved later stamp-aggregation branch |
131
+ | Cheap lexical pre-score | proportional to routed or gated binary term supports |
132
+ | Shortlist selection | approximately linear / partial-selection cost in the routed candidates |
133
+ | Final chunk evidence extraction | performed only on the shortlist `P` |
134
+ | Final top-10 construction | small overhead once shortlist features are available |
135
+
136
+ The preserved post-benchmark optimization branch additionally introduced:
137
+
138
+ - **stamp-based candidate aggregation**, replacing sort-heavy deduplication by an `O(C)` pass; and
139
+ - a **small gate before whole-chunk lexical scanning**.
140
+
141
+ Those optimizations are important and preserved in the repository, but they were developed **after** the frozen six-dataset benchmark and should therefore be presented separately rather than silently replacing the reported benchmark code.
142
+
143
+ ---
144
+
145
+ ## 6. Why top-10 rather than deep recall
146
+
147
+ ![Figure 7. Shortlist sweep](figures/fig07_shortlist_sweep.png)
148
+
149
+ **Figure 7.** The experiments show why `P` should be treated as a **RAG parameter**, not a sacred retrieval constant inherited from a deep-recall setting. On a large route such as TREC-COVID, a small shortlist acts as a denoiser and `P = 100` is the best top-10 operating point. On a tiny route such as SciFact, aggressive pruning is unnecessary and quality improves as that artificial cutoff disappears.
150
+
151
+ The practical reason is straightforward:
152
+
153
+ > A generator typically consumes only a small context window. Retrieval quality far beyond the first few chunks may have little or no downstream utility.
154
+
155
+ This is why the repository emphasizes `nDCG@10`, `MRR@10`, `P@10`, `R@10`, `Hit@10`, and latency, rather than selecting the operating point from deep-recall curves alone.
156
+
157
+ ---
158
+
159
+ ## 7. Frozen six-dataset results for OURS
160
+
161
+ ![Figure 8. Frozen six-dataset heatmap](figures/fig08_six_dataset_heatmap.png)
162
+
163
+ **Figure 8.** The frozen `100→10` CPU runs across six datasets.
164
+
165
+ ### 7.1 OURS only: concise summary
166
+
167
+ | Dataset | nDCG@10 | MRR@10 | P@10 | R@10 | Hit@10 | Median latency (ms) | p95 latency (ms) |
168
+ |---|---:|---:|---:|---:|---:|---:|---:|
169
+ | SciFact | 0.5685 | 0.5452 | 0.0737 | 0.6663 | 0.6833 | 0.947 | 1.031 |
170
+ | TREC-COVID | 0.5990 | 0.8252 | 0.6520 | 0.0163 | 1.0000 | 1.051 | 1.193 |
171
+ | Quora | 0.7366 | 0.7287 | 0.1124 | 0.8407 | 0.8904 | 120.301 | 175.494 |
172
+ | MS MARCO / DL19 | 0.3400 | 0.5189 | 0.2674 | 0.0916 | 0.7209 | 65.195 | 142.647 |
173
+ | HotpotQA | 0.4670 | 0.6255 | 0.0964 | 0.4820 | 0.7507 | 28.944 | 42.568 |
174
+ | NQ | 0.2579 | 0.2262 | 0.0462 | 0.3983 | 0.4342 | 33.686 | 44.161 |
175
+
176
+ Two observations matter.
177
+
178
+ 1. The repository is strongest when the goal is **cheap CPU retrieval** with credible top-10 quality, not absolute dominance over the strongest neural stacks.
179
+ 2. The speed advantage is especially visible on the small-route / CPU-native side of the design space.
180
+
181
+ ---
182
+
183
+ ## 8. Quality / latency positioning on CPU
184
+
185
+ ![Figure 9. SciFact quality versus latency](figures/fig09_scifact_quality_latency.png)
186
+
187
+ **Figure 9.** SparseGeometricRAG is best understood as occupying a **low-cost corner** of the quality / latency plane. The repository does not claim to beat the strongest neural retrievers in effectiveness; its claim is that it can remain operationally simple and CPU-first while still giving a practical top-10 retriever.
188
+
189
+ ---
190
+
191
+ ## 9. Full benchmark tables
192
+
193
+ The tables below are intentionally complete rather than selective. `NR` means a compatible value was not available in the current ledger.
194
+
195
+ ### 9.1 nDCG@10
196
+
197
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
198
+ |---|---:|---:|---:|---:|---:|---:|
199
+ | Exact TF-IDF | 0.5780 | 0.3738 | NR | NR | NR | NR |
200
+ | BM25 | 0.6650 | 0.6560 | 0.7890 | 0.2280 | 0.6030 | 0.3290 |
201
+ | MiniLM + FAISS Flat | 0.6451 | 0.4725 | 0.8756 | 0.3654 | 0.4651 | 0.4387 |
202
+ | BGE-base + FAISS Flat | 0.7404 | 0.7807 | 0.8890 | 0.4135 | 0.7260 | 0.5415 |
203
+ | BGE-base + FAISS HNSW | 0.7404 | 0.7807† | 0.8890† | 0.4135† | 0.7260† | 0.5415† |
204
+ | BGE-base + FAISS IVF-Flat | 0.7255 | 0.7807† | 0.8890† | 0.4135† | 0.7260† | 0.5415† |
205
+ | BGE-base + FAISS IVF-PQ | 0.6979 | 0.7807† | 0.8890† | 0.4135† | 0.7260† | 0.5415† |
206
+ | BGE-base + hnswlib HNSW | 0.7404 | 0.7807† | 0.8890† | 0.4135† | 0.7260† | 0.5415† |
207
+ | BGE-base + ScaNN | 0.6783 | 0.7807† | 0.8890† | 0.4135† | 0.7260† | 0.5415† |
208
+ | Contriever-MS MARCO + FAISS | 0.6770 | 0.5960 | 0.8650 | 0.4070 | 0.6380 | 0.4980 |
209
+ | SPLADE++ | 0.7040 | 0.7270 | 0.8340 | 0.4330 | 0.6870 | 0.5370 |
210
+ | Modern ColBERT | 0.7645 | 0.8341 | 0.8754 | 0.4499 | 0.7667 | 0.6169 |
211
+ | **OURS — CPU, 100→10** | **0.5685** | **0.5990** | **0.7366** | **0.3400** | **0.4670** | **0.2579** |
212
+
213
+ ### 9.2 MRR@10
214
+
215
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
216
+ |---|---:|---:|---:|---:|---:|---:|
217
+ | Exact TF-IDF | 0.5437 | 0.5915 | NR | NR | NR | NR |
218
+ | BM25 | 0.6460 | 0.8530 | 0.7790 | 0.1800 | 0.8030 | 0.2630 |
219
+ | MiniLM + FAISS Flat | 0.6110 | 0.7244 | NR | NR | 0.4446 | NR |
220
+ | BGE-base + FAISS Flat | 0.7034 | 0.9180 | 0.8823 | 0.3502 | 0.8611 | 0.4924 |
221
+ | BGE-base + FAISS HNSW | 0.7034 | 0.9180† | 0.8823† | 0.3502† | 0.8611† | 0.4924† |
222
+ | BGE-base + FAISS IVF-Flat | 0.6879 | 0.9180† | 0.8823† | 0.3502† | 0.8611† | 0.4924† |
223
+ | BGE-base + FAISS IVF-PQ | 0.6615 | 0.9180† | 0.8823† | 0.3502† | 0.8611† | 0.4924† |
224
+ | BGE-base + hnswlib HNSW | 0.7034 | 0.9180† | 0.8823† | 0.3502† | 0.8611† | 0.4924† |
225
+ | BGE-base + ScaNN | 0.6494 | 0.9180† | 0.8823† | 0.3502† | 0.8611† | 0.4924† |
226
+ | Contriever-MS MARCO + FAISS | 0.6207 | NR | NR | NR | NR | NR |
227
+ | SPLADE++ | 0.6699 | NR | NR | 0.3830 | NR | NR |
228
+ | Modern ColBERT | 0.7390 | 0.9533 | 0.8671 | 0.3849 | 0.9188 | 0.5655 |
229
+ | **OURS — CPU, 100→10** | **0.5452** | **0.8252** | **0.7287** | **0.5189** | **0.6255** | **0.2262** |
230
+
231
+ ### 9.3 Precision@10
232
+
233
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
234
+ |---|---:|---:|---:|---:|---:|---:|
235
+ | Exact TF-IDF | 0.0797 | 0.4020 | NR | NR | NR | NR |
236
+ | BM25 | 0.0863 | 0.6360 | ~0.1200 | NR | NR | NR |
237
+ | MiniLM + FAISS Flat | 0.0883 | 0.5040 | 0.1337 | 0.0591 | 0.0974 | 0.0770 |
238
+ | BGE-base + FAISS Flat | 0.0987 | 0.8300 | 0.1346 | 0.0656 | 0.1515 | 0.0884 |
239
+ | BGE-base + FAISS HNSW | 0.0987 | 0.8300† | 0.1346† | 0.0656† | 0.1515† | 0.0884† |
240
+ | BGE-base + FAISS IVF-Flat | 0.0973 | 0.8300† | 0.1346† | 0.0656† | 0.1515† | 0.0884† |
241
+ | BGE-base + FAISS IVF-PQ | 0.0950 | 0.8300† | 0.1346† | 0.0656† | 0.1515† | 0.0884† |
242
+ | BGE-base + hnswlib HNSW | 0.0987 | 0.8300† | 0.1346† | 0.0656† | 0.1515† | 0.0884† |
243
+ | BGE-base + ScaNN | 0.0887 | 0.8300† | 0.1346† | 0.0656† | 0.1515† | 0.0884† |
244
+ | Contriever-MS MARCO + FAISS | 0.0883 | NR | NR | NR | NR | NR |
245
+ | SPLADE++ | 0.0937 | NR | NR | NR | NR | NR |
246
+ | Modern ColBERT | 0.0977 | 0.8820 | 0.1327 | 0.0701 | 0.1548 | 0.0979 |
247
+ | **OURS — CPU, 100→10** | **0.0737** | **0.6520** | **0.1124** | **0.2674** | **0.0964** | **0.0462** |
248
+
249
+ ### 9.4 Recall@10
250
+
251
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
252
+ |---|---:|---:|---:|---:|---:|---:|
253
+ | Exact TF-IDF | 0.7135 | 0.0105 | NR | NR | NR | NR |
254
+ | BM25 | 0.7809 | 0.0158 | 0.8854 | NR | 0.6531 | NR |
255
+ | MiniLM + FAISS Flat | 0.7833 | 0.0128 | 0.9503 | 0.5676 | 0.4870 | 0.6471 |
256
+ | BGE-base + FAISS Flat | 0.8742 | 0.0221 | 0.9574 | 0.6277 | 0.7574 | 0.7469 |
257
+ | BGE-base + FAISS HNSW | 0.8742 | 0.0221† | 0.9574† | 0.6277† | 0.7574† | 0.7469† |
258
+ | BGE-base + FAISS IVF-Flat | 0.8609 | 0.0221† | 0.9574† | 0.6277† | 0.7574† | 0.7469† |
259
+ | BGE-base + FAISS IVF-PQ | 0.8441 | 0.0221† | 0.9574† | 0.6277† | 0.7574† | 0.7469† |
260
+ | BGE-base + hnswlib HNSW | 0.8742 | 0.0221† | 0.9574† | 0.6277† | 0.7574† | 0.7469† |
261
+ | BGE-base + ScaNN | 0.7814 | 0.0221† | 0.9574† | 0.6277† | 0.7574† | 0.7469† |
262
+ | Contriever-MS MARCO + FAISS | 0.7868 | NR | NR | NR | NR | NR |
263
+ | SPLADE++ | 0.8230 | NR | NR | NR | NR | NR |
264
+ | Modern ColBERT | 0.8647 | 0.0230 | 0.9516 | 0.6710 | 0.7739 | 0.8239 |
265
+ | **OURS — CPU, 100→10** | **0.6663** | **0.0163** | **0.8407** | **0.0916** | **0.4820** | **0.3983** |
266
+
267
+ ### 9.5 Hit@10
268
+
269
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
270
+ |---|---:|---:|---:|---:|---:|---:|
271
+ | Exact TF-IDF | 0.7333 | 0.8600 | NR | NR | NR | NR |
272
+ | BM25 | 0.8033 | 1.0000 | 0.9286 | NR | NR | NR |
273
+ | MiniLM + FAISS Flat | NR | NR | NR | NR | NR | NR |
274
+ | BGE-base + FAISS Flat | 0.8833 | NR | NR | NR | NR | NR |
275
+ | BGE-base + FAISS HNSW | 0.8833 | NR | NR | NR | NR | NR |
276
+ | BGE-base + FAISS IVF-Flat | 0.8700 | NR | NR | NR | NR | NR |
277
+ | BGE-base + FAISS IVF-PQ | 0.8567 | NR | NR | NR | NR | NR |
278
+ | BGE-base + hnswlib HNSW | 0.8833 | NR | NR | NR | NR | NR |
279
+ | BGE-base + ScaNN | 0.7900 | NR | NR | NR | NR | NR |
280
+ | Contriever-MS MARCO + FAISS | 0.7967 | NR | NR | NR | NR | NR |
281
+ | SPLADE++ | 0.8333 | NR | NR | NR | NR | NR |
282
+ | Modern ColBERT | 0.8100 | NR | NR | NR | NR | NR |
283
+ | **OURS — CPU, 100→10** | **0.6833** | **1.0000** | **0.8904** | **0.7209** | **0.7507** | **0.4342** |
284
+
285
+ ### 9.6 Median query latency (ms)
286
+
287
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
288
+ |---|---:|---:|---:|---:|---:|---:|
289
+ | Exact TF-IDF | 6.197 | 50.185 | NR | NR | NR | NR |
290
+ | BM25 | 0.561 | 4.912 | NR | NR | NR | NR |
291
+ | MiniLM + FAISS Flat | NR | NR | NR | NR | NR | NR |
292
+ | BGE-base + FAISS Flat | 10.013 | NR | NR | NR | NR | NR |
293
+ | BGE-base + FAISS HNSW | 10.369 | NR | NR | NR | NR | NR |
294
+ | BGE-base + FAISS IVF-Flat | 10.050 | NR | NR | NR | NR | NR |
295
+ | BGE-base + FAISS IVF-PQ | 13.910 | NR | NR | NR | NR | NR |
296
+ | BGE-base + hnswlib HNSW | 10.594 | NR | NR | NR | NR | NR |
297
+ | BGE-base + ScaNN | 9.947 | NR | NR | NR | NR | NR |
298
+ | Contriever-MS MARCO + FAISS | 7.472 | NR | NR | NR | NR | NR |
299
+ | SPLADE++ | 13.493 | NR | NR | NR | NR | NR |
300
+ | Modern ColBERT | 62.671 | NR | NR | NR | NR | NR |
301
+ | **OURS — CPU, 100→10** | **0.947** | **1.051** | **120.301** | **65.195** | **28.944** | **33.686** |
302
+
303
+ ### 9.7 p95 query latency (ms)
304
+
305
+ | Method | SciFact | TREC-COVID | Quora | MS MARCO / DL19 | HotpotQA | NQ |
306
+ |---|---:|---:|---:|---:|---:|---:|
307
+ | Exact TF-IDF | 14.605 | 56.716 | NR | NR | NR | NR |
308
+ | BM25 | 5.645 | 7.336 | NR | NR | NR | NR |
309
+ | MiniLM + FAISS Flat | NR | NR | NR | NR | NR | NR |
310
+ | BGE-base + FAISS Flat | 15.398 | NR | NR | NR | NR | NR |
311
+ | BGE-base + FAISS HNSW | 12.925 | NR | NR | NR | NR | NR |
312
+ | BGE-base + FAISS IVF-Flat | 16.303 | NR | NR | NR | NR | NR |
313
+ | BGE-base + FAISS IVF-PQ | 18.496 | NR | NR | NR | NR | NR |
314
+ | BGE-base + hnswlib HNSW | 13.293 | NR | NR | NR | NR | NR |
315
+ | BGE-base + ScaNN | 11.858 | NR | NR | NR | NR | NR |
316
+ | Contriever-MS MARCO + FAISS | 9.628 | NR | NR | NR | NR | NR |
317
+ | SPLADE++ | 19.156 | NR | NR | NR | NR | NR |
318
+ | Modern ColBERT | 70.994 | NR | NR | NR | NR | NR |
319
+ | **OURS — CPU, 100→10** | **1.031** | **1.193** | **175.494** | **142.647** | **42.568** | **44.161** |
320
+
321
+ **Notes.** `NR` means “not reported under a compatible metric / protocol in the current ledger.” `†` indicates that, outside SciFact, the BGE ANN-backend rows mirror the BGE-base representation-level effectiveness reference rather than a separately rerun backend-specific effectiveness experiment.
322
+
323
+ ---
324
+
325
+ ## 10. Reproducibility and repository structure
326
+
327
+ ![Figure 10. Repository map](figures/fig10_repository_map.png)
328
+
329
+ **Figure 10.** The repository is organized so that the reusable retriever, the BEIR experiments, the full-scale MS MARCO campaign, the result artifacts, and the documentation remain clearly separated.
330
+
331
+ A concise map is:
332
+
333
+ ```text
334
+ geomretrieval/ reusable sparse geometric retriever
335
+ experiments/beir/ clean BEIR runners
336
+ experiments/msmarco_scale/ full MS MARCO scale campaign
337
+ results/ frozen result JSONs
338
+ configs/ reproduction handles
339
+ scripts/ one-command runners
340
+ docs/ method, protocol, speed, baseline notes
341
+ tests/ smoke tests
342
+ ```
343
+
344
+ ---
345
+
346
+ ## 11. What the repository does and does not claim
347
+
348
+ ### It does claim:
349
+
350
+ - a **CPU-first** retriever with small structured state;
351
+ - bounded local computation driven by **16-coordinate residual codes**;
352
+ - a practical **top-10** evaluation philosophy;
353
+ - a meaningful **low-cost hardware** story;
354
+ - full reproducibility artifacts, experiment history, and result tables.
355
+
356
+ ### It does not claim:
357
+
358
+ - that it dominates the strongest neural retrievers in pure accuracy;
359
+ - that all latency figures across all baselines are strictly apples-to-apples end-to-end systems timings;
360
+ - that top-10 quality and deep-recall quality should always share the same shortlist setting.
361
+
362
+ This is precisely why the repository is interesting: it highlights a different design point in the retrieval landscape.
363
+
364
+ ---
365
+
366
+ ## 12. Bottom line
367
+
368
+ The central selling point is simple:
369
+
370
+ > **SparseGeometricRAG is a retriever designed so that expensive retrieval hardware is optional rather than mandatory.**
371
+
372
+ If the goal is to deploy a practical RAG retriever on low-cost CPU hardware, keep the retrieval layer simple, avoid retrieval-time transformer inference, and still obtain usable top-10 quality, then this repository offers a concrete and reproducible answer.
SHA256SUMS.txt ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 4f80423f26ffd9f82447201f0bf9dc37c47ebc38f8f22fd6ab5fead499f874a4 ./MANIFEST.md
2
+ 0ab6ea3c7d7195101e85eb466bf71178f4788fd018a2ba80e6e91b755e651d26 ./README.md
3
+ 5ba581947769d1a9873ec227146ff9fcd6e97e6c72d313e15b2dd0b1a78422da ./SHA256SUMS.txt
4
+ 2969493e97d84de0d62e940cd56eb2b2516ab52d953f5136cc522b8b25c10e18 ./baselines/README.md
5
+ 0b88da6a2d4b0d03ca6f7d3e2f9b5909df6ec77287b9f853ced8aa54334341f6 ./baselines/msmarco_scale/BASELINE_COMPARISON.json
6
+ 17c205fefea1cf76b786d374e66996f0fad284c1c3e20e25fb2f13eb78d06bf7 ./baselines/msmarco_scale/README.md
7
+ c1679a7dc3362df87e9b6f9776d687b39347667e3099336736c5c1bf2c8f4081 ./baselines/msmarco_scale/run_bm25_test_streaming_effectiveness.py
8
+ d057165b4a2fabf2412e2169d6c9054ea9143c98b19d971acf56e4bc45ace37a ./baselines/run_local_lexical.py
9
+ f1706888e5cde3c06910c4595b57f936eab81a5fab1f674ff5cd511ca48380c1 ./configs/msmarco_fullscale_lock.json
10
+ 6cadb36a36704b5e884136c6497edcd6bc0d735c2f6b3640a04c29f96d4090a5 ./configs/rag_top10_current.json
11
+ 392477be0bc316a79005f99b8552d81828f4f13b1a34fe7f9469d01867da0ebe ./data/README.md
12
+ 16baac51e07a2c18658e7a52be293e5faf76c85eed45af6020e1f3310c986e84 ./docs/BASELINE_SUITE.md
13
+ f2f6a48cfa62c6579eb8c9d12509bc84a694180c2183f1e307323e0b1fcf7fe8 ./docs/LITERATURE_AND_SPEED.md
14
+ 45e5ff63bb6806195dbbd88f1b4acaa44a6cafe2412f9b60ef5329744e9bf311 ./docs/METHOD.md
15
+ 86d453cdec765c7ebd7d8756f19eeb46eeaa6d434175d011ee605e54ce96ebf9 ./docs/RAG_PROTOCOL.md
16
+ 8f71f9ba5e0a3b8793eb579473b617a2680d7d257ca797bcc95cc439694dcaf1 ./docs/REPRODUCIBILITY.md
17
+ b1b557dfa9735a945ed90ecca0bc8a3c4b7b6c5c868b244319564193b52a1cca ./docs/images/scifact_pool_sweep.png
18
+ 45cd761e476585ed66c2f556dda1f6c3f41e952990aba2b4896afe86ba6450ce ./docs/images/treccovid_pool_sweep.png
19
+ 69ac0bdc2e42aba38b97af2d0f2f742a2d4868bbc3cf29b55498570b6dc93597 ./docs/images/treccovid_speed_pool.png
20
+ 034af73af755caed99eb5998c5a666c7a06a3dd08fb9599018d7b9d64e8f116f ./experiments/beir/run_pool_sweep.py
21
+ 5a878f6b0d99095cd16ecaf88f421d40116e00b28e36575a9a1c9829e7a4a844 ./experiments/beir/run_rag_top10.py
22
+ edad4ce1d8d74ca42d4c0068da64091ba25a39edbb819ce6fda21216dcf4fcbc ./experiments/beir/scifact_pool_sweep_exact_history.py
23
+ bd3587776da5a2706359acaede2ffd9845caaae324a975e548be927b4733c512 ./experiments/beir/treccovid_collision_diag_exact_history.py
24
+ 0fab03058fe78cefc5a256a6a2acb962610f9691fb43aa0e233f2a2604592377 ./experiments/beir/treccovid_hq_branch_exact_history.py
25
+ b289003e70d07342c1091cf89100f65f6c056e855f5e699fe678cb542eab1b69 ./experiments/beir/treccovid_idf_power_exact_history.py
26
+ 1e40adcddc0b8137d4a0711eb6242456dfeca3975dbca26c2d2076be19d47d51 ./experiments/beir/treccovid_local_baselines_exact_history.py
27
+ 03f408dd323f6b8b445820321453c3c16bd74c108fe73ee0c7a24d38561cbbf2 ./experiments/beir/treccovid_pool_sweep_exact_history.py
28
+ 0b69c6492c8dc9959ed2d7e3ed77828f1d6b80c50cc4170c317521360bc1f2f5 ./experiments/msmarco_scale/bench_fast.py
29
+ 79317da63ae94063be1a54fd9d668bbe8985c4245e1f5314bf590f3434839ae8 ./experiments/msmarco_scale/bench_post.py
30
+ adbfb8cd566efc555fc64bc56c632aa060d13b89d1f130e361f20cf52494ae16 ./experiments/msmarco_scale/build_branch_sorted_layout.py
31
+ d731b75f0fa7f76a1246f03866cb8f349e0fcd9ee0e49ac217877cbf7c89c8fd ./experiments/msmarco_scale/build_global_support.py
32
+ 46895b5c3400276235abe7d177a29f224cb90f088c3bb97910909697bb0bb6db ./experiments/msmarco_scale/compare_fast_post.py
33
+ 738469931c461f70434de151545caafd85ac5682a5d63c9b196a0023e309c708 ./experiments/msmarco_scale/msmarco_allroute_diag.py
34
+ 261459b5fd83fd4cdf2a5a88d9be36a83410ca9ed358efe9e229718b27de8926 ./experiments/msmarco_scale/msmarco_amplitude_diag_stage1.py
35
+ 1232f6e2a8f50d44215949493aa7a277d186bad61fe1ce96fcb5a3828f8b93cd ./experiments/msmarco_scale/msmarco_amplitude_diag_stage2.py
36
+ e9dbde8dfea6101eee75a13b55423192743745334c8910146bb16b7c316cdfeb ./experiments/msmarco_scale/msmarco_amplitude_diag_stage3.py
37
+ 78c884bca40e9c0a91982941b0a0f778436f9d32b05c11b6314a8498401adbba ./experiments/msmarco_scale/msmarco_best_all_dev.py
38
+ 66f848dcd48d93e2dd40f5c591e1b272d564ad591b4c451f20e7a99320a34b68 ./experiments/msmarco_scale/msmarco_best_tail_core.py
39
+ bbefbeeb5bdf65be97380691ef6402d696c253876e555e8366d38ce1a1b21c9b ./experiments/msmarco_scale/msmarco_best_tail_dev.py
40
+ b8e9207c47ec6eefa0a1242fe314b9f8f82de0eb925f248c6ed509b25223027d ./experiments/msmarco_scale/msmarco_best_tail_eval.py
41
+ 881c867a7b39c00a99efc9d988dacb03da6461b10edfaed9bd1cb736f1043385 ./experiments/msmarco_scale/msmarco_branch_coherence_multifold.py
42
+ 285b50278a451163946fb35401e54e3057fbd8f4c4ec78e44ffed751d9baef1f ./experiments/msmarco_scale/msmarco_branch_features.py
43
+ e1f94adad876988ef048fe215f0277fef184d64170993f637e28a9394b030906 ./experiments/msmarco_scale/msmarco_branch_fusion_sweep.py
44
+ afb1ba43fb4d5b30bf6f4e68e7958d604aab2345580cd60ea2b7611754f001ca ./experiments/msmarco_scale/msmarco_build_geometry.py
45
+ 46ad190f74ccc707fa7d46d0bb710e1c2e6adfe641c2f67e669f1871e1218b70 ./experiments/msmarco_scale/msmarco_build_geometry_uniform1m.py
46
+ 45e271933bcf058970fb4e917d57d14390da3db0112aecb2f5e241f6bfeec457 ./experiments/msmarco_scale/msmarco_build_s32_reliability.py
47
+ 38619f0b7a3cc53f7a43071fba267d6d0a0bdb7856a7303157cd4e267726060e ./experiments/msmarco_scale/msmarco_coordination_features.py
48
+ 420f26c180abae207ef59019b4fd0172ba1f65a40a126b4ed97d791b0be7e43e ./experiments/msmarco_scale/msmarco_coordination_sweep.py
49
+ 74e8125256ff7c0ece264699195972ba8cedb0246f3d6c615520a2f89f720e38 ./experiments/msmarco_scale/msmarco_covbonus_sweep.py
50
+ 9e5176fbf098f04fe58e803dc597a4168b9a4f6325cd361f3b0318297882acb4 ./experiments/msmarco_scale/msmarco_dev_fast.py
51
+ c0f76d5f036aad3ca2380ce9797051393e875efcc06d5f0a75ada99361fe031d ./experiments/msmarco_scale/msmarco_early_lex_dev.py
52
+ 5fbfe8bd9d9af97fe0614a64803affc8dd2c2ada406406b49548fb4f4fdfefee ./experiments/msmarco_scale/msmarco_early_lex_direct.py
53
+ 80c4499e5f9cd2dbbd5689742eeb2e98e1915d31fe0e6f3f9a0b90ec895891ff ./experiments/msmarco_scale/msmarco_early_lex_quota.py
54
+ 00727d6cca277783a3fd3c5077221cc801ca1699bf0c25cc5a93b303a5411d9d ./experiments/msmarco_scale/msmarco_early_lex_validation.py
55
+ a79a54e5aea400a5ab5511c4dca46b56c0267504701529920fc24c2269c2dca4 ./experiments/msmarco_scale/msmarco_early_lex_validation_fast.py
56
+ d8195c98fc6a73c7c59b55ac57305a8116661ecb096363aee5403f0ad9192d99 ./experiments/msmarco_scale/msmarco_encode_full.py
57
+ de36eb7df3838b25d678066c83b6c9ec3fe2e384a0cdba7b967d24ad504ebda0 ./experiments/msmarco_scale/msmarco_encode_resume.py
58
+ 966313af06ab566954606184a8537eeebb0c99582a297cdda8966e9e20aa1fe5 ./experiments/msmarco_scale/msmarco_encode_s32.py
59
+ e0a55887f6ed1e6bdd973d9a8a40522950acad2e4703dcd27cf43da93d6d6bbe ./experiments/msmarco_scale/msmarco_encode_s32_1w.py
60
+ fba6a6d64c22daa0469d34e359cfa874ab365128256382c07e62e3b224ccd3b2 ./experiments/msmarco_scale/msmarco_encode_s32_1w5t.py
61
+ 3c7dad17cf611051cae4f75c181afe31090b4b1b1a213ef837dca3db52fe1187 ./experiments/msmarco_scale/msmarco_encode_s32_2w.py
62
+ 2c2bba9b82e194d75e8157dc2b3d63b90ae29913c3661f1eec174c0c0f1ce03e ./experiments/msmarco_scale/msmarco_encode_uniform_residuals.py
63
+ 4d5a36223acf2a892c0045b520fd153ec9eacac2f2c72a196c85cfd74396da64 ./experiments/msmarco_scale/msmarco_extract_structural_features.py
64
+ 9c8a83dd82abe51bdf05b1ee3532cc93f399568fa2143855703b2771262c2ef9 ./experiments/msmarco_scale/msmarco_extract_structural_features_fast.py
65
+ ac540876ca306ad307e320c573fc9a3dae0e2be385736bd2d10fbfa79c601f38 ./experiments/msmarco_scale/msmarco_final_test_once.py
66
+ 572487beff4108cc7d533dd6978191087bb35660ffd3d6d57c583171da175330 ./experiments/msmarco_scale/msmarco_final_weight_sweep.py
67
+ 4de2e0fc6d6f839d38882d25e58959ede65930a9989f1c3b84eb7016e993b94e ./experiments/msmarco_scale/msmarco_finish_train_cache.py
68
+ db2264deb5a05f25a6e20001b42b512cb0debf392e4e6e9a50b4a48916e17e7a ./experiments/msmarco_scale/msmarco_finish_train_tune.py
69
+ c759413ea0620b5548904797f05e3f0a3fb29cc077adb2cdfd4df0bd0237b34a ./experiments/msmarco_scale/msmarco_full_search.py
70
+ 6e99ebaa106dfc5f2eb04d228b136955a420f532af81ddc29045f554b0aa2407 ./experiments/msmarco_scale/msmarco_full_search_fast.py
71
+ 4c18a93f1467cdc3059c95c9c7b5c1183f9921c0972a7960fd9ab2b6fce0d4ed ./experiments/msmarco_scale/msmarco_full_search_fastp.py
72
+ 70513336dd6eb7696baa700e9398d3fb16c33c8bd73358a7914c78aaf5b29083 ./experiments/msmarco_scale/msmarco_full_search_post.py
73
+ f20d3e28187484a5f62a8d6d118679587c67550c7aac8b9ef994dab8837cb1d7 ./experiments/msmarco_scale/msmarco_full_search_uniform1m.py
74
+ 62726f1bb4b3777d1a670e0961998c0c2594ff665bb0e60c332d22c0659831ac ./experiments/msmarco_scale/msmarco_full_search_uniform1m_s32.py
75
+ 340a353fa8fe95d1ab55a5f37243001b04a8152bb9175b332d2443fc99393d68 ./experiments/msmarco_scale/msmarco_gamma_lambda_diag.py
76
+ a2cb2c3df68bd1e90ca36d0e199d8f7fa7b3dffa71096336dbbe207f58f0615e ./experiments/msmarco_scale/msmarco_idf2_best_dev.py
77
+ 960eb4e025ab72c68d12fc35b410404c176b04cc0ab803fbe83d9405be0c8151 ./experiments/msmarco_scale/msmarco_idf2_rare3_best_dev.py
78
+ 4f4396ed271d7eb4fd6d3c5775b6a22e377b7bb78a0fd9fbbd9685bcbae22157 ./experiments/msmarco_scale/msmarco_lambdaM_uniform_diag.py
79
+ 7060d1ddbbbcffd8da22ce50dce7a4b7eaf0b768c68ec518c35dd2c059bd165a ./experiments/msmarco_scale/msmarco_lambda_diag.py
80
+ 5822caa5a1e74a0b349b1f2c0efb5c18b1306425948300d8e53d2326cdaccc0d ./experiments/msmarco_scale/msmarco_lex_idf_highpower_multifold.py
81
+ 1585716a09d55862b6899e16a85adc11968a61bff0f5978f824d76dd285986c6 ./experiments/msmarco_scale/msmarco_lex_idf_power_multifold.py
82
+ dc767671c4f39ee8c912bb3e2b9ac05b4faea2885143dce20ced6e2ac87ce25a ./experiments/msmarco_scale/msmarco_p_sweep.py
83
+ 1598e1bb3423b03d9d46a8fa7256618255ad5cdef24f8455423902ed6c5179a4 ./experiments/msmarco_scale/msmarco_prelex_idf2_multifold.py
84
+ 954bfef5e7ae2fc77b1bea2d85716aa457c80267ff0e99b01bcc44aa826d9c8e ./experiments/msmarco_scale/msmarco_preselection_finalists_validation.py
85
+ 2ca5caac2bfe079963124fdda5b52d9d480ef0cfb266d6f628a77e7acfb94a0f ./experiments/msmarco_scale/msmarco_preselection_length_sweep.py
86
+ 8ab754107bb57ad5ab0a36ac76c7c7f7c06a183047ee18f292463ba5a924faa8 ./experiments/msmarco_scale/msmarco_rare_conjunction_multifold.py
87
+ c1076c4bc3fd3d5f14039f7cbdbf08ac3be8e76e5ac6e4249148b415a7944caf ./experiments/msmarco_scale/msmarco_reorder_s32.py
88
+ 5a4fcd6764ed54cfb0a1d45d7de75cb8896140aad1b6dada0f62420325050899 ./experiments/msmarco_scale/msmarco_reorder_uniform.py
89
+ e8a2edc069f193dd44f36aafd3f9248a88fd2f0eb2b80af9dabf67c5f6cce5c3 ./experiments/msmarco_scale/msmarco_scale_exact_vocab.py
90
+ 155d1f390a3f65dd09d5d39cdbb5c2e3fbde08b1b974c010fd709c0857a24d5d ./experiments/msmarco_scale/msmarco_scale_vocab.py
91
+ dec02ef2df159ccd3ce977a9abc784379ee15e3102584b9e031485ab9745353c ./experiments/msmarco_scale/msmarco_semantic_coord_features.py
92
+ e8b2d586bf2cb5353a3af967413a56605b070c0a6e526218c1c5f053e64d81d5 ./experiments/msmarco_scale/msmarco_semcoord_best_dev.py
93
+ 452eaad19b02960f544db269db1e8aa171e7433c4dd570d86d0d70e4a9b6df2f ./experiments/msmarco_scale/msmarco_semcoord_sweep.py
94
+ 86855fc772847d4b53c1fd070b0b8b4137f1e670fa57eb246355bd0630e3a4cf ./experiments/msmarco_scale/msmarco_structural_157_dev.py
95
+ 7050da6798aefa97324866592c393a998ce9ce71e2cfd47b1ecc785daf36b6aa ./experiments/msmarco_scale/msmarco_structural_best_dev.py
96
+ 64ac793e56f13c53915425b9489fb22bcce3feb4d8bfcef8191cc31f658d5fe2 ./experiments/msmarco_scale/msmarco_structural_fusion_fast.py
97
+ 7acd1f4bbfc584e7ea94b135c23cdaf02934efa6c626b7293362e396a10e86b3 ./experiments/msmarco_scale/msmarco_structural_fusion_sweep.py
98
+ 8cd6419ae450b8e9242a4fde146fed06b33391587d0b4f449a8275f26552beb8 ./experiments/msmarco_scale/msmarco_tail_weight_sweep.py
99
+ 00fc9fd1f311e2f7f535a1901fb2c0b1ac4a2642e5d9ccc975c888ef0467b9d3 ./experiments/msmarco_scale/msmarco_test_baseline_compare.py
100
+ 2c228d9018addb2cc0f09d688ef93ba39e473588c3ad7d8f345ecf63fb13c3a6 ./experiments/msmarco_scale/profile_fast.py
101
+ 397f4fac4b8c6521033163bd220ba356d762eae21c1292a2bcada7455031dbc1 ./experiments/msmarco_scale/profile_post.py
102
+ 15c14fe55c1e5fac958b0bae16ffdbd1a000aa47834d8e14e4ed75d08e450f87 ./experiments/msmarco_scale/reorder_chunk.py
103
+ 0473a4c9e28db15cda4c9ae597abfd24c4197cb2988d848ee74fbd7efbe57bbe ./experiments/postbenchmark_optimizations/README.md
104
+ 6e248cf9706154e1dd676a4e7f91033c20869dc136c8f3510f1d9032db425f19 ./experiments/postbenchmark_optimizations/final_two_optimizations_ARCHIVE.py
105
+ 19045799bf28fc030a90e71c3c61c8bf02860271aac714468231b78db47c07fe ./figures/fig01_positioning_low_cost.png
106
+ 12fe3a942bebe026c4e2429fe93119b0b5a597873c75a760c92fa3bdbeaeedc4 ./figures/fig02_offline_index_pipeline.png
107
+ f6c32ca8583a5e458359ae0f6ca98d28047192a6c9fb74656b75b72a3ee0c962 ./figures/fig03_querytime_pipeline.png
108
+ f19b3833a423631522d12ab759590a91e17fb09f41cd98af28d9c847d3c065af ./figures/fig04_storage_budget.png
109
+ 0e02d5a1d4c1c43771e0c8b913d3d428fb93bbcd4175ed3d7d08696c1771f5d9 ./figures/fig05_query_complexity.png
110
+ 11ce7608555d17493b24626cf4765102309b08ad66f79f2e37c0020d8313cb16 ./figures/fig06_hardware_story.png
111
+ 2d253fbe10eb0bd89729d2ae4cadffeb18acc00970937e02879e94a612fe59db ./figures/fig07_shortlist_sweep.png
112
+ df9aebd43ae13bbead2d9d5319667d8eef59b76b4c675b3b45b3eb76dff077d6 ./figures/fig08_six_dataset_heatmap.png
113
+ 36db863813e83f504d107265747812514882767092284153f086f78f3d94f34c ./figures/fig09_scifact_quality_latency.png
114
+ 74f278355a84231cd094d6a75687076aea5eb94100e056db25f566b53232774a ./figures/fig10_repository_map.png
115
+ b886958ef2c5f1c9df5e0461258cbd37ea44827238d2e75abd4e23938d19c42b ./geomretrieval/__init__.py
116
+ 7b0f962f8644cf5c31bbc338dcac1c794b17d9b8c763b831ccdf72433782116a ./geomretrieval/baselines.py
117
+ 0262e0bc78f6c9a5f7f9b5c0d6526f517beaf603f62ed5b3aafe7875d9411bda ./geomretrieval/beir.py
118
+ d74a944d3db48b8afb2c66655269fb7ce0d30bfc28afd4f08ccdf8abfec81325 ./geomretrieval/cli.py
119
+ c13b3bc618eb829e1da469bf28ec4488119c17e0970f0aaefb64c5eee14118bc ./geomretrieval/config.py
120
+ d0784e0575359692433444604bde9810e39a03b55c5e5c0a5a438f2892918ded ./geomretrieval/geometry.py
121
+ b2ce5b99b79852d366d31fe7f91c0b8de45c200f0b8657169084db23df15ba64 ./geomretrieval/index.py
122
+ 394664b5aae5e46b0a1e2f99a7b78f08152b56a340187df152d42828d101310f ./geomretrieval/metrics.py
123
+ dbce3f5659f0f987cab14764e38197ebe72e11e7102695b0388f6f7401dd66bb ./geomretrieval/rag_top10.py
124
+ 4d8cd71a842534d7f0a9b8c689fbd5220be7b88b9be5000b6e44a7cccd9687b8 ./geomretrieval/utils.py
125
+ f04cfb911b60797b228758f7edfdae7f4a12ee03e750bf2f32b5519f5921dd96 ./manifests/msmarco_manifest.json
126
+ 698630f7f5974913cafc6fae873379318410ef965c119f05f2238131dd5801ac ./pyproject.toml
127
+ abc4cf067d3bd04ea2683c7bd0dae28d646e88a71f760cac5f8e901bdf81b9dc ./requirements-baselines.txt
128
+ f8cd9e4fbe2f25e62feeec30971977b2057c9cf229e0c17e0b5315c235d53135 ./requirements.txt
129
+ 71d077d23700cd79e83c306316e98ae675235725fabc0d3381640ae115834584 ./results/BENCHMARK_LEDGER.json
130
+ 6e691241fa267c2bae5da3302c95241528863781b613c5b1767fec6243791c85 ./results/beir/p100_full_benchmark_summary.json
131
+ 654c0d66ea22848032c94db728ed1e3a88bcd0e73ba8888e7de8033222637a34 ./results/beir/rag_top10_pool_sweep_scifact_treccovid.json
132
+ f8e9f7e4e42445389b035d82c8d6d5a1e31983748ccf4157f19a28eda8d967a4 ./results/beir/scifact_p100_sweep_result.json
133
+ f402034a17f0a428c5720c4eff82d38cc6961115fd0917879015a30a79476afd ./results/beir/scifact_p200_sweep_result.json
134
+ 028912bd9c73ed0aa058f88cc6c1a0d68d8b76ed3e89b83585ab395f9b6b5733 ./results/beir/scifact_p25_sweep_result.json
135
+ b7e930250b1ff3c062bbb2ddfd6191841cf1aeac00310065b9f7a6e62a829810 ./results/beir/scifact_p500_sweep_result.json
136
+ f19feb62efda43cd2e68ac95dbd9ce6a5f28b165fa36ed31fe90a369e3218404 ./results/beir/scifact_p50_sweep_result.json
137
+ 23faac5913e8e503ade069949d388b3d412369ffd5c392eaaa71022c6f2fd81d ./results/beir/scifact_softdiv_results.json
138
+ 13133b8a961c28f7680912e01869f08bfdc2729eafb95333c0222ae4c25a69cd ./results/beir/treccovid_collision_diagnostic.json
139
+ ac3074ed93a804a9a78e3e8bf247ff81dbb95063650c88891d1daaea4589503e ./results/beir/treccovid_full_benchmark_diversity.json
140
+ bccd29058a344ce06a82c84563861fafcdb7b469e896f0d8b4a35da37077e0cc ./results/beir/treccovid_hq_branch_benchmark.json
141
+ 0a94838b89369c69a9d7945c6bbb165a2862cbd3723e2017af16106e69eb32eb ./results/beir/treccovid_idf_power_2_3_4.json
142
+ 80e5bb194711ef4a09387afcbe9520f4ae31f3faacfc8324dfc2ab18ba8576a3 ./results/beir/treccovid_local_baselines.json
143
+ 6b530a471c675042b99d14947c1f928a6bab7253aa749fdb9652389eefdf4946 ./results/beir/treccovid_p100_sweep_result.json
144
+ 205df77ad5021b577db84c5db7605028226f6d190c19ad5942e3cd84e9372559 ./results/beir/treccovid_p200_sweep_result.json
145
+ 406c073a8feb753974dff40f649f03730913f429914091b5bd2dd8f9c8fd1243 ./results/beir/treccovid_p25_sweep_result.json
146
+ eebeccc0aa7125f7aca3f5f822309e5d7698ebf4485a6d726fa9edd10679b623 ./results/beir/treccovid_p500_sweep_result.json
147
+ f98ee7d1016c63adf64951f0eff4290fff717efed1834497faed4d986992aa55 ./results/beir/treccovid_p50_sweep_result.json
148
+ 71baa6b559d2d0e4b6a624902f6273c8dc516247854f68ba841aa47e3fcf33a5 ./results/final_100_to_10/RAG_TOP10_P_SWEEP_DL19.json
149
+ 04fee39f94790d004058074ebaf5a6317a2d5e5fe8b24621a531cd297ec9a35c ./results/final_100_to_10/final_benchmark_table.json
150
+ feedeb5078219a4b0398fa4203f70a6f1b17e4cef269f69ce79b483935fadb35 ./results/final_100_to_10/hotpotqa_RAG_TOP10_P_SWEEP.json
151
+ 709ce2e6d2616ffedca38b4f16d56e6b63d40d9d4b56b0464ed693f5845ab6ed ./results/final_100_to_10/hotpotqa_two_optimizations_merged.json
152
+ 7f24fcb6097a32d51a24c45c71ae73d04a731eddec1d274ef05b302203dc0c99 ./results/final_100_to_10/nq_RAG_TOP10_P_SWEEP.json
153
+ bd3c812bf28283a270c160d88deca19009bef9aea765785930027654fb94b9de ./results/final_100_to_10/nq_two_optimizations_merged.json
154
+ 6e691241fa267c2bae5da3302c95241528863781b613c5b1767fec6243791c85 ./results/final_100_to_10/p100_full_benchmark_summary.json
155
+ 77e41141202457af5c5e008f7557b73546c9f04e603e4ba4fcef00ba36a24d90 ./results/final_100_to_10/quora_msmarco_top10_results.json
156
+ 654c0d66ea22848032c94db728ed1e3a88bcd0e73ba8888e7de8033222637a34 ./results/final_100_to_10/rag_top10_pool_sweep_scifact_treccovid.json
157
+ f1706888e5cde3c06910c4595b57f936eab81a5fab1f674ff5cd511ca48380c1 ./results/msmarco_scale/FINAL_LOCK.json
158
+ a5667df5baf192dba9f65a34185a90f22f186e41e8709d6a126080e62eb804ad ./results/msmarco_scale/FINAL_TEST_ONCE_results.json
159
+ 4d327d8bb8b0d9251b3f5c214ffe871891e35251ca44e043c66bd77517742004 ./results/msmarco_scale/FINAL_TEST_TREC_CORRECTED_WITH_R1K.json
160
+ 9d80214bae331d92e6fbb09f80eb459e80d75f2e9972cc9009f8ec10f9d0ce3f ./results/msmarco_scale/amplitude_diagnostic_results.json
161
+ 141b27e9e7c8e3ae89d06dea6a68b5c8539b5abef3e9c75b2a3039d575613578 ./results/msmarco_scale/best_all_dev_results.json
162
+ 2d2cb286c0bf59f1ed42fa1a120d11e1a1e6fcccd17c2de09fd455bc15691588 ./results/msmarco_scale/best_tail_dev_results.json
163
+ 456aff979399dbd5c86c5ba8611be8f55cfd12ee3cbcf12c854daa1e98ad7183 ./results/msmarco_scale/best_tail_validation.json
164
+ 2080edeac2290696cae75818ee37a29a77db7f3cdad90c6c432652bf5d9c0151 ./results/msmarco_scale/branch_coherence_multifold.json
165
+ 4fda0356558b1e52293a665d50710fc8513eb3fe99d652097218001c4bee4f42 ./results/msmarco_scale/early_lex_dev_results.json
166
+ 2a46d2ac76df6d45d931bab49170736ba67c5099703ee1494f2db2490c0177e6 ./results/msmarco_scale/early_lex_direct_validation.json
167
+ b69ee75e3825aabaf41c517ff26dffa85e6defc31b0b5d0c997c3928974b46f4 ./results/msmarco_scale/early_lex_quota_validation.json
168
+ 3b9cd71620d34324fd09a945c08b9b286fb9a3f1df68bacb16d278a5a9580cbc ./results/msmarco_scale/early_lex_validation.json
169
+ 7ce9d5063c5846789b22307e6ef1947ff365631c326e03560478cc828711d581 ./results/msmarco_scale/final_weight_sweep.json
170
+ 50cfff01ff67e95c120bc2a74b297831e4340f1b5901284212144aeb60da3141 ./results/msmarco_scale/finish_final_weights_multifold.json
171
+ 46960c3da65f74187bc7488157e35d4f8ac12cd54f73a0d6c45bc2e62bfa5ab3 ./results/msmarco_scale/finish_length_coord_multifold.json
172
+ b03ddaf095e719d7afcb567c691a331ea882f4b456681f6cf2356cab329881ff ./results/msmarco_scale/finish_rare_final_multifold.json
173
+ 1c77d32bd821a917c0e9374637443216d654c980c9f8d03e65b1e89596e580c4 ./results/msmarco_scale/finish_train_selected.json
174
+ e00f042cd84a9c57eb138ec7bfb03b252d518bcc66ded057e174327274a9b0df ./results/msmarco_scale/full_msmarco_dev_fast_results.json
175
+ ab5ee8e8b90403710065e6140f6e74e5e668d39656d95ef117641333d72a9026 ./results/msmarco_scale/full_msmarco_uniform1m_results.json
176
+ 330a30e439448debe5c80d5b32ce023b3cb787edc546ad850f28b8d564ea36ca ./results/msmarco_scale/gamma_lambda_pool_diag.json
177
+ 4b26c10a9b95496d2a539d231c6fa82e149078a38ef62d95a8948a2658584565 ./results/msmarco_scale/idf2_best_dev_results.json
178
+ 5a2335041306f4b9383a579d025f4528d17eb1d646dd3203611fbb85e7634898 ./results/msmarco_scale/idf2_rare3_best_dev_results.json
179
+ 331040b6b8dd492242f12d1726c19cbc9d62d467e028bd46d40d0113d28c2050 ./results/msmarco_scale/lambdaM_uniform1m_diag.json
180
+ 62989bbec91a4245f63d8abe523d3ce5c41eb66026369753c87a77bea5eadb99 ./results/msmarco_scale/lambda_diag.json
181
+ 586df61e3420e70706394dd6d1c9b524e86e4be3a182a7f7c98409717295db19 ./results/msmarco_scale/lex_idf_highpower_multifold.json
182
+ 1da925fab863f7a5bec3fb713c258ff293a886e32170bb2f7e1e0f3dd652b1f5 ./results/msmarco_scale/lex_idf_power_multifold.json
183
+ d4b3a4d3b6559d0a04f2c6e8623cb8540b830f64badb80ec349f5ed3913ab978 ./results/msmarco_scale/msmarco_p_sweep.json
184
+ cd895b3f7ffb1d507664c375d0428ea31117554e1258e6654b27ff5bc31bb936 ./results/msmarco_scale/prelex_idf2_multifold.json
185
+ 6a3be9341216f5823aba99dbed4f96e6d6475442e5d8206d4628133ddeeb5e0c ./results/msmarco_scale/preselection_finalists_validation.json
186
+ ef819f51f1f67ba9c01329fb09c8705ca3efbbb0ef7062a2e61de9676b059def ./results/msmarco_scale/preselection_length_eta_sweep.json
187
+ f232a88418ce998ba2254f66ac6ca10a33d4e0c632677b1397bc4e4b34bfab09 ./results/msmarco_scale/rare_conjunction_multifold.json
188
+ 11567bb55e7034d6f2a034e640171d363247cb43a9923c22ce1fcae9bce6d996 ./results/msmarco_scale/semcoord_best_dev_results.json
189
+ c1cddf7dd3a37b053343943cbc50c6aab2e99ea711c2e37e1d8f79ef071829ad ./results/msmarco_scale/structural_157_dev_results.json
190
+ e6085f1053ded62f73eae034f00828b470001e83397544debf1a684710470a81 ./results/msmarco_scale/structural_best_dev_results.json
191
+ 687e5a56d1cfa0c9f9c451e739be2ca03c636d6f1aede8ce23f644269abcdee7 ./results/reproduced_reference/README.md
192
+ 44bd753e92decfdc59853dd7f42cdc4f7d2bc7348cd11f509510b597e5861c18 ./results/reproduced_reference/scifact_p100_clean_runner.json
193
+ e1bbce4aa5b051ee3202b9276fc4b4a640d62e1e515f7e75da8add62fada9c31 ./results/reproduced_reference/treccovid_p100_clean_runner.json
194
+ 44ae1b76607f0739feafec3a5d37f8dd3abc51ca3e688f8b887f29e460c5e516 ./scripts/reproduce_scifact.sh
195
+ 12563e357724431247f9ae5da9b88b9a7c195c672f049d9175a5878ece556c06 ./scripts/reproduce_treccovid.sh
196
+ f6339147fa6d437cd84115cc48ebe480392ce65b03acbf3d27d6acd11084aa85 ./tests/test_rag_utils.py
197
+ 750a10f542eebe412ec5dab36469e6892cb590fd53e50328f2363cb81e383b73 ./tests/test_toy.py
pyproject.toml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "geomretrieval"
7
+ version = "0.2.0"
8
+ description = "CPU-first sparse geometric retrieval for top-10 RAG with fuzzy routing, signed residuals, and branch-aware chunk selection."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ authors = [{name = "Research package"}]
12
+ dependencies = [
13
+ "numpy>=1.26",
14
+ "scipy>=1.11",
15
+ "scikit-learn>=1.4",
16
+ "joblib>=1.3"
17
+ ]
18
+
19
+ [project.optional-dependencies]
20
+ ann = ["faiss-cpu>=1.8", "hnswlib>=0.8"]
21
+ dev = ["pytest>=8"]
22
+
23
+ [project.scripts]
24
+ geomretrieval = "geomretrieval.cli:main"
25
+
26
+ [tool.setuptools.packages.find]
27
+ where = ["."]
28
+ include = ["geomretrieval*"]
requirements-baselines.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ faiss-cpu>=1.8
2
+ hnswlib>=0.8
3
+ sentence-transformers>=3.0
4
+ transformers>=4.45
5
+ torch>=2.2
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ numpy
2
+ scipy
3
+ scikit-learn
4
+ pandas
5
+ numba
6
+ joblib