Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture

Overview

┌─────────────────────────────────────────────────────────┐
│                    ChaoticSemanticFramework              │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────┐  │
│  │  Singularity │  │  Reservoir  │  │   Persistence   │  │
│  │  (Concepts)  │  │  (Temporal) │  │    (libSQL)     │  │
│  └──────┬──────┘  └──────┬──────┘  └────────┬────────┘  │
│         │                │                   │          │
│  ┌──────┴────────────────┴───────────────────┴──────┐   │
│  │                    Hyperdim                       │   │
│  │              (HVec10240 Operations)               │   │
│  └───────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────┘

Core Modules

Hyperdim (hyperdim.rs)

10240-bit binary hypervectors with SIMD-accelerated operations:

  • HVec10240 - Dense binary vector type
  • bundle() - Superposition (XOR + majority)
  • bind() - Binding (XOR)
  • permute() - Cyclic shift
  • cosine_similarity() - Similarity measure

Reservoir (reservoir.rs)

Echo State Network with chaotic dynamics:

  • Sparse CSR matrix (fixed degree k=64)
  • Spectral radius constraint [0.9, 1.1]
  • step() - Process single input
  • to_hypervector() - Project state to HVec10240

Singularity (singularity.rs)

Concept storage and semantic search:

  • HashMap-based concept storage
  • Association graph (weighted edges)
  • LRU cache for similarity queries
  • Rayon-parallel similarity search

Framework (framework.rs)

High-level async orchestration:

  • Builder pattern configuration
  • Persistence integration
  • Batch operations
  • Export/import

Data Flow

Concept Injection

inject_concept(id, vector)
    → Singularity::inject(id, vector)
    → Persistence::save_concept(id, vector) [if enabled]

Semantic Query

probe(vector, top_k)
    → Singularity::find_similar(vector, top_k)
    → Returns Vec<(id, similarity)>

Temporal Processing

process_sequence(inputs)
    → Reservoir::reset()
    → Reservoir::step(input) for each input
    → Reservoir::to_hypervector()
    → Returns HVec10240

Constraints

ConstraintValueRationale
LOC per file≤500Maintainability
Spectral radius[0.9, 1.1]Edge of chaos
WASM threadingGatedBrowser compatibility