Papers
Topics
Authors
Recent
Search
2000 character limit reached

User as Engram: Persistent Memory for User Modeling

Updated 5 July 2026
  • User as Engram is a concept that defines users as persistent memory traces, capturing behavioral patterns and contextual cues as latent representations.
  • The approach leverages methodologies like GRU autoencoders, stateful sequence models, and typed conversational memories to compress and update interaction histories.
  • This framework enhances prediction accuracy, memory efficiency, and personalization by enabling dynamic, task-specific retrieval of user information.

User as engram is a machine-learning perspective in which a user is treated as a persistent, reactivatable memory trace rather than only as a transient prompt context or a static identifier. In the literature, this trace may take the form of a fixed-length behavioral vector, a recurrent latent state, a typed collection of episodic and semantic records, or a set of local parametric edits inside a model. The term inherits its intuition from the neuroscientific engram: a sparse neural structure or sparse population of neurons that supports a memory, undergoes lasting change during learning, and can later be reactivated during recall (Lucas, 2023, Szelogowski, 2 Jun 2025, Klenitskiy et al., 11 Aug 2025).

1. Neuroscientific origin and early computational analogues

In neuroscience-oriented work, an engram is described as a sparse neural structure that supports a memory, potentially realized as one or a few concept neurons acting as indexes or pointers to distributed representations across modalities such as image, text, and sound (Lucas, 2023). The same literature emphasizes that there is still no consensus mechanistic framework for how such physical memory traces are implemented biologically, and that current machine-learning constructions are analogues rather than verified biological models (Lucas, 2023).

A central computational translation is the idea of latent neural spaces as indexes. An autoencoder maps an input xx to a latent code z=fθ(x)z = f_\theta(x), reconstructs it with x^=gϕ(z)\hat{x} = g_\phi(z), and minimizes a reconstruction loss such as mean-squared error or cross-entropy. In this framing, the latent code is not only a compressed representation but also an address from which detailed information can be reconstructed; concept nodes then link related latent states across modalities (Lucas, 2023). When generalized to user modeling, a user concept node CuC_u can connect latent codes for items, behaviors, and contexts, making the user’s memory trace a set of latent representations reachable from that node (Lucas, 2023).

A related theoretical synthesis argues that memory efficiency, capacity, and stability emerge from the interaction of plasticity and sparsity constraints. It surveys sparse regularization, engram gating, Sparse Distributed Memory, and spiking neural networks as computational mechanisms that may support efficient, interference-resistant traces (Szelogowski, 2 Jun 2025). This suggests that “user as engram” is not only a metaphor for persistence, but also a design principle centered on sparse, plastic, content-addressable structure.

An early person-dependent analogue appeared in “AlteregoNets: a way to human augmentation” (Kupeev, 2019). There, a separate network is created per person, takes object descriptions and environment descriptors as input, and outputs a textual stream resembling a narrative stream of consciousness. The model’s Person-Aligned Semantic stream and Object-Aligned Semantic stream function as a computational proxy for a user’s idiosyncratic internal world. Although that work is explicitly a rough computer modeling of certain mechanisms of human perception rather than an empirical user-representation benchmark, it anticipates the stronger claim that user-specific latent structure can be treated as an externalized memory trace (Kupeev, 2019).

2. Principal computational formulations

The literature does not converge on a single implementation. Instead, it offers several recurring formulations of the user engram.

This suggests a practical taxonomy of current systems: some compress the user into a single latent code, some maintain a continuously updated hidden state, some route dialogue into typed external memory records, and some write user facts directly into model parameters as local edits.

Formulation Memory carrier Representative papers
Behavioral compression Fixed-size latent vector reconstructing user history (Klenitskiy et al., 11 Aug 2025)
Stateful sequence model Persistent recurrent state plus updated embedding (Zhou et al., 2024, Lian et al., 2022)
Instruction-conditioned embedding <USER> hidden state conditioned on XiX_i and IkI_k (Gao et al., 13 Oct 2025)
Typed conversational memory Episodic, semantic, procedural records; MemCells and MemScenes (Patel et al., 17 Nov 2025, Hu et al., 5 Jan 2026, Wang, 5 Jun 2026)
Internalized parametric memory Hash-keyed memory rows edited per user (Li, 17 Jun 2026)

