Project 01 · Retrieval Systems / Deep Learning Research
Holographic RAG
A comparative retrieval system investigating whether Hyperdimensional Computing can offer practical advantages over conventional dense vector retrieval.
Source repositoryPurpose
Hyperdimensional Computing is often motivated by compact representations and efficient similarity operations. This research tests that expectation against a conventional dense-retrieval baseline instead of assuming it holds.
Technical approach
Two independent pipelines use identical 512-token chunking with 50-token overlap and the same Ollama llama3.2 generation path. Sentence Transformers all-MiniLM-L6-v2 produces 384-dimensional embeddings. The FAISS baseline uses IndexFlatL2; the HDC path randomly projects embeddings into 10,000 dimensions, binarizes them, and retrieves with TorchHD similarity search.
Architecture
The shared chunker feeds independent retrieval implementations. FAISS indexes sentence embeddings with IndexFlatL2; the HDC path projects and binarizes those embeddings before TorchHD similarity search. Both paths use Ollama llama3.2 for generation and can be compared in the Streamlit dashboard.
Controlled retrieval comparison
- Shared documents + queries
- FAISS IndexFlatL2
- Shared llama3.2 generation
HDC retrieval path
- all-MiniLM-L6-v2 · 384D
- Random projection · 10,000D
- Binarization / TorchHD similarity
Implemented features
- Side-by-side FAISS and TorchHD retrieval pipelines.
- Streamlit dashboard for retrieval comparison and benchmarking.
- Concept-arithmetic demonstrations using bound shared base concepts.
- Identical chunking and generation settings for the two retrieval paths.
Engineering decisions
- 01Held chunking, corpus, queries, and generation constant so retrieval approaches could be compared on the same workload.
- 02Rebuilt a near-random hash encoder, improving observed similarity from 0.017 to 0.586.
- 03Fixed concept arithmetic by binding shared base concepts.
- 04Identified and corrected three benchmark measurement bugs before interpreting results.
Evaluation / results
On the documented 50-query, 40-document benchmark, both methods achieved Hit@5 of 1.0. HDC was approximately 17% slower in this experiment and did not demonstrate the anticipated efficiency advantage.
| Metric | FAISS | HDC |
|---|---|---|
| Mean retrieval latency | 18.66 ms | 21.82 ms |
| Index memory | 0.059 MB | 0.153 MB |
| Hit@5 | 1.0 | 1.0 |
- The measured TorchHD path used float32 vector storage and ordinary floating-point cosine-style similarity rather than bit-packed XOR/popcount. Based on the displayed memory figures, HDC used about 2.6× the index memory (0.153 / 0.059); this does not match the separately supplied estimate of approximately 26×.
- Future work: true bit-packing, a hard-negative evaluation corpus, further experiments, and potential research-paper development. These are proposed next steps, not completed results.
Technology stack
- Python
- Sentence Transformers
- FAISS
- TorchHD
- Ollama
- Streamlit