[Paper Review] Reward Tweaking: Maximizing the Total Reward While Planning for Short Horizons
This paper proposes reward tweaking, a method that learns a surrogate reward function to enable reinforcement learning agents to achieve optimal performance on finite-horizon total reward tasks even when trained with short-horizon discounted objectives. By framing reward learning as a max-margin classification problem between trajectories, the approach improves performance across all feasible discount factors, including γ=0.99, boosting Hopper-v2 performance by +6% on average.
In reinforcement learning, the discount factor $γ$ controls the agent's effective planning horizon. Traditionally, this parameter was considered part of the MDP; however, as deep reinforcement learning algorithms tend to become unstable when the effective planning horizon is long, recent works refer to $γ$ as a hyper-parameter -- thus changing the underlying MDP and potentially leading the agent towards sub-optimal behavior on the original task. In this work, we introduce \emph{reward tweaking}. Reward tweaking learns a surrogate reward function $ ilde r$ for the discounted setting that induces optimal behavior on the original finite-horizon total reward task. Theoretically, we show that there exists a surrogate reward that leads to optimality in the original task and discuss the robustness of our approach. Additionally, we perform experiments in high-dimensional continuous control tasks and show that reward tweaking guides the agent towards better long-horizon returns although it plans for short horizons.
Motivation & Objective
- To address the gap between training with discounted objectives and evaluation on undiscounted total rewards in reinforcement learning.
- To mitigate sub-optimal behavior caused by insufficient planning horizons due to low discount factors (Blackwell sub-optimality).
- To enable agents trained under γ-discounted objectives to still achieve optimal behavior on the original finite-horizon total reward task.
- To design a method that learns a surrogate reward function that preserves optimality for the original task while being compatible with standard RL algorithms.
- To improve sample efficiency and performance in high-dimensional continuous control tasks where standard algorithms fail due to poor discount factor selection.
Proposed method
- The method learns a surrogate reward function $\tilde{r}$ that, when optimized under a γ-discounted objective, leads to policies optimal for the original total reward objective.
- Reward learning is formulated as a supervised classification problem, specifically finding a max-margin separator between high-return and low-return trajectories.
- The surrogate reward is trained using partial trajectories sampled from the environment, with loss computed over entire trajectory segments to capture long-term return differences.
- The approach is theoretically grounded in showing the existence of such a surrogate reward that induces optimal behavior under the original task objective.
- The method is evaluated in both tabular and high-dimensional continuous control settings, including the Hopper-v2 environment.
- The surrogate reward is trained offline using offline experience, enabling reuse across multiple policy training runs without additional environment interaction.
Experimental results
Research questions
- RQ1Can a surrogate reward function be learned such that optimizing it under a γ-discounted objective leads to optimal behavior on the original finite-horizon total reward task?
- RQ2How does reward tweaking perform across different discount factors, especially in the region of Blackwell sub-optimality (γ < 0.99)?
- RQ3Can the method improve performance on high-dimensional continuous control tasks like Hopper-v2, where standard algorithms struggle due to instability or short planning horizons?
- RQ4Does the max-margin formulation for reward learning lead to more robust and generalizable surrogate rewards compared to baseline methods?
- RQ5To what extent does reward tweaking reduce the performance gap between the discounted training objective and the undiscounted evaluation metric?
Key findings
- Reward tweaking improves average performance on the Hopper-v2 environment by approximately 6%, increasing the return from ~3200 to ~3400 at γ=0.99.
- The method achieves better performance across all feasible discount factors (γ ≤ 0.99), particularly mitigating the sub-optimality caused by short planning horizons.
- Performance variance increases as γ decreases, indicating that learning the surrogate reward becomes more challenging with shorter horizons.
- In the tabular setting, the learned surrogate rewards exhibit dense, informative signals that are easier for RL algorithms to learn from, as confirmed by visualization.
- Reward tweaking enables agents to achieve optimal behavior on the original total reward task even when the training objective uses a suboptimal discount factor.
- The method does not resolve training instability at high γ values (>0.99), but effectively addresses the more widespread issue of Blackwell sub-optimality in the low-γ regime.
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.