Source-linked AI summary
Semantic-TVM: Structure-Preserving Trustworthy Virtual Memory for Memory-Augmented and Tool-Using Agents
Yu Li, Qikun Cai, Tao Huang, Chen Hou
TL;DR
Memory-augmented and tool-using agents risk exposing private values to remote LLMs, while one-way masking can remove values needed for trusted execution. TVM keeps exact-value state local and projects protected context at whole-field or sensitive-span granularity. Across the evaluated benchmarks, Semantic-TVM recovers EHR utility lost under whole-field replacement while exposure remains reduced.
Problem
Remote LLM requests can expose exact private values from retrieved memory and intermediate state, while one-way masking can remove values needed for tool execution and fail to protect later requests.
Source: §1 · p. 1Method
TVM keeps exact bindings in local recovery state and projects retrieved memory into an online-safe view, using whole-field replacement or trusted-model-predicted sensitive-span replacement.
Source: §1 · p. 1Results
Across Memory-EHR and Memory-RAP, both granularities reduce exposure and Semantic-TVM raises DeepSeek Task Success from 52.33% under Rule-TVM to 84.17%.
Source: §1 · p. 1, §3.2 · p. 3Takeaways & Limitations
Granularity should be chosen per pipeline and coupled to validated local recovery, given the differing roles of recovery in EHR utility and scene-conditioned projection in RAP exposure reduction.
Source: §6 · p. 4The evaluation covers two providers and two pipelines, and measured exposure does not establish semantic privacy or prevent inference from retained context.
Source: §5 · p. 4
Abstract
from arXiv · showhide
Memory-augmented and tool-using agents expose exact private values when remote LLMs process retrieved memory, tool actions, and intermediate observations. One-way masking limits direct exposure but removes values needed for trusted execution and can leak them through later observations. We propose Trustworthy Virtual Memory (TVM), a closed-loop runtime that keeps exact-value state local while presenting a protected view to the remote model. Within this single runtime, Rule-TVM replaces whole protected fields with locally recoverable handles, and Semantic-TVM instead replaces only sensitive spans predicted by a trusted local model, preserving surrounding task-relevant context. On Memory-EHR and Memory-RAP across two providers, span-level projection recovers most of the EHR utility lost under whole-field replacement (Task Success 84.17% vs. 52.33% on DeepSeek) while measured exposure stays low and workflows remain executable.
1. INTRODUCTION
Remote LLM agents can expose exact private values across memory, tool actions, and observations, while one-way masking can remove values needed for execution. TVM keeps exact-value state local and projects protected context for remote reasoning.
1. INTRODUCTION
- Remote requests may expose private values from retrieved memory and intermediate state, while one-way masking can remove exact identifiers needed by tools and later observations can reintroduce them.Protecting only the initial prompt does not cover the full execution cycle.Source: §1 · p. 1
- TVM projects retrieved memory into an online-safe view, stores exact bindings locally, resolves handles before tool execution, and reprojects observations before the next request.Permitted capsule metadata can remain in the projected view.Source: §1 · p. 1
- Rule-TVM replaces whole fields, whereas Semantic-TVM replaces only sensitive spans predicted by a trusted local model and preserves the remaining content within its field or schema boundary.The two methods share the lifecycle, resolution, and reprojection path but use different projection granularities.Source: §1 · p. 1
- Across Memory-EHR and Memory-RAP, both projection granularities reduce exposure, while Semantic-TVM recovers utility lost under whole-field replacement.The study covers exposure, execution, and task utility across two remote providers.Source: §1 · p. 1
- TVM contributes a local–remote virtual-memory lifecycle, two projection granularities with local recovery, and an evaluation spanning exposure, execution, task utility, component effects, and robustness.Fig. 1 depicts the lifecycle with local recovery and observation reprojection.Source: §1 · p. 1, Figure 1 · p. 2
2. TRUSTWORTHY VIRTUAL MEMORY
TVM separates remote-visible projected memory from local exact-value recovery across tool execution. It instantiates that recovery-coupled projection at whole-field and sensitive-span granularities.
2.1. TVM Abstraction and Trust Boundary
- The online model receives projected memory, not recovery state; TVM resolves tool actions locally and reprojects observations before subsequent requests.The resulting serialized outbound messages are captured for audit.Source: §2.1 · p. 2
- TVM defines protected values through a trial-specific manifest and measures detectable exposure as exact or normalized matches in serialized outbound requests.The manifest covers protected values from retrieved records, historical actions, and values reappearing in tool results.Source: §2.1 · p. 2
2.2. Rule-TVM: Whole-Field Projection
- Rule-TVM replaces protected fields with handles stored in trial-local state; the resolver validates tool, argument path, expected type, and scope before substituting exact values locally.Resolved actions and raw observations do not enter online history.Source: §2.2 · p. 2
2.3. Semantic-TVM: Span-Level Projection
- Semantic-TVM uses a trusted local model on each memory item, task, and scene adapter to replace predicted sensitive spans while retaining surrounding structure and local recovery state.Spans needed for exact execution receive scoped slots; other protected spans receive scoped placeholders.Source: §2.3 · pp. 2–3
3. EXPERIMENT
The evaluation compares Rule-TVM and Semantic-TVM with conventional baselines on Memory-EHR and Memory-RAP. Semantic-TVM recovers substantial EHR task utility while both TVM variants reduce detected exposure, with results varying by pipeline.
3.1. Experimental Setup
- Memory-EHR uses four retrieved examples in a local query-program workflow; Memory-RAP uses three examples to construct search actions executed by a local tool.The comparison includes No Defense, one-way Masking, Rule-TVM, and Semantic-TVM; Execution Success measures successful execution, while Task Success measures correctness of the final outcome.Source: §3.1 · p. 3
3.2. Experimental Results
- Rule-TVM reaches at most 0.67% Leak Rate, while Semantic-TVM stays at most 1.00% on EHR and 12.00% on RAP; both remain above 99% RAP Execution Success.No Defense has protected-value matches in 78.50% of EHR trials and every RAP trial; Rule-TVM minimizes detected exposure while Semantic-TVM preserves more EHR executability.Source: §3.2 · p. 3, Table 1 · p. 4
- With fine-grained projection fixed, Recovery primarily improves EHR task utility, while the scene Adapter supplies privacy context for RAP exposure reduction.Source: §3.2 · p. 3, Table 2 · p. 4
- Semantic-TVM keeps EHR Leak Rate at most 1.00% with Execution Success above 87% and Task Success above 76%; on RAP it lowers Leak Rate to at most 12.00% with Execution Success above 99%.Source: §3.2 · p. 3
- 84.17% vs. 52.33% Task Success on DeepSeek and 76.83% vs. 6.17% on MiniMax show Semantic-TVM recovering EHR utility over Rule-TVM.The comparison is shown in Fig. 2; Leak Rate rises from 0.33% to 1.00% on DeepSeek and from 0.00% to 0.50% on MiniMax, versus 78.50% under No Defense.Source: §3.2 · p. 3, Figure 2 · p. 4
4. RELATED WORK
Related work frames TVM as trusted mediation of agent context, distinguishing it by the artifact it transforms and the granularity visible remotely. It connects to agent privacy risks, policy-aware release, and systems that mediate observations, bindings, or private environments.
- TVM separates related approaches by transformed artifact and remote-visible granularity.Source: §4 · p. 4
- Agent memories, tool observations, and generated programs can be exposed to inference [2], while EHR execution may require record-specific values [3].Extraction, poisoning, and prompt-injection risks [7] motivate a trusted boundary; TVM applies the principle that authorization to use data need not imply authorization to release it.Source: §4 · p. 4
- MINIM, SlotGuard [13], and PlanTwin [14] mediate UI observations, transcript bindings, and private environments; Semantic-TVM projects sensitive spans in retrieved memory while preserving local recovery.Source: §4 · p. 4
5. DISCUSSION AND LIMITATIONS
TVM's exposure measure and evaluation scope leave important privacy and deployment boundaries: it detects specified value matches in captured provider-bound requests, not semantic disclosure or all system costs.
- Exposure measurement counts detectable exact or normalized matches to manifest-listed values in completely captured provider-bound requests, excluding tool providers, local state, and the memory store.Source: §5 · p. 4
- The measure does not establish semantic privacy or prevent inference from retained context, and handles reveal per-type cardinality and repeated-record positions.Adversarial retrieved content can steer projection, reprojection may miss unanticipated structures, and recovery or schema repair can reintroduce original content.Source: §5 · p. 4
- Evaluation covers two providers and two pipelines with different utility definitions, but does not measure projection fidelity, local latency, throughput, or hardware cost.The authors recommend conservative projection with typed recovery bindings for high-assurance deployments.Source: §5 · p. 4
6. CONCLUSION
TVM keeps exact values local while projecting memory for remote reasoning at whole-field or sensitive-span granularity. Span-level projection recovers much EHR utility lost under whole-field replacement, while the preferred granularity depends on pipeline and validated local recovery.
- 84.17% vs. 52.33% Task Success on DeepSeek shows Semantic-TVM recovering much of the EHR utility lost under Rule-TVM.Source: §6 · p. 4
- TVM applies one recovery-coupled projection operator at whole-field or sensitive-span granularity while keeping exact-value state local.Source: §6 · p. 4
- Granularity should be chosen per pipeline and coupled to validated local recovery: trusted recovery drives EHR utility, while scene-conditioned projection drives RAP exposure reduction.Source: §6 · p. 4