Across these formulations, several recurring properties are stated explicitly. A user engram is compressed, since it is often a fixed-size vector regardless of history length; general, because it is not tuned to a single downstream label; expressive, because it must support heterogeneous tasks; stable yet updatable, because it summarizes history but can be recomputed or updated as new events arrive; and transferable, because the same representation is reused for tasks such as churn, propensity, recommendation, conversion, and personalization (Klenitskiy et al., 11 Aug 2025).

3. Behavioral sequence models and stateful user traces

A direct instantiation appears in “Encode Me If You Can: Learning Universal User Representations via Event Sequence Autoencoding” (Klenitskiy et al., 11 Aug 2025). The method linearizes each user’s history into a single chronological stream of five event types: product buy, add to cart, remove from cart, page visit, and search query. Each event is a tuple of categorical fields such as day or week index, event type, category, SKU, price bucket, and URL, with missing fields handled by a special category and rare SKUs or URLs collapsed to a “rare” category. For user uu, the sequence is

e(u)=(e1,e2,,eT).\mathbf{e}^{(u)} = (e_1, e_2, \dots, e_T).

Each field has its own embedding matrix, event embeddings are summed,

xt=fvt(f),\mathbf{x}_t = \sum_f \mathbf{v}_t^{(f)},

and a stacked GRU encoder maps the sequence to a fixed-size latent state

z(u)=hT(L).\mathbf{z}^{(u)} = \mathbf{h}_T^{(L)}.

A GRU decoder then reconstructs the entire sequence field by field using teacher forcing and cross-entropy loss: z=fθ(x)z = f_\theta(x)0 The central hypothesis is explicit: if the model can compress the user’s entire interaction sequence into a vector and reconstruct the original sequence from that vector, then the vector is a task-agnostic behavioral engram (Klenitskiy et al., 11 Aug 2025). The paper further combines this GRU autoencoder with iALS, LightFM, transformer next-event prediction, SmolLM2-based embeddings, and handcrafted features, normalizes each component to unit length, applies PCA to several high-dimensional blocks, and concatenates them into a 1066-dimensional representation. In the RecSys Challenge 2025, this ensemble achieved second place overall and first place on the academic leaderboard, with validation improvements over the best single model on churn, category propensity, and product propensity (Klenitskiy et al., 11 Aug 2025).

A different route appears in “USE: Dynamic User Modeling with Stateful Sequence Models” (Zhou et al., 2024). USE uses RetNet rather than a stateless transformer. For token z=fθ(x)z = f_\theta(x)1, the state update is

z=fθ(x)z = f_\theta(x)2

and the recurrent output depends only on current z=fθ(x)z = f_\theta(x)3 and the previous state. This permits exact stateful inference that is equivalent to full-sequence retention while avoiding exhaustive reprocessing. When new behavior chunks arrive, USE keeps the per-user state z=fθ(x)z = f_\theta(x)4, computes hidden states only for new behaviors, and updates the user embedding by an incremental mean: z=fθ(x)z = f_\theta(x)5 The model is trained with future z=fθ(x)z = f_\theta(x)6-behavior prediction, which predicts whether each behavior type will occur anywhere in the next z=fθ(x)z = f_\theta(x)7 actions, and Same User Prediction, a contrastive objective that brings disjoint segments from the same user closer in embedding space. On Snapchat behavioral logs, USE outperformed established baselines on 8 downstream tasks in both static and dynamic settings (Zhou et al., 2024).

“Incremental user embedding modeling for personalized text classification” (Lian et al., 2022) offers another stateful formulation. It maintains an accumulated user history vector z=fθ(x)z = f_\theta(x)8, encodes recent comments with BERT, combines the last z=fθ(x)z = f_\theta(x)9 embeddings and the previous accumulated embedding in a transformer, mean-pools the contextualized outputs to form x^=gϕ(z)\hat{x} = g_\phi(z)0, and updates the stored state by momentum: x^=gϕ(z)\hat{x} = g_\phi(z)1 On Reddit subreddit classification, this incremental approach achieved 9% and 30% relative improvement on prediction accuracy over a baseline system in two experiment settings (Lian et al., 2022).

Taken together, these sequence-based systems treat the user engram as a compressed trajectory. The representation is not a static profile extracted once; it is a memory trace induced by temporal order, recency, repetition, and reconstruction or prediction.

4. Language-conditioned and conversational user engrams

