NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On the Role of Discount Factor in Offline Reinforcement Learning

Hao Hu, Yiqin Yang, Qianchuan Zhao, Chongjie Zhang

Introduction

Offline reinforcement learning (RL) aims to learn optimal policies from static, pre-collected datasets without any further environment interaction. The primary hurdle in this domain is distributional shift: an agent might encounter state-action pairs not present in the training data, leading to over-optimistic value estimations and catastrophic failure during deployment.

To combat this, researchers typically develop complex "conservative" algorithms that penalize uncertainty or constrain the learned policy to stay close to the data-collection policy. However, this paper investigates whether the humble discount factor ($\gamma$)—a standard parameter in RL—can provide a simpler, natural mechanism for conservatism. While its role in online RL is well-documented (controlling the effective planning horizon), its specific impact on the unique challenges of the offline setting has remained largely under-explored.

This research demonstrates that carefully tuning $\gamma$ serves two critical roles: regularization and pessimism. By adjusting this single parameter, researchers can achieve performance gains comparable to complex state-of-the-art conservative methods, particularly in regimes with limited or noisy data.

Theoretical Mechanisms

The authors provide a rigorous theoretical treatment using Linear MDPs to characterize how $\gamma$ influences performance, identifying two distinct mechanisms:

  1. Regularization Effect: The paper proves that a lower $\gamma$ reduces the complexity of the potential optimal policy class. This acts as a regulator, trading off theoretical optimality for better sample efficiency. The authors derive a suboptimality bound showing that while a lower $\gamma$ introduces bias (short-sightedness), it significantly reduces variance in value estimation.
  2. Pessimistic Effect: Perhaps the most surprising finding is the mathematical equivalence between learning with a lower $\gamma$ and model-based pessimism. Maximizing a value function with a reduced discount factor is shown to be equivalent to optimizing performance against the "worst-case" transition models within a specific confidence set.

Key Insights

  • The "Sweet Spot" for $\gamma$: There is a clear trade-off. A high $\gamma$ (e.g., 0.99) is theoretically optimal but overfits to noisy data. A low $\gamma$ (e.g., 0.8) is too short-sighted. The optimal $\gamma^*$ often lies around 0.95 for many offline tasks.
  • Pessimism for Free: Lowering $\gamma$ provides a "coarse" form of pessimism. While it doesn't account for uncertainty as precisely as ensemble-based methods, it is remarkably effective and requires no additional computational overhead.
  • Data-Dependent Tuning: The optimal discount factor is not universal; it depends heavily on the dataset. Smaller or poorly covered datasets require a lower $\gamma$ to maintain stability.
  • Synergy with Regularization: In algorithms like TD3+BC, tuning $\gamma$ provides a more flexible trade-off than tuning the policy regularization parameter ($\alpha$) alone.

Empirical Results

The study utilizes a mix of synthetic and standard benchmarks, including Tabular MDPs, D4RL tasks (like Walker2d, Hopper, and Halfcheetah), and custom "noised" D4RL datasets to simulate small data regimes. The empirical results strongly support the theoretical claims:

Reduced Estimation Error: In tabular experiments, lowering $\gamma$ significantly decreased the gap between estimated and true Q-values as dataset noise increased or coverage decreased.

Estimation error of BCQ and Q-Learning in random MDPs. Star shapes mark the minima.

Performance Boost in Low-Data Regimes: On noised D4RL tasks, simply changing $\gamma$ from 0.99 to 0.95 allowed standard algorithms to achieve stable, high performance where they previously failed. Standard SAC (an online algorithm) with a tuned $\gamma$ even outperformed some specialized offline RL algorithms that used a fixed $\gamma=0.99$.

Scaling with Data Size: The authors found that as the number of trajectories in the dataset increases, the optimal $\gamma^*$ shifts closer to the true evaluation discount factor ($\gamma_e = 0.99$).

Optimal discount factor vs. number of trajectories for Walker2d.

Limitations and Future Work

The authors acknowledge that the pessimism provided by a lower $\gamma$ is "coarse"—it is a single scalar that affects all state-action pairs equally, regardless of their individual uncertainty. This explains why it sometimes falls short of state-of-the-art methods that use fine-grained, ensemble-based uncertainty estimates.

Future directions include developing fine-grained discount factor control, where $\gamma$ could vary depending on the specific state or transition, and integrating $\gamma$-tuning more deeply into the design of new offline RL architectures.

Summary updated

BibTeX
@inproceedings{hu2022role,
  author = {Hao Hu and Yiqin Yang and Qianchuan Zhao and Chongjie Zhang},
  title = {{On the Role of Discount Factor in Offline Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=mSDS6cT2NM},
}
Figure