Learning Intrinsic Symbolic Rewards in Reinforcement Learning

Hassam Sheikh, Shauharda Khadka, Santiago Miret, Somdeb Majumdar

TL;DR

The paper introduces Learned Intrinsic Symbolic Rewards (LISR), a framework that discovers dense reward functions in the form of low-dimensional, human-readable symbolic trees rather than complex, black-box neural networks. By combining evolutionary algorithms with standard reinforcement learning, LISR successfully trains agents in sparse-reward environments while offering a level of interpretability crucial for safety-critical applications.

What Problem Does This Paper Address?

Deep Reinforcement Learning (RL) has achieved remarkable success, but it heavily relies on dense rewards—frequent feedback from the environment telling the agent how well it is doing. In many real-world scenarios, however, rewards are sparse (e.g., an agent only gets a reward when it completely solves a maze).

To fix this, researchers either hand-engineer dense surrogate rewards using domain expertise, or train auxiliary neural networks (like Curiosity modules) to generate internal rewards. Hand-engineering is tedious and can inadvertently change the optimal policy, while neural network reward generators act as high-dimensional black boxes with thousands of parameters, making them impossible for humans to interpret or debug.

LISR addresses this gap by automatically discovering dense rewards that are both effective for training and simple enough to be represented as basic mathematical formulas.

Methods

LISR introduces a hybrid architecture that runs two populations of learners in parallel: Evolutionary Algorithm (EA) learners and Symbolic Regression (SR) learners.

Figure 2: LISR: EA (bottom) and SR (top) learners share a common replay buffer. A set of symbolic trees sample observations from this buffer and map them into scalar re- wards. SR learners also sample the same observations and the corresponding reward to train using policy gradients. The champion policy (circled) is selected by ranking all policies, EA and SR, based on a fitness function.
  1. Symbolic Reward Trees: Each SR learner possesses a symbolic tree where nodes represent basic mathematical or logical operators (such as add, sin, max, or gate). This tree maps the agent's raw observations to a scalar intrinsic reward.
  2. Policy Gradient Training: Standard off-policy RL algorithms—specifically Soft Actor-Critic (SAC) for continuous tasks and Maxmin DQN for discrete tasks—use these generated symbolic rewards to optimize the agent's neural network policy.
  3. The Shared Replay Buffer: Crucially, all experiences from both the EA and SR populations are pooled into a single, shared replay buffer. This allows SR learners to sample diverse experiences, evaluate them through their symbolic trees, and update policy parameters via gradient descent.
  4. Evolutionary Selection: At the end of each generation, all policies are evaluated on the environment's actual sparse objective (the fitness function). The best-performing policies and symbolic trees are selected, undergoing crossover and mutation to seed the next generation.

Datasets

The authors evaluated LISR across a diverse suite of standard RL benchmarks spanning continuous control, discrete gaming, and multi-agent environments:

  • Continuous Control: Four environments from the MuJoCo benchmark (HalfCheetah-v2, Ant-v2, Hopper-v2, and Swimmer-v2).
  • Discrete Control (Pygame): PixelCopter and Catcher.
  • Discrete Control (Atari): Amidar and LunarLander.
  • Multi-Agent/Discrete: Google Research Football, testing specific scenarios of varying difficulty (Run to Score, Empty Goal, and 3 vs 1 with Keeper).

Key Insights and Ideas

  • Interpretability via Sparsity: By restricting the symbolic trees to a depth of just three operational layers, the discovered reward functions remain incredibly compact. For example, in the PixelCopter environment, LISR found a highly effective reward function using only 22 operations, contrasting sharply with a standard Curiosity module requiring 5,634 parameters.
  • Code Unrolling: Because the rewards are symbolic trees, they can be directly unrolled into standard Python code. This allows engineers to inspect, debug, and mathematically verify the reward structure.
  • Synergy of EA and RL: Pure symbolic regression struggles to scale on its own. However, by pairing it with an evolutionary population and a shared replay buffer, LISR extracts maximal information from environment interactions, allowing gradient-based RL to thrive on purely intrinsic signals.

Key Results

LISR consistently outperformed contemporary baselines, including pure EA, pure SR, and the widely used Intrinsic Curiosity Module (ICM):

  • MuJoCo & Atari: LISR substantially outperformed the baselines in 3 out of 4 MuJoCo environments and all discrete Atari/Pygame tasks.
  • Curiosity Comparison: The neural-network-based Curiosity baseline struggled significantly in continuous control tasks, whereas LISR successfully scaled to solve them.
  • Google Research Football: Even without access to the environment's hand-crafted dense rewards during training, LISR discovered competitive strategies that performed closely to IMPALA, a state-of-the-art distributed RL framework optimized with dense rewards.

Limitations and Future Work

The primary drawback of LISR is its sample efficiency. Because the framework must search through a massive combinatorial space of symbolic mathematical structures using evolutionary algorithms, it requires significantly more environment frames to converge compared to standard RL algorithms that are fed pre-defined dense rewards.

To mitigate this bottleneck, the authors suggest that future work should explore more structured search mechanisms, such as Monte-Carlo Tree Search (MCTS), or implement early-stopping criteria to halt the symbolic search once a sufficiently performant reward function has been identified.

Summary updated

BibTeX
@inproceedings{sheikh2022learning,
  author = {Hassam Sheikh and Shauharda Khadka and Santiago Miret and Somdeb Majumdar},
  title = {{Learning Intrinsic Symbolic Rewards in Reinforcement Learning}},
  booktitle = {IJCNN},
  year = {2022},
  doi = {10.1109/ijcnn55064.2022.9892256},
}
Figure