A separate line of work makes the user engram explicitly queryable in natural language. “Instruction-aware User Embedding via Synergistic Language and Representation Modeling” introduces InstructUE, where the user embedding is conditioned on both heterogeneous user data x^=gϕ(z)\hat{x} = g_\phi(z)2 and a natural-language instruction x^=gϕ(z)\hat{x} = g_\phi(z)3: x^=gϕ(z)\hat{x} = g_\phi(z)4 The model uses modality-specific encoders, lightweight adapters into an LLM space, serialized modality delimiters, and a special <USER> token whose final hidden state becomes the user embedding. Training combines autoregressive learning,

x^=gϕ(z)\hat{x} = g_\phi(z)5

with a contrastive loss aligning user embeddings and answer embeddings. On six real-world tasks spanning user prediction, marketing, and recommendation, the instruction-aware variants outperform prior user-representation baselines, suggesting that the user engram can be selectively accessed through task instructions rather than only through fixed downstream heads (Gao et al., 13 Oct 2025).

Conversational memory systems externalize the same idea. “ENGRAM: Effective, Lightweight Memory Orchestration for Conversational Agents” organizes dialogue into three typed stores—episodic, semantic, and procedural—using a single router and dense retriever. Each turn can produce typed memory records such as

x^=gϕ(z)\hat{x} = g_\phi(z)6

where x^=gϕ(z)\hat{x} = g_\phi(z)7 is a temporal anchor and x^=gϕ(z)\hat{x} = g_\phi(z)8 is an embedding vector. Retrieval is cosine-based,

x^=gϕ(z)\hat{x} = g_\phi(z)9

performed independently per type and merged with deduplication and truncation. ENGRAM achieved 77.55% LLM-as-Judge on LoCoMo and 71.40% on LongMemEvalCuC_u0, while using about 1% of the tokens of the full-context baseline on LongMemEval (Patel et al., 17 Nov 2025). The result is a typed, persistent memory state in which the user is represented as a bundle of events, facts, preferences, and procedures rather than as raw transcript replay.

Two later systems make this structure more explicit. “EverMemOS: A Self-Organizing Memory Operating System for Structured Long-Horizon Reasoning” converts dialogue into MemCells

CuC_u1

where CuC_u2 is an Episode, CuC_u3 is a set of Atomic Facts, CuC_u4 is Foresight, and CuC_u5 is Metadata. MemCells are organized into MemScenes by incremental semantic clustering, profile fields are updated from scene summaries, and Reconstructive Recollection uses scene-level selection, episode re-ranking, foresight filtering, and agentic sufficiency checks. On LoCoMo, EverMemOS achieved 93.05% overall; on LongMemEval, 83.00%; and on PersonaMem v2, episodes plus profile reached 53.25%, outperforming profile-only and episodes-only variants (Hu et al., 5 Jan 2026).

“Less Context, More Accuracy: A Bi-Temporal Memory Engine for LLM Agents Where a Lean Retrieved Context Beats the Full History” likewise treats the user’s history as a persistent, structured engram made of Episodes plus a bi-temporal fact graph. Facts carry valid time and transaction time, contradictions are handled by invalidation rather than deletion, and the read path combines dense, lexical, graph, recency, and salience signals: CuC_u6 On the full 500-question LongMemEvalCuC_u7, the lean retrieved slice scored 83.6% versus 73.2% for the full-history baseline, using about 8x fewer tokens (Wang, 5 Jun 2026). A recurring implication of these conversational systems is that more stored history is not identical to better recall; typed consolidation and selective reconstruction can outperform replaying the full trace.

5. Internalized user memory as local model edits

A stronger formulation moves the user engram from external memory into the model itself. “User as Engram: Internalizing Per-User Memory as Local Parametric Edits” separates content from reasoning skill. User-specific facts are stored as local edits to a hash-keyed memory table in an Engram model, while a single shared LoRA adapter carries reasoning skill (Li, 17 Jun 2026).

At token position CuC_u8, an Engram layer computes a deterministic address from a suffix CuC_u9-gram, retrieves a row XiX_i0, gates it, and injects its value into the residual stream: XiX_i1 A user fact is written by editing only the small set of rows touched by the trigger pattern. The key claim is locality: all other rows and all other transformer parameters remain bit-identical. Empirically, per-user Engram row edits changed validation bits-per-byte on unrelated text by XiX_i2, whereas per-user LoRA increased it by about XiX_i3 on average, roughly 33,000× more extra loss on unrelated text (Li, 17 Jun 2026). In the layered design, direct recall matched per-user LoRA while indirect reasoning was 5.6× higher on average, and the design never made a single user worse at reasoning than the untouched base (Li, 17 Jun 2026).

