---
title: 'CUPMem: State-Aware Memory for LLM Agents'
url: https://www.emergentmind.com/topics/cupmem
type: topic
---

# CUPMem: State-Aware Memory for LLM Agents

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 [2605.06527]. 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 [2605.06527].

## 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 \(m_o\) may support a belief \(v_o(a)\) about an attribute \(a\), but a later observation \(m_n\) can invalidate that belief without explicit negation. STALE formalizes this with **Belief Incompatibility** and **Non-explicit Invalidation**:

\[
m_n \models_{\mathcal{K}} \neg v_o(a)
\]

\[
\forall \, m_j \in \{m_{o+1}, \ldots, m_n\}: \; \neg \mathrm{ExplicitInv}(m_j, v_o(a))
\]

This formulation defines the benchmark failure mode called **Implicit Conflict** [2605.06527].

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 [2605.06527].

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 [2605.06527].

## 2. Typed temporal memory store and schema

CUPMem maintains a **typed temporal memory store** built on a fixed two-level schema \(\Omega\):

\[
\Omega = \{(b,\ell): b \in \mathcal{B}, \ell \in \mathcal{T}_b\}
\]

Each slot has a cardinality annotation,

\[
\kappa(b,\ell) \in \{\text{single}, \text{multi}\},
\]

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

\[
m_i = (id_i, b_i, \ell_i, v_i, s_i, \tau_i, E_i),
\]

where \(id_i\) is the item identifier, \(b_i\) the state domain, \(\ell_i\) the local slot, \(v_i\) the state proposition, \(s_i \in \{ACTIVE, STALE\}\) the status, \(\tau_i\) the temporal provenance, and \(E_i\) 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 [2605.06527].

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` [2605.06527].

| 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 [2605.06527].

## 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 [2605.06527].

At the beginning of a write, a new session \(x_{\tau}\) is filtered for **state-relevant evidence spans**,

\[
C_{\tau} = \{c_j\}.
\]

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

\[
\delta_k = (b_k, \ell_k, \hat{v}_k, z_k, \gamma_k, \tau, E_k),
\]

where \((b_k,\ell_k)\) is the target slot, \(\hat{v}_k\) the candidate state value, \(z_k\) whether the value comes from direct observation or upstream inference, \(\gamma_k\) a confidence score, \(\tau\) the time, and \(E_k\) the evidence span. When an utterance describes a transition, CUPMem stores the **post-transition state**, not the event itself [2605.06527].

Local same-slot consolidation is then performed through

\[
a_k = U(\delta_k, R_{same\text{-}slot}(\delta_k), R_{same\text{-}domain}(\delta_k)),
\]

with decision

\[
a_k \in \{ADD, REFINE, REPLACE, NO\_OP\}.
\]

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 [2605.06527].

To capture propagated invalidation, CUPMem expands the search space. The main-text formulation is

\[
\mathcal{C}_t = \{ i \in \mathcal{A}_{t-1} \mid z_i \in \mathrm{Direct}(\Delta_t) \cup \mathrm{Affected}_{\theta}(\Delta_t,\Omega)\} \cup \mathrm{Global}_{k}(\Delta_t,\mathcal{A}_{t-1}),
\]

and the appendix gives the related decomposition

\[
\mathcal{R}_{\tau} = \mathcal{R}^{direct}_{\tau} \cup \mathcal{R}^{affected}_{\tau} \cup \mathcal{R}^{global}_{\tau},
\]

with

\[
\mathcal{R}^{affected}_{\tau} = F_{\text{affect}}(\Delta_{\tau}, C_{\tau}, \Omega).
\]

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 [2605.06527].

Candidate stale items are turned into revision proposals

\[
p = (m_{old}, \Delta_p, \rho_p, \gamma_p),
\]

and passed to an **LLM-based adjudicator**:

\[
y_i = J_{\theta}(i,\Delta_t,x_t,\Omega) \in \{KEEP,STALE,REPLACE,UNKNOWN\}.
\]

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` [2605.06527].

## 4. Constrained readout and premise-sensitive query handling

CUPMem’s query-time behavior is explicitly not ordinary top-\(k\) retrieval followed by ad hoc reconciliation. Instead, the paper describes **constrained readout under authorized state**. A query \(q\) is first analyzed as

\[
\pi(q) = (I_q, P_q, B_q, A_q),
\]

where \(I_q\) is the user intent, \(P_q\) the presupposed states, \(B_q\) the current-state basis needed to answer, and \(A_q\) the requested action [2605.06527].

The memory store is then checked for premise consistency through

\[
V(q,M) \in \{SUPPORTED, OUTDATED, UNRESOLVED\},
\]

where \(M\) 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 [2605.06527].

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 [2605.06527].

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 [2605.06527].

## 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** [2605.06527].

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 [2605.06527]:

| 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 [2605.06527].

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 [2605.06527].

## 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 \((m_o, m_n)\) per instance; real settings may involve repeated updates, coupled propagation across multiple attributes, or gradual drift [2605.06527].

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 [2605.06527].

A recurrent source of confusion is nomenclature. The CUPMem described here is distinct from **“CUP: Critic-Guided Policy Reuse”** in reinforcement learning [2210.08153], from **“CUP: Comprehensive User-Space Protection for C/C++”** in memory-safety instrumentation [1704.05004], from **“CToMP: A Cycle-task-oriented Memory Protection Scheme for Unmanned Systems”** [2309.05978], and from **“CausalMem”** for fixed-budget streaming video understanding [2606.25658]. In the supplied literature, the explicit system name **CUPMem** appears in STALE as a prototype for **state-aware memory revision** in personalized LLM agents [2605.06527].

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.

Source: https://www.emergentmind.com/topics/cupmem