1from hnm_v3 import HolographicNeuralMeshV3, HNMConfig
2
3# Initialize
4hnm = HolographicNeuralMeshV3(HNMConfig())
5
6# Encode text
7pattern, stats = hnm.forward("Machine learning is fascinating")
8print(f"Latency: {stats['inference_time_ms']:.2f}ms, Sparsity: {1-stats['active_ratio']:.1%}")
9
10# Semantic similarity
11sim = hnm.similarity("I am happy", "I feel joyful") # ~0.87
12sim = hnm.similarity("dog bites man", "man bites dog") # ~0.52 (role reversal detected)
13
14# Memory storage and retrieval
15hnm.encode_and_store("Deep learning uses neural networks")
16hnm.encode_and_store("The stock market crashed today")
17results = hnm.search("Tell me about neural networks", top_k=3)
18
19# Associative binding
20bound = hnm.bind("capital of France", "Paris")
21recovered = hnm.unbind(bound, "capital of France") # ≈ Paris vector
Input → Semantic Encoder → Holographic Projection → Interference Layers (×8) → Memory
↓ ↓ ↓ ↓
Word vectors + Complex pattern FFT + Phase mixing Cleanup memory +
Negation handling Phase = semantics 99% sparsification Iterative decoding
1@software{stone2024hnm,
2 author = {Stone, Kent},
3 title = {Holographic Neural Mesh: A Deterministic Sparse Semantic Substrate},
4 year = {2024},
5 publisher = {JARVIS Cognitive Systems},
6 url = {https://huggingface.co/jarvis-cognitive/hnm-v3}
7}