ruvector/examples
ruvnet 757f4fa226 feat(examples): connectome-fly SOTA example + ADR-154
- 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>
2026-04-21 23:27:11 -04:00
..
agentic-jujutsu
apify Add WebAssembly binary and TypeScript definitions for rvlite 2025-12-25 19:50:53 +00:00
app-clip feat(app-clip): add Swift App Clip skeleton for RVQS QR seed decoding 2026-02-15 18:34:13 +00:00
benchmarks fix: apply cargo fmt across workspace and fix CI issues 2026-02-21 20:56:38 +00:00
boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
brain-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
climate-consciousness feat(examples): gene, climate, ecosystem, quantum consciousness explorers 2026-03-31 22:01:55 +00:00
cmb-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
cmb-consciousness feat(examples): cosmic consciousness suite — CMB sky map, cross-freq, emergence sweep, GW background 2026-03-31 21:37:35 +00:00
connectome-fly feat(examples): connectome-fly SOTA example + ADR-154 2026-04-21 23:27:11 -04:00
data feat: 10 exotic frontier discovery datasets — 233 entries across 10 domains 2026-03-16 23:21:01 -04:00
decompiler-dashboard fix(decompiler): statement-boundary splitting — 14/14 modules now parse (was 2/17) 2026-04-03 11:50:34 +00:00
delta-behavior feat(delta-behavior): Complete Δ-behavior implementation with WASM 2026-01-28 04:18:34 +00:00
dna Merge remote-tracking branch 'origin/main' into claude/exo-ai-capability-review-LjcVx 2026-02-27 16:27:34 +00:00
docs
dragnes feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00
earthquake-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
ecosystem-consciousness feat(examples): gene, climate, ecosystem, quantum consciousness explorers 2026-03-31 22:01:55 +00:00
edge feat(quality): ADR-144 monorepo quality analysis — Phase 1 critical fixes (#336) 2026-04-06 21:19:13 -04:00
edge-full/pkg feat(edge-full): add unified WASM package with all modules 2025-12-31 20:59:29 +00:00
edge-net fix(brain): defer sparsifier build on startup for large graphs 2026-03-24 12:29:52 +00:00
exo-ai-2025 chore: publish EXO-AI crates v0.1.1 with bug fixes and READMEs 2026-02-27 16:26:40 +00:00
frb-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
gene-consciousness feat(examples): gene, climate, ecosystem, quantum consciousness explorers 2026-03-31 22:01:55 +00:00
google-cloud style: apply cargo fmt formatting 2026-03-12 20:57:18 -04:00
graph docs: Organize examples/ with comprehensive READMEs 2025-11-29 14:05:04 +00:00
gw-consciousness feat(examples): cosmic consciousness suite — CMB sky map, cross-freq, emergence sweep, GW background 2026-03-31 21:37:35 +00:00
health-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
infrastructure-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
market-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
meta-cognition-spiking-neural-network
mincut fix(ci): Fix formatting and workflow permission issues 2025-12-26 22:11:57 +00:00
music-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
neural-trader docs(neural-trader): comprehensive README with features, benchmarks, use cases 2025-12-31 18:03:56 +00:00
nodejs
onnx-embeddings fix: resolve 5 P0 critical issues + 2 pre-existing compile errors 2026-03-06 14:03:42 +00:00
onnx-embeddings-wasm docs(onnx-wasm): comprehensive README update for v0.1.2 2025-12-31 05:10:36 +00:00
OSpipe fix: migrate attention/dag/tiny-dancer to workspace versioning and fix all dep version specs 2026-02-23 13:29:46 +00:00
pandemic-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
prime-radiant fix: publish-readiness for 6 solver crates + npm package 2026-02-20 19:02:50 +00:00
pwa-loader feat(pwa-loader): add in-browser RVF seed decoder PWA 2026-02-15 18:38:10 +00:00
quantum-consciousness feat(examples): gene, climate, ecosystem, quantum consciousness explorers 2026-03-31 22:01:55 +00:00
real-eeg-analysis research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
real-eeg-multi-seizure research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
refrag-pipeline fix(ci): Fix formatting and workflow permission issues 2025-12-26 22:11:57 +00:00
robotics style: apply cargo fmt formatting 2026-03-12 20:57:18 -04:00
rust feat(postgres): Add HNSW index and embedding functions support (#62) 2025-12-09 11:14:52 -05:00
ruvLLM fix(security): harden intelligence providers — type-safe enums, input validation, file size limits 2026-02-21 18:29:33 +00:00
rvf feat: deep discovery analyses + brain MCP training integration 2026-03-16 23:14:43 -04:00
rvf-desktop feat(rvf): add Causal Atlas dashboard, solver fixes, and desktop app 2026-02-20 18:01:09 +00:00
rvf-kernel-optimized fix: format all files, add EXO crate READMEs, convert path deps to version deps 2026-02-27 16:21:14 +00:00
scipix fix: resolve compilation errors across workspace 2026-03-16 23:15:25 -04:00
seizure-clinical-report research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
seizure-therapeutic-sim research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
seti-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
seti-exotic-signals research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
spiking-network
subpolynomial-time fix(ci): Fix formatting and workflow permission issues 2025-12-26 22:11:57 +00:00
temporal-attractor-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
train-discoveries feat: 691 discoveries, 50 cross-domain correlations via per-node PPR 2026-03-16 23:17:00 -04:00
ultra-low-latency-sim feat(examples): Add ultra-low-latency meta-simulation engine (#53) 2025-12-04 18:00:21 -05:00
verified-applications fix: format all files, add EXO crate READMEs, convert path deps to version deps 2026-02-27 16:21:14 +00:00
vibecast-7sense docs(mincut): Add ADR/DDC for Anytime-Valid Coherence Gate (#115) 2026-01-17 14:36:52 -05:00
void-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
vwm-viewer feat: add package.json for rvdna example with WASM bindings and build scripts 2026-02-12 15:32:55 +00:00
wasm/ios feat(training): RuvLTRA v2.4 Ecosystem Edition - 100% routing accuracy (#123) 2026-01-20 20:08:30 -05:00
wasm-react
wasm-vanilla
weather-boundary-discovery research(boundary-first): 17 experiments proving boundary-first detection across 11 domains (#347) 2026-04-13 12:01:47 -04:00
bounded_instance_demo.rs feat(mincut): Add subpolynomial-time dynamic minimum cut system (#74) 2025-12-23 07:53:32 -05:00
README.md
security_hardened.rvf feat(security): Security Hardened RVF v3.0 — 30 capabilities verified 2026-02-21 17:39:58 +00:00

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

License

MIT OR Apache-2.0