Abstract
Large language models (LLMs) have shown promise in zero-shot and single step reasoning and decision making problems, but in long horizon sequential planning tasks, their errors compound, often leading to unreliable or inefficient behavior. We introduce LogicGuard, a modular actor-critic architecture in which an LLM actor is guided by a trajectory level LLM critic that communicates through Linear Temporal Logic (LTL). Our setup combines the reasoning strengths of language models with the guarantees of formal logic. The actor selects high-level actions from natural language observations, while the critic analyzes full trajectories and proposes new LTL constraints that shield the actor from future unsafe or inefficient behavior. LogicGuard supports both fixed safety rules and adaptive, learned constraints, and is model-agnostic: any LLM-based planner can serve as the actor, with LogicGuard acting as a logic-generating wrapper. We formalize planning as graph traversal under symbolic constraints, allowing LogicGuard to analyze failed or suboptimal trajectories and generate new temporal logic rules that improve future behavior. To demonstrate generality, we evaluate LogicGuard across two distinct settings: short-horizon general tasks and long-horizon specialist tasks. On the Behavior benchmark of 100 household tasks, LogicGuard increases task completion rates by 25% over a baseline InnerMonologue planner. On the Minecraft diamond-mining task, which is long-horizon and requires multiple interdependent subgoals, LogicGuard improves both efficiency and safety compared to SayCan and InnerMonologue. These results show that enabling LLMs to supervise each other through temporal logic yields more reliable, efficient and safe decision-making for both embodied agents.
Introduction
While Large Language Models (LLMs) excel at isolated reasoning tasks, they often struggle with long-horizon planning in dynamic, embodied environments like Minecraft or household robotics. In these settings, small errors—such as violating a precondition or repeating a redundant action—compound over time, leading to catastrophic failure or extreme inefficiency. Existing hybrid frameworks often rely on manually designed verifiers or unstructured natural language feedback, which are either difficult to scale or too ambiguous for reliable execution.
LogicGuard addresses this by bridging the reasoning flexibility of LLMs with the formal guarantees of symbolic logic. By employing a trajectory-level LLM critic that communicates via Linear Temporal Logic (LTL), LogicGuard provides a machine-checkable "shield" that prevents an actor from repeating past mistakes.
Methodology: The LogicGuard Framework
LogicGuard utilizes a two-timescale architecture that separates immediate execution from long-term reflection. This modular system consists of three primary components:
- Online Actor Loop: An LLM-based planner (e.g., GPT-4.1) selects high-level actions based on natural language observations from the environment.
- Symbolic Verifier: Before any action is executed, it is checked against a set of LTL constraints. If an action violates a "law," the verifier blocks it and provides immediate feedback, forcing the actor to replan.
- Offline Critic Loop: Periodically, a second LLM (the critic, e.g., o3-mini) reviews past trajectories stored in a memory buffer. It identifies failures or inefficiencies and synthesizes new LTL constraints to prevent those specific mistakes in the future.
The core innovation is using LTL as the communication protocol between the critic and the actor. Unlike natural language, LTL is formal and enforceable. The critic generates these laws based on three triggers: environmental feedback (errors), graph-based efficiency analysis (spotting redundant steps), and the detection of "overconstrained" states where existing rules have become too restrictive.
Experimental Results
LogicGuard was evaluated on two distinct benchmarks to test its generalist and specialist capabilities:
- Behavior-100: In this dataset of 100 diverse household tasks in the iGibson simulator, LogicGuard increased task completion rates by 25% (from 47% to 72%) compared to the InnerMonologue baseline.
- Minecraft (Diamond-mining): In this long-horizon task requiring complex tool-chaining, LogicGuard reduced the number of primitive actions needed by approximately 23%. Furthermore, safety significantly improved, with failed actions dropping from 23% to just 4.5%.
These results demonstrate that LogicGuard is model-agnostic; it can enhance the performance of various existing LLM planners (like SayCan or InnerMonologue) by acting as a logic-generating wrapper that "learns" guardrails from experience.
Discussion and Conclusion
LogicGuard demonstrates that enabling LLMs to supervise each other through formal logic yields more reliable and efficient decision-making. However, the system is currently limited by the expressivity of its atomic propositions, which may struggle with highly complex combinatorial tasks. Future work will explore leveraging expert trajectories to help the critic imitate optimal behavior and incorporating more dynamic mathematical models of the environment to evolve LTL laws over time. By combining the intuitive reasoning of LLMs with the rigorous constraints of temporal logic, LogicGuard moves embodied agents closer to autonomous, consistent long-term planning.
Summary updated