Skip to content
Robotics.world

Research

Safe Task Planning with Long-Term Graph Memory for Embodied Agents

LLM- and VLM-based robot planners can generate reasonable task plans, but they often lack awareness of physical hazards, especially when the dangerous object is occluded or outside the robot’s…

The paper’s first page · arXiv:2609.08444
arXiv
2609.08444 · Preprint · not peer-reviewed
Published
2026-09-08
Authors
Siyuan Li, Taiyan Lang, Aoqi Yan, Jia Yu, Feifan Liu, Yihan Du, Yu Zheng, Xun Wang, Peng Liu

In plain words

LLM- and VLM-based robot planners can generate reasonable task plans, but they often lack awareness of physical hazards, especially when the dangerous object is occluded or outside the robot’s current egocentric view.

AI summary

Overview

  • Research area: Robotics and embodied AI, specifically safe high-level task planning with LLM/VLM-based planners.
  • Technical level: Advanced.
  • Scope: The paper proposes SafeMem, a framework that maintains a long-term object-centric graph memory so an embodied agent can detect hazards outside its current view and replan before executing unsafe actions.

What This Paper Is About

LLM- and VLM-based robot planners can generate reasonable task plans, but they often lack awareness of physical hazards, especially when the dangerous object is occluded or outside the robot’s current egocentric view. SafeMem addresses this by building and continuously updating a graph of previously seen objects and their relationships, then using that memory to predict whether a candidate action is unsafe and to trigger replanning with an explanation. The goal is to improve both task success and safe success in simulated and real-world embodied tasks.

Key Contributions

  1. Long-term graph memory for partial observability: A safe task-planning framework that represents the environment as an object-centric semantic graph and preserves safety-critical information even when objects are occluded or out of view.
  2. Iterative risk prediction and replanning: An LLM-based risk predictor uses the graph memory, task instruction, and candidate action to detect hazards, emits a REPLAN signal with an explanation, and sends the plan back to the VLM planner.
  3. Conservatism-modulated control: A conservative factor η ∈ [0, 1] controls the probability that the planner follows the REPLAN signal, intended to avoid deadlock between the risk predictor and planner.
  4. Simulation and real-robot evidence: Experiments on the IS-Bench benchmark under partial and full observability, plus a 7-dof Franka Panda robotic arm, show improved safe success rates over VLM-driven baselines.

Main Findings

  • Partial observability on IS-Bench: SafeMem achieved an average Success Rate (SR) of 0.79 and Safe Success Rate (SSR) of 0.59. The best baseline SSR was 0.17 for CoT; SaP reached 0.13, Base reached 0.00, and the SafeMem variant without graph memory reached 0.21.
  • Per hazard category under partial observability: SafeMem reached SSR values of 0.67 for electric shock, 0.50 for fire hazard, 0.67 for falling hazard, and 0.50 for food contamination. Its corresponding SR values were 0.67, 0.50, 1.00, and 1.00.
  • Full observability on IS-Bench: SafeMem reached an average SR of 0.88 and SSR of 0.67. SafeMem without graph memory reached SR 0.92 and SSR 0.42; CoT reached SR 0.88 and SSR 0.21; Base reached SR 0.79 and SSR 0.21; SaP reached SR 0.88 and SSR 0.13.
  • Real-world robot results: On a 7-dof Franka Panda arm, averaged over 10 runs, SafeMem achieved SR 1.0 and SSR 1.0 in all four task categories: electric shock, fire hazard, falling hazard, and food contamination. Baseline SSRs were mostly 0.0 or 0.1; SafeMem without graph memory reached SSR 0.3 on the electric task and 0.0 on the other three.
  • Graph memory ablation: Replacing graph memory with full history produced SR 0.58 and SSR 0.13; RAG produced SR 0.79 and SSR 0.38; object-list memory produced SR 0.88 and SSR 0.17. The graph memory achieved SR 0.79 and SSR 0.59, indicating that graph relationships matter more for safety than a longer or less structured memory.
  • Component ablation: Removing graph memory reduced SSR to 0.21; removing invisible-object retention reduced SSR to 0.21; removing action-aware edge update reduced SSR to 0.38. The full SafeMem configuration reached SSR 0.59.
  • Conservatism factor: With η = 0.8, SafeMem had SR 0.79, SSR 0.59, and 0.35 safety violations (6/17). With η = 1, it had SR 0.79, SSR 0.67, and 0.18 safety violations (3/17). The paper notes that η = 1 can lead to higher latency.
  • Hazard-free tasks: SafeMem achieved an average SR of 0.82, compared with 0.76 for Base and 0.88 for CoT, suggesting that the risk predictor does not introduce unnecessary replanning.
  • Qualitative example: In the Cooking Tofu task, a saucepot placed on the stove occluded a flammable paper towel. SafeMem recalled the paper towel’s hazardous relationship with the stove from graph memory and replanned to remove the paper towel first.
  • Deferred implementation details: The paper states that prompt details, skill set, task settings, hyperparameters, average token counts, and average latency are in Appendix B; the specific token and latency values are not reported in the provided text.

