CUPMem: State-Aware Memory for LLM Agents
- CUPMem is a prototype system for state-aware memory revision in LLM agents that updates latent user state at write time.
- It employs a structured two-level schema to consolidate and propagate evidence across temporal memory slots, addressing both co-referential and propagated implicit conflicts.
- Evaluation on the STALE benchmark shows significant gains in premise resistance and state resolution compared to retrieval-only memory frameworks.
CUPMem, short for Current-state Updating and Propagation-aware Memory, is introduced as “a prototype” and “an initial baseline for state-aware memory” for long-term personalized LLM agents in the STALE benchmark framework (Chao et al., 7 May 2026). Its central purpose is to address the current-state adjudication gap: a system may retrieve updated evidence yet still fail to treat older memory as invalid or to stop using it in downstream reasoning. CUPMem therefore treats conversational memory as latent user-state tracking and performs state-aware memory revision at write time, deciding whether older memories should remain active, be replaced, be archived as stale, or be blocked because the current state is uncertain (Chao et al., 7 May 2026).
1. Problem formulation and conceptual basis
CUPMem is defined against STALE’s diagnosis of stale memory / invalidated memory in personalized agents. In this setting, the user’s true state is latent and evolves over time, while the assistant observes only dialogue evidence. A prior observation may support a belief about an attribute , but a later observation can invalidate that belief without explicit negation. STALE formalizes this with Belief Incompatibility and Non-explicit Invalidation:
This formulation defines the benchmark failure mode called Implicit Conflict (Chao et al., 7 May 2026).
The paper distinguishes two forms of implicit conflict. Type I: co-referential conflict arises when a later utterance updates the same underlying attribute but in a surface-compatible way. The example given is an earlier statement that the user lives in Seattle, followed later by evidence of signing a new lease and setting up utilities in Portland. Type II: propagated conflict is structurally harder: a later observation changes a different attribute whose consequences invalidate the earlier belief. The canonical example is an earlier memory that the user bikes to work every day, followed by a later report that the user broke their leg playing basketball yesterday. The injury utterance does not mention commuting or biking, yet it should change what the assistant recommends for commuting this week (Chao et al., 7 May 2026).
The significance of CUPMem lies in its rejection of a retrieval-only view of memory. The system is motivated by the claim that conversational memory should not be treated as a bag of retrievable snippets. Ordinary retrieval can surface both old and new evidence without deciding which one governs the assistant’s current belief state. CUPMem instead gives new evidence write-side authority to revise old state, so that the distinction between historical memory and currently authorized state is established before query time (Chao et al., 7 May 2026).
2. Typed temporal memory store and schema
CUPMem maintains a typed temporal memory store built on a fixed two-level schema :
Each slot has a cardinality annotation,
where a single slot usually has one active current default and a multi slot can support multiple simultaneous active constraints. Each stable memory item is represented as
where 0 is the item identifier, 1 the state domain, 2 the local slot, 3 the state proposition, 4 the status, 5 the temporal provenance, and 6 the supporting evidence. CUPMem can also mark a slot as UNKNOWN_CURRENT when it knows an old default is unsafe but cannot confidently establish the replacement (Chao et al., 7 May 2026).
The fixed schema used in the experiments contains ten domains. These are identity_and_background, stable_preferences, location_and_living, weather_and_environment, health_and_mobility, work_and_schedule, finance_and_resources, family_and_caregiving, routine_and_transport, and current_focus_and_goals. The local slots include, among others, current_base_location, living_arrangement_or_settlement, current_weather_pattern, environmental_condition, current_health_state, functional_limitation, schedule_pressure_or_bandwidth, standing_commitment_or_availability, current_commute_mode, and short_horizon_goal (Chao et al., 7 May 2026).
| Domain | Example local slots |
|---|---|
location_and_living |
current_base_location, living_arrangement_or_settlement |
weather_and_environment |
current_weather_pattern, environmental_condition |
health_and_mobility |
current_health_state, functional_limitation |
work_and_schedule |
schedule_pressure_or_bandwidth, standing_commitment_or_availability |
routine_and_transport |
current_commute_mode, routine_shift |
current_focus_and_goals |
current_primary_focus, short_horizon_goal |
This schema makes structured state consolidation possible. Instead of storing raw conversation turns as equivalent memory traces, CUPMem maps evidence into typed domain-slot locations and tracks whether each item is still active, stale, or currently unresolved. A plausible implication is that the schema provides the structural substrate needed for cross-attribute invalidation, especially in Type II cases (Chao et al., 7 May 2026).
3. Write-side belief updating and propagation-aware revision
The paper presents CUPMem as a pipeline with three major stages: write-side belief updating / adjudication, topology-triggered belief propagation / search, and constrained readout under authorized state. The first two stages define the system’s write path (Chao et al., 7 May 2026).
At the beginning of a write, a new session 7 is filtered for state-relevant evidence spans,
8
The appendix states that CUPMem filters away task wrappers, purely historical mentions, and conversational material that does not affect current user state. From these valid spans, it constructs update candidates
9
where 0 is the target slot, 1 the candidate state value, 2 whether the value comes from direct observation or upstream inference, 3 a confidence score, 4 the time, and 5 the evidence span. When an utterance describes a transition, CUPMem stores the post-transition state, not the event itself (Chao et al., 7 May 2026).
Local same-slot consolidation is then performed through
6
with decision
7
This handles direct revision within the same slot and domain, but the appendix explicitly states that this step only handles same-slot revision; it does not resolve cross-attribute stale states (Chao et al., 7 May 2026).
To capture propagated invalidation, CUPMem expands the search space. The main-text formulation is
8
and the appendix gives the related decomposition
9
with
0
This is the system’s propagation-aware search. It deliberately looks beyond literal slot overlap into structurally affected state regions. A health update in health_and_mobility can therefore trigger review of an older state in routine_and_transport; a relocation in location_and_living can trigger review of commute or environment-linked assumptions (Chao et al., 7 May 2026).
Candidate stale items are turned into revision proposals
1
and passed to an LLM-based adjudicator:
2
These outcomes determine whether an old memory remains usable, is archived as obsolete, is replaced by a new current state, or is blocked because no safe replacement can be established. The store obeys a temporal causality rule: only later evidence may revise or archive earlier items. Stale items are not deleted; they remain available as historical evidence with status STALE (Chao et al., 7 May 2026).
4. Constrained readout and premise-sensitive query handling
CUPMem’s query-time behavior is explicitly not ordinary top-3 retrieval followed by ad hoc reconciliation. Instead, the paper describes constrained readout under authorized state. A query 4 is first analyzed as
5
where 6 is the user intent, 7 the presupposed states, 8 the current-state basis needed to answer, and 9 the requested action (Chao et al., 7 May 2026).
The memory store is then checked for premise consistency through
0
where 1 is the post-adjudication memory. SUPPORTED indicates that the premise aligns with active current memory; OUTDATED indicates dependence on stale memory; UNRESOLVED indicates that the current state is not safely settled (Chao et al., 7 May 2026).
This design is particularly important for Premise Resistance, because a query may embed an obsolete assumption. CUPMem does not merely retrieve the most semantically similar snippets; it verifies whether the query’s presuppositions are still authorized by the current state. Only active items are used as current grounding. STALE items remain historical context, not the basis for current recommendations, and UNKNOWN_CURRENT prevents silent fallback to an obsolete default. This suggests that CUPMem’s main query-time advantage is not higher recall alone, but the explicit coupling between readout and write-time state adjudication (Chao et al., 7 May 2026).
The same mechanism also supports Implicit Policy Adaptation. In that probe setting, the query may not mention either the old or the new evidence directly. The system must nevertheless use the authorized current state in downstream behavior. CUPMem’s read path is therefore inseparable from its write path: query-time control depends on whether stale-state review has already retired or blocked obsolete assumptions (Chao et al., 7 May 2026).
5. Evaluation on STALE
STALE contains 400 expert-validated conflict scenarios and 1,200 evaluation queries across three probing dimensions—State Resolution (SR), Premise Resistance (PR), and Implicit Policy Adaptation (IPA)—covering over 100 everyday topics with contexts up to roughly 150K tokens. The CUPMem experiments use the same backbone model as the memory-framework baselines, GPT-4o-mini, so gains are attributable to memory management rather than to a stronger base model. The benchmark instances contain 50 sessions per instance, with average formatted context length about 151.8K tokens, and CUPMem’s approximate cost is \$0.37 per instance (Chao et al., 7 May 2026).
CUPMem is compared against plain long-context LLMs and against GPT-4o-mini-based memory frameworks: LightMem, Zep, LiCoMemory, A-mem, and mem-0. Its reported probe-level results are as follows (Chao et al., 7 May 2026):
| Probe dimension | Type I | Type II |
|---|---|---|
| SR | 91.0% | 89.0% |
| PR | 78.0% | 75.0% |
| IPA | 32.0% | 43.0% |
The reported overall score is 68.0%, the best result in the paper. The best evaluated frontier LLM, Gemini-3.1-pro, reaches 55.2% overall. Plain GPT-4o-mini scores 8.7% overall, so CUPMem raises that backbone by 59.3 percentage points. The other GPT-4o-mini-based memory frameworks score 17.8% for LightMem, 6.0% for Zep, 7.6% for LiCoMemory, 5.1% for A-mem, and 8.3% for mem-0 (Chao et al., 7 May 2026).
The paper emphasizes that CUPMem improves most strongly on Premise Resistance. Its Type I-PR: 78.0% and Type II-PR: 75.0% are substantially above the near-zero PR values reported for many other systems. CUPMem also reaches Type II-SR: 89.0%, which is presented as evidence that propagation-aware design substantially narrows the benchmark’s hardest structural-reasoning gap. By contrast, Implicit Policy Adaptation remains difficult even for CUPMem, with 32.0% on Type I and 43.0% on Type II. The paper reports this as a residual difficulty rather than as a solved problem (Chao et al., 7 May 2026).
6. Scope, limitations, and nomenclature
The authors are explicit that CUPMem is “a targeted prototype rather than a general-purpose memory architecture.” It depends on a predefined state schema, which makes stale-state adjudication and propagation tractable but constrains the system to limited attribute domains. The broader problem of recovering evolving user states from sparse dialogue without schema scaffolding remains unsolved, and the appendix identifies schema-free approaches as future work. STALE itself also focuses on one conflict pair 2 per instance; real settings may involve repeated updates, coupled propagation across multiple attributes, or gradual drift (Chao et al., 7 May 2026).
These limitations matter for interpretation. CUPMem handles more than trivial overwriting because it includes cross-slot propagated invalidation, explicit stale-state archiving, and the UNKNOWN_CURRENT state. At the same time, it is not presented as a complete solution for open-domain lifelong memory revision. A plausible implication is that its principal contribution is methodological: it demonstrates that write-side structured consolidation plus propagation-aware stale-state search can close a large portion of the gap between retrieving updated evidence and acting on it as the current state (Chao et al., 7 May 2026).
A recurrent source of confusion is nomenclature. The CUPMem described here is distinct from “CUP: Critic-Guided Policy Reuse” in reinforcement learning (Zhang et al., 2022), from “CUP: Comprehensive User-Space Protection for C/C++” in memory-safety instrumentation (Burow et al., 2017), from “CToMP: A Cycle-task-oriented Memory Protection Scheme for Unmanned Systems” (Ma et al., 2023), and from “CausalMem” for fixed-budget streaming video understanding (Song et al., 24 Jun 2026). In the supplied literature, the explicit system name CUPMem appears in STALE as a prototype for state-aware memory revision in personalized LLM agents (Chao et al., 7 May 2026).
Within that scope, CUPMem’s enduring significance is its shift from remembered text to adjudicated state. It operationalizes the claim that robust personalized memory requires not only storing and retrieving evidence, but deciding which memories are still valid now.