Neuro-Symbolic Reinforcement Learning with First-Order Logic

Daiki Kimura, Masaki Ono, Subhajit Chaudhury, Ryosuke Kohita, Akifumi Wachi, Don Joven Agravante, Michiaki Tatsubori, Asim Munawar, Alexander Gray

Introduction

Standard Deep Reinforcement Learning (DRL) faces significant hurdles in data efficiency and interpretability. Agents typically require millions of trials to master simple tasks, and their decision-making logic remains buried within opaque "black box" neural weights. This lack of transparency hinders trust and verification in critical real-world applications. Researchers from IBM have proposed a novel framework that bridges this gap by combining the reasoning capabilities of First-Order Logic (FOL) with the learning efficiency of neural networks.

Architecture: The FOL-LNN Framework

The core of the proposed method is a system that translates natural language observations into a structured logical format suitable for reasoning.

The FOL-LNN architecture: Natural language observations are converted into logical facts and processed by a Logical Neural Network to determine actions.

The architecture consists of two primary stages:

  1. FOL Converter: This module uses a semantic parser to extract entities and actions from text observations. It incorporates ConceptNet, an external common-sense knowledge graph, to categorize objects (e.g., identifying "north" as a direction-type). This allows the agent to reason about classes of objects rather than specific instances, significantly reducing the state space.
  2. Logical Neural Network (LNN): Unlike traditional neural networks, LNNs are composed of differentiable nodes representing logical operators like AND, OR, and NOT. This structure allows the network to be trained via standard backpropagation while maintaining a strictly logical and interpretable internal state.

Experimental Evaluation

The framework was tested using TextWorld, specifically the Coin-Collector game. The environment generates text-based maps with varying difficulty levels (Easy, Medium, Hard) based on the number of distractor rooms. Agents were trained on small maps (level 5) and evaluated on their ability to generalize to much larger, unseen maps (up to level 25).

Key Results and Generalization

The proposed FOL-LNN method demonstrated superior performance compared to several baselines, including standard LSTM-DQN++ and the Neural Logic Machine (NLM-DQN).

Performance comparison on unseen games: FOL-LNN (red) achieves maximum reward and minimum steps significantly faster than baselines.
  • Rapid Convergence: In the most challenging "Hard" settings, FOL-LNN reached a perfect reward score (1.0) within 1,000 epochs. Baselines like LSTM-DQN++ failed to solve the task, while NLM-DQN achieved only partial success.
  • Zero-Shot Generalization: By learning abstract logical rules (e.g., "If a room is unvisited, move there"), the agent successfully navigated maps five times larger than those encountered during training without further fine-tuning.
  • Interpretable Policies: Because the LNN is built from logic gates, the resulting policy can be directly translated into human-readable rules. For instance, the agent's movement strategy can be decomposed into explicit rules for exploration and backtracking.

Conclusion and Future Directions

By integrating First-Order Logic into the reinforcement learning loop, the FOL-LNN framework achieves both high data efficiency and unprecedented interpretability. While currently dependent on the accuracy of text parsers, future work aims to extend this logic-based reasoning to visual domains and explore automated predicate discovery, further reducing the need for predefined logical structures.

Summary updated

BibTeX
@inproceedings{kimura2021neuro,
  author = {Daiki Kimura and Masaki Ono and Subhajit Chaudhury and Ryosuke Kohita and Akifumi Wachi and Don Joven Agravante and Michiaki Tatsubori and Asim Munawar and Alexander Gray},
  title = {{Neuro-Symbolic Reinforcement Learning with First-Order Logic}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.283},
}
Figure