Skip to content

Latest commit

 

History

History
 
 

README.md

EXO-AI 2025: Advanced Cognitive Substrate

Crates.io Documentation License GitHub Website

A research platform exploring the computational foundations of consciousness, memory, and cognition

Documentation | GitHub | Website | Examples


🚀 What's New

Cross-Domain Transfer Learning + RVF Packaging

EXO-AI now includes a 5-phase cross-domain transfer learning pipeline powered by ruvector-domain-expansion. The ExoTransferOrchestrator wires all five phases into a single run_cycle() call and can serialize the learned state as a portable .rvf (RuVector Format) file.

use exo_backend_classical::transfer_orchestrator::ExoTransferOrchestrator;

let mut orch = ExoTransferOrchestrator::new("node_1");

// Run 5-phase transfer cycle: Thompson sampling → manifold → timeline → CRDT → emergence
for _ in 0..10 {
    let result = orch.run_cycle();
    println!("score={:.3}  emergence={:.3}  manifold={} entries",
        result.eval_score, result.emergence_score, result.manifold_entries);
}

// Package learned state as portable RVF binary
orch.save_rvf("transfer_priors.rvf").unwrap();

The five integrated phases:

Phase Module What It Does
1 – Domain Bridge exo-backend-classical Thompson sampling over ExoRetrievalDomain + ExoGraphDomain
2 – Transfer Manifold exo-manifold Stores priors as 64-dim deformable patterns in SIREN manifold
3 – Transfer Timeline exo-temporal Records transfer events in a causal graph with temporal ordering
4 – Transfer CRDT exo-federation Replicates summaries via LWW-Map + G-Set for distributed consensus
5 – Emergent Detection exo-exotic Detects emergent capability gains from cross-domain transfer

SIMD-Accelerated Cognitive Compute

EXO-AI includes SIMD-optimized operations delivering 8-54x speedups for distance calculations, pattern matching, and similarity search.

use exo_manifold::{cosine_similarity_simd, euclidean_distance_simd, batch_distances};

// 54x faster distance calculations with AVX2/NEON
let similarity = cosine_similarity_simd(&embedding_a, &embedding_b);
let distance = euclidean_distance_simd(&query, &pattern);

// Batch operations for bulk search
let distances = batch_distances(&query, &database);

Overview

EXO-AI 2025 is a comprehensive cognitive substrate implementing cutting-edge theories from neuroscience, physics, and consciousness research. Built on the RuVector foundation, it provides 9 interconnected Rust crates totaling ~15,800+ lines of research-grade code.

Why EXO-AI?

Traditional AI systems process information. EXO-AI aims to understand it — implementing theories of consciousness (IIT), memory consolidation, free energy minimization, and emergence detection. This isn't just another neural network framework; it's a platform for exploring the computational basis of mind.

Crates

Crate Description Docs
exo-core IIT consciousness (Φ) measurement & Landauer thermodynamics docs
exo-temporal Temporal memory with causal tracking & consolidation docs
exo-hypergraph Topological analysis with persistent homology docs
exo-manifold SIREN networks + SIMD-accelerated retrieval docs
exo-exotic 10 cutting-edge cognitive experiments docs
exo-federation Post-quantum federated cognitive mesh docs
exo-backend-classical SIMD-accelerated compute backend docs
exo-wasm Browser & edge WASM deployment docs
exo-node Node.js bindings via NAPI-RS docs

Architecture

