Skip to main content

Research paper

Memory SystemsAttention MechanismsAI ArchitectureHexagonal Architecture

ARMS: A Proposed Spatial Architecture for Persistent AI Memory

ARMS explores storing and retrieving model states through spatial organization. Its projection-based ARM prototype is an early experiment; the proposed native-state architecture has separate validation requirements.

Updated September 22, 2026 · Editorial correction dated 2026-09-22; no new experiment or independent reproduction. Reported implementation and verification gaps remain visible.

Code

Scope Proposed ARMS architecture and a separate learned-projection ARM prototype on 50-400-token contexts. The public ARMS repository describes small synthetic GPT-2 tests with fewer than 100 stored states. Limitations and artifacts

Abstract

We propose ARMS (Attention Reasoning Memory Store), a ports-and-adapters architecture for persistent model-state storage and hierarchical retrieval. The architecture aims to retain state payloads while indexing their coordinates. A separate ARM prototype uses a learned projection, contrastive training and a FAISS coordinate index on short contexts. Its original report lists 100% retrieval accuracy and a 5,372x compression ratio, but does not supply sufficient storage accounting or reconstruction criteria to establish lossless compression. We distinguish these preliminary observations from the proposed native-state architecture and from future model integration.

On this page
  1. The memory problem in AI
  2. The ARMS proposal
  3. Architecture
  4. Six domains
  5. The container model
  6. Reported results: ARM prototype
  7. How it works
  8. Projection and payload storage
  9. What the prototype does not yet establish
  10. Design principles
  11. The .kkrieger principle
  12. Minimal core: five primitives
  13. Implementation status
  14. Related research
  15. CMS: Computational Memory Snapshots
  16. CIT: Compute Image Tokenizer
  17. Conclusion
  18. Get started

The memory problem in AI

A language model without an external memory mechanism does not retain an application’s earlier sessions by itself. This project investigates reuse of computed states to address:

  • No learning across sessions: Every conversation reinvents the wheel
  • Computational waste: Identical attention patterns recomputed endlessly
  • Context constraints: Hard limits on what the model can “remember”

The ARMS proposal

ARMS proposes using spatial partitioning as an organizing analogy for model-state memory. The intended architecture and the tested ARM prototype are distinct:

ARMS goal
  1. State payload
  2. Store with coordinates
  3. Retrieve
  4. Reuse
ARM prototype
  1. Hidden state
  2. Learned projection
  3. FAISS lookup
  4. Retrieve payload
The intended design and the tested prototype take different routes: the prototype learns its coordinates.

The game engine analogy. Game engines can partition space to narrow collision searches. ARMS proposes a hierarchy to narrow memory searches. The analogy does not establish the same efficiency in high-dimensional model states; that requires measurement.

The project states its design philosophy in three lines:

The hierarchy IS the access pattern.
Position IS relationship.
The space IS the index.

The project uses a hippocampus analogy to motivate hierarchical memory. Its proposed storage and retrieval behavior must be evaluated separately from that analogy.

Architecture

ARMS uses hexagonal (ports and adapters) architecture with clean domain separation:

External world
PyTorch adapter
Python client
CLI adapter
Core domainpure logic, no I/O
Storagetiered
Index4096-dimensional
Latencyprobes
The proposed ports-and-adapters layout: inbound adapters above the core, storage, index and latency adapters below it. This is the design, not a record of which adapters are built.

Six domains

  1. CORE DOMAIN - Pure business logic, no I/O

    • State representation
    • Coordinate mathematics
    • Hierarchy rules (chunk → doc → session → domain)
  2. STORAGE DOMAIN - Tier management

    • RAM / NVMe / Archive
    • Promotion and eviction
    • Memory mapping
  3. INDEX DOMAIN - Spatial lookup

    • 4096-dimensional indexing
    • Temporal indexing
    • Query execution
  4. LATENCY DOMAIN - Runtime performance

    • Tier latency probing
    • Budget allocation
    • Capacity tracking
  5. INJECTION DOMAIN - Model integration

    • PyTorch hook integration
    • State format conversion
    • Injection point selection
  6. QUERY DOMAIN - External API

    • Clean interface design
    • Request validation
    • Response formatting

The container model

The proposed container model groups state payloads into snapshots that could be stored and reused. Compatibility with a model’s tensor shapes, position handling and injection point is an integration requirement:

  1. Level 0: Global all memory
  2. Level 1: Domains AI Research, DevOps, Business, etc.
  3. Level 2: Sessions conversations within a domain
  4. Level 3: Documents logical groupings
  5. Level 4: Chunks leaf nodes holding the attention states
The proposed container hierarchy.

Each container stores:

  • Centroid: 4096-dimensional mean of descendants
  • Children: Pointers to child containers
  • Timestamp: For temporal locality
  • Metadata: Context, source, relationships

Reported results: ARM prototype

The ARM (Attention Reasoning Manifold) prototype uses learned coordinates, unlike the native-state design goal above. Its original reported metrics are retained below as preliminary claims with unresolved definitions.

