# Structured Memory for Edge Language Models: Persistent Context and Corpus Retrieval via O(1) SSM State Injection

Source: [arXiv](https://arxiv.org/abs/2608.02560v1)  
Feed7 permalink: https://feed7.dev/p/2608-02560v1-1u8ls14  
Published: 2026-08-03T17:43:36.000Z  
Trust: Needs Review (needs_review)

## Why Included

PRECOG precomputes SSM corpus states and injects them at query time, avoiding context re-ingestion. On a 1.2B edge model, reported prefill fell from about 27 seconds to under 6 ms.

## Source Summary

PRECOG encodes documents offline as fixed-size SSM states, retrieves the best match, and injects it at query time. On a **1.2B-parameter** model with a **192 KB hidden state**, prefill dropped from about 27 seconds to **under 6 ms**.

## Practical Implication

For edge agents with repeated corpus access, benchmark state injection against conventional RAG. The accompanying memory scheme combines episodic, semantic, and retrieved states with **O(1) session initialization** and an adjustable storage-fidelity tradeoff.

## Agent-Ready Context

PRECOG encodes documents offline as fixed-size SSM states, retrieves the best match, and injects it at query time. On a **1.2B-parameter** model with a **192 KB hidden state**, prefill dropped from about 27 seconds to **under 6 ms**.

For edge agents with repeated corpus access, benchmark state injection against conventional RAG. The accompanying memory scheme combines episodic, semantic, and retrieved states with **O(1) session initialization** and an adjustable storage-fidelity tradeoff.

The approach depends on SSM architecture and cannot be transferred directly to position-entangled Transformer KV caches. The material says answer quality matched in-context RAG, but gives no task breakdown or evidence across other models and hardware.

## Connected Context

Feed7 judgment across 340 accumulated Signals:

This introduces an architecture-specific alternative to repeatedly prefilling retrieved documents: store corpus items as reusable SSM states and inject one at session start. It could materially change edge-agent retrieval economics and memory initialization, while narrowing applicability to compatible SSMs. Claims of RAG-equivalent quality remain provisional without task-level results, cross-model tests, or provenance controls.

- [ReContext: Recursive Evidence Replay as LLM Harness for Long-Context Reasoning](https://feed7.dev/p/2607-02509v1-11vodps) — ReContext replays selected evidence as tokens for long-context reasoning, whereas PRECOG injects an offline-encoded state; they are competing ways to surface query-relevant evidence with different architecture and prefill costs.
- [UniMem: Complementary Episodic-to-Parametric Memory for Boundary-Agnostic Task Streams](https://feed7.dev/p/2607-26017v1-1opv1da) — PRECOG supplies a fixed-state mechanism for episodic, semantic, and retrieved memory, while UniMem addresses routing recurring experience between retrieval and learned parameters; neither supplied result resolves inspectability or governance.
- [Citation Needed: Provenance for LLM-Built Knowledge Graphs — Daniel Chalef, Zep AI](https://feed7.dev/p/citation-needed-provenance-for-llm-built-knowledge-graphs-daniel-chalef-1iob5t8) — State injection accelerates access but does not preserve the claim-level provenance needed when stored knowledge merges, changes, or must be deleted, making provenance metadata an implementation consequence rather than a solved feature.
- [ReToken: One Token to Improve Vision-Language Models for Visual Retrieval](https://feed7.dev/p/2607-28627v1-0pc8021) — Both retrieve compact cached representations instead of processing the full context at query time, but PRECOG targets text in SSM state space while ReToken selects visual tokens from cached multimodal context.

## Context Map

- Layer: context
- Domains: research, data
- Topics: retrieval, agent-memory, context-engineering

## Uncertainty

- The approach depends on SSM architecture and cannot be transferred directly to position-entangled Transformer KV caches. The material says answer quality matched in-context RAG, but gives no task breakdown or evidence across other models and hardware.

## Agent Instruction

Use this item as source-backed context. Do not invent claims beyond the linked source. If this item conflicts with another source, call out the conflict.
