para + vault: a spectral memory where facts are stored as resonances in one fixed-size complex vector and recalled by tuning to a key.
Paravault is a memory module designed to plug into Paraphase (see the Paraphase docs). It targets Paraphase's biggest known weakness: an FFT mixer applies the same filter to every input, so it is poor at content-based lookup ("what value was paired with key X?"). Attention solves this but costs O(n²). Paravault gives O(T) lookup with a constant-size memory.
- Write: bind a key and a value by multiplying complex vectors (phases add), then add the result into the vault.
- Read: multiply the vault by the conjugate of the query key. A matching key makes the value pop out; everything else becomes low-level noise.
- Forget: the vault is damped over time, so old facts fade (like a string losing energy).
| String theory | Paravault |
|---|---|
| Many vibration modes coexist on one string | Many facts coexist in one vector as overtones |
| Resonance: tune to a frequency to excite one mode | Retrieval: conjugate key isolates one stored fact |
| Compact dimensions select allowed modes | Paraphase geometry vector g selects which bank a fact is written to |
| Energy dissipation | Learned damping = forgetting |
- Geometry-selected banks:
groutes facts into sub-vaults, reducing interference and raising capacity without growing the vector. - Learned phase keys: keys are produced from content, not random.
- Learned damping per bank: built-in recency and bounded memory.
- Drop-in for Paraphase blocks, so the whole model stays attention-free.
Closely related prior work: Holographic Reduced Representations (HRR), Fourier/associative memories, Hopfield networks, linear attention / fast weights. The combination in (1) to (3) is what must be tested. Capacity is limited (roughly on the order of the vault dimension), so results may show modest gains. See EXPERIMENTS.md, including the stop conditions.
| File | Purpose |
|---|---|
README.md |
This overview |
ARCHITECTURE.md |
Components, shapes, how it plugs into Paraphase |
MATH_SPEC.md |
Equations, capacity analysis |
IMPLEMENTATION_PLAN.md |
Build order and PyTorch skeleton |
EXPERIMENTS.md |
Benchmarks, baselines, success criteria |
ROADMAP.md |
Phases, risks, future ideas |
This repository includes the constant-size sequential vault, phase binding algebra, geometry-routed banks, learned per-channel damping, write gating, cleanup projection, Paraphase-compatible residual integration, associative-recall utilities, a capacity sanity experiment, and tests.
python -m pip install -e .
python -m pytest -q
python capacity.py --d-c 128 --max-facts 256
python train.py --steps 50The implementation is a research baseline. Capacity claims, learned recall quality, and long-context speedups still require the planned matched-parameter experiments.
Paravault now includes a chunked forward_parallel scan that is checked against
the sequential reference, plus a reproducible associative-recall capacity
benchmark. See LEVEL_UP.md for the commands and interpretation.