Persistent Memory for Decoder-Only Transformers: Latent Terrain, Diffusion, Homeostasis, and Emotional Stabilization

Read full text
Authors: Seidl, Michal
Cited by: 0

Abstract

AbstractPersistent memory is essential for enabling large language models (LLMs) to store and extend knowledge over long time horizons beyond the limits of a fixed context window. In this theoretical work, we propose a persistent memory architecture for decoder-only Transformers inspired by principles of biological memory. The design combines (i) sharp representations of memory traces in a latent space (e.g., 64D) with (ii) a compressed 3D terrain layer in which information spreads via diffusion and is regulated by homeostatic return to equilibrium. Memory traces further carry emotional components (e.g., four channels analogous to CMYK or hormonal configurations) that gradually diffuse into the terrain and subsequently stabilize emotional responses during reading.Reading is implemented in two phases via a TerrainPrior module (a 3D prior over memory) and MemoryAttention (kernel-based selection of centers in latent space), with controlled integration into the decoder (gating) to avoid distortion of semantic input parsing. Writing is performed at the segment level and weighted by a combination of novelty, prediction error, and emotional salience; we propose a dual STM/LTM system with consolidation (“sleep”) and normalization instead of hard deletion. We discuss relations to retrieval-augmented models (RAG, RETRO), memory Transformers (persistent memory, memory slots), andlong-context alternatives (e.g., convolutional operators such as Hyena), and formulate hypotheses on benefits: smooth forgetting, long-term stability, and the ability for cumulative learning over months to years without retraining the main weights.

Fields of Study & Subjects

Topic Modeling Ferroelectric and Negative Capacitance Devices Language and cultural evolution

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
9 January 2026
Language
EN
Document type
Preprint