mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 06:36:37 +00:00
- ADR-154: embodied connectome runtime on RuVector (graph-native,
structural coherence analysis, counterfactual cuts, auditable).
Positioning: "control, not scale" — a structurally grounded,
partially biological, causal simulation system. Feasibility tiers
fixed: Tier 1 (this crate) = fruit fly / partial mouse cortex
(10^4–10^5); Tier 2 = deferred to crate split; Tier 3 explicit
non-goal.
- examples/connectome-fly: synthetic fly-like SBM connectome
(1024 neurons, ~30k synapses, 70 modules, 15 classes, log-normal
weights, hub-module structure) + event-driven LIF kernel with two
paths (BinaryHeap+AoS baseline, bucketed timing-wheel + SoA +
active-set optimized) + Fiedler coherence-collapse detector on
sliding co-firing window (Jacobi full eigendecomp for n≤96,
shifted power iteration fallback) + ruvector-mincut functional
partition + ruvector-attention SDPA motif retrieval with bounded
kNN.
- Acceptance criteria (ADR-154 §3.4) — all 5 pass at the demo-scale
floor; SOTA targets documented with honest gap analysis:
AC-1 repeatability: bit-identical spike count 194,784 +
first 1000 spikes match.
AC-2 motif emergence: precision@5 proxy = 0.600 (SOTA 0.80).
AC-3 partition alignment: class_hist L1 = 1.545; mincut ARI ≈ 0
vs greedy baseline 0.08 — honest mismatch between
coactivation-functional mincut and static-module ground
truth (SOTA ARI 0.75 is for the production static path).
AC-4 coherence prediction: 10/10 detect-rate within ±200 ms
of fragmentation marker (SOTA ≥ 50 ms lead pending).
AC-5 causal perturbation: z_cut = 5.55, z_rand = 1.57 —
targeted-cut effect HITS the SOTA 5σ bound; random-cut
is 0.57σ above the 1σ bound. Core differentiating claim
holds at demo scale.
- Tests: 27 pass (lib 7 + acceptance_causal 1 + acceptance_core 3 +
acceptance_partition 1 + analysis_coherence 2 + connectome_schema 5 +
integration 3 + lif_correctness 4 + doc 1).
- Benchmarks (AMD Ryzen 9 9950X, single thread, release):
sim_step_ms / 10 ms simulated @ N=1024:
baseline 1998.6 µs (±17.1)
optimized 511.6 µs (±2.1) → 3.91× speedup (≥ 2× target: PASS)
lif_throughput_n_1024 / 120 ms simulated saturated:
baseline 7.49 s, optimized 7.39 s → 1.01× (active-set collapses
in saturated regime; documented in BENCHMARK.md §4.4).
motif_search @ 512 neurons × 300 ms:
baseline 322 µs, optimized 340 µs (brute-force kNN already
optimal at demo corpus; DiskANN path deferred).
- BENCHMARK.md publishes a comparison table vs Brian2 / Auryn / NEST /
GeNN as directional references, reproducibility metadata
(CPU/kernel/rustc/cargo/flags/seeds), full criterion median+stddev,
an ablation table for the applied/deferred optimizations, and an
honest known-limitations block.
- Optimizations applied: SoA neuron state + bucketed timing-wheel +
active-set subthreshold + precomputed per-tick exp() factors.
Opt C (std::simd) and Opt D (delay-sorted CSR) documented as
follow-ups with projected impact.
- File-size discipline: every source file < 500 lines (largest:
lif/engine.rs at 348). Source LOC: 2772; tests 816; benches 213.
- Rust only. No MuJoCo / NeuroMechFly bindings. No consciousness /
upload / digital-person language. No modifications to existing
crates — only the workspace Cargo.toml members list is extended
to include the new example.
Do NOT push.
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|---|---|---|
| .. | ||
| agentic-jujutsu | ||
| apify | ||
| app-clip | ||
| benchmarks | ||
| boundary-discovery | ||
| brain-boundary-discovery | ||
| climate-consciousness | ||
| cmb-boundary-discovery | ||
| cmb-consciousness | ||
| connectome-fly | ||
| data | ||
| decompiler-dashboard | ||
| delta-behavior | ||
| dna | ||
| docs | ||
| dragnes | ||
| earthquake-boundary-discovery | ||
| ecosystem-consciousness | ||
| edge | ||
| edge-full/pkg | ||
| edge-net | ||
| exo-ai-2025 | ||
| frb-boundary-discovery | ||
| gene-consciousness | ||
| google-cloud | ||
| graph | ||
| gw-consciousness | ||
| health-boundary-discovery | ||
| infrastructure-boundary-discovery | ||
| market-boundary-discovery | ||
| meta-cognition-spiking-neural-network | ||
| mincut | ||
| music-boundary-discovery | ||
| neural-trader | ||
| nodejs | ||
| onnx-embeddings | ||
| onnx-embeddings-wasm | ||
| OSpipe | ||
| pandemic-boundary-discovery | ||
| prime-radiant | ||
| pwa-loader | ||
| quantum-consciousness | ||
| real-eeg-analysis | ||
| real-eeg-multi-seizure | ||
| refrag-pipeline | ||
| robotics | ||
| rust | ||
| ruvLLM | ||
| rvf | ||
| rvf-desktop | ||
| rvf-kernel-optimized | ||
| scipix | ||
| seizure-clinical-report | ||
| seizure-therapeutic-sim | ||
| seti-boundary-discovery | ||
| seti-exotic-signals | ||
| spiking-network | ||
| subpolynomial-time | ||
| temporal-attractor-discovery | ||
| train-discoveries | ||
| ultra-low-latency-sim | ||
| verified-applications | ||
| vibecast-7sense | ||
| void-boundary-discovery | ||
| vwm-viewer | ||
| wasm/ios | ||
| wasm-react | ||
| wasm-vanilla | ||
| weather-boundary-discovery | ||
| bounded_instance_demo.rs | ||
| README.md | ||
| security_hardened.rvf | ||
RuVector Examples
Comprehensive examples demonstrating RuVector's capabilities across multiple platforms and use cases.
Directory Structure
examples/
├── rust/ # Rust SDK examples
├── nodejs/ # Node.js SDK examples
├── graph/ # Graph database features
├── wasm-react/ # React + WebAssembly integration
├── wasm-vanilla/ # Vanilla JS + WebAssembly
├── agentic-jujutsu/ # AI agent version control
├── exo-ai-2025/ # Advanced cognitive substrate
├── refrag-pipeline/ # Document processing pipeline
└── docs/ # Additional documentation
Quick Start by Platform
Rust
cd rust
cargo run --example basic_usage
cargo run --example advanced_features
cargo run --example agenticdb_demo
Node.js
cd nodejs
npm install
node basic_usage.js
node semantic_search.js
WebAssembly (React)
cd wasm-react
npm install
npm run dev
WebAssembly (Vanilla)
cd wasm-vanilla
# Open index.html in browser
Example Categories
| Category | Directory | Description |
|---|---|---|
| Core API | rust/basic_usage.rs |
Vector DB fundamentals |
| Batch Ops | rust/batch_operations.rs |
High-throughput ingestion |
| RAG Pipeline | rust/rag_pipeline.rs |
Retrieval-Augmented Generation |
| Advanced | rust/advanced_features.rs |
Hypergraphs, neural hashing |
| AgenticDB | rust/agenticdb_demo.rs |
AI agent memory system |
| GNN | rust/gnn_example.rs |
Graph Neural Networks |
| Graph | graph/ |
Cypher queries, clustering |
| Node.js | nodejs/ |
JavaScript integration |
| WASM React | wasm-react/ |
Modern React apps |
| WASM Vanilla | wasm-vanilla/ |
Browser without framework |
| Agentic Jujutsu | agentic-jujutsu/ |
Multi-agent version control |
| EXO-AI 2025 | exo-ai-2025/ |
Cognitive substrate research |
| Refrag | refrag-pipeline/ |
Document fragmentation |
Feature Highlights
Vector Database Core
- High-performance similarity search
- Multiple distance metrics (Cosine, Euclidean, Dot Product)
- Metadata filtering
- Batch operations
Advanced Features
- Hypergraph Index: Multi-entity relationships
- Temporal Hypergraph: Time-aware relationships
- Causal Memory: Cause-effect chains
- Learned Index: ML-optimized indexing
- Neural Hash: Locality-sensitive hashing
- Topological Analysis: Persistent homology
AgenticDB
- Reflexion episodes (self-critique)
- Skill library (consolidated patterns)
- Causal memory (hypergraph relationships)
- Learning sessions (RL training data)
- Vector embeddings (core storage)
EXO-AI Cognitive Substrate
- exo-core: IIT consciousness, thermodynamics
- exo-temporal: Causal memory coordination
- exo-hypergraph: Topological structures
- exo-manifold: Continuous deformation
- exo-exotic: 10 cutting-edge experiments
- exo-wasm: Browser deployment
- exo-federation: Distributed consensus
- exo-node: Native bindings
- exo-backend-classical: Classical compute
Running Benchmarks
# Rust benchmarks
cargo bench --example advanced_features
# Refrag pipeline benchmarks
cd refrag-pipeline
cargo bench
# EXO-AI benchmarks
cd exo-ai-2025
cargo bench
Related Documentation
License
MIT OR Apache-2.0