A Framework for Following Temporal Logic Instructions with Unknown Causal Dependencies

Duo Xu, Faramarz FekriarXiv 2022 · DOI

Abstract

This paper introduces a neuro-symbolic hierarchical framework designed to enable reinforcement learning (RL) agents to execute complex instructions specified in Linear Temporal Logic (LTL) within environments containing unknown causal dependencies. By integrating Inductive Logic Programming (ILP) with Hierarchical Reinforcement Learning (HRL), the agent learns a symbolic transition model of the environment's "world rules." This model allows for high-level planning that satisfies both user-defined goals and latent environmental constraints. Experimental results across various domains demonstrate significant improvements in training efficiency and generalization compared to model-free baselines.

Introduction

Reinforcement Learning agents are increasingly expected to follow human instructions. While natural language is intuitive, researchers often use formal languages like Linear Temporal Logic (LTL) because they provide clear, compositional semantics for complex tasks (e.g., "Visit the red room, then the blue room, but never enter the green room").

However, a major gap exists: unknown causal dependencies. A user might give an instruction without knowing the environment's physical constraints. For example, if a robot is told to "Enter the kitchen," but the kitchen door is locked, the robot must realize it needs to find a key first. Most existing LTL-based RL methods assume these "world rules" are either known or provided within the LTL formula. When they aren't, standard RL agents struggle with the resulting long-horizon planning and sparse rewards.

Proposed Framework

The authors propose a two-stage hierarchical framework that bridges the gap between high-level instructions and low-level environmental constraints. The system architecture involves an interplay between a symbolic transition model and a task-specific automaton.

Overview of the neuro-symbolic hierarchical framework for LTL instruction following.

1. Learning the Symbolic Transition Model ($\Phi$)

The agent first collects data using random high-level actions. It uses Inductive Logic Programming (ILP)—specifically via "logic neural networks"—to learn the preconditions and effects of symbolic operators (actions). Unlike previous works that use simple propositions, this model uses predicates (e.g., hasKey(C), On(X, Y)), allowing it to reason about relationships between objects.

Data pipeline for learning the symbolic transition model using logic neural networks.

2. Hierarchical Planning and Execution

  • High-Level Planning: The LTL instruction is converted into a Finite State Automaton (FSA). The agent then constructs a Product MDP, which is essentially a search graph combining the FSA (what the user wants) and the learned symbolic model (how the world works). It uses logic value iteration to find an optimal sequence of subtasks.
  • Low-Level Execution: The agent uses Goal-Conditioned RL (GCRL)—specifically Soft Actor-Critic with Hindsight Experience Replay (SAC-HER)—to train atomic skills (controllers) that execute the subtasks identified by the high-level planner.

Experimental Evaluation

The framework was evaluated on three distinct domains designed to test causal reasoning:

  • Room Domain: A discrete grid where the agent must navigate rooms, pick up colored keys, and unlock matching doors to satisfy temporal visit requirements.
  • Reacher Domain: A 2D continuous space where a two-link arm must visit colored balls in specific orders, with hidden "must-visit-A-before-B" constraints.
  • Block Stacking: A 3D continuous environment (simulated in PyBullet) where a robot arm must stack blocks, involving complex preconditions like gripper status and block clearance.

Key Insights and Results

  • Bridging the Instruction Gap: The agent doesn't just follow the LTL; it uses the LTL as a skeleton and fills in the "missing" causal steps (like grabbing a key) by planning over its learned symbolic model.
  • Superior Training and Generalization: In all three domains, the proposed framework reached a high success rate much faster than model-free Q-learning and Reward Machine baselines. When faced with brand-new LTL instructions, the framework generalized more than 5x faster than the model-free baseline because it only needed to re-plan the high-level path using its existing knowledge of world "physics."
  • Handling Complexity: The system successfully handled "Recursive" LTL tasks, which involve the most complex logical structures, where baselines almost entirely failed.

Conclusion

By combining symbolic reasoning with deep reinforcement learning, this framework allows agents to navigate environments with hidden rules. Future work aims to address the "symbolic bottleneck" by learning the mapping from raw pixels to symbolic atoms directly, further increasing the autonomy of the system.

Summary updated

BibTeX
@misc{xu2022framework,
  author = {Duo Xu and Faramarz Fekri},
  title = {{A Framework for Following Temporal Logic Instructions with Unknown Causal Dependencies}},
  year = {2022},
  eprint = {2204.03196},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.03196},
}
Figure