The public ARMS repository describes validation limited to synthetic GPT-2 tests with fewer than 100 stored states. That repository description does not supply a run-level mapping to the compression table below.

MetricValue
Reported retrieval accuracy100%; metric and test-set definition not supplied here
Reported compression ratio5,372×; storage accounting unresolved
Reported cross-topic similarity−0.33; distribution and decision criterion not supplied
Tested context lengths50–400 tokens; not proof of scale invariance

How it works

  1. ContrastiveARMEncoder - Projects hidden states to 4096-dim coordinates using contrastive learning (InfoNCE loss)
  2. HierarchicalMemory - Multi-level memory with chunking
  3. MultiScaleTrainer - Trains encoder on varied context lengths
  4. CoordinateStore - FAISS-based vector index

Projection and payload storage

Attention states are projected to coordinates:

# Hidden state (768-dim) → Coordinate (4096-dim)
coordinate = encoder(hidden_state)  # Learned projection

# Store at coordinate position
store.add(coordinate, attention_state)

# Retrieve by proximity
retrieved = store.nearest(query_coordinate, k=10)

What the prototype does not yet establish

The example stores both a coordinate and an attention_state payload. A 768-to-4,096-dimensional projection does not by itself explain a 5,372× storage reduction. To reproduce that ratio, a run record must identify the original tensor type, shape and precision; original byte count; stored payload and coordinate bytes; metadata; encoder weights; and which costs are amortized or excluded.

Likewise, retrieving the expected record is different from reconstructing a tensor exactly or preserving a downstream answer. A reconstruction claim needs a tensor comparison, numerical tolerance and task evaluation. None is defined alongside this table.

The original rationale included approximately 90% low-magnitude attention weights and a roughly 5,000× reduction. Low magnitude alone does not establish safe pruning; those statements remain hypotheses or incompletely specified observations, rather than general properties demonstrated here.

Design principles

The .kkrieger principle

The project draws an analogy to compact procedural assets: store a generator when it can reproduce the desired object. For ARMS, coordinates and metadata alone have not been shown here to reconstruct arbitrary states. The prototype code above explicitly stores a payload; compression accounting must include that payload or explain how it is regenerated.

Minimal core: five primitives

Point       // Position in 4096-dim space
Id          // Unique identifier (u128)
Blob        // Opaque payload (attention state)
Proximity   // Distance relationship
Merge       // Composition operation

Everything else builds on these five primitives.

Implementation status

Scaffold reported in January 2026:

  • 64 unit tests passing
  • All 5 primitives implemented
  • Trait contracts defined
  • Memory and flat index adapters complete

Original build plan (January 2026):

  • Phase 1: Core (complete). Pure logic, fully testable
  • Phase 2: Ports (complete). StoragePort, IndexPort, LatencyPort contracts
  • Phase 3: Adapters (in progress)
    • RAM Storage Adapter ✓
    • NVMe Storage Adapter
    • Spatial Index Adapter ✓
    • System Probe Adapter
  • Phase 4: Inbound ports
    • Query Port (Python bindings)
    • Injection Port (PyTorch integration)
    • Admin Port (CLI)
  • Phase 5: Integration. Wire everything, integration tests

The scaffold and build plan above describe the January report, not a new September implementation test. The reported 64 passing unit tests concern software behavior; they do not verify the compression or reconstruction claims.

CMS: Computational Memory Snapshots

The original report lists separate CMS results without a run-level artifact mapping in this article. They are not validation of the ARMS compression ratio:

  • 25× context extension (4K model → 100K effective)
  • 84.8% compute reduction
  • 18.4× compression ratio

CIT: Compute Image Tokenizer

A proposed direction for encoding attention as images; the following are research aims rather than validated ARMS results:

  • Vision transformers can “read” attention patterns
  • 100-1000× compression potential
  • Human-inspectable memory visualizations

Conclusion

ARMS proposes a spatial organization for persistent model-state memory. The separate ARM prototype supplies early observations, but it does not establish general logarithmic retrieval, lossless compression or preserved downstream behavior. The next evidentiary step is a versioned run with complete storage accounting, defined retrieval and reconstruction metrics, and an evaluated model integration. This editorial revision adds those distinctions without new experiments.


Get started

The ARMS source repository contains the memory architecture; HAT is a related experimental index. Their availability does not mean that every adapter in the proposed build plan is complete:

Part of ongoing research into computational memory systems at Automate Capture.

Paper record

Scope

Proposed ARMS architecture and a separate learned-projection ARM prototype on 50-400-token contexts. The public ARMS repository describes small synthetic GPT-2 tests with fewer than 100 stored states.

Proposal and early prototype

Limitation

The reported 5,372x ratio lacks a byte-level denominator, payload/weight accounting and a reconstruction criterion. It is not established as lossless compression.

Artifacts

Public ARMS source repository linked. This record does not identify the exact ARM prototype run or a reproduction package for the compression claim.

Citation

Use this record when citing the current public version.

Andrew Young (2026). ARMS: A Proposed Spatial Architecture for Persistent AI Memory. Automate Capture Research. https://research.automate-capture.co/journals/arms-attention-reasoning-memory-store/