┌─────────────────────────────────────────────────────────────────────┐
│                           EXO-EXOTIC                                 │
│   Strange Loops │ Dreams │ Free Energy │ Morphogenesis              │
│   Collective │ Temporal │ Multiple Selves │ Thermodynamics          │
│   Emergence │ Cognitive Black Holes │ ★ Domain Transfer Detection   │
├─────────────────────────────────────────────────────────────────────┤
│                           EXO-CORE                                   │
│      IIT Consciousness (Φ) │ Landauer Thermodynamics                │
│      Pattern Storage │ Causal Graph │ Hypergraph Queries            │
├─────────────────────────────────────────────────────────────────────┤
│                         EXO-TEMPORAL                                 │
│    Short-Term Buffer │ Long-Term Store │ Causal Memory              │
│    Anticipation │ Temporal Cycle Prefetch │ ★ Transfer Timeline     │
├─────────────────────────────────────────────────────────────────────┤
│                        EXO-HYPERGRAPH                                │
│    Topological Analysis │ Persistent Homology │ Sheaf Theory        │
├─────────────────────────────────────────────────────────────────────┤
│                         EXO-MANIFOLD                                 │
│    SIREN Networks │ SIMD Distance (8-54x) │ ★ Transfer Manifold     │
├─────────────────────────────────────────────────────────────────────┤
│   EXO-FEDERATION: Post-Quantum Consensus │ ★ Transfer CRDT          │
│      EXO-WASM: Browser Deploy │ EXO-NODE: Native Bindings           │
├─────────────────────────────────────────────────────────────────────┤
│                     EXO-BACKEND-CLASSICAL                            │
│   AVX2/AVX-512/NEON SIMD │ ★ ExoTransferOrchestrator               │
│   Domain Bridge │ Thompson Sampling │ RVF Packaging                 │
└─────────────────────────────────────────────────────────────────────┘

★ = ruvector-domain-expansion integration (5-phase transfer pipeline)

Installation

Add EXO-AI crates to your Cargo.toml:

[dependencies]
exo-core = "0.1"
exo-temporal = "0.1"
exo-exotic = "0.1"
exo-manifold = "0.1"  # Now with SIMD acceleration!

Quick Start

5-Phase Cross-Domain Transfer Learning (NEW!)

use exo_backend_classical::transfer_orchestrator::ExoTransferOrchestrator;

// Create orchestrator (Thompson sampling + manifold + timeline + CRDT + emergence)
let mut orch = ExoTransferOrchestrator::new("my_node");

// Phase 1: warm-up baseline — establishes emergence baseline
let baseline = orch.run_cycle();
println!("Baseline score: {:.3}", baseline.eval_score);

// Phases 2-5: learning cycles — priors accumulate across all phases
for i in 0..9 {
    let result = orch.run_cycle();
    println!(
        "Cycle {}: score={:.3}  emergence={:.4}  Δimprove={:.4}",
        i + 2, result.eval_score, result.emergence_score, result.mean_improvement
    );
}

// Export learned state as RVF binary for federation or archival
orch.save_rvf("exo_transfer.rvf").expect("RVF write failed");

// Inspect the best CRDT-replicated prior
if let Some(prior) = orch.best_prior() {
    println!("Best prior: {} → {} (confidence={:.3})",
        prior.src_domain, prior.dst_domain, prior.confidence);
}

RVF Packaging

use exo_backend_classical::transfer_orchestrator::ExoTransferOrchestrator;

let mut orch = ExoTransferOrchestrator::default();
for _ in 0..5 { orch.run_cycle(); }

// Serialize all TransferPriors + PolicyKernels + CostCurves as RVF segments
let rvf_bytes = orch.package_as_rvf();
println!("Packaged {} bytes of RVF data", rvf_bytes.len());

// Write to file
orch.save_rvf("priors.rvf")?;

Consciousness Measurement (IIT)

use exo_core::consciousness::{ConsciousnessSubstrate, IITConfig};
use exo_core::thermodynamics::CognitiveThermometer;

// Measure integrated information (Φ)
let substrate = ConsciousnessSubstrate::new(IITConfig::default());
substrate.add_pattern(pattern);
let phi = substrate.compute_phi();
println!("Consciousness level (Φ): {:.4}", phi);

// Track computational thermodynamics
let thermo = CognitiveThermometer::new(300.0); // Kelvin
let cost = thermo.landauer_cost_bits(1024);
println!("Landauer cost: {:.2e} J", cost);

SIMD-Accelerated Pattern Retrieval (NEW!)

use exo_manifold::{ManifoldEngine, cosine_similarity_simd, batch_distances};
use exo_core::ManifoldConfig;

