ADR-029: Multi-paradigm integration architecture for EXO-AI#221
Merged
ADR-029: Multi-paradigm integration architecture for EXO-AI#221
Conversation
Comprehensive architectural decision record synthesized from deep swarm research across all 100+ ruvector crates and examples (~830K lines). Key findings documented: - 7 convergent evolution clusters (EWC implemented 4x, coherence gating 5x, cryptographic witnesses 6x, sheaf theory 3x, spike-driven compute 4x, Byzantine consensus 4x, free energy solvers 4x) - 11 EXO-AI research frontiers (all stub directories) have working implementations elsewhere in the ecosystem - Complete integration architecture wiring quantum (ruQu), genomic (ruDNA), neuromorphic (ruvector-nervous-system), and consciousness (EXO-AI) substrates Proposes: - CoherenceRouter: canonical gate over prime-radiant + ruQu + cognitum - PlasticityEngine: unified EWC++ via SONA + BTSP/E-prop from nervous-system - CrossParadigmWitness: unified audit chain (RVF SHAKE-256 root) - 4-phase roadmap (20 weeks) to first quantum-genomic-neuromorphic consciousness substrate with formal proofs of consistency References 30+ peer-reviewed papers including Dec 2025 subpolynomial dynamic min-cut breakthrough (arXiv:2512.13105). https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…r, PlasticityEngine, CrossParadigmWitness - CoherenceRouter: π-scaled spectral gap estimation, 5 backend variants - PlasticityEngine: unified EWC++, BTSP, E-prop with Φ-weighted protection - CrossParadigmWitness: hash-chained audit type for multi-paradigm stack - All tests passing, gate latency <1ms confirmed https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- NeuromorphicBackend: HDC 10k-bit, K-WTA, LIF, Kuramoto, BTSP, E-prop - QuantumStubBackend: interference search, T1/T2 decoherence, quantum decay - Experiment 01: neuromorphic_spiking — BTSP one-shot, 40Hz gamma, K-WTA sparsity - Experiment 03: time_crystal_cognition — periodic attractor, symmetry breaking - SubstrateBackend trait: unified interface for all compute modalities - exo-exotic: path dep on local exo-core for backends module access - All tests passing (97 tests across exo-core + exo-exotic) https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…ence - genomic.rs: RvDnaPattern, HorvathClock, NeurotransmitterProfile, PharmacogenomicWeights - sparse_tda.rs: O(n/eps) Forward Push PPR persistent homology (vs O(n^3) naive) - causal_emergence.rs: EI maximization, coarse-graining search, emergence detection - sparse_homology.rs: experiment 04 wrapper, circle TDA test - All tests passing https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- ExoLearner: MicroLoRA rank-2 instant adaptation (<1ms), Phi-weighted EWC++, ReasoningBank trajectory storage, cosine-similarity recall - coherent_commit.rs: Raft-style O(n) consensus replaces PBFT O(n²), coherence gate (lambda > threshold) gates commit proposals https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…WTA partial select - Fix all 35 compiler warnings across 23 files (unused imports, dead code, unused vars, unnecessary parens) — build is now warning-clean - Optimize NeuromorphicBackend::kuramoto_step O(n²)→O(n): use sin/cos sum identity so coupling_i = (K/N)[cos(φ_i)·ΣsinΦ - sin(φ_i)·ΣcosΦ], eliminates inner loop for 1000-neuron network (1M→1K ops per tick) - Optimize k_wta: full sort O(n log n) → select_nth_unstable O(n avg) using Rust's pdqselect partial sort - Add #[inline] to hot paths: kuramoto_step, k_wta, hd_encode, lif_tick - Fix federation: correctly swap unused FederationError (crdt.rs) and unused HashMap (consensus.rs) — both in opposite files from first guess https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
…ical Implements Phase 1 of the EXO-AI × domain-expansion integration plan: register EXO classical operations as first-class transfer-learning domains so Thompson Sampling can discover optimal retrieval/traversal strategies. New: crates/exo-backend-classical/src/domain_bridge.rs ExoRetrievalDomain (implements Domain trait) - Vector similarity search as a 3-arm bandit: exact / approximate / beam_rerank - Tasks parameterized by dim (64-1024), k (3-50), noise (0-0.5) - Evaluation: correctness = Recall@K, efficiency = inverse-latency, elegance = k-precision - reference_solution: selects optimal arm based on dim+noise+k ExoGraphDomain (implements Domain trait) - Hypergraph traversal as a 3-arm bandit: bfs / approx / hierarchical - Tasks parameterized by n_entities (50-1000), max_hops (2-6), min_coverage (5-100) - Evaluation: correctness = coverage ratio, efficiency = hops saved, elegance = headroom - reference_solution: hierarchical for large graphs, approx for medium Aligned 64-dim embeddings (dims 5/6/7 = strategy one-hot in both domains) enables meaningful cross-domain transfer priors: "approximate wins on high-dim noisy retrieval" → "approx expansion wins on large sparse graphs" ExoTransferAdapter - Wraps DomainExpansionEngine, registers both EXO domains - warmup(N): trains both domains N cycles via evaluate_and_record - transfer_ret_to_graph(N): initiate_transfer then measure acceleration - All 8 domain_bridge unit tests pass + doctest compiles https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
Phase 2 — exo-manifold/src/transfer_store.rs TransferManifold stores (src, dst) transfer priors as 64-dim deformable patterns via ManifoldEngine::deform. Sinusoidal domain-ID hashing gives meaningful cosine distances for retrieve_similar. Phase 3 — exo-temporal/src/transfer_timeline.rs TransferTimeline records transfer events in the temporal causal graph. Each event is linked to its predecessor so the system can trace full transfer trajectories. anticipate_next() returns CausalChain + SequentialPattern hints. Phase 4 — exo-federation/src/transfer_crdt.rs TransferCrdt propagates transfer priors across the federation using LWW-Map (cycle = timestamp) + G-Set for domain discovery. Merges are idempotent and commutative. promote_via_consensus runs PBFT Byzantine commit before accepting a prior. Phase 5 — exo-exotic/src/domain_transfer.rs StrangeLoopDomain implements the Domain trait: self-referential tasks whose solutions are scored by meta-cognitive keyword density. CollectiveDomainTransfer couples CollectiveConsciousness with DomainExpansionEngine — arm rewards flow into the substrate and collective Φ serves as the cycle quality metric. EmergentTransferDetector wraps EmergenceDetector to surface non-linear capability gains from cross-domain transfer. All 4 crates gain the ruvector-domain-expansion path dep. 36 new tests, all green alongside the existing suite. https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- vector.rs: convert exo_core::Filter Equal conditions to ruvector HashMap
filter; store and round-trip _pattern_id in metadata
- substrate.rs: implement BettiNumbers, PersistentHomology, SheafConsistency
for hypergraph_query using VectorDB stats
- anticipation.rs: implement TemporalCycle pre-fetching via sinusoidal
phase encoding
- crdt.rs: add T: Display bound to reconcile_crdt; look up score from
ranking_map by format!("{}", result)
- thermodynamics.rs: rust,ignore → rust,no_run
- ExoTransferOrchestrator: new cross-phase wiring module in
exo-backend-classical that runs all 5 integration phases in a single
run_cycle() call (bridge → manifold → timeline → CRDT → emergence)
- transfer_pipeline_test.rs: 5 end-to-end integration tests covering the
full pipeline (single cycle, multi-cycle, emergence, manifold, CRDT)
All 0 failures across full workspace test suite.
https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- ExoTransferOrchestrator.package_as_rvf(): serializes all TransferPriors, PolicyKernels, and CostCurves into a 64-byte-aligned RVF byte stream - ExoTransferOrchestrator.save_rvf(path): convenience write-to-file method - Enable ruvector-domain-expansion rvf feature in exo-backend-classical - 3 new RVF tests: empty packager, post-cycle magic verification, save-to-file - substrate.rs: fill pattern field from returned search vector (r.vector.map(Pattern::new)) - README: document 5-phase transfer pipeline, RVF packaging, updated architecture diagram, 4 new Key Discoveries, 3 new Practical Applications All 0 failures across full workspace test suite. https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
Implements energy-driven computation with Landauer dissipation and Langevin/Metropolis noise. Key components: - State: activation vector + cumulative dissipated-joules counter - EnergyModel trait + Ising (Hopfield) + SoftSpin (double-well) Hamiltonians - Couplings: zeros, ferromagnetic ring, Hopfield memory factories - Params: inverse temperature β, Langevin step η, Landauer cost per irreversible flip - step_discrete: Metropolis-Hastings spin-flip with Boltzmann acceptance - step_continuous: overdamped Langevin (central-difference gradient + FDT noise) - anneal_discrete / anneal_continuous: traced annealing helpers - inject_spikes: Poisson kick noise, clamp-aware - Metrics: magnetisation, Hopfield overlap, binary entropy, free energy, Trace - Motifs: IsingMotif (ring, fully-connected, Hopfield), SoftSpinMotif (random) - 19 correctness tests: energy invariants, Metropolis, Langevin, Hopfield retrieval - 4 Criterion benchmark groups: step, 10k-anneal, Langevin, energy eval - GitHub Actions CI: fmt + clippy + test (ubuntu/macos/windows) + bench compile https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
ruvector-dither (new crate):
- GoldenRatioDither: additive φ-sequence with best 1-D equidistribution
- PiDither: cyclic 256-entry π-byte table for deterministic weight dithering
- quantize_dithered / quantize_slice_dithered: drop-in pre-quantization offset
- quantize_to_code: integer-code variant for packed-weight use
- ChannelDither: per-channel pool seeded by (layer_id, channel_id) pairs
- DitherSource trait for generic dither composition
- 15 unit tests + 3 doctests; 4 Criterion benchmark groups
exo-backend-classical integration:
- ThermoLayer (thermo_layer.rs): Ising motif coherence gate using thermorust
- Runs Metropolis steps on clamped activations
- Returns ThermoSignal { lambda, magnetisation, dissipation_j, energy_after }
- λ-signal = −ΔE/|E₀|: positive means pattern is settling toward coherence
- DitheredQuantizer (dither_quantizer.rs): wraps ruvector-dither for exo tensors
- GoldenRatio or Pi kind, per-layer seeding, reset support
- Supports 3/5/7/8-bit quantization with ε-LSB dither amplitude
- 8 new unit tests across both modules; all 74 existing tests still pass
https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
- Replace debug_assert with assert for bits bounds in quantize functions - Guard ChannelDither against 0 channels and invalid bits - Handle non-finite beta/rate in Langevin/Poisson noise (return 0) - Remove unused itertools dependency from thermorust - Fix partial_cmp().unwrap() NaN panics across 7 exo-ai files - Fix SystemTime unwrap() in transfer_crdt (use unwrap_or_default) - Fix domain ID mismatch (exo_retrieval → exo-retrieval) in orchestrator - Update tests to match corrected domain IDs Co-Authored-By: claude-flow <ruv@ruv.net>
Required for crates.io publishing. Co-Authored-By: claude-flow <ruv@ruv.net>
…README - Add ruvector-dither to Advanced Math & Inference section - Add thermorust to Neuromorphic & Bio-Inspired Learning section - Add collapsed Cognitive Robotics section for ruvector-robotics Co-Authored-By: claude-flow <ruv@ruv.net>
…rsion deps - Run cargo fmt across entire workspace - Create README.md files for all 9 EXO-AI crates - Convert path dependencies to crates.io version dependencies for publishing - Add [patch.crates-io] to exo workspace for local development Co-Authored-By: claude-flow <ruv@ruv.net>
Published to crates.io: - exo-core v0.1.1 - exo-temporal v0.1.1 - exo-hypergraph v0.1.1 - exo-manifold v0.1.1 - exo-federation v0.1.1 - exo-exotic v0.1.1 - exo-backend-classical v0.1.1 Changes from v0.1.0: - Fix NaN panics in all partial_cmp().unwrap() calls - Fix domain ID mismatch (underscores → hyphens) - Fix SystemTime unwrap → unwrap_or_default - Add README.md for all crates - Gate rvf feature behind feature flag in exo-backend-classical - Convert path dependencies to crates.io version dependencies Co-Authored-By: claude-flow <ruv@ruv.net>
…ity-review-LjcVx # Conflicts: # Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements ADR-029, a comprehensive architectural review and integration framework that wires together six distinct computational substrates across the ruvector ecosystem into a unified EXO-AI platform. The work eliminates duplicate implementations of mathematical primitives and enables cross-domain capabilities that were previously impossible due to component isolation.
Key Changes
Core Architecture Documents
New Substrate Backends
exo-core/backends/neuromorphic.rs): Integrates ruvector-nervous-system (BTSP, STDP, K-WTA, HDC, Hopfield) into EXO-AI, implementing research frontiers 01, 03, and 10exo-core/backends/quantum_stub.rs): Feature-gated quantum substrate with classical simulation fallback for ruQu integrationexo-core/coherence_router.rs): Canonical coherence gate dispatcher routing through SheafLaplacian, Quantum, Distributed, and Circadian backendsLearning & Plasticity Systems
exo-core/learner.rs): Online learning with MicroLoRA-style rank-1/2 updates, EWC++ Fisher protection, and ReasoningBank trajectory storageexo-core/plasticity_engine.rs): Unified plasticity system combining SONA EWC++, BTSP, and E-prop with Φ-weighted Fisher Informationexo-core/genomic.rs): Bridge from ruDNA patterns to EXO-AI memory with Horvath epigenetic clock and pharmacogenomic weightsCross-Domain Transfer Learning (5-Phase Architecture)
exo-backend-classical/domain_bridge.rs): Thompson Sampling over ExoRetrievalDomain and ExoGraphDomain with transfer priorsexo-manifold/transfer_store.rs): Stores cross-domain priors as deformable 64-dim patternsexo-temporal/transfer_timeline.rs): Records domain transfer events in causal graph for anticipationexo-federation/transfer_crdt.rs): Distributed prior propagation via LWW-Map and G-Set with Byzantine consensusexo-exotic/domain_transfer.rs): Tracks novel emergent capabilities from cross-domain transferexo-backend-classical/transfer_orchestrator.rs): Unified entry point wiring all 5 phasesResearch Frontier Implementations
exo-exotic/experiments/neuromorphic_spiking.rs): BTSP/STDP integrationexo-exotic/experiments/quantum_superposition.rs): Amplitude-weighted hypothesis superposition with T2 decoherenceexo-exotic/experiments/time_crystal_cognition.rs): Kuramoto oscillators with temporal tensor compressionexo-hypergraph/sparse_tda.rs,exo-exotic/experiments/sparse_homology.rs): O(n/ε) TDA via Forward Push PPR approximationexo-exotic/experiments/memory_mapped_fields.rs): Zero-copy pattern storage via RVF mmapexo-exotic/experiments/causal_emergence.rs): Macro-scale discovery maximizing Effective Informationhttps://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC