TL;DR
LogicGuard is a modular actor–critic framework that pairs large language model (LLM) planners with an LLM critic that communicates through formal Linear Temporal Logic (LTL) constraints. By translating trajectory criticisms into machine-checkable symbolic rules, an online verifier blocks invalid, unsafe, or inefficient actions before execution. This closes the loop between natural language reasoning and formal verification, boosting task completion on household tasks by 25% and enabling agents to reliably conquer complex, multi-stage goals like mining a diamond in Minecraft.
What Problem Does This Paper Address?
While LLMs can generate impressive single-step plans, long-horizon decision-making in embodied environments remains a struggle. In partially observable, dynamic domains (such as robotics or interactive games), early planning errors compound. Agents routinely get stuck in repetitive loops, violate action preconditions (e.g., trying to mine iron ore with bare hands), or wander aimlessly.
Recent "LLM-as-a-judge" approaches use language models to critique and evaluate actions in natural language, but they operate as unverified, stochastic black boxes that frequently contradict themselves or hallucinate. Conversely, classical formal verification methods require labor-intensive manual rule authoring. LogicGuard bridges this divide by using an LLM to automatically synthesize verifiable LTL rules from past mistakes.
Methods
LogicGuard operates as a model-agnostic wrapper around any off-the-shelf LLM planner (such as InnerMonologue or SayCan) via a two-timescale actor–critic loop:
[Trajectory History] ──> [LLM Critic (o3-mini)] ──> [New LTL Rules]
│
[Environment State] ──> [LLM Actor (GPT-4.1)] ──> [Action] ──> [LTL Verifier] ──> [Execute / Replan]
- Online Actor Loop: At each timestep, the LLM actor proposes an abstract action. An online verifier built on the SPOT model-checking library checks the action against current LTL constraints using Büchi automata. If the action is permitted, it executes; if blocked, the actor receives natural language feedback explaining the violation and is prompted to choose a valid alternative.
-
Offline Critic Loop: After rollouts, an LLM critic analyzes the trajectory to synthesize reactive LTL constraints of the form: $$\mathcal{G}(\phi_{\text{state}} \implies \mathcal{X}(\phi_{\text{action}}))$$ Rules are generated from three sources: environmental feedback/errors, graph-based efficiency analysis (detecting useless or looped actions), and overconstrained state detection (relaxing conflicting rules when no valid action exists).
-
Graph Traversal Representation: Planning is framed as finding a shortest path across a bipartite graph of symbolic states and state-action pairs, where the critic’s constraints prune invalid edges.
Datasets & Benchmarks
The framework was evaluated across two contrasting domains:
- BEHAVIOR-100: A benchmark of 100 short-horizon household tasks (average horizon: 14.6 steps) in simulated domestic environments (via the iGibson API). Here, atomic propositions (APs) capturing object states, spatial relations, and robot hand status were automatically generated.
- Minecraft (Diamond-Mining): A long-horizon, specialist challenge requiring an agent to execute nine hierarchical subgoals without intermediate rewards (from punching logs to crafting pickaxe tiers, smelting ore, and mining diamond blocks) using the Mineflayer API and hand-engineered APs.
Key Insights and Ideas
- LTL as a Machine-Checkable Medium: Rather than relying on fuzzy natural language critiques, forcing the critic to output formal LTL guarantees zero ambiguity at execution time.
- Grounded Rule Generation Bounds Hallucinations: By restricting the critic to synthesize rules only for state conditions actually observed in the trajectory, the authors mathematically bound the number of possible generated rules to the trajectory length ($N$) and precisely quantify policy shifts via KL-divergence.
- Why Pure LLM Judges Fall Short: In ablation experiments replacing the symbolic verifier with an LLM judge, the LLM misinterpreted rules in 11.6% to 12.5% of cases—often directly contradicting its own reasoning (e.g., agreeing that all preconditions are met, yet marking the action as infeasible), triggering deadlocks or catastrophic variance.
Key Results
- BEHAVIOR-100 Household Tasks: LogicGuard elevated the task completion rate of the baseline InnerMonologue planner from 47% to 72% (a 25% absolute improvement).
- Minecraft Diamond Challenge:
- SayCan: The baseline SayCan agent repeatedly got stuck exploring and failed entirely (0/5 success rate). Adding LogicGuard prevented premature exploration and enabled 100% (5/5) success (averaging 45.4 primitives).
- InnerMonologue: LogicGuard boosted success from 4/5 to 5/5 while delivering a 23% efficiency gain, cutting down the average required primitive actions from 45.5 to 35.8.
- Safety: Environmental action failures dropped significantly from 23% down to 4.5%.
Limitations and Future Work
- Sensitivity to Atomic Proposition Design: LogicGuard’s rule expressivity depends heavily on its atomic propositions. Automated generation currently struggles with combinatorial permutations (e.g., assigning four specific plates across four boxes).
- Restricted Logic Fragment: The critic is currently constrained to reactive single-step temporal transitions ($\mathcal{G}(\phi_s \implies \mathcal{X}(\phi_a))$) rather than arbitrary multi-step temporal formulas.
- Future Directions: The authors plan to integrate expert demonstration learning, incorporate predictive environment models to enable time-evolving constraints for multi-agent coordination, and deploy the verifier on physical robots using smaller, local LLMs.
Summary updated