Agnostic Q-learning with Function Approximation in Deterministic Systems: Tight Bounds on Approximation Error and Sample Complexity

Simon S. Du, Jason D. Lee, Gaurav Mahajan, Ruosong WangarXiv 2020

Abstract

This paper addresses the problem of agnostic $Q$-learning with function approximation in deterministic systems, where the optimal $Q$-function is approximable by a function class $\mathcal{F}$ with an approximation error $\delta \ge 0$. We introduce a novel recursion-based algorithm and demonstrate that if $\delta = O(\rho/\sqrt{\dim_E})$, where $\rho$ is the action gap and $\dim_E$ is the Eluder dimension of $\mathcal{F}$, the optimal policy can be identified using only $O(\dim_E)$ trajectories. This result suggests that the condition $\delta = \widetilde{\Theta}(\rho/\sqrt{\mathrm{dim}_E})$ is both necessary and sufficient for polynomial sample complexity, effectively settling a long-standing open problem regarding the sample complexity of agnostic $Q$-learning in deterministic environments.

Introduction

In modern Reinforcement Learning (RL), $Q$-learning serves as a fundamental framework for value-based control. To scale to high-dimensional state spaces, researchers rely on function approximation—using models like linear functions or neural networks to represent the $Q$-function. However, most theoretical guarantees assume a "well-specified" setting, where the true optimal $Q$-function ($Q^*$) is contained perfectly within the chosen function class.

In practice, we often face the agnostic setting, where the function class can only approximate $Q^*$ with some inherent error $\delta > 0$. Until now, it remained unclear whether efficient $Q$-learning was possible in this setting without requiring an exponential number of samples. This paper provides the first provably efficient algorithm for agnostic $Q$-learning in deterministic systems, establishing tight bounds on both approximation error and sample complexity.

The Problem: Bridging the Agnostic Gap

The core challenge in agnostic RL is "error amplification." In a deterministic system, a small approximation error at one step can propagate and grow as the agent plans over a long horizon. A seminal question posed by Wen and Van Roy in 2013 asked: Can we design a Q-learning algorithm for deterministic systems that is robust to approximation error while maintaining polynomial sample complexity?

This research answers that question by analyzing the relationship between the approximation error $\delta$ and the optimality gap $\rho$—the difference in value between the best action and the second-best action. If the error is too large relative to this gap, the agent may never be able to distinguish the optimal path from suboptimal ones.

Methodology: Recursion and Uncertainty

The authors propose a novel recursion-based algorithm designed for episodic deterministic systems. The algorithm's efficiency stems from a Maximum Uncertainty Oracle, which governs the balance between exploration and exploitation through three main mechanisms:

  1. Uncertainty Quantification: For any given state, the algorithm queries the oracle to determine if the current dataset can accurately predict the optimal $Q$-value for all actions. This is measured by the potential disagreement between different functions in the class $\mathcal{F}$ that fit the observed data.
  2. Recursive Exploration: If the uncertainty is high, the algorithm does not rely on its current predictor. Instead, it triggers a recursive Explore(s) call. Because the system is deterministic, the algorithm can visit the state and build a dataset of exact $Q^*$ values by rolling out trajectories and applying the Bellman equation.
  3. Least Squares Prediction: If the uncertainty is low, the algorithm utilizes a least-squares predictor. The deterministic nature of the environment allows the algorithm to treat these predictions as reliable ground truth for future steps.

To generalize beyond linear models, the authors utilize the Eluder dimension ($\dim_E$). This metric captures the complexity of the function class by measuring how many samples are required to learn a function's behavior across the entire state space.

Key Insights and Theoretical Results

The Error-Gap Tradeoff

The most significant theoretical contribution is the derivation of a tight condition for efficiency: $\delta = O(\rho / \sqrt{\text{dim}_E})$. This result establishes that to recover the optimal policy, the approximation error must be inversely proportional to the square root of the function class complexity. The authors prove this is a necessary and sufficient condition; if the error exceeds this threshold, any algorithm would require an exponential number of trajectories to succeed.

Sample Complexity and Independence

The algorithm finds the exact optimal policy using $O(\text{dim}_E)$ trajectories. Notably, this sample complexity is independent of the size of the action space $|A|$. This suggests that the approach is potentially viable for environments with very large or even continuous action spaces, provided the Eluder dimension remains manageable.

Extension to Stochastic Rewards

While the transitions are deterministic, the authors extended their analysis to handle stochastic rewards. In this variation, the sample complexity scales with $\text{poly}(\text{dim}_E, H) / \rho^2$, where $H$ is the planning horizon. This demonstrates the robustness of the recursive approach even when the feedback signal is noisy.

Conclusion

By providing an upper bound that matches known lower bounds, this work settles the complexity of agnostic $Q$-learning in deterministic systems. It formalizes the "error amplification" phenomenon, showing that an approximation error of $\delta$ effectively grows by a factor of $\sqrt{\text{dim}_E}$ during the learning process.

While the assumption of deterministic transitions is a limitation, many high-stakes environments—such as robotics in controlled settings or complex strategy games—fit this profile. Future research will likely focus on whether these tight agnostic bounds can be extended to fully stochastic Markov Decision Processes (MDPs), which remains one of the most difficult frontiers in reinforcement learning theory.

Summary updated

BibTeX
@misc{du2020agnostic,
  author = {Simon S. Du and Jason D. Lee and Gaurav Mahajan and Ruosong Wang},
  title = {{Agnostic Q-learning with Function Approximation in Deterministic Systems: Tight Bounds on Approximation Error and Sample Complexity}},
  year = {2020},
  eprint = {2002.07125},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.07125},
}
Figure