<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Uncertainty-Aware Reward-Free Exploration with General Function Approximation</title></titleStmt>
			<publicationStmt>
				<publisher>International Conference on Machine Learning</publisher>
				<date>07/21/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10530214</idno>
					<idno type="doi"></idno>
					
					<author>Junkai Zhang</author><author>Weitong Zhang</author><author>Dongruo Zhou</author><author>Quanquan Gu</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Mastering multiple tasks through exploration and learning in an environment poses a significant challenge in reinforcement learning (RL). Unsupervised RL has been introduced to address this challenge by training policies with intrinsic rewards rather than extrinsic rewards. However, current intrinsic reward designs and unsupervised RL algorithms often overlook the heterogeneous nature of collected samples, thereby diminishing their sample efficiency. To overcome this limitation, in this paper, we propose a reward-free RL algorithm called GFA-RFE. The key idea behind our algorithm is an uncertaintyaware intrinsic reward for exploring the environment and an uncertainty-weighted learning process to handle heterogeneous uncertainty in different samples. Theoretically, we show that in order to find an ϵ-optimal policy, GFA-RFE needs to collect O(H 2 log N F (ϵ) dim(F )/ϵ 2 ) number of episodes, where F is the value function class with covering number N F (ϵ) and generalized eluder dimension dim(F ). Such a result outperforms all existing reward-free RL algorithms. We further implement and evaluate GFA-RFE across various domains and tasks in the DeepMind Control Suite. Experiment results show that GFA-RFE outperforms or is comparable to the performance of state-of-the-art unsupervised RL algorithms.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Deep reinforcement learning (RL) has been the source of many breakthroughs in games (e.g., Atari game <ref type="bibr">(Mnih et al., 2013)</ref> and Go game <ref type="bibr">(Silver et al., 2016)</ref>) and robotic control <ref type="bibr">(Levine et al., 2016)</ref> over the last ten years. A key com-ponent of RL is exploration, which requires the agent to explore different states and actions before finding a nearoptimal policy. Traditional exploration strategy involves iteratively executing a policy guided by a specific reward function, limiting the trained agent to solving only the single task for which it was trained. Designing an efficient exploration strategy agnostic to reward functions is crucial, as it prevents the agent from repeated learning under different reward functions, thereby avoiding inefficiency and potential intractability in sample complexity. To achieve this goal, <ref type="bibr">Jin et al. (2020a)</ref> introduced a twophase RL framework known as "reward-free exploration" (RFE) for the basic tabular MDP setting. In this framework, the agent only interacts with the environment in the first phase without reward. Upon receiving the specific reward in the second phase, the algorithm returns a near-optimal policy without further interactions. The overall framework is displayed in Figure <ref type="figure">1</ref>. A series of subsequent works extended the idea to more complex settings, such as linear MDPs <ref type="bibr">(Wang et al., 2020;</ref><ref type="bibr">Zanette et al., 2020;</ref><ref type="bibr">Wagenmaker et al., 2022;</ref><ref type="bibr">Hu et al., 2022)</ref> and linear mixture MDPs <ref type="bibr">(Zhang et al., 2021b;</ref><ref type="bibr">Chen et al., 2021;</ref><ref type="bibr">Zhang et al., 2023)</ref>. RFE diverges from classical RL approaches by not relying on a specific reward function for exploration. Instead, RFE utilizes an "intrinsic reward", a.k.a., pseudo-reward function, defined based on all previously explored samples. This encourages the agent to venture into unexplored states and actions. In particular, in the realm of deep RL where no structural assumptions are made, recent studies <ref type="bibr">(Pathak et al., 2017;</ref><ref type="bibr">Burda et al., 2018b;</ref><ref type="bibr">Eysenbach et al., 2018;</ref><ref type="bibr">Lee et al., 2019;</ref><ref type="bibr">Pathak et al., 2019;</ref><ref type="bibr">Liu &amp; Abbeel, 2021a;</ref><ref type="bibr">b)</ref> have developed RFE (a.k.a., unsupervised RL) algorithms by employing various intrinsic reward functions, demonstrating promising performance in finding the near-optimal policy. Despite the success of intrinsic reward functions in facilitating RFE, the design of these functions in prior studies could be further optimized. For example, <ref type="bibr">Kong et al. (2021)</ref> defined an intrinsic reward based on the maximum difference between function pairs that show similarity in past data. This approach essentially treats each collected sample equally. It is a well-established principle in RL that in order to achieve optimal sample efficiency, different samples should be treated distinctively based on their importance. Notably, <ref type="bibr">Zhang et al. (2023)</ref> utilized variance-dependent weights to address the heteroscedasticity observed in samples, thereby achieving optimal sample complexity in linear mixture MDPs. However, this approach calculates its intrinsic reward by nested iterative optimization, which hampers computational efficiency and practical applicability. Therefore, for RFE or more generally unsupervised RL, we are faced with the following question:</p><p>Is it possible to craft an intrinsic reward function that excels both theoretically and empirically?</p><p>We answer the above question affirmatively by proposing a variance-adaptive intrinsic reward for RFE. Theoretically, we show that our method enjoys a finite sample complexity in finding the near-optimal policy for any given reward, and our theoretical guarantee is tighter than existing methods. Empirically, we show that by incorporating variance information, a series of existing reward-free RL baselines can be further improved in terms of sample efficiency. The main contributions of our work can be summarized as follows.</p><p>&#8226; We propose a new algorithm GFA-RFE under the RFE framework. The key innovation of GFA-RFE is a new intrinsic reward, which depends on an uncertainty estimation of each past state-action pair that appeared during the exploration phase. Our designed intrinsic reward relies more on observed samples with lower uncertainty, and it encourages the agent to explore states and actions with larger uncertainty. Intuitively speaking, such a strategy ensures the agent to find samples that are universally suitable for all reward functions that it may encounter during the planning phase, without knowing the extrinsic rewards in hindsight.</p><p>&#8226; Theoretically, we prove that during the planning phase, given any reward function r, GFA-RFE achieves an O(H 2 log N F (&#1013;) dim(F )/&#1013; 2 ) sample complexity to find the &#1013;-optimal policy w.r.t. the reward r, where F is the value function class with covering number N F (&#1013;) and generalized eluder dimension dim(F ). Our sample complexity outperforms the existing sample complexity result achieved by <ref type="bibr">Kong et al. (2021)</ref> (see Table <ref type="table">1</ref>), which verifies our claim that an adaptive intrinsic reward improves exploration efficiency.</p><p>&#8226; We also show that our variance-adaptive intrinsic reward can efficiently explore the environment in practice through extensive experiments on the DeepMind Control Suite <ref type="bibr">(Tassa et al., 2018)</ref>. Our theory-guided algorithm GFA-RFE exhibits compatible or superior performance compared with the state-of-the-art unsupervised exploration methods. This promising result demonstrates the huge potential of incorporating the theories into practice to solve real-world problems.</p><p>Notation We denote by <ref type="bibr">[n]</ref> the set {1, &#8226; &#8226; &#8226; , n}. For two positive sequences {a n } and {b n } with n = 1, 2, &#8226; &#8226; &#8226; , we write a n = O(b n ) if there exists an absolute constant C &gt; 0 such that a n &#8804; Cb n holds for all n &#8805; 1, write a n = &#8486;(b n ) if there exists an absolute constant C &gt; 0 such that a n &#8805; Cb n holds for all n &#8805; 1, and write</p><p>and &#8486;(&#8226;) to further hide the polylogarithmic factors.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Related Work</head><p>Reinforcement learning with general function approximation. RL with general function approximation has been widely studied in recent years, due to its ability to describe a wide range of existing RL algorithms. To explore the theoretical limits of RL and understand the practical DRL algorithms, various statistical complexity measurements for general function approximation have been proposed and developed. For instance, Bellman rank <ref type="bibr">(Jiang et al., 2017)</ref>, Witness rank <ref type="bibr">(Sun et al., 2019)</ref>, eluder dimension <ref type="bibr">(Russo &amp; Van Roy, 2013)</ref>, Bellman eluder dimension <ref type="bibr">(Jin et al., 2021)</ref>, Decision-Estimation Coefficient (DEC) <ref type="bibr">(Foster et al., 2021)</ref>, Admissible Bellman Characterization <ref type="bibr">(Chen et al., 2022c)</ref>, generalized eluder dimension <ref type="bibr">(Agarwal et al., 2022)</ref>, etc. Among different statistical complexity measurements, <ref type="bibr">Foster et al. (2021)</ref> showed a DEC-based lower bound of regret which holds for any function class. Specifically, our algorithm falls into the category of generalized eluder dimension function class, which includes linear MDPs <ref type="bibr">(Jin et al., 2020b)</ref> as its special realization.</p><p>Reward-free exploration. Unlike standard RL settings where the agent interacts with the environment with reward signals, reward-free exploration <ref type="bibr">(Jin et al., 2020a)</ref> in RL in- </p><p>troduced a two-phase paradigm. In this approach, the agent initially explores the environment without any reward signals. Then, upon receiving the reward functions, it outputs a policy that maximizes the cumulative reward, without any further interaction with the environment.</p><p>Jin et al. (2020a) first achieved O(H 5 S 2 A/&#1013; 2 ) sample complexity in tabular MDPs by executing exploratory policy visiting states with probability proportional to its maximum visitation probability under any possible policy. Subsequent works (Kaufmann et al., 2021; M&#233;nard et al., 2021) proposed algorithms RF-UCRL and RF-Express to gradually improve the result to O H 3 S 2 A&#1013; -2 . The optimal sample complexity bound O(H 2 S 2 A&#1013; -2 ) was achieved by algorithm SSTP proposed in Zhang et al. (2020), which matched the lower bound provided in Jin et al. (2020a) up to logarithmic factors. Recent years have witnessed a trend of reward-free exploration in RL with function approximations, while most of these works are considering linear function approximation: in the linear MDP setting, Wang et al. (2020) propose an exploration-driven reward function and the minimax optimal bound was achieved by Hu et al. (2022) by introducing the weighted regression in the algorithm. In linear mixture MDPs, Zhang et al. (2021c) proposed the 'pseudo reward' to encourage exploration, Chen et al. (2021); Wagenmaker et al. (2022) improved the sample complexity by introduc-ing a more complicated, recursively defined pseudo reward. The minimax optimal sample complexity, O(d 2 /&#1013; 2 ) was achieved by Zhang et al. (2023) in the horizon-free setting. Moving forward, in the general function approximation setting, Kong et al. (2021) used 'online sensitivity score' to estimate the information gain thus providing a O(d 4 H 6 &#1013; -2 ) sample complexity where d is the dimension of contexts when reduced to linear function approximations. Yet another line of works (Chen et al., 2022a;b) aimed to follow the Decision-Estimation Coefficient (DEC, Foster et al. 2021) and provided a unified framework for reward-free exploration with general function approximations, achieving a O(ploy(H)d 2 &#1013; -2 ), nevertheless, all existing works with general function approximations leave a huge gap between their proposed upper bound and lower bound, even when reduced to linear settings. We record existing results in Table 1. Unsupervised reinforcement learning. Witnessing recent advancements in unsupervised CV and NLP tasks, unsupervised reinforcement learning has emerged as a new paradigm trying to learn the environment without supervision or reward signals. As suggested in Laskin et al. (2021), these works are mainly separated into two lines: unsupervised representation learning in RL and unsupervised behavioral learning. Unsupervised representation learning in RL mainly addresses issues on how to learn good representations for different states s, which can facilitate efficient learning of a policy &#960;(a|s). From the theoretical side, a list of works have identified how to select or learn good representations for various RL tasks with linear function approximations, by using MLE <ref type="bibr">(Uehara et al., 2021)</ref>, contrastive learning <ref type="bibr">(Qiu et al., 2022)</ref> or model selection <ref type="bibr">(Papini et al., 2021;</ref><ref type="bibr">Zhang et al., 2021a)</ref>. From the empirical side, various methods in unsupervised learning or self-supervised learning are applied to RL tasks, including contrastive learning <ref type="bibr">(Laskin et al., 2020;</ref><ref type="bibr">Stooke et al., 2021;</ref><ref type="bibr">Yarats et al., 2021a)</ref>, autoencoders <ref type="bibr">(Yarats et al., 2021b)</ref> and world models <ref type="bibr">(Hafner et al., 2019a;</ref><ref type="bibr">b)</ref>. Unsupervised behavioral learning in RL aims to eliminate this reward signal during exploration. Therefore, the agent can be adapted to different tasks in the downstream finetuning. To replace the 'extrinsic' reward signals, these methods usually leverage different 'intrinsic rewards' during exploration. Many recent algorithms have been proposed to learn from different types of intrinsic reward, which is based on the prediction, information gain or entropy. In particular, Pathak et al. (2017); Burda et al. (2018a); Pathak et al. (2019) are referred to as "knowledge based" intrinsic reward (Laskin et al., 2021) and they all maintain a neural network g(s t , a t ) to predict the next state s t+1 from the current state and actions. Among these three methods, Pathak et al. (2017) and Burda et al. (2018a) are using the prediction error |s t+1 -g(s t , a t )| as the intrinsic reward, Pathak et al. (2019) is using the variance of N ensemble neural networks (i.e., Var g i (s t , a t )) as the intrinsic reward. On the other hand, Lee et al. (2019); Eysenbach et al. (2018); Liu &amp; <ref type="bibr">Abbeel (2021a)</ref> are trying to maximize the mutual information to complete the exploration of the agent, thus they are referred to as the "complete-based" algorithms. In addition, <ref type="bibr">Liu &amp; Abbeel (2021b)</ref> is trying to maximize the entropy of the collected observations via a kNN method, which is referred to as the "data-based" algorithm. URLB <ref type="bibr">(Laskin et al., 2021)</ref> provided a unified framework providing benchmarks for all these intrinsic rewards.</p><p>3 Problem Setup</p><p>3.1 Time-Inhomogeneous Episodic MDPs We model the sequential decision making problem via time-inhomogeneous episodic Markov decision processes (MDPs), which can be denoted as tuple M = (S, A, H, P = {P h } H h=1 , r = {r h } H h=1 ) by convention. Here, S and A are state and action spaces, H is the length of each episode, P h : S &#215; A &#215; S &#8594; [0, 1] is the transition probability function at stage h for state s to transit to state s &#8242; after executing action a, and r h : S &#215; A &#8594; [0, 1] is the deterministic reward function at stage h. For any policy &#960; = {&#960; h } H h=1 , reward r = {r h } H h=1 , and stage h &#8712; [H], the value function V &#960; h (s; r) and the state-action value function Q &#960; h (s, a; r) is defined as:</p><p>. Furthermore, the optimal value function V * h (s; r) is defines as max &#960; V &#960; h (s; r), and the optimal action-value function Q * h (s, a; r) is defined as max &#960; Q &#960; h (s, a; r). For simplicity, we utilize the following bounded total reward assumption: Assumption 3.1. The total reward for every possible trajectory is assumed to be within the interval of (0, 1).</p><p>Up to rescaling, Assumption 3.1 is more general than the standard reward scale assumption where r h &#8712; [0, 1] for all h &#8712; [H]. Assumption 3.1 also ensures that the value function V &#960; h (s) and action-value function Q &#960; h (s, a; r) belong to the interval [0, 1]. For any function V : S &#8594; R and stage h &#8712; [H], the firstorder Bellman operator T h is defined as:</p><p>For simplicity, we further define the shorthand:</p><p>Throughout the paper, if the reward r is clear in the context, we omit the notation r in Q and V for simplicity.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Reward-free Exploration</head><p>Reward-free RL. In reward-free RL, the real reward function is accessible only after the agent finishes the interactions with the environment. Specifically, the algorithm can be separated into two phases: (i) Exploration phase: the algorithm can't access the reward function but collects K episodes of samples by interacting with the environment. (ii) Planning phase: The algorithm is given reward function {r h } H h=1 and is expected to find the optimal policy without interaction with the environment. To deal with the randomness in learning processes and evaluate the efficiency of algorithms, we adopt the commonly used (&#1013;, &#948;)-learnability concept, which is formulated in Definition 3.2. Definition 3.2. ((&#1013;, &#948;)-learnability). Given an MDP transition kernel set P, reward function set R and a initial state distribution &#181;, we say a reward-free algorithm can (&#1013;, &#948;)-learn the problem (P, R) with sample complexity K(&#1013;, &#948;), if for any transition kernel P &#8712; P, after receiving K(&#1013;, &#948;) episodes in the exploration phase, for any reward function r &#8712; R, the algorithm returns a policy &#960; in planning phase, such that with probability at least 1 -&#948;, V * 1 (s 1 ; r) -V &#960; 1 (s 1 ; r) &#8804; &#1013;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">General Function Approximation</head><p>In this work, we focus on the model-free value-based RL methods, which require us to use a predefined function class to estimate the optimal value function Q * h (s, a; r) for any reward r. We use F := {F h } H h=1 to denote the function class we will use during all H stages. To build the statistical complexity of using F to learn Q * h (s, a; r), we require several assumptions and definitions that characterize the cardinality of the function class. Assumption 3.3 (Completeness, <ref type="bibr">Zhao et al. (2023)</ref>). Given</p><p>We assume that for any h and function V : S &#8594; [0, 1] and r :</p><p>We assume that L = O(1) throughout the paper. <ref type="bibr">Kong et al. (2021)</ref> introduced a similar definition called "sensitivity". In particular, it is defined by</p><p>where &#955; is defined by T (H + 1) 2 for the RL task with r h (s, a) &#8712; [0, 1]<ref type="foot">foot_0</ref> . The major difference between the generalized eluder dimension and sensitivity is that the generalized eluder dimension incorporates the variance &#963; 2 s into the historical observation Z to craft the heterogeneous variance in Z.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Since D 2</head><p>F h in Definition 3.4 is not computationally efficient in some circumstances, we approximate it via an oracle D 2 F h , which is formally defined in Definition 3.6.</p><p>), which computes the estimated uncertainty of a state-action pair z = (s, a) &#8712; S &#215; A with respect to historical data z [t],h and corresponding weights &#963; [t],h . It satisfies</p><p>where C is a fixed constant.</p><p>The covering numbers of the value function class and the bonus function class are introduced in the following definition.</p><p>Definition 3.7 (Covering numbers of function classes). For any &#1013; &gt; 0, we define the following covering numbers of involved function classes:</p><p>For any &#1013; &gt; 0, we define the uniform covering number of F with respect to &#1013; as </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">There exists a bonus function class</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">The optimistic function class at stage h &#8712; [H] is:</head><p>There exists an &#1013;-cover</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Algorithm</head><p>In this section, we introduce our algorithm GFA-RFE as presented in Algorithm 1. GFA-RFE consists of two phases, where in the first exploration phase, GFA-RFE collects K episodes without reward signal. Then in the second planning phase, GFA-RFE leverages the collected K episodes to learn a policy trying to maximize the cumulative reward given a specific reward function r. The details of these two phases are presented in the following subsections.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Exploration Phase: Efficient Exploration via</head><p>Uncertainty-aware Intrinsic Reward The ultimate goals of the exploration phase are exploring environments and collecting data in the absence of reward to facilitate finding the near-optimal policy in the next phase. At a high level, GFA-RFE achieves these goals by encouraging the agent to explore regions containing higher uncertainty, which intuitively guarantees the maximal information gained in each episode. Intrinsic reward. GFA-RFE evaluate the uncertainty by D F h in Definition 3.4, and uses its oracle D F h as the intrinsic reward r k,h in Line 1 to generate an uncertainty-target policy in Line 1. Recall that</p><p>In particular, a high reward signal means that there exist functions in F h close to each other on all historical observations but divergent for the current state and action pair. This further suggests that the past observations are not enough for the agent to make a precise value estimation for the current state-action pair.</p><p>Weighted regression. The usage of the intrinsic reward r k,h induces an intrinsic action-value function Q * k,h (&#8226;, &#8226;; r k ), which serves as a metric for cumulative uncertainty of remaining stages. As in model-free approaches, GFA-RFE aims to estimate Q * k,h (&#8226;, &#8226;; r k ) and further finds a policy &#960; k h that would maximize the cumulative uncertainty over H stages. This part is presented in Algorithm 1 through Line 1 to Line 1. To reduce the estimation error, GFA-RFE incorporates the weighted regression proposed in <ref type="bibr">Zhao et al. (2023)</ref> </p><p>The algorithm starts at final stage h = H and estimating the Q * k,h (s, a; r k ) approximated by function p f k,h using Bellman equation:</p><p>However, estimating</p><p>) may also introduce error since the variance of distribution P h (&#8226;|s, a) varies among different state-action pair. Therefore, we tackle this heterogeneous variance issue by minimizing the Bellman residual loss weighted by using the estimated variance &#963;k,h of observed state-action pairs s i h , a i h :</p><p>Obviously, a lower variance &#963;i,h yields a larger weight during the regression. The calculation of variances &#963;i,h involves both aleatoric uncertainty and epistemic uncertainty <ref type="bibr">(Kendall &amp; Gal, 2017;</ref><ref type="bibr">Mai et al., 2022)</ref>, where the aleatoric uncertainty is &#963; k,h calculated in Line 1 caused by indeterminism of the transition and epistemic uncertainty is D 1/2 F h caused by limited data. Such an approach can be proved to improve the sample efficiency of our algorithm GFA-RFE (see Theorem 5.1 and its discussion). Similar approaches have been used in <ref type="bibr">Zhou et al. (2021)</ref>; <ref type="bibr">Ye et al. (2023)</ref> to provide more robust and efficient estimation. After obtaining the p f k,h function through weighted regression, GFA-RFE follows the standard optimism design in online exploration methods to add the bonus term b k,h for overestimating the Q * k,h (s, a; r) function in Line 1. Using this optimistic estimation, GFA-RFE thus takes the greedy policy and estimates the value function V k,h in Line 1 before proceeding to the previous stage h -1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Planning Phase: Effective Planning Using Weighted Regression</head><p>After exploring environments and collecting data in the exploration phase, the agent is now given the reward for a specific task, but no longer interacts with the environment. GFA-RFE enters its planning phase and ensures a policy to maximize the cumulative reward of r h across all H stages. GFA-RFE estimates Q * h (s, a; r) by weighted regression and further finds the optimal policy &#960; h , which is the same process as in the exploration phase. This part is presented in Algorithm1 through Line 1 to Line 1.</p><p>Remark 4.1. Compared with <ref type="bibr">Kong et al. (2021)</ref>, our algorithm leverages the advantage of generalized elude dimension and incorporates the estimated variance &#963; into 1) weighted regression in Line 1 in the planning phase and Line 1 in exploration phase; 2) intrinsic reward design in Line 1. Also, our algorithm does not set the reward r k,h = b k,h /H as of <ref type="bibr">Kong et al. (2021)</ref>; <ref type="bibr">Wang et al. (2020)</ref>, thus the agent can explore more aggressively and more efficiently using the knowledge of variance of the observation. Therefore, GFA-RFE is more sample efficient compared with <ref type="bibr">Kong et al. (2021)</ref>, which is discussed in detail in Remark 5.7.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Theoretical Results</head><p>We analyze GFA-RFE theoretically in this section. The uncertainty-aware reward-free exploration mechanism leads to efficient learning with provable sample complexity guarantees. The first theorem characterizes how the suboptimality decays as exploration time grows.</p><p>Theorem 5.1. For GFA-RFE, set confidence radius &#946; E = O H log N V (&#1013;) and &#946; P = O H log N F (&#1013;) , and take &#945; = 1/ &#8730; H and &#947; = log N V (&#1013;). Then, for any &#948; &#8712; (0, 1), with probability at least 1 -&#948;, after collecting K episodes of samples, for any reward function r = {r h } H h=1 such that</p><p>Set the policy</p><p>end for 11:</p><p>Receive the initial state s k 1 .</p><p>12:</p><p>for stage h = 1, . . . , H do 13:</p><p>Take action a k h &#8592; &#960; k h (s k h ), receive next state s k h+1 .</p><p>14:</p><p>end for 17: end for 18: Phase II: Planning Phase Require:</p><p>25:</p><p>. 26: end for Ensure: Policy &#960; &#960; satisfying the following sub-optimality bound,</p><p>We are now ready to present the sample complexity of GFA-RFE for the reward-free exploration. Corollary 5.2. Under the same conditions in Theorem 5.1, with probability at least 1 -&#948;, for any reward function r = {r h } H h=1 such that In addition, this approach is generally computationally intractable as it explicitly maintains feasible function classes. For its V-type variant, it even maintains a finite cover of the function class, which can be exponentially large. Remark 5.7. <ref type="bibr">Kong et al. (2021)</ref> leveraged the "sensitivity" as the intrinsic reward during the exploration and achieved a O(H 6 d 4 &#1013; -2 ) reward-free sample complexity. Compare their algorithm and ours, ours improves a H 2 d 2 factor from 1) using weighted regression to handle heterogeneous observations 2) using a "truncated Bellman equation" <ref type="bibr">(Chen et al., 2021)</ref> in our analysis, and 3) a properly improved uncertainty metric D 2 F h instead of the sensitivity.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Experiments</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1">Experiment Setup</head><p>Based on our theoretical perceptive, we integrate our algorithm in the unsupervised reinforcement learning (URL) framework and evaluate the performance of the proposed k,h for the value target regression. All these Q networks are trained by Qlearning with different mini-batches in the replay buffer. Obviously, the variance of these Q networks comes from the randomness of initialization and the randomness of different mini-batches used in training. The pseudo code for the practical algorithm is deferred to Appendix F. The original implementation of <ref type="bibr">Laskin et al. (2021)</ref> involves two phases where the neural network is first pretrained by interacting with the environment without receiving reward signals and then finetuned by interacting with the environment again with reward signal. However, in our experiments, we strictly follow the design of reward-free exploration by first exploring the environment without the reward. The explored trajectories are collected into a dataset D = {(s, a, s &#8242; )}. Then we call a reward oracle r to assign rewards to this dataset D and learn the optimal policy using the offline dataset D r = {(s, a, s &#8242; , r(s, a, s &#8242; ))} without interacting the dataset anymore. Intuitively speaking, this online exploration + offline planning paradigm is more challenging than the online pretraining + online finetuning and would be more practical, especially with different reward signals.</p><p>Unsupervised reinforcement learning benchmarks. We conduct our experiments on Unsupervised Reinforcement Learning Benchmarks <ref type="bibr">(Laskin et al., 2021)</ref>, which consists of two multi-tasks environments (Walker, Quadruped) from DeepMind Control Suite <ref type="bibr">(Tunyasuvunakool et al., 2020)</ref>. Each environment is equipped with several reward functions and goals. For example, Walker-run consists of rewards en-2 Our implementation can be accessed at GitHub via <ref type="url">https:  //github.com/uclaml/GFA-RFE</ref>.</p><p>couraging the walker to run at speed and Walker-stand consists of rewards indicating the walker should stead steadily. We consider the state-based input in our experiments where the agent can directly observe the current state instead of image inputs (a.k.a. pixel-based). Baseline algorithms. We inherit the baseline algorithms ICM <ref type="bibr">(Pathak et al., 2017)</ref>, Disagreement <ref type="bibr">(Pathak et al., 2019)</ref>, RND <ref type="bibr">(Burda et al., 2018b)</ref>, APT <ref type="bibr">(Liu &amp; Abbeel, 2021b)</ref>, DIAYN <ref type="bibr">(Eysenbach et al., 2018)</ref>, APS <ref type="bibr">(Liu &amp; Abbeel, 2021a)</ref>, SMM <ref type="bibr">(Lee et al., 2019)</ref>. All these algorithms provide different 'intrinsic rewards' in place of ours during exploration. We make all these baseline algorithms align with our settings which first collect an exploration dataset and then do offline training on the collected dataset with rewards.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2">Experiment Results</head><p>Experimental results are presented in Table <ref type="table">2</ref>. It's obvious that GFA-RFE can efficiently explore the environment without the reward function and then output a near-optimal policy given various reward functions. For the baseline algorithms, APT, Disagreement, and RND perform consistently better than the rest of the 4 algorithms on all 2 environments and 8 tasks. The performance of GFA-RFE enjoys compatible or superior performance compared with these top-level methods (APT, Disagreement, and RND), on these tasks. These promising numerical results justify our theoretical results and show that GFA-RFE can indeed efficiently learn the environment in a practical setting. Ablation study. To verify the performance of our algorithm, we also did ablation studies on 1) the relationship between offline training processes and episodic reward 2) the relationship between the quantity of online exploration data used in offline training and the achieve episodic reward. The details of the ablation study are deferred to Appendix F.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">Conclusion</head><p>We study reward-free exploration under general function approximation in this paper. We show that, with an uncertaintyaware intrinsic reward and variance-weighted regression on learning the environment, GFA-RFE can be theoretically proved to explore the environment efficiently without the existence of reward signals. Experiments show that our design of intrinsic reward can be efficiently implemented and effectively used in an unsupervised reinforcement learning paradigm. In addition, experiment results verify that adding uncertainty estimation to the learning processes can improve the sample efficiency of the algorithm, which is aligned with our theoretical results of weighted regression.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Impact Statement</head><p>This paper discusses efforts aimed at enhancing the domain of reinforcement learning, encompassing both theoretical insights and empirical findings. Our approaches are poised to offer beneficial societal effects as they circumvent the reliance on pre-defined reward functions, which could embed biases and prejudicial assessments. Furthermore, our robust theoretical foundation enhances the transparency of exploration processes within reinforcement learning frameworks. While our algorithm potentially improve the accountability of exploration of RL, it does not eliminate the risks of unsafe behavior or offending to the constrain of exploration, which might be addressed in the future works. Other than that we do not see any potential negative impacts of our work that need to be specifically pointed out here, to the best of our knowledge.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Proof of Theorems in Section 5</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.1 Additional Definitions and High Probability Events</head><p>In this section, we introduce additional definitions that will be used in the proofs. Also, we define the good events that GFA-RFE is guaranteed to have near-optimal sample complexity. Definition A.1 (Truncated Optimal Value Function). We define the following truncated value functions for any reward r:</p><p>The good event E E k,h at stage h of episode k in exploration phase is defined to be:</p><p>The intersection of all good events in exploration phase is:</p><p>The following lemma indicates that E holds with high probability for GFA-RFE. Lemma A.2. In Algorithm 1, for any &#948; &#8712; (0, 1) and fixed h &#8712; [H], with probability at least 1 -&#948;, E E holds.</p><p>In the planning phase, we define the good events for exploration phase with indicator functions as</p><p>where p</p><p>) and &#951; = log N V (&#1013;). Like in the exploration phase, we also have that E P holds with high probability for GFA-RFE.</p><p>Lemma A.3. In Algorithm 1, for any &#948; &#8712; (0, 1) and fixed h &#8712; [H], with probability at least 1 -&#948;, E P holds.</p><p>Furthermore, we have the following good events in the planning phase without indicator function:</p><p>And we define E P := E P 1 . We shows that E P holds if both E E , E P hold with the help of the following lemma:</p><p>Lemma A.4. If the event E E , E P , E P h+1 all hold, then event E P h holds. Since E P H holds trivially, Lemma A.4 indicates that E P holds.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A.2 Covering Number</head><p>The optimistic value functions at stage h &#8712; [H] in our construction belong to the following function class:</p><p>Lemma A.5 (&#1013;-covering number of optimistic value function classes). For optimistic value function class V k,h defined in (A.1), we define the distance between two value functions V 1 and</p><p>Then the &#1013;-covering number with respect to the distance function can be upper bounded by</p><p>where the last inequality holds due to Lemma A.6. Then, by the induction, we have</p><p>Therefore, by substituting &#946; E = O H log N V (&#1013;) , we complete the proof:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Proof of Lemmas in Appendix A</head><p>In this section, we prove the lemmas used in Appendix A.</p><p>Proof of Lemma A.2. We first prove that E E k,h holds with probability 1 -&#948;/(KH). We have T h V k,h+1 &#8712; F h due to Assumption 3.3. For any function</p><p>Applying Lemma E.1, for fixed f , f , and V , with probability at least 1 -&#948;,</p><p>Applying a union bound, for any k, with probability at least 1 -&#948;, we have for all f a , f b in the &#1013;-net C(F h , &#1013;) that</p><p>Therefore, with probability at least 1 -&#948;, we have</p><p>Substituting it back, with probability at least 1 -&#948;/(KH), we have</p><p>Then we complete the proof by taking a union bound for all k &#8712; [K] and h &#8712; [H].</p><p>Proof of Lemma A.3. We have</p><p>By definition, we have that</p><p>We decompose I( p f h , T h p V h+1 , p V h+1 ) into two parts:</p><p>For the first term in (B.1), we have</p><p>Furthermore, we can bound the maximum as following:</p><p>where the first inequality is due to bounded total rewards assumption, the second inequality holds due to Definition 3.4, and the last inequality holds due to Line 1 in Algorithm 1 and Definition 3.7.</p><p>We further define var(V -V * h+1 ) as</p><p>By the definition of the indicator function, we have</p><p>, and probability at least</p><p>we have the inequality above holds for all such f, f , V with probability at least 1 -&#948;/H. There exist a V c h+1 in the &#1013;-net such that &#8741; p V h+1 -V c h+1 &#8741; &#8804; &#1013;. Then we have</p><p>For the second term in (B.1), applying Lemma E.1, for fixed f , f , and V * h+1 , with probability at least 1 -&#948;, we have</p><p>Applying a union bound, for any k, with probability at least 1 -&#948;, we have for all f a , f b in the &#1013;-net</p><p>Therefore, with probability at least 1 -&#948;, we have</p><p>2) and (B.3) back into (B.1), we have</p><p>Lemma B.1. On the event E E &#8745; E P h , for any h &#8712; [H], we have</p><p>Proof of Lemma A.4. Recall that the indicator function in event E P is</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I3</head><p>,</p><p>Proof of Lemma A.5. There exists an &#1013;/2-net of F , denoted by C(F h , &#1013;/2), such that for any f &#8712; F h , we can find</p><p>Also, there exists an &#1013;/2&#946;-net of B, C(B, &#1013;/2&#946;).</p><p>Then we consider the following subset of V h ,</p><p>Consider an arbitrary V &#8712; V where V = max a&#8712;A min(1,</p><p>Proof of Lemma A.6. According to the definition of D 2 F function, we have</p><p>where the first inequality holds due the definition of D 2 F function with the Assumption 3.3 and the second inequality holds due to the events E E h . Thus, we have</p><p>Proof of Lemma A.7. We prove this statement by induction. Note that V * H+1 (s; r) = p V H+1 (s). Assume that the statement holds for h + 1. If p V h (s) = 1, then the statement holds trivially for h; otherwise, we have for any (s, a) &#8712; S &#215; A that</p><p>where the first inequality holds due to the induction assumption, and the second inequality holds due to Lemma A.6.</p><p>In order to prove Lemma A.8, we need the following three lemmas.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Lemma B.3 (Simulation Lemma</head><p>). On the event E E , we have <ref type="bibr">Zhao et al. (2023)</ref>]For any parameters &#946; &#8805; 1 and stage h &#8712; [H], the summation of confidence radius over episode k &#8712; [K] is upper bounded by</p><p>where z = (s, a) and z</p><p>Now we can prove Lemma A.8.</p><p>Proof of Lemma A.8. We have</p><p>where the first inequality follows from Lemma B.3, the third inequality follows from Lemma B.4, and the last equality holds due to Lemma B.5.</p><p>Proof of Lemma A.9.</p><p>By Azuma-Hoeffding inequality (Lemma E.3), we have</p><p>Lemma B.6. On the event E E , for any k &#8712; [K] and h &#8712; [H], we have</p><p>Proof of Lemma A.10. Since &#946; E = O( H log N V (&#1013;)) and &#946; P = O( H log N F (&#1013;)), for some constant c, we have</p><p>where the second inequality follows from Lemma A.9, and the third inequality follows from Lemma B.6. Therefore, we have</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Proofs of Lemmas in Appendix B</head><p>Proof of Lemma B.1. We see that</p><p>We prove this statement by induction. Note that V * H+1 (s; r) + V k,H+1 (s) = p V H+1 (s) = 0. Assume the statement holds for h + 1. By definition, we have</p><p>Therefore, we only need to prove</p><p>We have</p><p>where the second inequality holds due to induction assumption, the third inequality holds by high probability events, and the last inequality holds by &#946; E &#8805; &#946; P , DF h (z; z [k],h , &#963; [k],h ) decreasing with k, and Definition 3.6.</p><p>Lemma C.1. On the event E E , we have</p><p>Proof of Lemma B.2. We have Lemma A.7 and B.1 both hold on E P h+1 . Therefore, we have</p><p>where the second inequality holds due to Lemma A.7 and p V h+1 , V * h+1 &#8712; [0, 1], the third inequality holds due to Lemma B.1, the fourth inequality holds due to Lemma C.1, and the last inequality holds due to Definition 3.6.</p><p>Proof of Lemma B.3. According to Algorithm 1, we have that</p><p>For all k and all h, we have that</p><p>where the last inequality holds due to Lemma C.1 and Definition 3.6.</p><p>Lemma C.2. On the event E E , with probability at least 1 -&#948;,</p><p>where the first inequality holds due to Lemma C.1, the second inequality holds due to Definition 3.6, and the last inequality holds due to Lemma C.2. For the term I, we further have</p><p>where the first inequality holds due to Definition 3.6, the second inequality holds due to Lemma B.4, the third inequality holds due to Cauchy-Schwarz inequality. Therefore, we can get</p><p>Proof of Lemma B.6. We prove this statement by induction. Note that V * H+1 (s; r k ) = V k,H+1 (s) = 0. Assume that the statement holds for h + 1. If V k,h (s) = 1, then the statement holds trivially for h; otherwise, we have for any (s, a) &#8712; S &#215; A that</p><p>where the first inequality holds due to Definition A.1, the second inequality holds due to induction hypothesis, the third inequality holds due to Lemma C.1, and the forth inequality holds due to Definition 3.6.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D Proof of Lemmas in Appendix C</head><p>Proof of Lemma C.1. According to the definition of D 2 F function, we have</p><p>where the first inequality holds due the definition of D 2 F function with the Assumption 3.3 and the second inequality holds due to the events E E h . Thus, we have</p><p>Proof of Lemma C.2. By Lemma E.3, we have</p><p>Then, under event E E , we have</p><p>where the inequality holds due to Lemma C.1 and Definition 3.6. Therefore, for fixed h, we have</p><p>where the first inequality holds due to induction, and the last inequality holds due to Lemma E.3. Hence, by combining the above two inequalities, we have</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E Auxilliary Lemmas</head><p>Lemma E.1 (Self-normalized bound for scalar-valued martingales). Consider random variables (v n |n &#8712; N) adapted to the filtration n : n = 0, 1, ...). Let {&#951; i } &#8734; i=1 be a sequence of real-valued random variables which is H i+1 -measurable and is conditionally &#963;-sub-Gaussian. Then for an arbitrarily chosen &#955; &gt; 0, for any &#948; &gt; 0, with probability at least 1 -&#948;, it holds that</p><p>Lemma E.3 (Azuma-Hoeffding Inequality). Let {x i } n i=1 be a martingale difference sequence with respect to a filtration</p><p>Then for any 0 &lt; &#948; &lt; 1, with probability at least 1 -&#948;, n i=1</p><p>x i &#8804; M 2n log(1/&#948;).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F Experiment details F.1 Details of exploration algorithm</head><p>We present the practical algorithm in this subsection. We start by introducing the notation &#981; i as the parameter for the i-th Q networks, which is a three-layer MLP with 1024 hidden size, same as other benchmark algorithms implemented in URLB <ref type="bibr">(Laskin et al., 2021)</ref>. For the ease of presentation, we ignore the Q network as Q &#981;i as Q i and the target network Q &#966;i as Qi when there is no confusion. We initialize the parameters in &#981; i using Kaiming distribution <ref type="bibr">(He et al., 2015)</ref>. The algorithm works in the discounted MDP with the discounted factor &#947;. For each t in training steps, the algorithm updates the t%N -th Q function by taking the gradient descent regarding the loss function where we simply set &#946; = 1 to align with our theory, the factor (1 -&#947;) before the intrinsic reward is because we want to balance the horizon 1/H &#8776; (1 -&#947;) in the setting. The reason for choosing the target Q function Qi instead of the updating Q function is to update the intrinsic reward, exploration bonus slower than the update of Q function, therefore give the agent more time to explore the optimal policy for maximizing a certain intrinsic reward r int (s, a). After updating the parameter &#981; t%N , we perform a soft update for the target network as &#966;t%N &#8592; (1 -&#951;) &#966;t%N + &#951;&#981; t%N , (F.3)</p><p>where we follow the setting in URLB to set &#951; = 0.01. After updating the Q function, the algorithm then updates the actor &#960; &#952; (a|s) following DDPG in maximizing</p><p>We summarize the exploration algorithm in Algorithm 2, in particular, we use Adam to optimize the loss function defined by (F.1) and (F.3). Algorithm 2 GFA-RFE-Exploration Phase -Implementation  <ref type="figure">4</ref> and <ref type="figure">5</ref> show the episode rewards for top-performing algorithms, including our algorithm (GFA-RFE), RND, Disagreement, and APT, across varying numbers of exploration episodes for different tasks. Notably, GFA-RFE competes with these leading unsupervised algorithms effectively, matching their performance across a range of exploration episodes.</p><p>0 20000 40000 60000 80000 100000 Training Step 0 100 200 300 400 500 600 Episode Reward Episode Reward at different training steps on walker-flip Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (a) Flip 0 20000 40000 60000 80000 100000 Training Step 50 100 150 200 250 300 350 Episode Reward Episode Reward at different training steps on walker-run Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (b) Run 0 20000 40000 60000 80000 100000 Training Step 200 400 600 800 1000 Episode Reward Episode Reward at different training steps on walker-stand Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (c) Stand 0 20000 40000 60000 80000 100000 Training Step 0 200 400 600 800 Episode Reward Episode Reward at different training steps on walker-walk Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (d) Walk 0 20000 40000 60000 80000 100000 Training Step 100 200 300 400 500 Episode Reward Episode Reward at different training steps on quadruped-run Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (a) Run 0 20000 40000 60000 80000 100000 Training Step 100 200 300 400 500 600 700 800 Episode Reward Episode Reward at different training steps on quadruped-jump Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (b) Jump 0 20000 40000 60000 80000 100000 Training Step 200 400 600 800 1000 Episode Reward Episode Reward at different training steps on quadruped-stand Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (c) Stand 0 20000 40000 60000 80000 100000 Training Step 0 200 400 600 800 Episode Reward Episode Reward at different training steps on quadruped-walk Agent gfa-rfe (Ours) icm_apt disagreement rnd icm smm diayn aps (d) Walk </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>We ignore the clipping process making sensitivity Z,F (z) &#8592; min{sensitivity Z,F (z)} for the clarity of demonstration</p></note>
		</body>
		</text>
</TEI>
