Mycelium-Index: A Streaming Approximate Nearest Neighbor Index with Myelial Edge Decay, Traffic-Driven Reinforcement, and Adaptive Living Hierarchy
Organizations: Independent Researcher, Haifa, Israel
Abstract
We present mycelium-index, a streaming approximate nearest neighbor (ANN) index for high-dimensional vector spaces, inspired by the adaptive growth patterns of biological mycelium. The system continuously adapts its topology through myelial edge decay and reinforcement, a traffic-driven living hierarchy, and hybrid deletion combining O(1) bypass for cold nodes with O(k) beam-search repair for hub nodes. Experimental evaluation on SIFT-1M demonstrates that mycelium achieves 0.927 +/- 0.028 recall@5 under FreshDiskANN's 100%-turnover benchmark protocol -- within the measurement confidence interval of FreshDiskANN's ~0.95 -- while using 5.7x less RAM (88 MB vs. >500 MB) and achieving 4.7x higher QPS (2,795 vs. ~600). On the static index, at ef=192, mycelium matches HNSW M=16 recall (0.962 vs. 0.965) at 5.2x less RAM (163 MB vs. 854 MB). Performance optimizations including NEON SIMD distance computation, Vec-backed node storage, and bitset visited tracking yield a cumulative 2.7x QPS improvement. A systematic study of ten streaming repair mechanisms finds that geometric heuristics universally fail in high dimensions, while topological mechanisms succeed -- a principle we term the topological repair invariance of high-dimensional ANN graphs.
Figures & tables
| Method | ef | Recall@10 | QPS | RAM (MB) | Streaming |
|---|---|---|---|---|---|
| HNSW M=16 | 64 | 0.942 | 1,941 | 854 | No |
| HNSW M=16 | 128 | 0.965 | 1,170 | 854 | No |
| HNSW M=8 | 128 | 0.876 | 1,890 | 671 | No |
| HNSW M=8 | 200 | 0.896 | 1,170 | 671 | No |
| HNSW M=6 | 200 | 0.813 | 1,732 | 626 | No |
| HNSW M=4 | 200 | 0.646 | 2,281 | 580 | No |
| Configuration | Recall@10 | QPS |
|---|---|---|
| Base graph, random entry | 0.774 | 843 |
| + Living hierarchy | 0.938 | 843 |
| + Bypass reconnection | 0.938 | 843 |
| + Hybrid deletion | 0.938 | 843 |
| Optimization | QPS | Cumul. |
|---|---|---|
| Baseline (HashSet, HashMap, scalar) | 742 | |
| + Remove .collect() + #[inline] | 1,287 | |
| + Vec-backed NodeStore | 1,414 | |
| + NEON SIMD + compact NodeMeta | 2,006 |
| Iter | Mycelium | Tombstone | Edge store | |
|---|---|---|---|---|
| 0 | 0.858 | 0.912 | 0.054 | — |
| 10 | 0.908 | 0.840 | +0.068 | — |
| 50 | 0.838 | 0.640 | +0.198 | 2.3 112 MB |
| 100 | 0.704 | 0.608 | +0.096 | 1.2 105 MB |
| 150 | 0.608 | 0.526 | +0.082 | 972 102 MB |
| 200 | 0.684 | 0.442 | +0.242 | 732 101 MB |
| Size | Before ( s) | After ( s) | Speedup |
|---|---|---|---|
| 100K | 386 | 467 | |
| 200K | 1,119 | 731 | |
| 500K | 3,726 | 1,390 | |
| 1M | 5,290 | 1,835 |
| # | Mechanism | Recall@5 (cycle 20) | Degree | Verdict |
|---|---|---|---|---|
| 1 | Baseline (no hierarchy refresh) | 0.122 | 13.4 | Hierarchy staleness |
| 2 | + Per-cycle hierarchy refresh | 0.738 | 13.4 | Best—fixes navigation |
| 3 | + Adaptive ef (auto-tuned beam) | 0.682 | 13.3 | Marginal improvement |
| 4 | + Physarum flow-weighted bypass | 0.020 | 13.2 | Hot edges dominate beam |
| 5 | + Naive anastomosis (edge sharing) | 0.496 | 14.3 | Geometrically wrong edges |
| 6 | + Greedy multi-bypass (all neighbors) | 0.280 | 15.8 | More bad edges = worse |
| Cycle | Mycelium | FreshDiskANN | Gap | Hub% | RAM |
|---|---|---|---|---|---|
| 0 | 0.966 | 0.95 | +0.02 | — | 84 |
| 5 | 0.921 | 0.95 | 0.03 | 26% | 92 |
| 10 | 0.926 | 0.95 | 0.02 | 29% | 97 |
| 15 | 0.924 | 0.95 | 0.03 | 31% | 101 |
| 20 | 0.927 | 0.95 | 40% | 88 |
| Constraint removed | Recall@5 (cycle 10) | from unconstrained |
|---|---|---|
| Unconstrained (k=16, ef=200, all, f32, RAM) | 0.988 | — |
| k=8 (from 16) | 0.975 | 0.013 |
| + ef=128 (from 200) | 0.955 | 0.033 |
| + Hybrid delete (from all) | 0.927 | 0.061 |
| + Scalar quantization (u8) | 0.927 | 0.061 |
| + 163 MB RAM limit | 0.927 | 0.061 |
| Mycelium (streaming) | Mycelium (static) | FreshDiskANN | HNSW M=16 | |
|---|---|---|---|---|
| Recall@5 (100% turnover) | — | N/A | ||
| Recall@10 (static) | — | 0.962 | — | 0.965 |
| RAM | 88 MB | 163 MB | 500 MB | 854 MB |
| QPS | 2,795 | 2,006 | 1,170 | |
| Delete cost | 90% / 10% | — | all | N/A |
| Streaming | Yes | — | Yes | No |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value | Default | Sensitivity |
| Graph construction | |||
| k_grow | 8 | 8 | 8–16; higher improves recall, costs memory |
| k_local | 6 | 6 | Subset of k_grow |
| k_long_range | 2 | 2 | Kleinberg shortcuts; 0 in streaming |
| long_range_alpha | 2.0 | 2.0 | Optimal for high-dim data |
| max_edges_per_node | 64 | 64 | Effectively unlimited |
Approximate Nearest Neighbor Search
Approximate nearest neighbor search finds close vectors without exhaustive comparisons, enabling scalable retrieval in high-dimensional datasets.
See all 42 papers