Methodology in Plain English

The problem is framed as a partially observable Markov decision process. At each timestep, the robot receives an egocentric RGB-D observation, holds a natural-language task instruction, and chooses from a predefined set of high-level skills. Evaluation follows IS-Bench with a task goal and a safety goal expressed in BDDL predicates; SR measures task completion, and SSR measures completing the task while satisfying safety.

SafeMem represents the environment as a graph whose nodes are object instances and whose edges are semantic relationships. Each node stores an instance ID, bounding box, mask, and class label. Edges use a closed relationship set including ON, IN, ABOVE, NEAR, ATTACHED TO, PART OF, and HOLDING. For graph construction, Gemini 2.5 flash proposes objects and relationships from the RGB image, while SAM 2.0 produces masks through grid-based sampling. The two outputs are aligned by bounding-box IoU, nodes with low IoU are discarded, duplicate masks are trimmed, and each remaining node receives an ID. Relationships in a calculable subset, such as ON, IN, and NEAR, are refined using depth: pixels are back-projected into 3D points with the camera intrinsics, and the resulting 3D bounding boxes are used to correct the edges.

Across timesteps, the new graph is merged with the previous graph. Nodes are matched by mask IoU using bipartite matching with a threshold τ. Matched nodes keep their persistent identity and are updated with new geometry and labels; unmatched new nodes are added; unmatched old nodes are retained rather than deleted, which helps with occlusion and out-of-view objects. Edges are updated from the new graph, edges involving invisible objects are preserved, and edges that cannot be correctly inferred after interaction are pruned. The action semantics are also used to update edges, for example by adding an IN edge after an object is placed into a container.

At planning time, the graph memory and a candidate action are passed to an LLM-based risk predictor. The graph is simplified by omitting bounding boxes and masks while keeping object semantics and relationships. If a hazard is detected, the risk predictor emits REPLAN and explains the hazard-related nodes. The VLM planner then generates a new action, and the loop repeats until no REPLAN signal is produced. The conservative factor η determines the probability that the planner follows the REPLAN signal. The planner and risk predictor were implemented with GPT-4o, and the baselines were also implemented with GPT-4o for comparison.

Why This Matters

This work highlights a gap in VLM-driven robot planning: strong semantic reasoning does not guarantee physical risk awareness, especially when hazards are not currently visible. By making memory an explicit graph rather than relying on long context or unstructured history, SafeMem offers a practical design pattern for safety-aware embodied agents. It also provides evidence that structured relationships, not just object lists, are important for hazard prediction.

Real-world applications include:

  • Home service robots: Avoiding electrical, fire, and falling hazards while cooking, cleaning, or watering plants.
  • Assistive robots: Operating in cluttered homes where dangerous objects may be occluded or temporarily out of view.
  • Food-handling and kitchen automation: Tracking contamination risks across multi-step tasks.
  • Industrial or laboratory automation: Maintaining awareness of hazards around equipment, containers, and previously observed obstacles.

For industry, the approach is relevant to teams building robot foundation models, VLM-based planners, or safety layers for embodied agents. It suggests that a separate memory and risk-prediction module can improve safety without retraining the underlying VLM, and it provides a benchmark comparison on IS-Bench plus a real robot deployment.

Future Directions

  • Handling unseen hazards: SafeMem assumes hazards appear in historical or current observations. Extending it to infer risks from broader physical context, hidden objects, or implicit environmental dynamics remains open.
  • Replacing probabilistic conservatism: The paper notes that in more safety-critical scenarios, a halting fallback should replace the probabilistic η mechanism.
  • Reducing latency: The η = 1 setting improves safety but is reported to increase latency, so efficient risk prediction and replanning are practical next steps.
  • Broader generalization: Testing across more environments, object vocabularies, and task domains would clarify how well the graph memory and closed-set relationships transfer beyond IS-Bench and the reported real-world setup.

Target Audience

This paper is most useful for robotics and embodied-AI researchers working on LLM/VLM task planning, safe autonomy, and long-horizon memory. It also benefits engineers building safety layers for robot manipulation systems, and safety researchers interested in how structured memory can address partial observability in physical environments.

Authors’ abstract

Large language models (LLMs) and vision-language models (VLMs) have significantly advanced zero-shot task planning for embodied agents. However, most LLM- and VLM-driven methods struggle to generate safe high-level actions due to a lack of physical risk awareness, particularly under partial observability, where hazards lie outside the immediate field of view. To address this challenge, we propose a novel safe task-planning framework, SafeMem, which constructs and maintains a…

The full abstract on arXiv
Read the original paper

Related papers