Delete README.md
Browse files
README.md
DELETED
|
@@ -1,372 +0,0 @@
|
|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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 |
-

|
| 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|