Settings

Theme

Show HN: I Replaced Vector DBs with Optimal Transport (Open Source Project))

github.com

2 points by MohskiBroskiAI a day ago · 0 comments · 1 min read

Reader

I spent the last few months frustrated with RAG hallucinations and the cost of vector databases ($2k/mo for Pinecone).

I realized that Cosine Similarity is often a weak proxy for semantic truth, so I built a memory protocol based on Wasserstein-2 Distance (Optimal Transport) instead.

The core idea: Treat memory as a geometry problem. By measuring the transport cost between the "Stored State" and the "Retrieved State," we can mathematically enforce coherence. If the transport cost exceeds a threshold ($W_2 > \epsilon$), the system rejects the memory rather than hallucinating.The Benchmarks (Local CPU):Coherence: 0.96 (vs ~0.67 for standard RAG)Efficiency: 40x compression ratio via state s ynthesis.Cost: $0 (No external DBs; runs in-process).I’ve packaged the core protocol into a Python library (pip install remember-me-ai). The repo also includes a CLI "Cognitive Shell" I used to test it (with local models/voice), but the real engineering value is in src/rememberme/csnp.py.It’s MIT licensed. I’m looking for feedback on the optimal transport implementation—specifically edge cases where the topological bounds might break.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection