[Paper Review] Encoding formulas as deep networks: Reinforcement learning for zero-shot execution of LTL formulas
This paper proposes a reinforcement learning agent that uses a compositional recurrent neural network to encode and execute any unseen Linear Temporal Logic (LTL) formula in zero-shot fashion. By structuring the network according to LTL syntax and training end-to-end, the agent generalizes across diverse, unseen formulas in symbolic and Minecraft-like environments with high accuracy, achieving 97% on Symbol and 73% on Craft domains for out-of-distribution formulas.
We demonstrate a reinforcement learning agent which uses a compositional recurrent neural network that takes as input an LTL formula and determines satisfying actions. The input LTL formulas have never been seen before, yet the network performs zero-shot generalization to satisfy them. This is a novel form of multi-task learning for RL agents where agents learn from one diverse set of tasks and generalize to a new set of diverse tasks. The formulation of the network enables this capacity to generalize. We demonstrate this ability in two domains. In a symbolic domain, the agent finds a sequence of letters that is accepted. In a Minecraft-like environment, the agent finds a sequence of actions that conform to the formula. While prior work could learn to execute one formula reliably given examples of that formula, we demonstrate how to encode all formulas reliably. This could form the basis of new multitask agents that discover sub-tasks and execute them without any additional training, as well as the agents which follow more complex linguistic commands. The structures required for this generalization are specific to LTL formulas, which opens up an interesting theoretical question: what structures are required in neural networks for zero-shot generalization to different logics?
Motivation & Objective
- To enable reinforcement learning agents to execute any unseen LTL formula without prior exposure, achieving zero-shot generalization.
- To integrate symbolic reasoning (LTL) with data-driven perception and control via a structured neural network architecture.
- To develop a multi-task learning framework where a single agent learns to compose policies for a vast, diverse set of LTL formulas.
- To investigate the feasibility and performance of end-to-end training with co-trained feature extractors and LTL controllers.
- To explore the theoretical limits of neural network architectures for zero-shot generalization across logical formalisms.
Proposed method
- The agent uses a structured, compositional recurrent neural network where each LTL operator and predicate is represented by a sub-network with learnable recurrent states.
- Sub-networks are connected hierarchically according to the syntactic tree of the LTL formula, with state propagation between parents and children via linear layers.
- The feature extraction network is co-trained end-to-end with the LTL controller to map environmental observations into relevant features for action prediction.
- The root node’s hidden state is decoded into a distribution over actions, enabling policy learning via reinforcement learning.
- A diverse, hard-to-solve LTL formula generation mechanism ensures training covers a broad distribution of temporal and spatial constraints.
- The model is trained on thousands of formulas and tested on novel, unseen formulas to evaluate zero-shot generalization.
Experimental results
Research questions
- RQ1Can a single neural network architecture generalize to execute any unseen LTL formula without fine-tuning or per-formula pre-training?
- RQ2What architectural components are essential for zero-shot generalization in temporal logic execution?
- RQ3How does the number of training formulas affect zero-shot performance on out-of-distribution LTL formulas?
- RQ4Can end-to-end training of a compositional network with co-trained perception and control achieve reliable execution across diverse environments?
- RQ5What is the minimal inductive bias required in neural networks to generalize across logical structures like LTL?
Key findings
- The model achieves 97% accuracy on unseen LTL formulas in the Symbol domain and 73% in the Craft domain, demonstrating strong zero-shot generalization.
- With 10,000 training formulas, the model generalizes to out-of-distribution formulas with 90% accuracy in the Symbol domain, improving from 65% at 1,000 formulas.
- Performance on unseen formulas improves logarithmically with training data, with an R² of 0.99 for a logarithmic fit, predicting near-100% accuracy at ~24,000 formulas.
- Abllation studies show that removing the compositional structure reduces performance to ~66%, proving its necessity for generalization.
- The model generalizes effectively to longer formulas and novel maps, even when both the formula and environment are unseen at training time.
- The method outperforms baselines significantly, with every component of the architecture contributing critically to performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.