Minuet
"The optical table for holographic computing."
Minuet is a Rust toolkit for building holographic memory systems, extending amari-holographic with higher-level abstractions for cognitive memory architectures.
Named after Star Trek's first sentient hologram, Minuet provides memory that participates in cognition rather than merely serving it.
What's New in 0.2.0
- Optical Backend: Hardware abstraction for optical holographic computing (DMD + MMF systems)
- Checkpoint Persistence: Journal-based state persistence portable across hardware
- T-Matrix Fingerprinting: Fast hardware validation without full recalibration
- Symbolic Expressions: Hardware-independent memory representation (symbols, bindings, bundles)
See the CHANGELOG for full details.
What is Holographic Memory?
Holographic memory stores information in superposition using high-dimensional algebraic representations. Unlike traditional key-value stores:
- Retrieval is algebraic: Queries are pattern completions in the same representational space as stored knowledge
- Relationships are first-class: Associations are stored as algebraic bindings, enabling analogical queries
- Graceful degradation: Memory degrades smoothly under capacity pressure rather than failing catastrophically
- Compositional: Complex structures are built from simple binding and bundling operations
Quick Start
Add to your Cargo.toml:
[]
= "0.2"
= "0.15"
Basic Usage
use *;
// Choose an algebra - ProductCliffordAlgebra<K> has 8*K dimensions
type Algebra = ; // 512 dimensions, ~85 item capacity
Pipeline Composition
For more control, compose custom pipelines:
use *;
use RejectPolicy;
type Algebra = ; // 256 dimensions
Optical Backend (New in 0.2.0)
For optical holographic computing systems:
use ;
use PathBuf;
use Duration;
Core Concepts
Binding Algebras
Minuet is generic over any BindingAlgebra from amari-holographic. The algebra provides:
| Operation | Symbol | Description |
|---|---|---|
| Bind | a.bind(&b) |
Create association (dissimilar to inputs) |
| Bundle | a.bundle(&b, β) |
Superpose (similar to inputs) |
| Unbind | key.unbind(&trace) |
Retrieve associated value |
| Similarity | a.similarity(&b) |
Measure closeness [-1, 1] |
Available algebras:
| Type | Dimensions | Use Case |
|---|---|---|
ProductCliffordAlgebra<K> |
8×K | General purpose, recommended |
Cl3 |
8 | Small/embedded systems |
FHRRAlgebra<D> |
D | Frequency domain operations |
MAPAlgebra<D> |
D | Binary/bipolar systems |
Memory Traces
A trace stores items in superposition:
use DenseTrace;
let mut trace = new;
// Add items (they superpose)
trace.add; // weight = 1.0
trace.add;
// Query similarity
let sim = trace.similarity; // High similarity
// Unbind to retrieve
let retrieved = trace.unbind;
Memory Stores
Stores manage one or more traces:
| Store | Description |
|---|---|
SimpleStore |
Single trace, minimal overhead |
ShardedStore |
Hash-sharded across N traces for N× capacity |
// Simple store for small workloads
let simple = new;
// Sharded store for larger capacity
let sharded = with_shards;
Codebooks
Codebooks provide consistent symbol-to-vector mappings:
use HashMapCodebook;
let codebook = new;
// Same name always returns same vector
let v1 = codebook.symbol;
let v2 = codebook.symbol;
assert!;
// Find closest symbol to a vector
if let Some = codebook.closest
Retrievers
Retrievers clean up noisy retrieval results:
| Retriever | Description |
|---|---|
DirectRetriever |
Return raw result (no cleanup) |
ResonatorRetriever |
Iterative cleanup via resonator network |
use ResonatorRetriever;
// Resonator with custom settings
let retriever = new
.initial_temperature // Start soft
.final_temperature // End hard
.max_iterations;
Capacity Management
Holographic memory has finite capacity based on dimensions:
| Algebra | Dimensions | Approximate Capacity |
|---|---|---|
ProductCliffordAlgebra<16> |
128 | ~23 items |
ProductCliffordAlgebra<32> |
256 | ~46 items |
ProductCliffordAlgebra<64> |
512 | ~85 items |
ProductCliffordAlgebra<128> |
1024 | ~147 items |
Capacity scales as O(D / ln D) where D is dimension.
For larger workloads, use ShardedStore:
// 8 shards × 85 items ≈ 680 item capacity
let store = with_shards;
Optical Backend (New in 0.2.0)
The optical module provides hardware abstraction for optical holographic computing:
┌─────────────────────────────────────────────────────────┐
│ CheckpointedOpticalMemory │
│ • store() / retrieve() - optical hot paths │
│ • checkpoint() - periodic persistence │
│ • restore() - hardware-independent recovery │
├─────────────────────────────────────────────────────────┤
│ MemoryJournal TMatrixFingerprint OpticalHardware │
│ (portable) (validation) (backend) │
└─────────────────────────────────────────────────────────┘
Key Concepts:
- Hardware as Accelerator: Optical hardware computes, but doesn't store. State is persisted independently.
- Portable Checkpoints: Save on one device, restore on another.
- T-Matrix Fingerprinting: Detect hardware drift or replacement without full recalibration.
- Symbolic Expressions: Hardware-independent representation using symbols, bindings, and bundles.
Persistence Model:
| Layer | Content | Portability |
|---|---|---|
| Semantic | Associations, relationships | Fully portable |
| Codebook | Symbol → seed mappings | Regenerable |
| Holograms | Binary patterns | Derived on demand |
| Calibration | T-matrix, learned patterns | Hardware-bound |
Architecture
minuet/
├── src/
│ ├── lib.rs # Re-exports and prelude
│ ├── traits.rs # Core trait definitions
│ ├── error.rs # Error types
│ ├── store/ # Memory storage
│ │ ├── trace.rs # DenseTrace - fundamental storage unit
│ │ ├── simple.rs # SimpleStore - single-trace store
│ │ └── sharded.rs # ShardedStore - hash-sharded store
│ ├── encoding/ # Symbol encoding
│ │ └── codebook.rs # HashMapCodebook
│ ├── retrieval/ # Cleanup strategies
│ │ ├── direct.rs # DirectRetriever
│ │ └── resonator_retriever.rs
│ ├── capacity/ # Capacity management
│ │ └── mod.rs # RejectPolicy, AcceptAllPolicy
│ ├── pipeline/ # Composition
│ │ └── builder.rs # PipelineBuilder
│ ├── reference/ # Reference implementations
│ │ └── simple_memory.rs # SimpleMemory
│ └── optical/ # Optical backend (feature-gated)
│ ├── mod.rs # Module exports
│ ├── symbolic.rs # SymbolicExpression types
│ ├── journal.rs # MemoryJournal, MemoryOp
│ ├── fingerprint.rs # TMatrixFingerprint
│ ├── hardware.rs # OpticalHardware trait
│ ├── mock_hardware.rs # MockOpticalHardware
│ └── checkpoint.rs # CheckpointedOpticalMemory
├── docs/
│ └── API.md # Complete API reference
├── examples/
│ ├── simple_memory.rs # Basic usage
│ ├── compose_pipeline.rs # Pipeline composition
│ ├── optical_memory_demo.rs # Optical backend demo
│ ├── optical_fingerprint_demo.rs # T-matrix fingerprinting
│ └── optical_expressions_demo.rs # Symbolic expressions
└── tests/
Examples
Basic Examples
# Simple memory operations
# Pipeline composition with sharding
Optical Examples (requires optical feature)
# Full optical memory demo with checkpoint/restore
# T-matrix fingerprinting for hardware validation
# Symbolic expressions (symbols, bindings, bundles)
Feature Flags
[]
= { = "0.2", = ["optical"] }
| Feature | Description | Dependencies |
|---|---|---|
default |
Standard features | std |
std |
Standard library support | - |
parallel |
Rayon parallelism | rayon |
serde |
Serialization | serde, bincode |
persistence |
RocksDB storage | rocksdb, serde |
async |
Async support | tokio |
optical |
Optical backend | serde, ordered-float, rand |
full |
All features | all above |
Documentation
- API Reference - Complete API documentation
- docs.rs - Generated rustdoc
Algebraic Guarantees
The underlying BindingAlgebra satisfies:
- Identity:
x.bind(&A::identity()) = x - Inverse:
x.bind(&x.inverse()?) ≈ A::identity() - Dissimilarity:
a.bind(&b)is dissimilar to bothaandb - Bundle Similarity:
a.bundle(&b, β)?is similar to bothaandb - Distributivity:
a.bind(&b.bundle(&c, β)?) ≈ a.bind(&b).bundle(&a.bind(&c), β)?
Performance Considerations
- Dimension Choice: Higher dimensions = more capacity but slower operations
- Sharding: Use
ShardedStorewhen single-trace capacity is insufficient - Retriever:
DirectRetrieveris fastest;ResonatorRetrieverimproves accuracy - Bundling Temperature: β=1.0 (soft) preserves more information; β=∞ (hard) is faster
Use Cases
| Domain | Application |
|---|---|
| Cognitive Agents | Working memory with associative recall |
| Knowledge Graphs | Relationship storage and analogical queries |
| Semantic Search | Content-addressable retrieval |
| Neurosymbolic AI | Symbol grounding with compositional generalization |
| Robotics | Motor primitive composition |
| Optical Computing | DMD/MMF-based memory systems |
What Minuet Is Not
- A replacement for vector databases at scale (millions of items)
- A general-purpose key-value store
- An embedding similarity search engine
Minuet excels at small-to-medium associative memories where algebraic structure matters.
Testing
# Run all tests
# Run with all features
# Run optical tests
# Run examples
Minimum Supported Rust Version
Rust nightly is required. This enables compatibility with amari-gpu for future GPU-accelerated implementations.
License
MIT OR Apache-2.0
References
- amari-holographic - Core binding algebras
- Holographic Reduced Representations (Plate, 1995)
- Hyperdimensional Computing (Kanerva, 2009)
- Vector Symbolic Architectures (Gayler, 2003)
Contributing
Contributions welcome! Please see the GitHub repository for issues and pull requests.