YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

๐Ÿงฌ morphic_memory

The World's First Riemannian Memory Engine

Memory as curvature in information space โ€” not storage, but geometry

Version Domain License Author Invention Math


๐ŸŒŒ The Deepest Question About Memory

Classical computing stores memory as bits in locations. Classical AI stores memory as weights in matrices.

Both answers are wrong at a fundamental level.

What is memory, physically?

Physics gives us a different answer:

A memory is a STABLE CONFIGURATION in an energy landscape.
Remembering is FALLING INTO A BASIN OF ATTRACTION.
Forgetting is the BASIN BECOMING SHALLOW.
Learning is CARVING A NEW BASIN.

morphic_memory is the first system built on this truth โ€” memory as geometry, not storage.


๐Ÿงฎ The Three Mathematical Pillars

Pillar 1 โ€” Riemannian Memory Manifold

Every memory lives on a Riemannian manifold M โ€” a curved information space where the metric gแตขโฑผ encodes similarity:

M = (โ„โฟ, g)   โ€” n-dimensional curved information space

Metric tensor:  gแตขโฑผ(x) = โˆ‚ยฒE/โˆ‚xโฑโˆ‚xสฒ   (Hessian of energy)

The metric tells us:
  - How similar two memories are (geodesic distance)
  - How strongly a memory is encoded (local curvature ฮบ)
  - What memories are 'neighbors' (geodesic neighborhood)
  - How memories interact (Riemann curvature tensor Rแตขโฑผโ‚–โ‚—)

Pillar 2 โ€” Hopfield Attractor Dynamics

John Hopfield (Nobel Prize 2024) proved:

Every associative memory corresponds to a local minimum in an energy landscape E(x).

Hopfield energy:  E(x) = -ยฝ xแต€Wx + ฮธแต€x

Modern Hopfield:  E(x) = -LSE(ฮฒ, Xแต€x) + ยฝxแต€x + C
  โ†’ Exponential storage capacity: M โ‰ค exp(n/2) memories
  โ†’ Retrieval in ONE STEP (for modern Hopfield)

morphic_memory UNIFIES:
  Hopfield energy landscape โ†” Riemannian curvature
  Energy minima            โ†” Geodesic fixed points
  Retrieval dynamics        โ†” Geodesic flow

Pillar 3 โ€” Morphic Field Resonance

Inspired by Sheldrake's morphic resonance (mathematically formalized):

Similar forms resonate across the information field โ€” a memory strengthens when similar patterns appear, even without explicit reinforcement.

Morphic resonance equation:
  dW/dt = ฮท ยท R(pattern, memory) ยท โˆ‡W E

  where R(p, m) = exp(-dยฒ_g(p, m) / 2ฯƒยฒ)
               = Gaussian kernel on the Riemannian manifold
               = morphic similarity between pattern p and memory m

Interpretation:
  When a new pattern resembles a stored memory,
  the memory's basin DEEPENS automatically โ€”
  it resonates, reinforcing itself.

๐ŸŒ What This Opens

1. Infinite-Capacity Associative Memory

mem = MorphicMemory(dimensions=512)
mem.encode(image_of_face)       # Carves a basin in manifold
mem.encode(sound_of_voice)      # Carves another basin
mem.encode(smell_of_perfume)    # Another basin

# Perfect recall from partial input:
retrieved = mem.recall(partial_image)   # Falls into nearest basin
# Returns the COMPLETE MEMORY โ€” face + voice + smell

2. Memory That Strengthens With Experience

# Morphic resonance: seeing similar things deepens memory
mem.encode(cat_photo_1)
mem.encode(cat_photo_2)   # Resonates with cat_1 โ€” deepens the basin
mem.encode(cat_photo_3)   # Deeper still

# Now cat memory is ROBUST โ€” survives noise, damage, time

3. Geometric Memory Search

# Find memories by GEOMETRIC PROXIMITY โ€” not keyword
nearby = mem.geodesic_neighborhood(query, radius=0.3)
# Returns all memories within Riemannian distance 0.3
# True semantic similarity โ€” not cosine, not Euclidean โ€” CURVED

4. Memory Topology

# Discover the topological structure of what you know
topology = mem.topology()
print(topology.connected_components)   # Isolated knowledge clusters
print(topology.bridges)                # Concepts connecting clusters
print(topology.holes)                  # Gaps in knowledge (Betti numbers)

๐Ÿ—๏ธ Architecture