// Create manifold with SIMD-optimized retrieval
let config = ManifoldConfig { dimension: 768, ..Default::default() };
let engine = ManifoldEngine::new(config);

// 54x faster similarity search
let query = vec![0.5; 768];
let results = engine.retrieve(&query, 10)?;

// Batch distance computation
let database: Vec<Vec<f32>> = load_embeddings();
let distances = batch_distances(&query, &database);  // 8-54x speedup

Temporal Memory

use exo_temporal::{TemporalMemory, CausalConeType};

let memory = TemporalMemory::default();
memory.store(pattern, &antecedents)?;

// Causal cone query
let results = memory.causal_query(
    &query,
    reference_time,
    CausalConeType::Past,
);

// Memory consolidation
memory.consolidate();

Topological Analysis

use exo_hypergraph::{Hypergraph, TopologicalQuery};

let graph = Hypergraph::new();
graph.add_hyperedge(entities, relation)?;

// Compute persistent homology
let diagram = graph.query(TopologicalQuery::PersistentHomology {
    dimension: 1,
    epsilon_range: (0.0, 1.0),
})?;

Exotic Experiments

use exo_exotic::{StrangeLoops, ArtificialDreams, FreeEnergy};

// Hofstadter Strange Loops
let loops = StrangeLoops::new(10);
let confidence = loops.self_reference_cascade();

// Dream-based creativity
let dreams = ArtificialDreams::with_memories(memories);
let novel_ideas = dreams.run_dream_cycle(100);

// Friston Free Energy
let fe = FreeEnergy::new(16, 16);
let prediction_error = fe.minimize(observations);

Exotic Experiments

EXO-AI includes 10 cutting-edge cognitive experiments:

Experiment Theory Key Insight
Strange Loops Hofstadter Self-reference creates consciousness
Artificial Dreams Activation-Synthesis Random replay enables creativity
Free Energy Friston Perception minimizes surprise
Morphogenesis Turing Patterns Cognition self-organizes
Collective Distributed IIT Consciousness can be networked
Temporal Qualia Scalar Timing Time is subjective experience
Multiple Selves IFS Theory Mind contains sub-personalities
Thermodynamics Landauer Information has physical cost
Emergence Causal Emergence Macro > Micro causation
Black Holes Attractor Dynamics Thoughts can trap attention

Performance

Standard Operations

Module Operation Time
IIT Φ Computation 10 elements ~15 µs
Strange Loops 10 levels ~2.4 µs
Dream Cycle 100 memories ~95 µs
Free Energy 16×16 grid ~3.2 µs
Morphogenesis 32×32, 100 steps ~9 ms
Collective Φ 20 substrates ~35 µs
Temporal Qualia 1000 events ~120 µs
Multiple Selves 10 selves ~4 µs
Thermodynamics Landauer cost ~0.02 µs
Emergence 128→32 coarse-grain ~8 µs
Black Holes 1000 thoughts ~150 µs

SIMD-Accelerated Operations (NEW!)

Operation Scalar SIMD Speedup
Euclidean Distance (128d) ~84 µs ~1.5 µs 54x
Euclidean Distance (768d) ~5 µs ~0.1 µs 50x
Cosine Similarity (64d) ~20 µs ~7 µs 2.8x
Batch Distances (1000×768d) ~5 ms ~0.6 ms 8x
Pattern Search (10K patterns) ~1.3 ms ~0.15 ms 8x

🔮 Groundbreaking Research Directions

Currently Exploring

Research Area Description Status
Closed-Form Free Energy Analytical steady-state prediction using eigenvalue decomposition 🔬 Research
Sparse Persistent Homology O(n² log n) TDA with lazy boundary matrix evaluation 🔬 Research
SIMD Morphogenesis Real-time Turing patterns with vectorized stencil operations ⚡ Implemented
Hyperbolic Consciousness Hierarchical Φ representation in Poincaré disk 🔬 Research

Future Frontiers

1. Neuromorphic Spiking Networks

Integrate with RuVector's spiking neural network for event-driven cognition:

