Abstract: It is notoriously difficult to control the behavior of reinforcement learning agents. Agents often learn to exploit the environment or reward signal and need to be retrained multiple times. The multi-objective reinforcement learning (MORL) framework separates a reward function into several objectives. An ideal MORL agent learns to generalize to novel combinations of objectives allowing for better control of an agent's behavior without requiring retraining. Many MORL approaches use a weight vector to parameterize the importance of each objective. However, this approach suffers from lack of expressiveness and interpretability. We propose using propositional logic to specify the importance of multiple objectives. By using a logic where predicates correspond directly to objectives, specifications are inherently more interpretable. Additionally the set of specifications that can be expressed with formal languages is a superset of what can be expressed by weight vectors. In this paper, we define a formal language based on propositional logic with quantitative semantics. We encode logical specifications using a recurrent neural network and show that MORL agents parameterized by these encodings are able to generalize to novel specifications over objectives and achieve performance comparable to single objective baselines.
Introduction
Controlling the behavior of reinforcement learning (RL) agents is a persistent challenge. Standard RL relies on a single scalar reward signal, which often leads to agents exploiting reward functions in unintended ways. Multi-Objective Reinforcement Learning (MORL) offers a solution by decomposing rewards into a vector of distinct objectives. Traditionally, these objectives are combined using linear scalarization—assigning a weight vector to balance priorities. However, this method lacks interpretability and expressivity, as simple weights cannot easily capture complex logical relationships like "achieve A or B, but avoid C."
This paper proposes a framework that replaces weight vectors with propositional logic specifications. By encoding these logical instructions into a neural network, the authors create agents capable of zero-shot generalization to entirely new instructions at test time, providing a more precise and intuitive control mechanism.
Methodology
The proposed approach bridges formal logic and deep learning through three main components:
- Formal Language with Quantitative Semantics: The authors define a version of propositional logic where operations map to real numbers [0, 1]. For instance, AND ($\wedge$) operations use the minimum of objectives, while OR ($\vee$) operations use the maximum.
- Logical Specification Encoding: A three-layer bidirectional Gated Recurrent Unit (GRU) processes logic strings (e.g.,
o1 & (o2 | o3)) to create a semantic vector embedding representing the instruction's meaning. - Universal Value Function Approximators (UVFA): The agent's policy is conditioned on both the environment state and the logical encoding. This allows a single Deep Q-Network (DQN) to generalize across different logical goals provided at runtime.
To facilitate learning complex instructions, the authors employ Curriculum Learning, gradually increasing the complexity of logical formulae during training to stabilize convergence.
Experimental Setup
The framework was evaluated in a custom Grid-World Navigation Environment. Agents balanced up to six objectives, such as staying on a "road," avoiding "hazards," and moving in specific directions. The training set included 50,000 random logical formulae, with 100 novel specifications held out to test zero-shot generalization capabilities.
Key Results and Discussion
The experimental results demonstrate that the logical agent achieves performance parity with baseline DQN models trained on specific single tasks, even when facing unseen test specifications.
Key findings include:
- Zero-Shot Generalization: The GRU encoder learns the underlying "grammar" of the logic, allowing the agent to interpret and follow novel combinations of objectives without additional training.
- Semantic Understanding: T-SNE visualizations revealed that the encoder groups semantically equivalent instructions (like
A ∧ BandB ∧ A) closely in the vector space, despite different string representations. - Curriculum Impact: As shown in the performance curves, curriculum learning significantly reduces variance and is crucial for convergence on complex tasks compared to a "no curriculum" baseline.
- Linear Compatibility: When given instructions that could be represented by simple weights, the logical agent performed just as well as traditional linear MORL agents, proving logic is a strict upgrade over weight vectors.
Conclusion
This work demonstrates that propositional logic is a powerful and interpretable alternative to weight vectors in MORL. While currently limited to "stateless" propositional logic, future work aims to incorporate Linear Temporal Logic (LTL) for sequential tasks and integrate Large Language Models to translate natural language instructions into these formal specifications. This approach marks a significant step toward more controllable and generalizable RL agents.
Summary updated