Introduction
Standard reinforcement learning (RL) often struggles with reward sparsity. In complex tasks like writing a computer program or performing multi-digit addition, an agent must execute a long, precise sequence of actions to receive any reward at all. To find these rare rewards, most RL algorithms rely on "undirected exploration," typically through entropy regularization. This approach essentially encourages the agent to maintain uncertainty and try random paths. However, in high-dimensional spaces, wandering randomly is highly inefficient.
To address this, researchers introduce UREX (Under-appreciated Reward Exploration), a policy gradient variant that replaces undirected exploration with a directed strategy. By identifying and over-weighting action sequences where the reward exceeds the model's current expectations, UREX successfully solves complex algorithmic tasks that have previously stumped pure reinforcement learning methods.
Methodology: The UREX Approach
UREX proposes a hybrid objective that combines two mathematical goals:
- Mode Seeking (Standard REINFORCE): Maximizing the expected reward, which is standard in RL.
- Mean Seeking (RAML): Ensuring the policy distribution covers all high-reward regions.
The core innovation is the concept of under-appreciated rewards. An action sequence is considered "under-appreciated" if its log-probability under the current policy is significantly lower than the reward it actually produced.
UREX utilizes Self-Normalized Importance Sampling to draw samples from the current policy and re-weight them. Samples that yielded high rewards but had low predicted probability receive a massive boost in the gradient update. This forces the model to calibrate its probabilities to match observed rewards, effectively pulling the policy toward successful but previously ignored trajectories. Crucially, UREX is easy to implement, requiring only minor modifications to the classic REINFORCE algorithm and a softmax operation over rewards.
Unlike entropy regularization, which is "blind" and often requires manual decay schedules, UREX is adaptive. As the policy improves and begins to assign high probabilities to high-reward sequences, the importance weights stabilize, naturally reducing exploration as it nears the optimal policy.
Experimental Results
The authors evaluated UREX on six algorithmic tasks, five of which are from the OpenAI Gym (Copy, DuplicatedInput, RepeatCopy, Reverse, ReversedAddition) and one custom task (BinarySearch).
UREX demonstrated remarkable capabilities across these benchmarks:
- Solving Addition: UREX is the first pure RL method—using only reward feedback and no supervised "gold" sequences—to solve the multi-digit addition task.
- Extreme Generalization: A policy trained on addition problems with at most 33 digits successfully generalized to numbers with 2,000 digits with zero mistakes.
- Superior Performance: On the most difficult tasks (Reverse, ReversedAddition, and BinarySearch), UREX consistently found the optimal solution where standard REINFORCE and Q-learning failed or were highly inconsistent.
- Hyperparameter Robustness: UREX proved significantly more robust to learning rate and temperature settings than baseline methods, making it highly practical for real-world use.
Interestingly, in the Binary Search task, the agents learned a hybrid strategy rather than a perfect logarithmic search: they used binary search logic to narrow the range and then switched to a linear search once the range was small enough.
Limitations and Future Work
While UREX represents a significant step forward, it has a few limitations:
- Computational Complexity: The importance sampling step requires multiple trajectories per update to be effective, which can increase computational costs.
- Sub-optimal Algorithm Discovery: The agent's failure to learn a pure binary search suggests that future reward signals might need to incorporate "efficiency" (speed of execution) alongside "correctness" to encourage truly optimal algorithms.
- Episodic Constraint: The current formulation is designed for episodic rewards received at the end of a sequence. Adapting this directed exploration to per-step rewards in continuous environments remains an open area for future research.
Summary updated