TL;DR
This paper introduces a safety framework for robotic task planning that combines Large Language Models (LLMs) with a dynamic, Graphormer-based "spatio-semantic safety graph." By continuously evaluating spatial proximity and contextual risks in real time, the system allows robots to autonomously detect unforeseen hazards and adaptively replan their actions, moving far beyond the limitations of rigid, static safety rules.
What Problem Does This Paper Address?
While LLMs excel at generating high-level step-by-step instructions for robots (e.g., "walk to kitchen, gather ingredients, start cooking"), they lack a structured understanding of physical space and real-time environmental hazards.
Traditionally, roboticists have relied on formal frameworks like Linear Temporal Logic (LTL) to enforce safety. LTL uses predefined rules, such as "only use a knife on a cutting board." However, these static rules suffer from two fatal flaws:
- Lack of spatial perception: An LTL rule doesn't know if a toddler is suddenly reaching for that knife.
- Poor scalability: It is practically impossible to manually write out rules for every single hazardous scenario a robot might encounter in an open-world home environment.
When unexpected risks emerge, LLM-only planners fail to notice them, and rule-based systems fail to adapt. This paper tackles the challenge of giving robots low-latency, context-aware hazard perception so they can proactively alter their plans when safety is threatened.
Methods
The authors propose GGTP (Graphormer-Guided Task Planning), a framework consisting of three main components:
- Spatio-Semantic Safety Graph ($G = (V, E)$): The environment is modeled as a graph where nodes ($V$) represent entities (objects, humans, robots) and edges ($E$) represent their relationships. An LLM is initially used to annotate semantic risk levels (low, medium, high) and reasons for interactions between objects (e.g., a baby near a hot kettle is high risk). This semantic risk is multiplied by a spatial proximity score to create a dynamic danger score.
- Graphormer for Live Risk Detection: A Graphormer architecture—a type of graph neural network based on Transformers—is trained to process this safety graph. It uses self-attention mechanisms to weigh structural and semantic features simultaneously, outputting the probability of an edge becoming hazardous during task execution. Because dangerous situations are rare in everyday life, the authors utilize a focal loss function to handle severe data imbalance.
- Adaptive Task Replanning: If the Graphormer detects a high-risk edge during execution, it triggers an immediate alert. The system interrupts the robot's current plan and queries the LLM planner with the updated graph context to generate a safe, revised task sequence.
Datasets
The framework was evaluated inside AI2-THOR, a simulated 3D environment for indoor robotics.
- Environment Setup: The authors used 120 diverse household environments spanning kitchens, living rooms, bedrooms, and bathrooms.
- Risk Injection: To simulate real-world dangers, they manually introduced human agent nodes (like children or pets) near hazardous items (stoves, knives) in half of the test scenes.
- Data Split: 90 training samples, 15 validation samples, and 15 test samples.
Key Insights and Ideas
- The Power of Graph-Based Attention: Standard Graph Neural Networks (GNNs) aggregate local neighborhoods, but Graphormer leverages global attention with spatial encodings. This allows the robot to quickly correlate distant but relevant entities—such as a child moving across a room toward an active oven.
- Overcoming the 1% Problem: In the dataset, hazardous edges constitute only 1% of the total graph edges. A naive model predicting "everything is safe" would achieve 99% accuracy while being entirely useless. Implementing focal loss allowed the model to prioritize these rare, hard-to-classify safety risks effectively.
- Semantic + Spatial Fusion: Pure geometry (distance) isn't enough to define risk, nor is pure semantics. A baby near a toy is safe; a baby near a knife is dangerous. Fusing these two vectors into edge encodings is what enables flexible safety compliance.
Key Results
The authors evaluated their framework against LLM-only baselines and LLM+LTL (static rule) systems across simple, intermediate, and complex tasks.
- Risk Detection Trade-off: By setting a decision threshold of 0.21, the Graphormer model achieved a 91.39% Recall rate (successfully capturing over 90% of true hazards) while filtering out 70% of false positives.
- Complex Task Performance: In complex cooking scenarios involving dynamic hazards:
- LLM-Only achieved a 0% Safety Notice Rate (SNR) and only a 10% Risk Handling Success (RHS) rate.
- LLM + Static Rules (LTL) achieved 100% SNR but suffered a low Task Success Rate (60%) because rigid rules often caused the planner to freeze or fail.
- LLM + Graphormer (Ours) achieved a 92.5% Task Success Rate, a 100% Safety Notice Rate, and a 95.0% Risk Handling Success rate.
- Computational Efficiency: The safety notice module takes roughly 1.19 seconds to process. The authors note that the majority of the system's latency stems from waiting for the LLM to generate text sequences, rather than the risk detection itself, making the Graphormer component highly viable for online deployment.
Limitations and Future Work
While GGTP shows a clear advantage over static rules, the authors point out two main areas for improvement:
- Static Spatial Perception: The current model evaluates spatial risk based on instantaneous snapshots. Future iterations will extend this to a temporal framework, allowing the robot to predict human trajectories and anticipate hazards before they happen.
- Simulation Limits: The current dataset is constrained to a subset of objects within AI2-THOR. The authors plan to expand the environment with a broader variety of interactive, safety-critical objects and release a benchmark dataset specifically for hazardous factor perception.
Summary updated