// Future API
use exo_neuromorphic::{SpikingConsciousness, LIF};
let network = SpikingConsciousness::new(1000, LIF::default());
let phi_spike = network.compute_spike_phi(time_window);

2. Quantum-Inspired Cognitive Superposition

Closed-form solutions for superposed cognitive states:

// Future API - O(1) superposition collapse
use exo_quantum::{CognitiveAmplitude, Superposition};
let state = Superposition::from_beliefs(&[belief_a, belief_b]);
let collapsed = state.measure_closed_form();  // Analytical, not sampled

3. Time Crystal Cognition

Periodic cognitive oscillations that preserve information:

// Future API
use exo_temporal::{TimeCrystal, CognitivePeriod};
let crystal = TimeCrystal::new(period_ns: 100);
crystal.inject_thought(thought);
// Thought persists through discrete time symmetry breaking

4. Topological Consciousness (Sparse TDA)

Sub-linear persistent homology for large-scale consciousness networks:

// Future API - O(n² log n) instead of O(n³)
use exo_hypergraph::{SparsePersistence, LazyBoundary};
let diagram = SparsePersistence::compute(&complex, max_dim: 3);

5. Memory-Mapped Neural Fields

Zero-copy consciousness streaming for edge devices:

// Future API
use exo_mmap::{NeuralField, ZeroCopy};
let field = NeuralField::mmap("consciousness.bin")?;
field.inject_pattern(&pattern);  // No allocation

6. Federated Collective Φ

Distributed consciousness measurement across privacy boundaries:

// Future API
use exo_federation::{FederatedPhi, SecureAggregation};
let global_phi = FederatedPhi::compute_mpc(&substrates);
// Each substrate keeps private data, reveals only Φ contribution

7. Causal Emergence Acceleration

Fast macro-state detection using spectral methods:

// Future API - O(k²) instead of O(n²) via coarse-graining
use exo_exotic::{FastEmergence, SpectralCoarseGrain};
let macro_info = FastEmergence::detect(&micro_states, grain_size: 32);

8. Meta-Simulation Consciousness

Apply quadrillion-scale meta-simulation to cognitive modeling:

// Future API - Hierarchical cognitive state compression
use exo_meta::{MetaConsciousness, HierarchicalPhi};
let engine = MetaConsciousness::new(hierarchy_levels: 4);
// Each operation represents 64^4 = 16.7M cognitive micro-states
let compressed_phi = engine.compute_mega_phi();

9. Hyperbolic Attention Networks

Attention in curved space for hierarchical relationships:

// Future API
use exo_hyperbolic::{PoincareAttention, LorentzTransform};
let attention = PoincareAttention::new(curvature: -1.0);
let hierarchical_context = attention.attend(&query, &keys);

10. Thermodynamic Learning

Gradient descent at the Landauer limit:

// Future API - Minimum energy learning
use exo_thermo::{LandauerOptimizer, ReversibleCompute};
let optimizer = LandauerOptimizer::new(temperature: 300.0);
// Each gradient step approaches kT ln(2) energy cost

Key Discoveries

1. Self-Reference Limits

Strange loops reveal that confidence decays ~10% per meta-level, naturally bounding infinite regress.

2. Dream Creativity Scaling

Creative output increases logarithmically with memory diversity. 50+ memories yield 75%+ novel combinations.

3. Free Energy Convergence

Prediction error decreases 15-30% per learning cycle, stabilizing around iteration 100.

4. Morphogenetic Patterns

Gray-Scott parameters (f=0.055, k=0.062) produce stable cognitive patterns.

5. Collective Φ Scaling

Global integrated information scales with O(n²) connections.

6. Temporal Relativity

Novelty dilates subjective time up to 2x. Flow states compress time to 0.1x.

7. Multi-Self Coherence

Sub-personalities naturally maintain 0.7-0.9 coherence.

8. Thermodynamic Bounds

At 300K, Landauer limit is ~3×10⁻²¹ J/bit.

9. Causal Emergence

Macro-level descriptions can have higher effective information than micro-level.