The same paper reports a memory-footprint contrast: at 100 facts per user, a per-user Engram override is about 88 KB per user, whereas a per-user LoRA is 14.2 MB per user (Li, 17 Jun 2026). This turns the user engram into an auditable set of exact addresses and values rather than a diffuse weight delta. Because different users’ facts land in disjoint hash slots, their edits can compose additively when triggers do not collide (Li, 17 Jun 2026).

Related work on conditional memory suggests a broader design space. “Memory Grafting: Scaling LLM Pre-training via Offline Conditional Memory” builds a frozen n-gram memory bank from pretrained hidden states and combines it with an Engram fallback (Cheng et al., 20 May 2026). Its user-facing interpretation is explicitly stated: one can build per-user memory banks from user-specific texts or structured descriptions, retrieve them by exact longest-match lookup, and gate them into a smaller serving model. This suggests a future route in which user engrams combine local parametric memory with external latent memory banks rather than choosing one exclusively (Cheng et al., 20 May 2026).

6. Limits, misconceptions, and open problems

Several misconceptions recur in this literature. First, a user engram is not necessarily a single vector. In current work it can be a fixed-size latent code, a persistent state, a typed database of memory records, a set of MemScenes plus a profile, or a small override map in a hash-keyed memory table (Klenitskiy et al., 11 Aug 2025, Patel et al., 17 Nov 2025, Hu et al., 5 Jan 2026, Li, 17 Jun 2026). Second, “more context” is not automatically better. Both ENGRAM and the bi-temporal Engram engine report that a lean retrieved context can outperform the full-history baseline on long-horizon QA benchmarks (Patel et al., 17 Nov 2025, Wang, 5 Jun 2026). Third, the neuroscience analogy remains hypothesis-generating rather than biologically verified; autoencoders, key-value stores, and backprop-based systems are engineering analogues, not settled models of biological memory (Lucas, 2023).

The technical limitations are substantial. Sequence models truncate history: the GRU autoencoder in (Klenitskiy et al., 11 Aug 2025) uses maximum sequence length 128, while SmolLM2 variants use the last 64 or 90 events; very long histories may lose older but still relevant behavior. Rare items are collapsed into “rare” buckets, which can damage niche-item fidelity (Klenitskiy et al., 11 Aug 2025). Stateful systems still face cold-start problems when user history is short (Lian et al., 2022, Zhou et al., 2024). Typed conversational systems require routing, extraction, and consolidation decisions that can become error sources, and profile updates risk staleness or overcommitment to early impressions (Hu et al., 5 Jan 2026). Parametric Engram edits require an Engram-pretrained base, depend on trigger design, and show a within-user density ceiling under high fact counts (Li, 17 Jun 2026).

Interpretability is uneven. Typed stores and profile summaries are comparatively transparent, whereas latent vectors and recurrent states are not directly readable. The sequence-autoencoding work notes that one cannot easily read off “this user is price-sensitive” from the embedding without additional analysis (Klenitskiy et al., 11 Aug 2025). Privacy is a pervasive but underdeveloped concern. Several papers note that user engrams store sensitive personal data, raise questions of inspection and deletion, or would need explicit governance, editing, temporal decay, and privacy constraints in real deployments (Lucas, 2023, Patel et al., 17 Nov 2025, Wang, 5 Jun 2026).

Open directions are correspondingly broad. The sequence literature proposes transformer-based sequence autoencoders, explicit temporal modeling, contrastive or self-supervised pretraining, multi-task training, incremental or online updating, and interpretable subspaces (Klenitskiy et al., 11 Aug 2025). Conversational memory systems point toward memory governance, profile revision, contradiction handling, and richer multi-hop reasoning over consolidated user state (Patel et al., 17 Nov 2025, Hu et al., 5 Jan 2026, Wang, 5 Jun 2026). Neurocomputational work suggests sparse gating, Hebbian plasticity, and content-addressable retrieval as mechanisms for high-capacity, low-interference user traces (Szelogowski, 2 Jun 2025). A plausible implication is that future “user as engram” systems will be hybrid: sparse where stability and isolation are required, typed where auditability is required, and generative where flexible recall and instruction conditioning are required.

In current research usage, “user as engram” therefore names not a single algorithm but a unifying thesis: the user is best modeled as a persistent memory object whose contents are formed from interaction history, consolidated into reusable structure, and reactivated differently for different tasks. The central question is no longer only how to predict from user logs, but how to encode, update, consolidate, retrieve, and govern a user-specific memory trace across time.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to User as Engram.