mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-28 18:13:33 +00:00
ADR-154 §16 named three observer-side levers for closing the saturated-regime throughput gap that (a) SIMD (commit 2) and (b) Opt D delay-sorted CSR (commit 7) left on the table. The first lever — dropping the sparse-Fiedler dispatch threshold — was measured in commit 9 and turned out to be a 3× regression. This commit implements the second: adaptive detect cadence. Logic (14 LOC addition to src/observer/core.rs): a helper `current_detect_interval_ms(&self)` reads the co-firing-window density per `on_spike` call. If the window holds more than `5 × num_neurons` spikes — equivalent to ≥ 100 Hz average per neuron over the 50 ms window — back off to a 4× cadence (20 ms instead of 5 ms). Drop back to 5 ms as soon as density falls below threshold. Both sides are deterministic given the spike stream, so AC-1 repeatability is preserved. Measured on the reference host (N=1024, 120 ms saturated, SIMD default on Ryzen-class CPU): lif_throughput_n_1024/baseline : 6.86 s → 1.70 s (4.03× vs pre) lif_throughput_n_1024/optimized : 6.74 s → 1.57 s (4.29× vs pre) ADR-154 §3.2 saturated-regime target was ≥ 2× over scalar-opt. **Measured: 4.29×. HIT — the first optimization on this branch to clear that target at the top-line bench.** Acceptance-test suite impact (proportional to detector share each test spent in saturation): acceptance_causal (AC-5) 395 s → 100 s (4.0×) acceptance_core (AC-1..AC-4) 63 s → 16 s (4.0×) integration 32 s → 8.5 s (3.8×) sparse_fiedler_10k 20 ms unchanged (well below threshold) AC-4-strict guarantee preserved. The 20 ms backoff interval gives ≥ 2 detects inside any 50 ms lead window, so the precognitive claim (≥ 50 ms lead on ≥ 70 % of 30 trials) is unaffected. Test passes with 30/30 trials detecting the constructed-collapse marker on the new cadence. AC-1 bit-exactness preserved. Two repeat runs produce identical spike traces — the adaptive interval is deterministic per `(connectome_seed, engine_seed, stimulus_schedule)`. Knock-on effect on Opt D (commit 7): with the detector no longer dominating by 450:1, Opt D's ~5 ms-per-step kernel savings should now represent ~120 ms of the new 1.57 s median. A clean paired- sample criterion bench to isolate the Opt-D-attributable share is named as follow-up. Commit arc summary at head: Commit 2 SIMD (Opt C) 1.013× — MISS Commit 7 Opt D delay-sorted CSR 1.00× — MISS at top-line Commit 9 Drop sparse-Fiedler threshold 3× regression (disproven) Commit 10 Adaptive detect cadence 4.29× — HIT ≥ 2× target The lesson the full arc makes concrete: throughput gaps diagnosed as "kernel-bound" via a pre-measurement guess can turn out to be *detector-bound* (commit 7's surprise), and even after that correction the right remediation is not necessarily the structurally-obvious one (commit 9's regression). The win came from changing *when* the detector runs, not *what* it does or *how* it is represented. All 58 tests pass. Positioning rubric held across all 10 commits. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| adr | ||
| analysis | ||
| api | ||
| architecture | ||
| benchmarks | ||
| cloud-architecture | ||
| cnn | ||
| code-reviews | ||
| dag | ||
| development | ||
| examples | ||
| gnn | ||
| guides | ||
| hnsw | ||
| hooks | ||
| implementation | ||
| integration | ||
| nervous-system | ||
| optimization | ||
| plans/subpolynomial-time-mincut | ||
| postgres | ||
| project-phases | ||
| publishing | ||
| research | ||
| reviews | ||
| ruvllm | ||
| rvagent | ||
| security | ||
| sparse-inference | ||
| sql | ||
| testing | ||
| training | ||
| .gitkeep | ||
| .nojekyll | ||
| agi-container.md | ||
| C2-shell-execution-hardening.md | ||
| C8_RESULT_VALIDATION_IMPLEMENTATION.md | ||
| consciousness-api.md | ||
| IMPLEMENTATION-C5.md | ||
| index.html | ||
| INDEX.md | ||
| moe-routing-optimization-analysis.md | ||
| README.md | ||
| REPO_STRUCTURE.md | ||
| research-openfang.md | ||
RuVector Documentation
Complete documentation for RuVector, the high-performance Rust vector database with global scale capabilities.
📚 Documentation Structure
docs/
├── adr/ # Architecture Decision Records
├── analysis/ # Research & analysis docs
├── api/ # API references (Rust, Node.js, Cypher)
├── architecture/ # System design docs
├── benchmarks/ # Performance benchmarks & results
├── cloud-architecture/ # Cloud deployment guides
├── code-reviews/ # Code review documentation
├── dag/ # DAG implementation
├── development/ # Developer guides
├── examples/ # SQL examples
├── gnn/ # GNN/Graph implementation
├── guides/ # User guides & tutorials
├── hnsw/ # HNSW index documentation
├── hooks/ # Hooks system documentation
├── implementation/ # Implementation details & summaries
├── integration/ # Integration guides
├── nervous-system/ # Nervous system architecture
├── optimization/ # Performance optimization guides
├── plans/ # Implementation plans
├── postgres/ # PostgreSQL extension docs
├── project-phases/ # Development phases
├── publishing/ # NPM publishing guides
├── research/ # Research documentation
├── ruvllm/ # RuVLLM documentation
├── security/ # Security audits & reports
├── sparse-inference/ # Sparse inference docs
├── sql/ # SQL examples
├── testing/ # Testing documentation
└── training/ # Training & LoRA docs
Getting Started
- guides/GETTING_STARTED.md - Getting started guide
- guides/BASIC_TUTORIAL.md - Basic tutorial
- guides/INSTALLATION.md - Installation instructions
- guides/AGENTICDB_QUICKSTART.md - AgenticDB quick start
- guides/wasm-api.md - WebAssembly API documentation
Architecture & Design
- architecture/ - System architecture details
- cloud-architecture/ - Global cloud deployment
- adr/ - Architecture Decision Records
- nervous-system/ - Nervous system architecture
API Reference
- api/RUST_API.md - Rust API reference
- api/NODEJS_API.md - Node.js API reference
- api/CYPHER_REFERENCE.md - Cypher query reference
Performance & Benchmarks
- benchmarks/ - Performance benchmarks & results
- optimization/ - Performance optimization guides
- analysis/ - Research & analysis docs
Security
- security/ - Security audits & reports
Implementation
- implementation/ - Implementation details & summaries
- integration/ - Integration guides
- code-reviews/ - Code review documentation
Specialized Topics
- gnn/ - GNN/Graph implementation
- hnsw/ - HNSW index documentation
- postgres/ - PostgreSQL extension docs
- ruvllm/ - RuVLLM documentation
- training/ - Training & LoRA docs
Development
- development/CONTRIBUTING.md - Contribution guidelines
- development/MIGRATION.md - Migration guide
- testing/ - Testing documentation
- publishing/ - NPM publishing guides
Research
- research/ - Research documentation
- cognitive-frontier/ - Cognitive frontier research
- gnn-v2/ - GNN v2 research
- latent-space/ - HNSW & attention research
- mincut/ - MinCut algorithm research
🚀 Quick Links
For New Users
- Start with Getting Started Guide
- Try the Basic Tutorial
- Review API Documentation
For Cloud Deployment
- Read Architecture Overview
- Follow Deployment Guide
- Apply Performance Optimizations
For Contributors
- Read Contributing Guidelines
- Review Architecture Decisions
- Check Migration Guide
For Performance Tuning
- Review Optimization Guide
- Run Benchmarks
- Check Analysis
📊 Documentation Status
| Category | Directory | Status |
|---|---|---|
| Getting Started | guides/ | ✅ Complete |
| Architecture | architecture/, adr/ | ✅ Complete |
| API Reference | api/ | ✅ Complete |
| Performance | benchmarks/, optimization/, analysis/ | ✅ Complete |
| Security | security/ | ✅ Complete |
| Implementation | implementation/, integration/ | ✅ Complete |
| Development | development/, testing/ | ✅ Complete |
| Research | research/ | 📚 Ongoing |
Total Documentation: 460+ documents across 60+ directories
🔗 External Resources
- GitHub Repository: https://github.com/ruvnet/ruvector
- Main README: ../README.md
- Changelog: ../CHANGELOG.md
- License: ../LICENSE
Last Updated: 2026-02-26 | Version: 2.0.4 (core) / 0.1.100 (npm) | Status: Production Ready