Skip to content

A Self-Evolving Just-in-Time Memory Framework for Proactive Embodied SafetySelf-Evolving Just-In-Time Memory for Proactive Embodied Safety

arXiv· arXiv:2607.16247· Bingrui Sima, Lizhong Wang, Xiaoya Lu, Kun He, Xiao YangHuazhong University of Science and Technology; Dept. of Comp. Sci. and Tech., Tsinghua University; Shanghai Jiao Tong UniversityIndexed by this site · 24 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose the Just-In-Time Memory framework, which on IS-Bench raises Qwen3-VL-8B's Safe Success from 18.4% to 48.7%, without a drop in task success rate.

Threat modelBenign-goal interactive safety: the task instruction is semantically neutral, and risk emerges dynamically with environment state during closed-loop interaction; the agent must proactively identify and mitigate hazards under a POMDP rather than aborting the task.

Questions
When VLM-driven embodied agents perform benign household tasks, they struggle to proactively handle risks that arise dynamically during interaction; existing runtime guardrails trade safety for aborting the task, sacrificing task progress.
Methods
Proposes the Just-In-Time Memory framework: a risk-sufficient topological belief graph (RSG) for persistent state tracking, factual memory triggering rules via state–intent coupling, experiential memory injecting procedural Meta-Skills to guide mitigation, and a Test-Verify-Write loop for self-evolution at test time.
Experiments and results
On IS-Bench, Safe Success for Qwen3-VL-8B rises from 18.4% with Vanilla to 48.7%, and for GPT-4o from 35.3% to 66.2%, with no decrease in TS; ablations show that each module contributes.
Limitations and future work
The authors note that the system relies on an auxiliary VLM to construct the RSG; when simulation image quality is limited, the graph may miss states, thereby affecting rule triggering and verification; overall safety success rate is constrained by the planner's basic capabilities. Experiments were conducted only on the IS-Bench simulation, and the rules cover approximately 80% of risks.
Experimental setupQwen3-VL-8B、Qwen3-VL-32B et al. · IS-Bench · TS、SS et al.
Evaluated models
Qwen3-VL-8BQwen3-VL-32BGPT-4o
Benchmarks
IS-Bench
Metrics
TSSSPrePost
AI summaryThe researchers propose a self-evolving just-in-time memory framework (JIT-Memory) that shifts embodied safety from a runtime guardrail that blocks actions to proactively resolving risks. The framework has three parts: a Risk-Sufficient topological belief graph that continuously tracks safety states under partial observability, an evidence-grounded fact memory for anticipating danger, and an experience memory injected with procedural meta-skills; a companion Test-Verify-Write loop lets the agent improve these meta-skills from execution trajectories at test time. On IS-Bench, the framework improves the safety success rate of multiple VLM backbones, including a 30.3% improvement on Qwen3-VL-8B. The code is publicly available on GitHub.