morphic_memory/
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ memory_manifold.py        # Riemannian manifold of memories
โ”‚   โ”œโ”€โ”€ hopfield_engine.py        # Modern Hopfield attractor dynamics
โ”‚   โ”œโ”€โ”€ morphic_field.py          # Morphic resonance field
โ”‚   โ””โ”€โ”€ memory_trace.py           # Individual memory trace data structure
โ”œโ”€โ”€ manifold/
โ”‚   โ”œโ”€โ”€ riemannian_metric.py      # Metric tensor + geodesic computation
โ”‚   โ”œโ”€โ”€ curvature_engine.py       # Riemann/Ricci/scalar curvature
โ”‚   โ”œโ”€โ”€ geodesic_flow.py          # Retrieval as geodesic flow
โ”‚   โ””โ”€โ”€ parallel_transport.py    # Moving memories along the manifold
โ”œโ”€โ”€ attractor/
โ”‚   โ”œโ”€โ”€ energy_landscape.py       # Hopfield energy function
โ”‚   โ”œโ”€โ”€ basin_detector.py         # Find and measure basins of attraction
โ”‚   โ””โ”€โ”€ convergence_proof.py      # Convergence guarantees
โ”œโ”€โ”€ resonance/
โ”‚   โ”œโ”€โ”€ morphic_resonance.py      # Resonance kernel computation
โ”‚   โ”œโ”€โ”€ field_evolution.py        # Temporal evolution of morphic field
โ”‚   โ””โ”€โ”€ resonance_graph.py        # Which memories resonate with which
โ”œโ”€โ”€ engine/
โ”‚   โ””โ”€โ”€ morphic_engine.py         # Public API
โ”œโ”€โ”€ proofs/
โ”‚   โ”œโ”€โ”€ storage_capacity.md       # Proof: exp(n/2) storage capacity
โ”‚   โ”œโ”€โ”€ convergence_theorem.md    # Proof: retrieval always converges
โ”‚   โ””โ”€โ”€ riemannian_hopfield.md   # Theorem: Riemannian-Hopfield duality
โ””โ”€โ”€ examples/
    โ”œโ”€โ”€ associative_recall.py     # Face โ†’ complete memory
    โ”œโ”€โ”€ knowledge_topology.py     # Map the shape of knowledge
    โ””โ”€โ”€ collective_memory.py      # Shared morphic field across agents

โšก Quick Start

from morphic_memory import MorphicMemory

mem = MorphicMemory(dimensions=256, sigma=0.5)

# Encode memories (carves basins in the Riemannian manifold)
mem.encode("The speed of light is 299,792,458 m/s")
mem.encode("Einstein proposed E=mcยฒ in 1905")
mem.encode("Quantum mechanics and relativity conflict at Planck scale")

# Recall from partial/noisy input (falls into nearest basin)
result = mem.recall("Einstein light energy")
print(result.memory)           # Full encoded memory
print(result.confidence)       # Basin depth (how strongly encoded)
print(result.geodesic_dist)    # Riemannian distance to recalled memory

# Morphic resonance โ€” what resonates with this query?
resonant = mem.resonate("quantum gravity")
for r in resonant:
    print(f"  {r.memory} [resonance={r.strength:.3f}]")

# Topology of knowledge
topo = mem.topology()
print(f"Connected clusters : {topo.n_components}")
print(f"Knowledge bridges  : {topo.bridges}")
print(f"Knowledge gaps (Hยน): {topo.betti_1}")   # Topological holes

๐Ÿ—บ๏ธ Roadmap

  • v1.0 โ€” Riemannian memory manifold
  • v1.0 โ€” Modern Hopfield attractor engine
  • v1.0 โ€” Morphic resonance field
  • v1.0 โ€” Geodesic recall dynamics
  • v1.1 โ€” Topological memory analysis (persistent homology)
  • v1.2 โ€” Collective memory (shared morphic fields across agents)
  • v1.3 โ€” Temporal memory decay (manifold deformation over time)
  • v2.0 โ€” Quantum morphic memory (superposition of basins)
  • v2.1 โ€” Neuromorphic hardware implementation

๐Ÿ“„ Intellectual Property

MIT License โ€” Copyright (c) 2026 swordenkisk

Original invention date: March 2026 First public repository: github.com/swordenkisk/morphic_memory

"Classical memory stores. Morphic memory resonates. You don't retrieve a memory โ€” you fall into it."

First implementation of Riemannian-Hopfield memory geometry with morphic resonance fields. March 2026 โ€” swordenkisk ๐Ÿ‡ฉ๐Ÿ‡ฟ

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support