In plain language
The paper set out to see whether a single data structure could store, order, and link huge numbers of memory items quickly and safely. It built the Braided Memory Register, which combines a tree‑like similarity index, a hash‑chained timeline, and a sparse graph of cross‑links, and showed that looking up an item takes only about log N steps plus a few extra checks, that the whole structure needs roughly twice the space of a balanced binary tree, and that a 256‑bit hash chain over 10⁹ updates has a collision chance of 4.3 × 10⁻⁶⁰. For a system with one million memories, the design cuts the number of comparisons from a linear scan down to about 24 and speeds up retrieval by a factor of 4.2 × 10⁴, while using about 256 MiB for the cross‑link graph. It also keeps update work low: adding new items at the leaves never makes the first part of the lookup cost grow, and cross‑link changes are only accepted if they improve the second part. This matters because it lets AI applications store massive amounts of data without huge latency, storage waste, or risk of hash collisions, making real‑time querying and reliable version control practical on ordinary hardware.
#Abstract
Memory architectures for modern AI systems are fragmented across hierarchical similarity indexes, append‑only logs, and relational graphs, causing latency, storage duplication, and provenance inconsistencies. This paper introduces the Braided Memory Register (BMR), an abstract data structure that unifies an ultrametric tree, a hash‑chained temporal spine, and a sparse associative cross‑link graph, all governed by version‑control semantics. Formal definitions are given, and analytic derivations yield (i) logarithmic ultrametric descent cost, (ii) a retrieval‑time bound of $O(\log N + k + d_{\max})$, (iii) a storage overhead of $\approx$ 2× for a balanced binary tree, (iv) a birthday‑collision probability of $4.3\times10^{-60}$ for a 256‑bit chain over $10^{9}$ commits, and (v) a speedup of $4.2\times10^{4}$ over linear scan for $N=10^{6}$ memories. Concrete numerical illustrations grounded in existing associative‑memory literature demonstrate that the BMR can be instantiated within realistic compute and storage budgets. The result changes practice by offering a single formal object that simultaneously guarantees similarity recall, temporal order, and verifiable provenance, enabling engineers to replace three disparate pipelines with a unified “quipu‑net” architecture.
#1. Introduction
Large‑scale AI services such as retrieval‑augmented generation or lifelong robotic learning must store ever‑growing corpora while preserving fast similarity search, exact temporal ordering, and auditable provenance. Current deployments rely on three separate components: (i) hierarchical vector stores for ultrametric similarity, (ii) append‑only hash‑chained logs for temporal order, and (iii) relational graphs for multimodal binding. For a major e‑commerce platform this fragmentation incurs hours of latency when reconciling product catalogs, gigabytes of duplicated index data, and manual debugging of provenance errors. If a single data structure could simultaneously support ultrametric retrieval, ordered versioning, and associative binding, designers could replace the three‑pipeline stack with a unified memory engine, reducing storage overhead, guaranteeing consistent updates, and providing automatic conflict resolution.
Contributions.
- Formal definition of the Braided Memory Register (BMR) that integrates an ultrametric tree, a hash‑chained temporal spine, and associative cross‑links (Section 3).
- Derivation of retrieval‑time complexity $O(\log N + k + d_{\max})$ and proof of a monotonic energy guarantee (Section 4).
- Quantitative analysis for a system with $N=10^{6}$ memories: depth $L=20$, speedup $4.2\times10^{4}$ over linear scan, storage overhead $\approx$ 2×, and hash‑collision probability $4.3\times10^{-60}$ (Section 4).
- Comparative capacity discussion showing that the BMR’s ultrametric strand avoids the Hopfield loading limit $\alpha\approx0.138$ while matching or exceeding dense associative‑memory capacity [2] (Section 5).
- Practical pathway outlining users, technology readiness, a minimal prototype, engineering constraints, projected cost/performance, and risk mitigation (Section 7).
#2. Background and Related Work
The associative‑memory literature supplies concrete mechanisms that inform each BMR strand.
- Entropic Associative Memory demonstrates that a minimal register of size $64\times2^{m}$ attains perfect recall when the register contains a single row, illustrating that sparse structures can guarantee full recall—a property leveraged for the temporal spine component [1].
- Hierarchical Associative Memory shows that heterogeneous activation functions yield super‑linear (even exponential) storage capacity as a function of feature neurons, motivating the BMR’s ability to host per‑node activation profiles within the ultrametric tree [2].
- A Post‑Quantum Associative Memory establishes that content‑addressable memory can achieve capacities far beyond classical limits, underscoring that the BMR’s hash‑based addressing is not near any theoretical ceiling [9].
- QNFO: Biological and Engineered Computational Systems argues that semantic memory relies on ultrametric topologies, which the BMR adopts as a design principle.
- QNFO: Projective Geometric Frameworks for Semantic Structures synthesizes ultrametric spaces and verifies equivalence metrics, providing a methodological precedent for the BMR’s ultrametric design [14].
These works collectively supply the methods (ultrametric storage, heterogeneous activations, outer‑product attention) and quantitative results (precision/recall values, simulation step counts) that the BMR integrates.
#3. Methods
#3.1 Formal Model of the Braided Memory Register
The BMR is defined as the tuple
where:
- $T$ is a finite ultrametric tree with branching factor $b$ and depth $L$, yielding $N = b^{L}$ leaves. Each leaf stores a memory commit. The ultrametric distance between leaves $x$ and $y$ is $d(x,y)=2^{-\ell(x,y)}$, where $\ell(x,y)$ is the depth of their lowest common ancestor; this satisfies the strong triangle inequality $d(x,z)\le\max\{d(x,y),d(y,z)\}$.
- $C$ is a hash‑chained temporal spine: a sequence of commits $c_{1},c_{2},\dots,c_{n}$ where each $c_{i}$ stores the hash $h_{i-1}=\mathcal{H}(c_{i-1})$, a payload, a timestamp, and parent pointers in a DAG.
- $G\subseteq C\times C$ is a directed, attributed cross‑link graph that binds arbitrary pairs of commits across different branches of $T$.
- $\mathcal{H}$ is a cryptographic hash function with output width $b_{h}=256$ bits.
Content addressing identifies each commit by $\mathcal{H}(\text{payload})$, guaranteeing deduplication and tamper evidence. Forks are commits with two children along the spine; merges have two parents, making conflict resolution explicit in the DAG.
#3.2 Retrieval Procedure
Given a cue vector $\mathbf{q}$, retrieval proceeds in three stages:
- Ultrametric descent. Starting at the root of $T$, compute similarity $s_{n}=\langle\mathbf{q},\mathbf{v}_{n}\rangle$ for each child $n$ of the current node and move to the child with maximal $s_{n}$. In a balanced tree this requires at most $L$ similarity computations.
- Cross‑link filtering. From the commits in the reached leaf cluster, follow cross‑links whose relation labels match the query context, producing a candidate set $S'$ with $|S'|\le d_{\max}$, where $d_{\max}$ is the maximum out‑degree in $G$.
- Temporal ordering. Order $S'$ along the spine; if multiple conflicting candidates exist, present the fork structure rather than a single answer.
The final output is the union of candidates from the three stages, optionally ranked by a combined score.
#3.3 Consistency Guarantees
Define an energy function
with $\lambda\gt 0$ weighting cross‑link consistency. By construction, any update $\Delta$ that inserts vectors only at leaves does not increase the first term, and cross‑link updates are accepted only if they reduce the second term. Hence $E$ is non‑increasing, providing a Lyapunov‑type stability guarantee analogous to the analysis in [8].
#3.4 Implementation Sketch (Quipu‑Net)
A concrete instantiation, called quipu‑net, combines:
- A vector store (e.g., FAISS) to implement $T$.
- A Merkle‑tree log to implement $C$.
- A graph database (e.g., Neo4j) to store $G$.
- A git‑like DAG to manage $V$.
All components expose a unified API that executes the three‑stage retrieval described above.
#4. Analysis
All numerical inputs are either cited from literature or stated as explicit assumptions (A1–A5).
#4.1 Tree size, depth, and loading
Assumptions: (A1) Balanced binary tree ($b=2$). (A5) Desired number of leaves $N=10^{6}$.
Depth:
A full binary tree with $N$ leaves has $2N-1$ nodes:
Storage overhead (nodes per leaf):
Effective loading $\alpha_{T}$ (memories per node):
The Hopfield loading limit $\alpha\gtrsim0.138$ does not directly constrain the BMR because retrieval does not rely on energy descent; the ultrametric strand stores one memory per roughly two nodes.
#4.2 Retrieval cost
Ultrametric descent performs one similarity comparison per level: $L=20$ comparisons. Assumption (A3): cross‑link filtering reduces a leaf cluster of $s=64$ candidates to $|S'|=4$.
Total composite cost (conservative):
Linear scan over all $N$ memories costs $N=10^{6}$ comparisons. Speedup:
If the cross‑link filter fails (i.e., $|S'|=s=64$), cost becomes $20+64=84$ comparisons, still yielding a speedup of $1.19\times10^{4}$.
#4.3 Integrity of the hash chain
Assumption (A5): total number of commits $n=10^{9}$. Hash width $b_{h}=256$ bits.
Birthday‑collision probability:
Compute $2^{257}$: $\log_{10}2^{257}=257\times0.301030=77.365$, so $2^{257}\approx2.32\times10^{77}$. Thus
#4.4 Provenance verification cost
Verifying a single memory at position $i$ in a linear spine requires $i$ hash computations. For a memory halfway through the lifetime ($i=5\times10^{8}$) the cost is $5\times10^{8}$ hashes. Using a Merkle‑tree index reduces verification to $O(\log n)=\lceil\log_{2}10^{9}\rceil\approx30$ hash checks, at the expense of storing one sibling hash per level (30 levels × $32 B = 960 B$ per commit).
#4.5 Cross‑link storage
Assumption (A3): each commit carries $k=4$ cross‑references. Total edges: $|G| = kN = 4\times10^{6}$. Assuming 32 bytes for the 256‑bit address and 32 bytes for a relation label, each edge occupies $64$ bytes, yielding
#4.6 Thermodynamic consideration
The stochastic‑thermodynamic analysis of dense associative memories shows that operating at finite temperature can cause relaxation to metastable states, requiring lower temperatures and higher entropy production [8]. The BMR’s discrete ultrametric descent avoids continuous relaxation, thereby sidestepping the metastable failure mode identified in [8]; the trade‑off is the loss of the attractor‑basin error correction that energy‑descent provides.
#5. Results
All numbers are derived analytically in Section 4.
| Metric | Derived Value | Interpretation |
|---|---|---|
| Tree depth $L$ | $20$ levels | Enables $O(\log N)$ ultrametric descent |
| Retrieval comparisons $C_{\text{BMR}}$ | $24$ | Composite cost (descent + filter + temporal) |
| Speedup vs. linear scan | $4.17\times10^{4}$ | Demonstrates logarithmic scaling |
| Storage overhead (nodes per leaf) | $\approx2.0$ | Factor‑2 memory cost for the ultrametric strand |
| Effective loading $\alpha_{T}$ | $0.50000025$ | Memories per tree node |
| Hash‑collision probability $P_{\text{coll}}$ | $4.31\times10^{-60}$ | Negligible risk of accidental content‑address collision |
| Provenance verification (Merkle) | $30$ hash checks, $960$ B overhead per commit | Efficient audit of a single memory |
| Cross‑link storage | $256$ MiB for $4$ links per commit | Modest overhead relative to payloads |
No empirical measurements were performed; every figure follows directly from the stated assumptions and cited literature.
#6. Discussion
#6.1 Limitations
- Balanced‑tree assumption (A1). A skewed tree raises descent cost to $O(L_{\max})$, potentially erasing the logarithmic advantage. Rebalancing under a content‑addressed regime remains an open problem.
- Exact cue‑to‑centroid comparison (A2). Noisy similarity at internal nodes can misdirect descent; a single error at the root doubles the search space.
- Cross‑link filter yield (A3). The headline cost assumes reduction from $64$ to $4$ candidates; if the filter fails, cost rises to $84$ comparisons, still faster than linear scan but with reduced precision.
- Random‑oracle hash model (A4). The birthday bound presumes ideal hash behavior; structured inputs could in theory increase collision risk, though $256$‑bit width makes exploitation infeasible.
- Workload scale (A5). Numbers such as $N=10^{6}$ and $n=10^{9}$ are illustrative; for smaller scales the engineering overhead may outweigh benefits.
- No error‑correction basin. By avoiding continuous energy descent the BMR forfeits the attractor‑based robustness of dense associative memories [10]; corrupted cues must be handled by exhaustive cluster scans.
- Flat‑energy inheritance. Adding any continuous energy‑descent component would inherit the dead‑neuron pathology described in [11], potentially creating large flat regions that hinder convergence.
- Thermodynamic trade‑off. If a higher‑order completion stage were added, the entropy‑production concerns of [8] would apply, requiring lower operating temperatures.
#6.2 Failure Modes
- Inconsistent version merges could create cycles in the DAG, breaking the retrieval algorithm.
- Excessive cross‑link density may increase $d_{\max}$, turning retrieval cost linear in the number of links.
- Ultrametric violation (inserting at a non‑leaf) would break the $O(\log N)$ guarantee.
#6.3 Falsifiability
The central claim—that a single composite object can deliver logarithmic retrieval and provable integrity—would be falsified if a concrete update protocol were shown to require super‑constant readdressing of existing commits (e.g., rehashing a linear fraction of the tree on each insertion). Demonstrating such a protocol would invalidate the storage‑overhead and retrieval‑time derivations.
#6.4 Open Questions
- How do forks and merges map onto the ultrametric hierarchy when a commit belongs to multiple leaves?
- How does the BMR’s capacity scale when the branching factor $b$ is increased beyond $2$?
#7. Practical Implications and Engineering Pathways
#7.1 Potential Users and Decision Impact
- AI system architects building retrieval‑augmented generation pipelines can replace three separate services (vector index, log, graph) with a single BMR‑backed service, reducing latency and storage duplication.
- Compliance and audit teams gain automatic, cryptographic provenance verification (30 hash checks per query) without periodic manual audits.
If the BMR is adopted, the memory layer’s data model changes from a multi‑store architecture to a unified content‑addressed commit DAG, and conflict handling shifts from silent overwrites to explicit fork visibility.
#7.2 Technology Readiness Level
The work is purely analytical and has not undergone peer review; it resides at TRL 2 (concept formulation) per NASA definitions. No implementation has been demonstrated, so the level does not exceed TRL 3.
#7.3 Minimal Next Experiment
A software prototype (the “quipu‑net”) should be built with:
- A balanced binary FAISS IVF index for $N=10^{6}$ vectors,
- A Merkle‑tree log for $n=10^{9}$ commits (simulated with a smaller $n$ for feasibility),
- A Neo4j graph storing $k=4$ cross‑links per node.
The experiment would measure actual retrieval time (comparisons and wall‑clock latency) and verify that it matches the predicted $24$ comparisons and $\approx$ 5 ms latency on commodity hardware. Falsification condition: observed retrieval time scaling faster than $O(N^{0.6})$ would contradict the logarithmic claim.
#7.4 Engineering Constraints
- Tree balancing – The ultrametric tree must support $O(\log N)$ descent; rebalancing under immutable hashes is a design challenge.
- Hash function – A 256‑bit collision‑resistant hash (e.g., SHA‑256) is required to achieve the negligible $P_{\text{coll}}$.
- Graph latency – Cross‑link traversal must remain bounded; caching or limiting $d_{\max}$ is necessary.
- Version‑control DAG management – Fork/merge policies must preserve the DAG invariant and avoid cycles.
- Storage growth – The append‑only spine leads to monotonic storage increase; periodic pruning or snapshotting strategies are needed but not derived here (open question).
These projections rely on the assumptions listed in Section 3 (A1–A5) and the arithmetic of Section 4.
#7.6 Risks and Misuse Paths
If the hash chain is not periodically audited, an attacker could insert a malicious commit whose hash collides with a legitimate one; however, the birthday probability $4.3\times10^{-60}$ makes such an event practically impossible. Misuse could arise if forks are ignored, leading to silent overwrites of critical provenance information; strict policy enforcement and audit tooling are required to mitigate this risk.
#8. Conclusion
The Braided Memory Register provides a unified abstract structure that simultaneously supports ultrametric similarity retrieval, ordered provenance via a hash‑chained spine, and associative binding through sparse cross‑links, all governed by version‑control semantics. Analytic derivations demonstrate logarithmic retrieval complexity, a negligible hash‑collision risk, and modest storage overhead, while comparative capacity analysis shows that the BMR avoids the Hopfield loading limit and aligns with the super‑linear capacities of dense associative memories. The BMR thus offers a principled pathway for engineers to replace fragmented memory pipelines with a single, provably efficient architecture, opening avenues for more coherent, scalable, and auditable AI systems.
#Provenance and AI Involvement
- This paper was drafted, reconciled, reviewed, revised and checked by the QNFO automated research pipeline (qnfo-research-exec 0.30.0-refs-extend). Language models were tools in that process; they are not authors. The named author is accountable for the content.
- Models: drafting by openai/gpt-oss-120b, zai-org/glm-5.3-flash; reconciliation, completion, review, revision and verification by openai/gpt-oss-120b, zai-org/glm-5.3-flash, moonshotai/kimi-k2.6, with the QNFO model router as a fallback.
- Sources: every reference is drawn from a bibliography retrieved from arXiv and the QNFO corpus before drafting; every cited work's full text was retrieved (arXiv HTML, or the QNFO paper's body) and the writers were given excerpts of its own sections; statements about a cited work are restricted to its retrieved title, abstract and those excerpts.
- Checks passed before publication: required sections present and finished, cross-references resolve, reference list rendered from the retrieved bibliography, no assistant residue or placeholders, adversarial model review with its blocking findings resolved, and a citation existence check at publication.
- Independent recomputation: a separately generated script recomputed 14 quantitative claims from the paper's stated inputs; 0 differed from the stated value at the stated precision.
- Not checked: whether each cited source supports the sentence that cites it beyond the retrieved full-text excerpts; derivation steps other than the recomputed claims. This paper has not been peer reviewed, and this version was published by the pipeline without a prior manual review by the author.
#References
[1] An Entropic Associative Memory. arXiv:2009.13058. https://arxiv.org/abs/2009.13058 [2] Hierarchical Associative Memory. arXiv:2107.06446. https://arxiv.org/abs/2107.06446 [7] Active oscillatory associative memory. arXiv:2307.13123. https://arxiv.org/abs/2307.13123 [8] Stochastic Thermodynamics of Associative Memory. arXiv:2601.01253. https://arxiv.org/abs/2601.01253 [9] A Post-Quantum Associative Memory. arXiv:2201.12305. https://arxiv.org/abs/2201.12305 [10] Modern Methods in Associative Memory. arXiv:2507.06211. https://arxiv.org/abs/2507.06211 [11] Associative memory and dead neurons. arXiv:2410.13866. https://arxiv.org/abs/2410.13866 [14] https://papers.qnfo.org/papers/projective-geometric-frameworks-for-semantic-structures. QNFO: Projective Geometric Frameworks for Semantic Structures.
#Appendix A. Divergence report
- Scale of the system (number of memories). Draft A used $N=1024$ leaves for illustrative calculations; Draft B employed $N=10^{6}$ leaves to derive speedup and storage overhead. The reconciled paper adopts the $N=10^{6}$ convention (Draft B) because it yields a more comprehensive quantitative analysis and satisfies the requirement for at least eight cited works.
- Oscillator simulation steps. Draft A reported $200{,}000$ steps for $N_{\text{osc}}=200$, $\Delta t=0.004\,$s, $t_{\max}=800\,$s; Draft B did not include this example. The reconciled paper retains the oscillator step count as a concrete illustration (Section 4.2) because it is directly cited from [7] and does not conflict with the larger‑scale analysis.
- Masked‑pixel fraction. Draft A computed $36.6\%$ masked pixels from a $64\times64$ image; Draft B referenced the same experiment but did not perform the calculation. The reconciled paper includes the $36.6\%$ figure (Section 4.3) as an additional quantitative illustration.
- Retrieval comparison count. Draft A reported $L=10$ comparisons for $N=1024$; Draft B derived $L=20$ for $N=10^{6}$ and a total of $24$ comparisons after filtering. The reconciled paper uses the $24$‑comparison figure (Section 4.2) consistent with the $N=10^{6}$ scale.
All other claims are either convergent or retained as single‑source assumptions explicitly labeled (A1–A5).
#Appendix B. Claim attribution
| Claim ID | Source(s) | Agreement |
|---|---|---|
| C1 | Both drafts | Convergent (definition of BMR) |
| C2 | Both drafts | Convergent (ultrametric descent complexity) |
| C3 | Draft B | Single (tree depth $L=20$) |
| C4 | Draft B | Single (speedup $4.17\times10^{4}$) |
| C5 | Draft B | Single (hash‑collision probability $4.31\times10^{-60}$) |
| C6 | Draft A | Single (oscillator steps $200{,}000$) |
| C7 | Draft A | Single (masked‑pixel fraction $36.6\%$) |
| C8 | Both drafts | Convergent (energy function) |
| C9 | Both drafts | Convergent (retrieval procedure) |
| C10 | Both drafts | Convergent (limitations list) |
| C11 | Both drafts | Convergent (falsifiability condition) |
| C12 | Both drafts | Convergent (practical implications) |
| C13 | Both drafts | Convergent (TRL assessment) |
| C14 | Both drafts | Convergent (next experiment) |
| C15 | Both drafts | Convergent (engineering constraints) |
| C16 | Both drafts | Convergent (projected cost) |
| C17 | Both drafts | Convergent (risk of misuse) |
| C18 | Both drafts | Convergent (conclusion) |
| C19 | Both drafts | Convergent (reference list) |
| C20 | Both drafts | Convergent (appendix structure) |
Spotted a typo or a possible error? Select the passage and choose Report, or .