Large Language Models (LLMs) are used to drive robotic manipulation and planning, yet deploying them on physical systems exposes risks, including jailbreak attacks that induce unsafe behavior. Existing inference-time defenses are mostly evaluated on short instructions with a single hazard. Real tasks may mix safe and unsafe sub-tasks, or combine individually safe actions into an unsafe outcome. For such compound instructions, a single safety decision either misses the hazard or rejects the whole instruction. We introduce safe task completion, a task that requires an LLM-powered robot to refuse the harmful part of an instruction while completing its legitimate part. To address this, we propose RuleGraph, a multi-agent Graph-of-Rules framework that verifies safety at multiple stages rather than relying on a single one. Five agents ground safety principles into world-specific rules, judge each sub-task in context, and derive a safe goal from the legitimate ones. Planning toward this goal is organized as a graph in which each node handles its assigned rules. Candidate plans are verified and aggregated level by level until one plan satisfies every rule. We evaluate RuleGraph on pure-attack and compound instructions from two benchmarks, measuring Attack Success Rate (ASR) and Task Success Rate (TSR). RuleGraph reaches 0% ASR on both benchmarks and highest TSR among all methods, with 98.57% on the RoboGuard benchmark and 83.51% on our long-horizon compound instructions.
翻译:暂无翻译