Small Learned Projections for Semantic-Reversal-Aware Retrieval with Spectral Acceleration: A Four-Domain Empirical Study
Organizations: Pelloran Research
Abstract
Dense-embedding retrievers can fail adversarially: when a query is answered by a document A and reversed by a near-copy B that differs from A by a small meaning-changing edit (a "trap"), raw cosine over E5-Large-v2 places B in the top-10 for 82-100% of queries at a pool of 5,000. We study two things. First, a small learned projection W: R^1024 -> R^d (d in {11, 32}), trained by a deterministic recipe on a declared set of cases, that suppresses the trap: for the declared cases, HN@10 = 0.0000 (no trap in the top-10) in all twelve (domain, pool-size) settings across four independent domains (legal, medical, patent, financial) and pools up to 100,000, while the correct paraphrase is retained for 93-99% of cases, under exact nearest-neighbour search. Second, a boundary-conditioned accelerator that serves the projection at that scale: an acceleration of spectral graph retrieval (SpectRAG) that replaces a dense eigendecomposition with a boundary-value solve, holding HN@10 = 0.0000 at n = 100,000 in every domain and retrieving the ~300-query suite in 0.6-1.1 s (~2-4 ms per query on average). Because the lens's output is the stored representation (a few floats per document), a hardened, specialised index per domain or tenant is ~90x smaller and dimension-proportionally faster than the full embedding, making many small declared indexes a practical alternative to one large vector store. The claim is scoped to the declared cases on the measured pools, with no probabilistic bound; the correct-answer rate drops for a reworded query against an unchanged corpus (about 0.79, trap suppression still holding). A projection transfers only partly to other domains, which we report in full. The recipe, lenses, trap sets and evaluation harness are released under AGPL-3.0; the accelerator's implementation is a reserved commercial component, and every HN number is reproducible under exact search.
Figures & tables
| Domain | Query cases | Distractor pool | Lens dim | Trap taxonomy |
|---|---|---|---|---|
| Legal | 299 | LexGLUE sentence-split | 11 | 23 types (largest 102) |
| Medical | 300 | PubMed sentence-split, k | 32 | 4 75 |
| Patent (USPTO) | 301 | BIGPATENT sentence-split, 182k | 32 | 4 75 |
| Financial (SEC-adjacent) | 301 | 5 HF financial datasets, 178k | 32 | 4 75 |
| Domain | (lens) | (lens) | (raw cosine) | |
|---|---|---|---|---|
| Legal | 5 897 | 0.0000 | 0.9866 | 0.6722 |
| Legal | 50 897 | 0.0000 | 0.9866 | 0.6722 |
| Legal | 100 897 | 0.0000 | 0.9833 | 0.6722 |
| Medical | 5 900 | 0.0000 | 0.9733 | 0.9867 |
| Medical | 50 900 | 0.0000 | 0.9700 | 0.9867 |
| Medical | 100 900 | 0.0000 | 0.9700 | 0.9867 |
| Domain | Suite wall | |||
|---|---|---|---|---|
| Legal | 5 897 | 0.0000 | 0.9799 | 0.03 s |
| Legal | 50 897 | 0.0000 | 0.9866 | 0.26 s |
| Legal | 100 929 | 0.0000 | 0.9498 | 0.62 s |
| Medical | 5 300 | 0.0000 | 0.9733 | 0.05 s |
| Medical | 50 300 | 0.0000 | 0.9700 | 0.45 s |
| Medical | 100 300 | 0.0000 | 0.9633 | 1.06 s |
| pool | backend | wall-clock | ||
|---|---|---|---|---|
| 5 897 | Cell B cascade (exact) | 3.85 s | 0.0836 | 0.9900 |
| 5 897 | Cell D accelerator | 0.027 s | 0.0000 | 0.9799 |
| 50 897 | Cell B cascade (exact) | 35.33 s | 0.0970 | 0.9900 |
| 50 897 | Cell D accelerator | 0.261 s | 0.0000 | 0.9866 |
| 100 929 | Cell B cascade (exact) | 72.04 s | 0.0970 | 0.9900 |
| 100 929 | Cell D accelerator | 0.620 s | 0.0000 | 0.9498 |
| Lens / Trap corpus | Legal | Medical | Patent | Financial |
|---|---|---|---|---|
| Legal C02 ( ) | 0.0000 | 0.5467 | 0.4385 | |
| Medical D2c ( ) | 0.7191 | 0.0000 | 0.6877 | 0.7674 |
| Patent v3 ( ) | 0.6120 | 0.7333 | 0.0000 | 0.5382 |
| Financial v4 ( ) | 0.6221 | 0.8467 | 0.6312 | 0.0000 |
| Corpus | Legal C02 ( ) | Legal v2 | |
|---|---|---|---|
| Legal (matched) | 0.0000 | 0.0000 | |
| Medical | 0.5467 | 0.7233 | |
| Patent | 0.2957 | 0.4086 | |
| Financial | 0.4385 | 0.5648 |
| projection | Legal | Medical | Patent | Financial |
|---|---|---|---|---|
| random projection, | 0.5251 | 0.7000 | 0.6478 | 0.6478 |
| random projection, | 0.7659 | 0.9600 | 0.9668 | 0.9236 |
| PCA, | 0.5418 | 0.8167 | 0.8472 | 0.5748 |
| PCA, | 0.6020 | 0.9367 | 0.9668 | 0.6445 |
| trained lens | 0.0000 | 0.0000 | 0.0000 | 0.0000 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Artefact | SHA-256 (12-char prefix) |
|---|---|
| Legal lens (C02, — § 6.3 matrix) | 321e6c55fa27… |
| Legal lens ( v2 warm — § 6.4 ablation) | 4858ce2dbaf4… |
| Medical lens (D2c curated) | f356d51ef515… |
| Patent lens (v3 curated) | 47a82d868935… |
| Financial lens (v4 ) | f9c80a7df4db… |
| Legal pool (AQTC binary) | 66d6c68a4ed9… |
| Domain | Cold | Warm | Warm | |
|---|---|---|---|---|
| Legal | stable ( ) | not needed | not tested | |
| Medical | stable ( ) | not needed | not tested | |
| Patent | residual ( ) | not needed | not tested | |
| Financial | residual ( ) | (winner) | diverged @ ep. 200 |
Dense Retrieval
Dense retrieval uses learned vector representations to find relevant documents, passages, products, or tools by semantic similarity.
See all 168 papers