The researchers propose a self-evolving just-in-time memory framework (JIT-Memory) that shifts embodied safety from a runtime guardrail that blocks actions to proactively resolving risks. The framework has three parts: a Risk-Sufficient topological belief graph that continuously tracks safety states under partial observability, an evidence-grounded fact memory for anticipating danger, and an experience memory injected with procedural meta-skills; a companion Test-Verify-Write loop lets the agent improve these meta-skills from execution trajectories at test time. On IS-Bench, the framework improves the safety success rate of multiple VLM backbones, including a 30.3% improvement on Qwen3-VL-8B. The code is publicly available on GitHub.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Addresses the problem that embodied agents under benign goals struggle to proactively mitigate dynamic risks, and existing guardrails sacrifice task progress.

    Core problem: VLM-driven embodied agents, when performing semantically neutral household tasks, cannot proactively handle physical risks that arise dynamically in closed-loop interaction, while existing safety methods trade safety for aborting the task.

    • Problem scenario: The authors divide embodied interactive safety into two types: malicious-goal safety (the task itself is unsafe) and benign-goal interactive safety. The latter is closer to reality: the goal is harmless, but risks arise dynamically with interaction and environment state—for example, when a plate is dusty, it should be wiped first before placing food, rather than abandoning the task.
    • Shortcomings of existing methods: The authors state that the mainstream defense against malicious goals is runtime guardrails, which prevent risk by refusing instructions or blocking execution; this essentially treats safety as task refusal rather than risk mitigation, and severely stalls task progress.
    • Core observation: The authors propose that interactive safety is not an intrinsic property of the environment but a binary function of environment state and agent intent (agency); accordingly, they formalize risk as situational risk (triggered by intent coupling) and temporal risk (a persistently unsafe state that must be resolved before task end).
    • Paper's approach: Proposes the Self-Evolving Just-In-Time Memory framework, comprising a Risk-Sufficient Topological Belief Graph (RSG), factual memory (triggerable rules), and episodic memory (Meta-Skill), and uses a Test-Verify-Write loop to automatically evolve mitigation skills at test time.
    • Threat model:
      • Goal: proactively identify and mitigate dynamically arising hazards in benign tasks while maintaining task progress.
      • Knowledge/capability: under a POMDP the agent only obtains partial observations and must maintain a belief state.
      • Victim system: VLM-driven embodied planning agents (in household tasks in the OmniGibson-simulated IS-Bench).
  2. What related research exists?

    Related work is divided into two groups, memory-augmented embodied planning and embodied safety; this paper positions itself as a proactive safety memory framework for benign goals.

    Memory-Augmented Embodied Planning

    • KARMA, RoboMemory: adopt dual-memory architectures or persistent scene graphs to maintain consistent environment beliefs under closed-loop interaction and partial observability.
    • Voyager: builds a continuously expanding skill library storing reusable programs to support long-horizon embodied planning.
    • The paper notes that such methods focus on task completion and dense scene reconstruction, lacking proactive safety awareness to anticipate and mitigate physical risks that arise dynamically during interaction.

    Safety of VLM-Driven Embodied Agents

    • BadRobot, SafeAgentBench: early benchmarks mainly evaluate instruction-level vulnerabilities, i.e., the ability to abort tasks when facing dangerous instructions, and compliance with explicit temporal safety constraints (AgentSafe).
    • Agentspec, Plug in the Safety Chip, RoboSafe: as runtime guardrails, they use linear temporal logic (LTL) or domain-specific languages to dynamically monitor and block unsafe behaviors.
    • The paper notes that such reactive interventions abort task progress and struggle with household scenarios in IS-Bench where instruction semantics are neutral and risks arise dynamically.

    Baselines and Benchmarks

    • Baseline methods: Safe-CoT (injecting a pre-generated global safety prompt and performing step-by-step safety reasoning), Vanilla (the original IS-Bench planning prompt); ablation baselines include Dense Retrieval, Per-step Re-parse, Only Episodic, Only Factual, Perception-CoT, RSG-Augmented.
    • Benchmark: IS-Bench (based on OmniGibson simulation, 161 semantically neutral household tasks, 388 potential risks; the paper uses 150 episodes after removing 11 unstable tasks).

    The authors position this paper as: a proactive memory framework for benign-goal interactive safety, using executable Meta-Skills to anticipate and mitigate risks, rather than aborting execution like guardrails.

  3. How does the paper address this problem?

    RSG is used to persistently track state, factual rules are triggered by state-intent coupling, Meta-Skill guides mitigation, and test-time evolution proceeds through a Test-Verify-Write loop.

    Overall approach: formalize interactive safety as a binary function of state and intent, and build the Just-In-Time Memory framework that triggers intervention only when state-intent coupling or persistent risk occurs, avoiding over-caution.

    Problem Formalization

    • Under a POMDP, the agent maintains a belief state bt ≈ p(st | o0:t, a0:t−1); the paper instantiates bt as a graph containing object entities, semantic attributes, dynamic unary states, and sparse topological relations.
    • Situational risk: hsit(bt, ãt) = 1[∃ r ∈ ℛsit, r(bt, ãt) = 1], i.e., triggered when the current belief together with the intent about to be executed violates some situational rule; the state conflict must be resolved first before executing the original intent.
    • Temporal risk: htem(bt) = 1[∃ u ∈ 𝒰, u(bt) = 1], a persistently unsafe state constitutes an obligation that must be resolved before task termination, but does not require immediate intervention.

    Working Memory: Risk-Sufficient Topological Belief Graph (RSG)

    • RSG is defined as Gt = (Vt, Et, σt, τ); nodes carry dynamic unary states (e.g., open, toggled_on) and static functional/safety labels (e.g., SAFETY_FLAMMABLE), and edges are the three predicates INSIDE, ONTOP, NEXTTO; the vocabulary is finite and "risk-sufficient", abstracting different instances into unified functional categories.
    • Action-conditioned patch updates are used: seeded by the parameters of executed actions and predicted intents, a k=1 hop local subgraph is taken, and an auxiliary VLM (Qwen3-VL-32B) compares new observations to generate a local patch that is then merged, preserving occluded hazardous states and avoiding full-scene re-parsing.

    Factual Memory: Rule Compilation and Just-in-Time Triggering

    • Offline, GPT-4o compiles 20 abstract safety principles into rules r = ⟨mode, φr, ψr, Vr⟩ (14 situational rules, 6 temporal rules), covering about 80% of the 388 potential risks in IS-Bench; compilation involves three stages—concept alignment, action grounding, and verification synthesis—taking about two GPT-4o batch runs plus about one hour of manual audit.
    • Rules are defined over abstract labels and predicates (rather than concrete instances) and can generalize zero-shot to new object combinations; they trigger deterministically only when the RSG subgraph matches exactly and the predicted intent hits ψr, otherwise remaining dormant to prevent over-caution.

    Episodic Memory and Test-Time Evolution

    • Each rule maintains an experience entry Er = ⟨mr, Br+, Br−⟩; the Meta-Skill mr contains six fields: Purpose, When, How, Grounding, Timing, Constraints; upon triggering, mr and one verified successful case are injected into the planner prompt.
    • Test-Verify-Write loop: after an episode ends, the execution trajectory is programmatically verified using historical RSG snapshots, and the causal segment cr from trigger to resolution is extracted and routed to success/failure buffers (capacity K=3); when a buffer is full or failures recur, the agent itself updates mr by comparing evidence; initial Meta-Skills are bootstrapped from a single verified safe trajectory in a held-out seed set.
    • Evaluation method: directly use IS-Bench's native metrics TS, SS, Pre, Post; the authors state that Pre/Post only roughly correspond conceptually to their situational/temporal risks and are not definitionally equivalent.
  4. What experiments did the paper conduct?

    Testing 5 VLMs on IS-Bench, Ours achieves SS of 48.7% for Qwen3-VL-8B and 66.2% for GPT-4o, with ablations validating the contribution of each module.

    Experimental Setup

    • Models tested: Qwen3-VL-8B, Qwen3-VL-32B, GPT-4o (all three run Vanilla/Safe-CoT/Ours); GPT-5.2 and Gemini-3.1-Pro-Preview run only Vanilla and Safe-CoT as closed-source references.
    • Benchmark: IS-Bench (OmniGibson simulation); of the original 161 tasks, 11 simulation-unstable tasks are removed and 150 episodes are used, containing 388 potential risks.
    • Baselines: Vanilla (original IS-Bench planning prompt), Safe-CoT (global safety prompt + step-by-step safety reasoning).
    • Metrics: TS (task success rate), SS (safe success rate, task completed and all triggered safety goals satisfied), Pre/Post (risk mitigation rate before/after the specified risky action), all per IS-Bench native definitions.
    • Implementation: auxiliary VLM is Qwen3-VL-32B, RSG patches use a 1-hop local region; fixed decoding, single run; the paper does not report the number of repetitions or statistical significance tests.

    Main Results

    According to Table 1 (IS-Bench, %):

    Swipe horizontally to read the table

    ModelMethodTSSSPrePost
    Qwen3-VL-8BVanilla69.318.417.246.2
    Qwen3-VL-8BSafe-CoT57.630.240.061.1
    Qwen3-VL-8BOurs71.348.746.889.4
    Qwen3-VL-32BVanilla70.525.216.776.0
    Qwen3-VL-32BSafe-CoT71.233.332.863.8
    Qwen3-VL-32BOurs76.958.761.594.1
    GPT-4oVanilla77.735.315.472.0
    GPT-4oSafe-CoT71.731.229.572.3
    GPT-4oOurs81.366.270.996.8
    GPT-5.2Vanilla / Safe-CoT78.0 / 74.728.0 / 45.320.6 / 39.371.7 / 77.2
    Gemini-3.1-Pro-PreviewVanilla / Safe-CoT88.0 / 82.025.8 / 46.021.3 / 38.761.3 / 81.3
    • The authors state that Safe-CoT improves safety but over-caution lowers TS, whereas this method improves SS without lowering TS (e.g., on Qwen3-VL-8B, SS improves by +30.3% absolute over Vanilla).
    • The authors state that Qwen3-VL-8B+Ours's SS (48.7%) is higher than that of GPT-5.2 (45.3%) and Gemini-3.1-Pro-Preview (46.0%) with Safe-CoT, suggesting structured memory may be more effective than generic step-by-step safety reasoning.
    • The authors state that gains scale with backbone base capability: Pre for Qwen3-VL-32B and GPT-4o improves by +44.8 and +55.5 percentage points over Vanilla, respectively, versus +29.6 for the 8B model.

    Ablation Experiments (Qwen3-VL-8B, Table 2)

    • Trigger mechanism: replacing with dense retrieval lowers SS to 24.0%, Pre to 26.8%, and TS to 62.0%; the authors state that visual noise in global scene descriptions dilutes local hazard signals and interferes with the planner.
    • Working memory: replacing with full re-parsing at each step lowers SS from 48.7% to 40.0% and Post from 89.4% to 72.3%; the authors attribute this to perceptual forgetting and instability from full-graph reconstruction.
    • Experience format: factual principles only gives SS 28.1%, raw episodic cases only gives SS 21.3% (TS 68.0%), and the full system gives 48.7%; the authors state that the grounding and timing guidance of procedural Meta-Skills is necessary.

    Test-Time Evolution (Figure 2)

    • Setup: 150 episodes split into 60 training and 90 test episodes; every 20 episodes the episodic memory is frozen and re-evaluated on the same test set.
    • Results (Qwen3-VL-8B): initial SS rises slightly from Vanilla's 17.8% to 20.0%, TS drops from 63.3% to 60.0%; after evolving to 60 episodes, SS rises to 42.2%, Pre 50.0%, Post 80.5%, and TS recovers to 64.4%, surpassing the baseline.
    • Authors' interpretation: early Meta-Skill timing is inaccurate (e.g., immediately turning off the faucet), causing TS to drop; evolution learns to delay resolving temporal obligations, ground dynamically, and optimize mitigation action sequences.

    Perception-Augmented Baselines (Table 3, Qwen3-VL-8B)

    • Perception-CoT: SS 20.0%, Pre 17.2%, Post 42.8%; the authors state that unstructured textual descriptions often overlook potential risks.
    • RSG-Augmented (injecting only RSG without episodic memory): SS 28.0%, Pre 19.2%, Post 57.5%; the authors state that even when the agent clearly sees the state, it lacks counterfactual reasoning to anticipate how an intent would trigger risk.

    Other Ablations and Analyses

    • Rule coverage: the 20 compiled rules cover about 80% of the 388 potential risks (Appendix A.2).
    • Inference cost: per-step generation token budget is about 40 for Vanilla, about 140 for Safe-CoT, and 59 planning tokens + 63 auxiliary tokens for Ours (Appendix B.5).
    • Negative result: in early evolution, TS drops from 63.3% to 60.0%, which the authors attribute to improper timing of the initial Meta-Skill.
  5. What are some points that can be further explored?

    The authors note that RSG construction depends on the perception quality of an auxiliary VLM, that the safety ceiling is constrained by the planner's base capability, and propose internalized memory as a future direction.

    Limitations and Future Directions Noted by the Authors

    • RSG perception is unreliable (Appendix D.2): the system relies on an auxiliary VLM to construct the RSG from simulation observations; IS-Bench image quality is limited, and when small objects or fine-grained states are ambiguous, the graph may miss key states or relations, thereby reducing the reliability of rule triggering and verification.
    • Sensitive to the quality of the perception module (Appendix D.2): weaker backbones (e.g., Qwen3-VL-8B) are more prone to perception errors and hallucinated states when performing the same structured memory maintenance; the current system's performance partly depends on a sufficiently reliable external perception module.
    • Constrained by the planner's basic capabilities (Appendix D.2): even when the retrieved Meta-Skill is correct, the planner may still fail to execute due to insufficient basic planning or grounding ability; overall safety success rate is limited by the planner's own capabilities.
    • Future directions (Appendix D.2): reduce reliance on a separate perception–memory pipeline, and explore training a single planner to internalize structured scene memory, risk awareness, and mitigation scheduling into its own parameters.

    Experimental Coverage

    • 5 models were tested in total: Qwen3-VL-8B, Qwen3-VL-32B, and GPT-4o were run with three methods, while GPT-5.2 and Gemini-3.1-Pro-Preview were run only with Vanilla and Safe-CoT (Table 1).
    • Evaluation was conducted only on the IS-Bench simulation benchmark, using 150 episodes after excluding 11 tasks (Appendix C.2).
    • The 20 compiled rules cover approximately 80% of the 388 potential risks; the remaining risks have no applicable rules (Appendix A.2).
    • Main results are a single run with fixed decoding; the paper does not report the number of repetitions, variance, or statistical significance tests (Appendix B.5).
    • The test-time evolution experiment used only Qwen3-VL-8B, with a split of 60 training / 90 test (Sec 5.4).
  6. Summarize the main content of the paper

    Just-In-Time Memory shifts embodied safety from blocking guardrails to proactive mitigation, improving safety success rate on IS-Bench without reducing task progress.

    A proactive safety paper for VLM-driven embodied agents, addressing interactive safety where risks arise dynamically under benign goals.

    • Problem: Existing runtime guardrails trade safety for aborting the task; the authors state this essentially treats safety as task refusal and cannot handle hazards that arise dynamically in semantically neutral tasks.
    • Method: Formalize interactive safety as a binary function of environment state and agent intent (situational risk/temporal risk), and propose the Just-In-Time Memory framework: RSG persistently tracks risk states via action-conditioned patches, factual memory compiles 20 safety principles into rules that can be deterministically triggered by state-intent coupling, and episodic memory injects six-field Meta-Skills to guide how to mitigate and when to resolve; a Test-Verify-Write loop automatically verifies trajectories and evolves Meta-Skills at test time.
    • Results: On IS-Bench, Qwen3-VL-8B's SS rises from Vanilla's 18.4% to 48.7% (TS 71.3% higher than Vanilla's 69.3%); GPT-4o's SS rises from 35.3% to 66.2%, with Post reaching 96.8%; Qwen3-VL-8B+Ours's SS (48.7%) is higher than GPT-5.2 and Gemini-3.1-Pro-Preview with Safe-CoT (45.3%, 46.0%).
    • Ablations: Replacing the trigger mechanism with dense retrieval lowers SS to 24.0%; replacing patch updates with per-step re-parsing lowers Post from 89.4% to 72.3%; factual principles only or episodic cases only are both clearly worse than Meta-Skill (Table 2).
    • Test-time evolution: After 60 episodes of evolution, SS rises from 20.0% to 42.2%, and TS recovers to 64.4%, surpassing the Vanilla baseline (Figure 2).
    • Authors' conclusion: Structured memory-driven just-in-time intervention can resolve the safety-progress trade-off; the authors also note that the system depends on the auxiliary VLM's perception quality and is constrained by the planner's base capability, and that a future direction is to internalize memory and risk awareness into a single planner.
Read originalarxiv.org