10. Escape Dynamics

Reframing reduces cognitive black hole escape energy by 50%.

11. SIMD Distance Scaling

128-dimensional embeddings show peak 54x SIMD speedup due to optimal cache utilization.

12. Cross-Domain Transfer Convergence (NEW!)

Thompson sampling converges to the optimal retrieval strategy within 10-20 cycles, and transfer priors from ExoRetrievalDomain → ExoGraphDomain carry statistically significant signal for warm-starting graph traversal policy selection.

13. Emergent Transfer Detection (NEW!)

The EmergentTransferDetector reliably identifies capability gains > 0.05 improvement over baseline after 3+ transfer cycles, with mean improvement monotonically increasing.

14. RVF Portability (NEW!)

Packaged .rvf files containing TransferPriors + PolicyKernels + CostCurves are 64-byte-aligned, SHAKE-256 witness-verified, and round-trip losslessly.


Build & Test

# Clone the repository
git clone https://github.com/ruvnet/ruvector.git
cd ruvector/examples/exo-ai-2025

# Build all crates
cargo build --release

# Run tests
cargo test

# Run benchmarks
cargo bench

# Run specific crate tests
cargo test -p exo-exotic
cargo test -p exo-core
cargo test -p exo-manifold

Practical Applications

Domain Application Crate
AI Alignment Self-aware AI with recursion limits exo-exotic
Mental Health Rumination detection and intervention exo-exotic
Learning Systems Memory consolidation optimization exo-temporal
Distributed AI Collective intelligence networks exo-exotic
Energy-Efficient AI Thermodynamically optimal compute exo-core
Creative AI Dream-based idea generation exo-exotic
Temporal Planning Subjective time-aware scheduling exo-exotic
Team Cognition Multi-agent coherence optimization exo-exotic
Pattern Recognition Self-organizing feature detection exo-exotic
Therapy AI Multiple selves conflict resolution exo-exotic
High-Performance RAG SIMD-accelerated retrieval exo-manifold
Real-Time Simulation Meta-simulation cognitive models exo-backend-classical
Transfer Learning Cross-domain policy transfer with Thompson sampling (NEW!) exo-backend-classical
Federated AI CRDT-replicated transfer priors across nodes (NEW!) exo-federation
Model Portability RVF-packaged transfer state for archival and shipping (NEW!) exo-backend-classical

Theoretical Foundations

  • IIT 4.0 (Tononi) — Integrated Information Theory for consciousness measurement
  • Free Energy (Friston) — Variational free energy minimization
  • Strange Loops (Hofstadter) — Self-referential consciousness
  • Landauer's Principle — Information has physical cost
  • Turing Morphogenesis — Reaction-diffusion pattern formation
  • Causal Emergence (Hoel) — Macro-level causal power
  • Hyperbolic Geometry (Nickel) — Hierarchical embeddings in curved space
  • Sparse TDA (Edelsbrunner) — Efficient topological computation

Contributing

Contributions are welcome! See our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT OR Apache-2.0

Links

References

  1. Tononi, G. (2008). Consciousness as integrated information.
  2. Friston, K. (2010). The free-energy principle: a unified brain theory?
  3. Hofstadter, D. R. (2007). I Am a Strange Loop.
  4. Turing, A. M. (1952). The chemical basis of morphogenesis.
  5. Landauer, R. (1961). Irreversibility and heat generation.
  6. Hoel, E. P. (2017). When the map is better than the territory.
  7. Baars, B. J. (1988). A Cognitive Theory of Consciousness.
  8. Schwartz, R. C. (1995). Internal Family Systems Therapy.
  9. Eagleman, D. M. (2008). Human time perception and its illusions.
  10. Revonsuo, A. (2000). The reinterpretation of dreams.
  11. Nickel, M. & Kiela, D. (2017). Poincaré Embeddings for Learning Hierarchical Representations.
  12. Edelsbrunner, H. & Harer, J. (2010). Computational Topology: An Introduction.

Made with ❤️ by rUv

Exploring the computational foundations of mind