<?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'>Active Advantage-Aligned Online Reinforcement Learning with Offline Data</title></titleStmt>
			<publicationStmt>
				<publisher>Exploration in AI Today Workshop at ICML (ExAI), July 2025.</publisher>
				<date>07/13/2025</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10621891</idno>
					<idno type="doi"></idno>
					
					<author>X Liu</author><author>HT Le</author><author>S Chen</author><author>R Stevens</author><author>Z Yang</author><author>MR Walter</author><author>Y Chen</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Online reinforcement learning (RL) enhances policies through direct interactions with the environment, but faces challenges related to sample efficiency. In contrast, offline RL leverages extensive pre-collected data to learn policies, but often produces suboptimal results due to limited data coverage. Recent efforts integrate offline and online RL in order to harness the advantages of both approaches. However, effectively combining online and offline RL remains challenging due to issues that include catastrophic forgetting, lack of robustness to data quality and limited sample efficiency in data utilization. In an effort to address these challenges, we introduce A3RL, which incorporates a novel confidence aware Active Advantage Aligned (A3) sampling strategy that dynamically prioritizes data aligned with the policy's evolving needs from both online and offline sources, optimizing policy improvement. Moreover, we provide theoretical insights into the effectiveness of our active sampling strategy and conduct diverse empirical experiments and ablation studies, demonstrating that our method outperforms competing online RL techniques that leverage offline data. Our code will be publicly available at:this https URL.]]></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>Reinforcement learning (RL) has achieved notable success in many domains, such as robotics <ref type="bibr">[24,</ref><ref type="bibr">25]</ref>, game play <ref type="bibr">[40,</ref><ref type="bibr">57]</ref>, drug discovery <ref type="bibr">[34,</ref><ref type="bibr">37]</ref>, and reasoning with Large Language Models (LLMs) <ref type="bibr">[16]</ref>. Online RL algorithms such as Q-learning <ref type="bibr">[67]</ref>, SARSA <ref type="bibr">[53]</ref>, and PPO <ref type="bibr">[56]</ref> learn and make decisions in an online, sequential manner, whereby an agent interacts with an environment and learns from its experience. However, due to the need for exploration that is fundamental to RL, online RL tends to be highly sample inefficient in high-dimensional or sparse reward environments. A complementary approach to improve the sample efficiency is imitation learning (IL) <ref type="bibr">[51,</ref><ref type="bibr">52]</ref>, where an agent learns a policy by leveraging expert demonstrations <ref type="bibr">[7,</ref><ref type="bibr">35,</ref><ref type="bibr">36]</ref>.</p><p>However, in many cases, we do not have access to a live expert to query, but often have access to an abundance of logged data collected from experts. One approach to make use of this data is through offline reinforcement learning. Offline RL <ref type="bibr">[30,</ref><ref type="bibr">47]</ref> learns a policy solely from such a fixed dataset of pre-collected experiences, without the need to directly interact with the environment. Despite its advantages, offline RL often results in a suboptimal policy due to dataset limitations. This has motivated recent work that combines offline and online RL, whereby learning begins from a logged dataset before transitioning to online interactions for further improvement. While beneficial, contemporary offline-to-online RL methods suffer from catastrophic forgetting, where previously learned knowledge is overwritten during online fine-tuning, leading to significant performance degradation <ref type="bibr">[39,</ref><ref type="bibr">69]</ref>.</p><p>More recently, methods that integrate online RL with offline datasets utilize off-policy techniques to incorporate offline data while learning online <ref type="bibr">[2,</ref><ref type="bibr">59]</ref>, mitigating catastrophic performance drops. These techniques do not require any preliminary offline RL training or incorporate specific imitation clauses that prioritize pre-existing offline data. Notably, RLPD <ref type="bibr">[2]</ref> exhibits strong empirical performance, however it employs a uniform random sampling strategy for both offline and online learning, ignoring that different transitions contribute differently to the various stage of policy improvement. Furthermore, this uniform sampling strategy may result in data inefficiencies (e.g., sampling useless data while missing valuable data) and also make policy improvement highly sensitive to data quality.</p><p>Our contributions. In this work, we introduce Active Advantage-Aligned Reinforcement Learning (A 3 RL), a novel method that operates in the realm of online RL with an offline dataset. Our approach dynamically prioritizes data (transitions) that have the highest potential to maximize policy improvement, aligning with the evolving quality and learning needs of the policy. More specifically, A 3 RL considers not only the relevance of the data in facilitating the current policy's online exploration and exploitation but also its estimated contribution to policy improvement via confidence-aware advantage-based prioritization. A 3 RL demonstrates robustness to data quality in a black-box manner and maintains resilience under varying environmental conditions. Notably, it also effectively accelerates policy improvement, even in a purely online environment.</p><p>In summary, our contributions are: &#8226; We propose A 3 RL, a novel algorithm for online RL with offline data. This algorithm surpasses current state-of-the-art (SOTA) methods by integrating a priority-based active sampling strategy based on the value of confidence-aware advantage function and coverage by offline dataset.</p><p>&#8226; In contrast to RLPD and other related works <ref type="bibr">[29,</ref><ref type="bibr">55]</ref>, which lack theoretical support, this study provides theoretical insights of our confidence-aware active advantage-aligned sampling strategy, demonstrating superiority and its minimum improvement gap over random sampling.</p><p>&#8226; Through extensive empirical evaluations in various environments, we demonstrate that A 3 RL achieves consistent and significant improvements over prior SOTA models.</p><p>&#8226; Given the black-box nature of offline datasets, we conduct comprehensive ablation studies across a range of dataset qualities and environmental settings, including purely online scenarios, to evaluate the robustness of A 3 RL. These studies consistently confirm its stable performance across diverse conditions, regardless of environmental factors or data quality.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Related Work</head><p>Online RL with offline datasets Several methods exist that incorporate offline datasets in online RL to enhance sample efficiency. Many rely on high-quality expert demonstrations <ref type="bibr">[19,</ref><ref type="bibr">23,</ref><ref type="bibr">42,</ref><ref type="bibr">49,</ref><ref type="bibr">64,</ref><ref type="bibr">70]</ref>. Nair et al. <ref type="bibr">[43]</ref> introduced the Advantage Weighted Actor Critic (AWAC), which utilizes regulated policy updates to maintain the policy's proximity to the observed data during both offline and online phases. On the other hand, Lee et al. <ref type="bibr">[29]</ref> propose an initially pessimistic approach to avoid overoptimism and bootstrap errors in the early online phase, gradually reducing the level of pessimism as more online data becomes available. Most relevant to our work is RLPD <ref type="bibr">[2]</ref>, which adopts a sample-efficient off-policy approach to learning that does not require pre-training. Unlike RLPD, which utilizes symmetric sampling to randomly draw from both online and offline datasets for policy improvement, A 3 RL adopts a Prioritized Experience Replay (PER)-style method, whereby it selectively uses data from both datasets to enhance policy performance.</p><p>Prioritized experience replay Experience replay <ref type="bibr">[31]</ref> enhances data efficiency in online RL by reusing past experiences. Priority Experience Replay (PER) <ref type="bibr">[55]</ref> introduces prioritization based on temporal difference (TD) error to ensure that impactful experiences are used more frequently, and has proven effective in a variety of settings <ref type="bibr">[17,</ref><ref type="bibr">21,</ref><ref type="bibr">42,</ref><ref type="bibr">45,</ref><ref type="bibr">54,</ref><ref type="bibr">61,</ref><ref type="bibr">65,</ref><ref type="bibr">68]</ref>. Alternative prioritization strategies have been explored, such as prioritizing transitions based on expected return <ref type="bibr">[20]</ref> or adjusting sample importance based on recency <ref type="bibr">[11]</ref>. Existing research predominantly focuses on either purely online or offline applications of PER. Our research distinctively integrates the advantages of both online and offline data in an innovative way. Eysenbach et al. <ref type="bibr">[9]</ref> apply a density ratio to the reward instead of weighting the samples. The most relevant studies to ours include Sinha et al. <ref type="bibr">[58]</ref> that uses the density ratio between off-policy and near-on-policy state-action distributions as an importance weight for policy evaluation, and Lee et al. <ref type="bibr">[29]</ref> that employs density ratios to select relevant samples from offline datasets. Our method differs by not only using the density ratio to assess the "on-policyness" of the data but also by considering the confidence-aware advantage value to determine how much the data can contribute to enhancing policy improvement.</p><p>Active learning in RL Active learning has been explored in RL for data-efficient exploration <ref type="bibr">[8,</ref><ref type="bibr">10,</ref><ref type="bibr">27,</ref><ref type="bibr">33,</ref><ref type="bibr">35,</ref><ref type="bibr">36,</ref><ref type="bibr">38]</ref>. Unlike previous approaches that focus on oracle selection <ref type="bibr">[35,</ref><ref type="bibr">36]</ref>, state exploration <ref type="bibr">[8,</ref><ref type="bibr">36]</ref> or reward estimation <ref type="bibr">[38]</ref>, A 3 RL introduces an active transition sampling mechanism tailored to online RL with offline data, prioritizing transitions that maximize policy improvement. We defer more details of related work to App. B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Preliminaries and Problem Statement</head><p>We consider a discounted Markov decision process (MDP) environment <ref type="bibr">[3]</ref> characterized by a tuple M = (S, A, P, R, &#969;, d 0 ), where S represents a potentially infinite state space, A is the action space, P : S &#8594; A &#8593; !(S) is the unknown transition kernel, R : S &#8594; A &#8593; [0, 1] is the reward function, &#969; &#8595; (0, 1) is the discount factor and d 0 (s) is the initial state distribution. The learner's objective is to solve for the policy &#949; : S &#8593; !(A) that maximizes the expected sum of discounted future rewards</p><p>where the expectation is taken over the trajectory sampled from &#949;.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Maximum entropy RL.</head><p>In this work, we adopt off-policy soft actor-critic (SAC) <ref type="bibr">[15]</ref> RL to train an agent with samples generated by any behavior policy. We use a general maximum entropy objective <ref type="bibr">[2,</ref><ref type="bibr">15,</ref><ref type="bibr">71]</ref> as follows:</p><p>where &#977; is a temperature parameter. This involves optimizing reward while encouraging exploration, making the learned policy more robust.</p><p>Q-value and advantage function. The Q-value function measures the expected return of executing action a in state s under policy &#949;:</p><p>, where B &#969; is the Bellman operator:</p><p>The soft state value function is defined as:</p><p>For a generator policy &#949;, the advantage function <ref type="bibr">[60]</ref> quantifies the relative benefit of selecting a over the policy's default behavior:</p><p>Specifically, SAC learns a soft Q-Function, denoted as Q &#977; (s, a) which parameterized by &#982;, and a stochastic policy &#949; &#982; parameterized by &#1009;. The SAC method involves alternating between updates for the critic and the actor by minimizing their respective objectives <ref type="bibr">[29]</ref> as follows</p><p>Here, R is an experience replay buffer of either on-policy experience <ref type="bibr">[60]</ref> or through off-policy experience <ref type="bibr">[41,</ref><ref type="bibr">46]</ref>, and &#982; denotes the delayed parameters.</p><p>Prioritized experience replay. PER <ref type="bibr">[55]</ref> serves as the basis of our sampling techniques, providing a framework for prioritizing experience replay based on transition importance. Instead of sampling uniformly from the replay buffer R, PER assigns higher probability to more informative transitions, leading to improved sample efficiency <ref type="bibr">[17]</ref>. Each transition R i = (s i , a i , r i , s i+1 ) is assigned a priority &#962; i , typically based on the TD-error: &#966; = r + &#969;V (s t+1 ) &#8596; V (s t ) <ref type="bibr">[4,</ref><ref type="bibr">17,</ref><ref type="bibr">45,</ref><ref type="bibr">55,</ref><ref type="bibr">63]</ref>. Subsequently, the sampling approach of PER involves establishing an index set I within the range of [|R|] based on the probabilities p i assigned by the priority set as follows:</p><p>, with a hyper-parameter &#8636; &gt; 0. To correct for sampling bias, PER applies importance sampling weights:</p><p>where &#8637; anneals from &#8637; 0 &#8595; (0, 1) to 1 during training to counteract bias in the learning updates, and the importance sampling weights are normalized to have maximum weight of 1 for stability. While standard PER prioritizes TD-error, our method extends this framework to prioritize transitions based on onlineness and contribution to policy improvement.</p><p>Online RL with offline datasets. In this work, we study online RL with offline datasets denoted as D <ref type="bibr">[2]</ref>. These datasets consist of a set of tuples (s, a, r, s &#8596; ) generated from a specific MDP. A key characteristic of offline datasets is that they typically offer only partial coverage of state-action pairs. In other words, the set of states and actions in the dataset, denoted as {(s, a) &#8595; D}, represents a limited subset of the entire state space and action space, S &#8594; A. Moreover, learning on the data with incomplete coverage of state-action pairs potentially results in excessive value extrapolation during the learning process for methods using function approximation <ref type="bibr">[14]</ref>. Our model, based on SAC <ref type="bibr">[15]</ref>, incorporates several effective strategies for RL with offline data, as outlined in RLPD <ref type="bibr">[2]</ref>. These strategies include:</p><p>Layer Normalization: Off-policy RL algorithms often query the learned Q-function with out-ofdistribution actions, leading to overestimation errors due to function approximation. This can cause training instabilities and even divergence, particularly when the critic struggles to keep up with growing value estimates. To address this, prior research has employed Layer Normalization to ensure that the acquired functions do not extrapolate in an unconstrained manner. Layer Normalization acts to confine Q-values within the boundaries set by the norm of the weight layer, even for actions beyond the dataset. As a result, the impact of inaccurately extrapolated actions is substantially reduced, as their associated Q-values are unlikely to significantly exceed those already observed in the existing data. Consequently, Layer Normalization serves to alleviate issues such as critic divergence and the occurrence of catastrophic overestimation.</p><p>Update-to-Data: Enhancing sample efficiency in Bellman backups can be accomplished by elevating the frequency of updates conducted per environment step. This approach, often referred to as the update-to-data (UTD) ratio, expedites the process of backing up offline data.</p><p>Clipped Double Q-Learning: The maximization objective of Q-learning and the estimation uncertainty from value-based function approximation often leads to value overestimation <ref type="bibr">[62]</ref>. To address this problem, Fujimoto et al. <ref type="bibr">[13]</ref> introduced Clipped Double Q-Learning (CDQ) as a means of mitigation. CDQ involves taking the minimum from an ensemble of two Q-functions for computing TD-backups.</p><p>The targets for updating the critics are given by the equation y = r (s, a)</p><p>Maximum Entropy RL: Incorporating entropy into the learning objective (as defined in (1)) helps mitigate overconfidence in value estimates, particularly when training with offline datasets. In offline RL, policies may become overly conservative due to limited dataset coverage, leading to suboptimal exploration during fine-tuning. By preserving policy stochasticity, entropy regularization ensures that the agent remains adaptable when transitioning from offline training to online interactions. This controlled exploration has been shown to improve training stability and prevent premature convergence <ref type="bibr">[2,</ref><ref type="bibr">6,</ref><ref type="bibr">15,</ref><ref type="bibr">18]</ref>.</p><p>Limitations of the prior state-of-the-art. A drawback of RLPD, as discussed by Ball et al. <ref type="bibr">[2]</ref>, lies in its symmetric random sampling method applied to both online and offline data, disregarding the significance of individual transitions for evolving quality of policy. This predefined approach to sampling can potentially lead to less than optimal policy improvements due to the omission of vital data and inefficiencies arising from the use of redundant data. Such inefficiencies fail to offer any positive contribution towards enhancing policy. To address the limitation, our research presents an innovative active data sampling technique, specifically designed to optimize the use of both online and offline data in the process of policy improvement.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Algorithm</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Confidence-aware Active Advantage-Aligned Sampling Strategy</head><p>In this study, we theoretically derived from the performance difference lemma in &#167;5 and presented active advantage-aligned strategy, a novel sampling approach for policy improvement. Here, 'advantage' measures the potential impact of the transition on policy improvement, while 'aligned' assesses how well the transition aligns with the states sampled online by the current policy. This method allows for the safe utilization of online and offline samples by harnessing relevant, near on-policy offline samples that also present the potential to enhance policy improvement. For the advantage term, to enhance robustness, we use the pessimistic CDQ Q estimation, while incorporating uncertainty estimation for the value function under the current policy. Specifically, we estimate both the value function V -which directly determines the estimated advantage of A-and the associated uncertainty C A (s, a), through Monte Carlo samples of the on-policy actions. Furthermore, we extend this approach to density ratio estimation, using an ensemble of density networks to predict the density ratio w (s, a) and associated uncertainty C w (s, a). This approach broadens the distribution of samples used for updates, centering around on-policy examples, thereby facilitating immediate value. The active advantage-aligned priority &#962; and the probability p are as follows:</p><p>where I off and I on represents the indicator of offline and online respectively, density ratio w (s, a) is the LCB (Lower Confidence Bound) <ref type="bibr">[35]</ref> of density ratio, which measures the onlineness of the transition (defined in Eq. ( <ref type="formula">6</ref>)) in a conservative manner, A (s, a) is LCB of the advantage term, which assesses the potential of the transition in improving the policy and &#8640; &gt; 0 representing a temperature hyperparameter associated with the advantage term, and another &#8636; &gt; 0 for the entire priority term, per the standard PER approach. This approach considers not only the on-policyness of the data but also measures how important the data contributes to the current policy improvement. The active advantage-aligned sampling strategy aims to assign greater weight to transitions that are either not well covered by the offline dataset-indicating that the state-action pair is novel to the offline policy (i.e., the density ratio is large)-or that represent good actions for maximizing cumulative reward (i.e., the advantage / Q function is large).</p><p>Density ratio. We evaluate the onlineness through the use of a density ratio</p><p>for a given transition, where d on (s, a) denotes the state-action distribution of online samples in the online buffer R on and the d off (s, a) denotes the offline samples in the offline buffer R off . By identifying a transition with a high density ratio w (s, a), we can effectively select a near-on-policy sample (s, a, s &#8596; ) from the offline dataset B off . Consider the much larger volume of offline data compared to online data, this would greatly improve the amount of transition and diversity of coverage for policy improvement in each step.</p><p>Estimating the likelihoods d off (s, a) and d on (s, a) poses a challenge, as they could represent stationary distributions from mixture of complex policy. To address this issue, we employ a method studied by Lee et al. <ref type="bibr">[29]</ref>, Sinha et al. <ref type="bibr">[58]</ref> for density ratio estimation that does not rely on likelihoods. This method approximates w (s, a) by training a neural network w &#8636;i (s, a), which is parameterized by</p><p>where N e is the number of density networks in the ensemble. The training exclusively uses samples from B off and B on . We use variational representation of f-divergences <ref type="bibr">[44]</ref>. Consider P and Q as probability measures on a measurable space X , with P being absolutely continuous w.r.t Q. We define the function f (y) := y log 2y y+1 + log 2 y+1 . The Jensen-Shannon (JS) divergence is then defined as D JS (P ||Q) = X f (dP (x)/dQ (x)) dQ (x). Then we use a parametric based model w &#8636; (x) to represent density ratio dP dQ and estimated the density ratio by maximizing the lower bound of D JS (P ||Q):</p><p>where w &#8636; (x) &#8771; 0 is represented by a neural network, with parameters ensuring that the outputs remain non-negative through the use of activation function. Additionally, f &#8594; represents convex conjugate and we sampled from B on for x &#8600; P and from B off for x &#8600; Q.</p><p>Confidence-aware active advantage-aligned sampling. Relying solely on the density ratio is insufficient; even if a transition appears to be relevant in the online context, it may still fail to contribute meaningfully to policy improvement. For instance, consider a transition (s, a, s &#8596; ). If the</p><p>Algorithm 1 A 3 RL 1: Select LayerNorm, large ensemble Size E, gradient steps G, discount &#969;, temperature &#977;. 2: Randomly initialize Critic &#982; i (set targets &#982; &#8596; i = &#982; i ) for i = 1, 2, . . . , E, Actor &#1009; parameters. 3: Select critic EMA weight &#961;, batch size N , determine number of Critic targets to subset Z &#8595; {1, 2} 4: Initialize buffer D with offline data, online replay buffer R &#8656; &#8658; 5: while True do 6:</p><p>Receive initial observation state s 0 7:</p><p>for t = 0, . . . , T do 8:</p><p>Take action a t &#8600; &#949; &#982; (&#8226;|s t ), update buffer R &#8656; R &#8657; {(s t , a t , r t , s t+1 )}. </p><p>16:</p><p>Calculate importance weight u i via (3).</p><p>18:</p><p>Update &#982; i minimizing loss:</p><p>Update target networks:</p><p>With b, update &#1009; maximizing objective:</p><p>21:</p><p>policy has previously encountered this state and taken the same action, or if the action performed in this state could potentially lead to a negative reward, such a transition would not that helpful in contributing to policy improvement, regardless of how closely it aligns with on-policy data.</p><p>To address this, we incorporate an estimate of the advantage value A(s, a) (Eq. ( <ref type="formula">2</ref>)) into our sampling strategy. Specifically, we integrate a non-negative exponential advantage term, exp (&#8640; &#8226; A (s, a)), into the priority calculation. This term ensures that transitions are selected not only based on relevance but also on their contribution to policy improvement. The higher the advantage value, the greater the transition's impact on learning, making our sampling mechanism both adaptive and optimization-aware.</p><p>For transitions from the offline dataset, we prioritize samples based on both the estimated density ratio and advantage value, retrieving near-on-policy samples that also provide policy improvement benefits. Since the data source is known, we set the density ratio to 1 for transitions from the online dataset and prioritize them purely based on advantage values under the current policy. Additionally, there may be uncertainty and significant variance in estimating the advantage value and density ratio.</p><p>To address this, we adopt LCB as a conservative estimate. Thus, we define the priority function for sampling as:</p><p>Note that this advantage-aligned sampling strategy is not a heuristic-based approach but is theoretically derived in the performance difference lemma <ref type="bibr">[22]</ref>, providing insights into its effectiveness and superiority over the random sampling approach (see Section 5).</p><p>The active sampling process in our algorithm is highlighted in blue in Algorithm 1, while our approach to addressing sampling bias is highlighted in red.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Theoretical Analysis</head><p>In this section, we derive the priority term theoretically from the performance difference lemma <ref type="bibr">[22]</ref> and show that our active advantage-aligned sampling strategy leads to improved policy performance. Furthermore, we establish a theoretical lower bound on the performance improvement gap under our sampling scheme.</p><p>Theorem 1 Suppose the Q-function class is uniformly bounded, and for any Q-function, the corresponding optimal policy lies within the policy function class. Let &#9655; t denote the &#8467; 2 error of the Q-function in the critic update step. Let &#949; t be the policy at iteration t in A 3 RL, updated using priority-weighted sampling with w(s, a) exp(&#8640; &#8226; A(s, a)). Then, the following lower bound holds:</p><p>where</p><p>&#8637; represents the maximum possible improvement if the true Q-function were known, and the function R t (s, a; &#8640;) is given by:</p><p>The proof is provided in Appendix A. We note that the coefficient R t (s, a; &#8640;) is not necessarily the tightest possible bound, since it is based on the supremum norm and therefore can be dominated by a single (s, a) pair. A sharper result could be obtained by measuring distribution shift in the &#8467; 2 norm (or some other weaker norm). We nevertheless adopt the simpler supremum-norm bound here for clarity and to highlight the core intuition behind why advantage reweighting yields improvement, as will be detailed in the following.</p><p>Comparison to random sampling. The fundamental concept behind proving that our sampling technique surpasses random sampling and contributes to positive policy improvement involves initially applying the performance difference lemma. This approach yields the performance differential term J &#949; t+1 &#8596; J (&#949; t ) between the updated policy and the current policy. Our goal is to demonstrate that this term is non-negative under our sampling priority. To do this, we prove that by a shift of distribution, this term is no less than the gap</p><p>When looking at the distribution shift</p><p>we notice the shift between online/offline dataset is canceled, and the remaining terms comprise a shift term d &#969; t+1 (s)/d on (s) that characterizes how well the online data cover the visitation measure induced by the next policy, and another term that characterizes the shift in policy. In the sequel, we will see through an example why using some proper &#8640; helps reduce the shift in policy.</p><p>Why does advantage weighting help? We show that under certain conditions, the ratio R t (s, a) can decrease for increased value of &#8640;. Since &#8640; does not influcence the ration between the state distribution, let us just consider the bandit case with ratio</p><p>We illustrate the results of Theorem 1 on the bandit setting because its visitation measure reduces directly to the policy distribution-eliminating any dependence on a transition kernel-and note that the same argument carries over to MDPs with deterministic transitions. Moreover, the argument will still provide sufficient insight. Suppose the online data distribution d on (a) &#8599; exp(&#8637; 1 r(a)) for some parameter &#8637; while the policy &#949; t+1 (a) &#8599; exp(&#8637; 2 r(a)) for some parameter &#8637; 2 &gt; &#8637; 1 . This is reasonable since the policy converges faster than the online buffer to the optimal policy. Then we have the following lemma.</p><p>Lemma 1 For the bandit case with d on (a) &#8599; exp(&#8637; 1 r(a)) and &#949; t+1 (a) &#8599; exp(&#8637; 2 r(a)) for &#8637; 2 &gt; &#8637; 1 , the coefficient sup a R t (a; &#8640;) decreases as &#8640; increases within the range &#8640; &#8595; (0, 1 &#8596; &#8637; 1 /&#8637; 2 ).</p><p>This lemma justifies that within a proper range of &#8640;, adding more advantage weighting would benefit learning by reducing the distributional shift. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Experiments</head><p>Environments We evaluate A 3 RL on both dense and sparse reward tasks from the D4RL benchmark <ref type="bibr">[12]</ref>. These include halfcheetah, walker2d, and ant, which are dense reward locomotion tasks, and antmaze, which involves sparse rewards. Each environment offers offline datasets composed of trajectories ranging from completely random to expert. Appendix C provides additional details.</p><p>Setup. We employ the basic setup of the SAC networks as recommended by <ref type="bibr">[2]</ref>, i.e., with an ensemble of size 10 each for critic networks and target critic networks, as well as entropy regularization. A significant difference is that the MLP underlying these networks only has 2 layers of size 256 each, as we desired to see if the agent is able to learn with less complexity.</p><p>Baseline Methods For our main results, we compare A 3 RL with two baselines: (1) RLPD <ref type="bibr">[2]</ref>, regarded as the SOTA baseline for addressing online RL with offline datasets, also attains state-ofthe-art performance in this problem set, (2) SAC with offline data (SACfD), a canonical off-policy approach using offline data, as also studied in <ref type="bibr">[43]</ref> and <ref type="bibr">[64]</ref>. In the ablation studies, we evaluate A 3 RL against five additional representative baselines: (3) Off2On <ref type="bibr">[29]</ref>, an offline-to-online RL method; (4) a variant of A 3 RL using advantage estimation only; <ref type="bibr">(5)</ref> an online version of A 3 RL that excludes offline data; (6) SAC in an online setting without offline data; ( <ref type="formula">7</ref>) TD (Temporal Difference) with a PER <ref type="bibr">[55]</ref> sampling strategy; and (8) TD+Density, which combines PER with a density ratio sampling strategy.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.1">Main results</head><p>Fig. <ref type="figure">1</ref> presents a comparative analysis of A 3 RL's performance against the baseline SACfD and the current state-of-the-art method, RLPD. The results demonstrate that A 3 RL consistently outperforms the baseline across the evaluated domains. This performance advantage can be attributed to a fundamental difference in sampling strategy: while RLPD relies on symmetric random sampling, A 3 RL employs an active sampling approach based on advantage alignment.</p><p>Unlike RLPD, which treats all transitions uniformly, A 3 RL dynamically reevaluates the relevance and on-policyness of each transition as the policy evolves, continuously adjusting its sampling priority to align with the current learning needs. This targeted sampling ensures that the most beneficial transitions are prioritized, directly contributing to faster and more effective policy improvement.</p><p>In scenarios involving nearly random offline datasets Fig. <ref type="figure">1a</ref>,1b, datasets containing trajectories from a poorly performing policy, or even medium datasets Fig. <ref type="figure">1d</ref>,<ref type="figure">1c</ref>, useful transitions are often sparse and scattered. Random sampling, as used by RLPD, is likely to miss these valuable data points, leading to suboptimal performance. In contrast, A 3 RL 's active sampling strategy effectively identifies and emphasizes these critical transitions, resulting in substantial policy enhancements, as clearly illustrated in Fig. <ref type="figure">1</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Figure 2: halfcheetah-expert</head><p>In expert environments Fig. <ref type="figure">2</ref>, A 3 RL consistently matches or exceeds the performance of RLPD. This superior performance can be attributed to the higher quality of transitions present in medium and expert datasets, compared to random datasets. Consequently, even with a random sampling strategy, RLPD is still likely to encounter useful transitions. However, most offline datasets are provided in a black-box format, where the specifics of the data are unknown. Despite this uncertainty, A 3 RL achieves performance that is at least on par with RLPD, demonstrating robustness to varying data quality in these black-box conditions. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.2">Ablation studies</head><p>Ablation on advantage term Fig. <ref type="figure">3a</ref> illustrates the comparison between the performance of A 3 RL using advantage-aligned sampling priority and Off2On utilizing solely density ratio (&#962; = I off w (s i , a i ) + I on ), a modified version of balanced experience replay <ref type="bibr">[29]</ref>. The results show that A 3 RL with the advantage term surpasses its counterpart that only considers online-ness in prioritizing samples in the halfcheetah-random environments. This superiority is attributed to the advantage term, which effectively screens out transitions that are either non-informative or harmful. For example, even if a transition indicates online-ness, it may not provide new information if the policy has already mastered the associated action for that state. By integrating the advantage term, such repetitive transitions are excluded, as the advantage value tends to zero for well-understood transitions.</p><p>Ablation on density term Fig. <ref type="figure">3b</ref> compares the performance of A 3 RL to A 3 RL with only advantage in sampling priority (&#962; = exp (&#8640; &#8226; A)), without density term. The results consistently show that A 3 RL, which incorporates onlineness through the density term w = d on /d off , outperforms the version that does not. Onlineness measures the likelihood that A 3 RL will experience the given transition during the online exploration and exploitation of the current policy. Transitions experienced during online policy enhancement are more advantageous for policy development. In contrast, focusing on transitions that are unlikely to occur during live interactions with the environment can hinder the progression of policy improvement. This result demonstrates the effectiveness of onlineness term.</p><p>Ablation on purely online setting and offline data Fig. <ref type="figure">3c</ref> presents an ablation study comparing regular A 3 RL (in red), purely online A 3 RL (in blue), and SAC (in green), with neither having access to offline data. A 3 RL surpasses its purely online version when utilizing an offline dataset, as the offline data provides a more diverse range of transitions that the online policy might not encounter, effectively demonstrating A 3 RL's ability to leverage offline datasets. Moreover, the purely online version of A 3 RL outperforms SAC, highlighting A 3 RL's robustness in environment setting. The results confirm A 3 RL's effectiveness in a purely online environment and its superiority over SAC in online batch scenarios through active advantage-aligned sampling.</p><p>Ablation on priority term Fig. <ref type="figure">3d</ref> presents an ablation study for A 3 RL (in red), where we compare two different sampling strategies: PER as detailed in <ref type="bibr">[55]</ref> (named as TD in blue), and a modified version incorporating a density ratio (named as TD+Density in green). The TD-error based sampling strategy prioritizes transitions with larger TD-errors. A 3 RL significantly outperforms both strategies, illustrating that an active advantage-aligned sampling approach is more effective than prioritizing based on TD-error alone. The superior performance of A 3 RL over TD+Density also indicates that prioritizing using the advantage term achieve the better performance compared to the TD-error term.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="7">Conclusion</head><p>We present A 3 RL, a novel algorithm for online RL with offline dataset through a confidenceaware active advantage-aligned sampling strategy. This algorithm is theoretically motivated by the objective of shifting the sampling distribution toward more beneficial transitions to maximize policy improvement. We provide theoretical insights for A 3 RL and quantify its enhancement gap. Moreover, we conduct comprehensive experiments with various qualities of offline data, demonstrating that A 3 RL outperforms the SOTA RLPD method with significance. We also conduct multiple ablation studies and confirm the importance of each component within the active advantagealigned formula and its effectiveness to pure online setting as well. While our approach primarily aims to enhance performance, it may result in higher computational costs due to the calculations needed for determining advantage-aligned sampling priorities. Reducing computational demands will be a focus of our future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Theoretical Motivation</head><p>In this section, we show that the active advantage-aligned sampling strategy helps mitigate the gap between offline data distribution, online data distribution and the current on-policy distribution, which serves as a main theoretical motivation for designing A 3 RL.</p><p>Theorem 1 Suppose the Q-function class is uniformly bounded, and for any Q-function, the corresponding optimal policy lies within the policy function class. Let &#9655; t denote the &#8467; 2 error of the Q-function in the critic update step. Let &#949; t be the policy at iteration t in A 3 RL, updated using priority-weighted sampling with w(s, a) exp(&#8640; &#8226; A(s, a)). Then, the following lower bound holds:</p><p>where</p><p>&#8637; represents the maximum possible improvement if the true Q-function were known, and the function R t (s, a; &#8640;) is given by:</p><p>Proof: (Proof of Theorem 1). Define visitation measures</p><p>Consider a sufficiently small one-step update in the policy network with step-size &#9665;. Define</p><p>. Let &#63723; &#949; be the policy from the last iteration. In the following, we abbreviate</p><p>Using this iterative form, we conclude that</p><p>Recall our definition of &#962;(s, a) that</p><p>where &#181;(&#8226;, &#8226;) is the distribution in the sampled batch and d on (&#8226;, &#8226;) is the online distribution. Note that the advantage function A &#969; (s, a) = Q &#969; (s, a) &#8596; &#977; log a &#8594; exp(&#977; &#8600;1 Q(s, a &#8596; )) is calculated using policy &#63723; &#949; and Q function Q &#969; obtained from the last iteration in the above formula. Let us define &#949; &#982; &#982; as the optimal policy under the current Q function &#63723; Q:</p><p>where &#63723; Z &#8637; (s) is the normalization factor at state s for the exponential of the Q function, and A &#969; (s, &#8226;) is the advantage function under policy &#63723; &#949;. Recall by policy optimization:</p><p>where Q &#969; is the estimated Q function at the current iteration. In the above formula, &#181; is the sampled data distribution and &#962; is the quantity calculated in <ref type="bibr">(8)</ref>. Suppose we take some function class &#949; &#982; which contains the optimal one-step policy improvement &#949; &#8641; and also the optimization target &#949;. Using a shift of distribution, we have</p><p>where we define &#961;(s, a) as the probability density induced by the above distribution. Here, the first ratio d on (s)/d &#969; &#982; (s) is the state-drift between the online data and the next-step optimal policy. Since the online batches are refreshing as the algorithm proceeds, the ratio will be close to 1. The second ratio term characterizes the drift caused by a mismatch in the policy. Intuitively, as we know the policy &#63723; &#949; from the last iteration, we can use this information to further boost the alignment between the online policy and the next-step policy. Suppose the Q function is learned up to &#9655; error, that is</p><p>Then, we have performance difference lemma that</p><p>where C is an absolute constant given that both Q &#969; and Q &#969; are uniformly bounded. Here, the first inequality holds by the policy optimization step where we upper bound the second term by zero, and the last inequality holds by the assumption that the Q function class is uniformly bounded. Now, by a shift of distribution</p><p>Let's look at the distribution ratio</p><p>Therefore, the policy improvement is guaranteed by</p><p>This completes the proof. &#8621;</p><p>Now we give a formal proof for Lemma 1.</p><p>Lemma 1 For the bandit case with d on (a) &#8599; exp(&#8637; 1 r(a)) and &#949; t+1 (a) &#8599; exp(&#8637; 2 r(a)) for &#8637; 2 &gt; &#8637; 1 , the coefficient sup a R t (a; &#8640;) decreases as &#8640; increases within the range &#8640; &#8595; (0, 1 &#8596; &#8637; 1 /&#8637; 2 ).</p><p>Proof:(Proof of Lemma 1) Under the reparameterization d on (a) &#8599; exp(&#8637; 1 r(a)) and &#949; t+1 (a) &#8599; exp(&#8637; 2 r(a)), we have for the coefficient R t (a; &#8640;) that</p><p>Within the range &#8640; &#8595; (0, 1 &#8596; &#8637; 1 /&#8637; 2 ), we always have</p><p>Hence, the largest coefficient always occurs on action &#63723; a = arg max a &#8594; r(a &#8596; ). In addition, we consider the following ratio log R(a; &#8640;) R(a; 0) = &#8596;&#8640; log(&#949; t+1 (a)) + log</p><p>Note that the largest probability ratio happens for &#63723; a = arg max a &#8594; r(a &#8596; ). Since the softmax is strictly less than the argmax when r has different values in each action, the above derivative for action &#63723; a is negative, meaning that by increasing &#8640;, the value of R(&#63723; a; &#8640;) will decrease. As sup a R(a; &#8640;) = R(&#63723; a; &#8640;) by our previous discussion, we complete the proof. &#8621;</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Additional Related Work</head><p>Offline to online RL In an effort to mitigate the sample complexity of online RL <ref type="bibr">[36]</ref>, offline RL utilizes fixed datasets to train policies without online interaction, however it can be prone to extrapolation errors that lead to overestimation of state-action values. Recent off-policy actor-critic methods <ref type="bibr">[14,</ref><ref type="bibr">26,</ref><ref type="bibr">28,</ref><ref type="bibr">66]</ref> seek to mitigate these issues by limiting policy learning to the scope of the dataset, thereby minimizing extrapolation error. Strategies for reducing extrapolation error include value-constrained approaches <ref type="bibr">[28]</ref> that aim for conservative value estimates and policy-constrained techniques <ref type="bibr">[43]</ref> that ensure the policy remains close to the observed behavior in the data. There are several works that leverage advantage estimation to guide policy improvement in purely offline RL, such as LAPO <ref type="bibr">[5]</ref>, A2PR <ref type="bibr">[32]</ref>, and A2PO <ref type="bibr">[48]</ref>. However, they are not well-suited for online settings because they fail to consider the importance of "onlineness," measured by the density ratio, to align with the needs of online RL exploration and exploitation. Additionally, they do not account for uncertainty in advantage estimation.</p><p>While offline RL methods can outperform the dataset's behavior policy, they rely entirely on static data <ref type="bibr">[30]</ref>. When the dataset has comprehensive coverage, methods like FQI <ref type="bibr">[1]</ref> or certaintyequivalence model learning <ref type="bibr">[50]</ref> can efficiently find near-optimal policies. However, in practical scenarios with limited data coverage, policies tend to be suboptimal. One approach to addressing this suboptimality is to follow offline RL with online fine-tuning, however as discussed above, existing methods are prone to catastrophic forgetting and performance drops during fine-tuning <ref type="bibr">[39]</ref>. In contrast, A 3 RL begins with online RL while incorporating offline data to enhance the policy, selectively leveraging offline data to facilitate online policy improvement.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Experimental Details</head><p>In order to ensure fair evaluation, all baselines and ablation studies are assessed using an equal number of environment interaction steps. We average results over 10 seeds to obtain the final result. One standard error of the mean is shaded for each graph.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.1 Additional experimental results.</head><p>We explored whether different mixtures of offline datasets can be exploited by A 3 RL. In particular, for the D4RL locomotion halfcheetah, walker2d, hopper and ant environments in Fig. <ref type="figure">4</ref>, mix A corresponds to having the offline dataset consisting of 100% of the -simple Minari dataset, mix B corresponds to 100% -simple and 5% -medium, while mix C corresponds to 100% -simple and 10% -medium. Those proportions were chosen due to the recognizable difference in the performance of RLPD under these different settings. In particular, we observed that all RLPD runs with the offline dataset consisting of 100% of the -simple dataset and no less than 30-40% of the -medium dataset achieve similar performance. Meanwhile at lower percentages such as 5% and 10%, there is a difference between runs of RLPD, which implies that there is significant impact from the offline dataset quality to the bootstrapping from offline transitions. For the Adroit environments (Fig. <ref type="figure">5</ref>) pen, relocate and door, the -cloned dataset plays the role of the -simple dataset above, while the -expert plays the role of the -medium dataset above. The mixtures were generated similarly. A 3 RL robustly outperforms, or at least performs on par with, RLPD across diverse black-box environments. C.2 Additional ablation studies.</p><p>Ablation on density term. Fig. <ref type="figure">6</ref> presents further ablation studies on the density term for A 3 RL. We see the distinction in the effectiveness of the density term is more significant over harder tasks like antmaze-medium-play. Ablation on purely online setting. Fig. <ref type="figure">7</ref> presents further ablation studies on A 3 RL interacting with the environment in a purely online manner, i.e., the algorithm does not utilize access to offline data. It is consistent throughout tested environments that A 3 RL is able to leverage offline data effectively, especially in harder tasks like antmaze-medium-play where purely online A 3 RL fails to learn in the same number of steps. Ablation on priority term. Fig. <ref type="figure">8</ref> presents further ablation studies on the priority term for A 3 RL, where we compare it against the sampling strategy that solely uses TD-error as the priority term, and another that combines the density term with TD-error. The superior performance of A 3 RL over TD+Density over tested environments indicates that prioritizing using the advantage term achieves better performance compared to the canonical TD-error term. Training and evaluation environments. Fig. <ref type="figure">9</ref> presents snapshots of tested D4RL locomotion tasks: halfcheetah, walker2d, hopper, ant and antmaze. halfcheetah, walker2d, hopper and ant have dense rewards, while antmaze has sparse rewards, and all environments are equipped with continuous state and action spaces.</p><p>In the halfcheetah environment, the 2D agent resembles a simplified cheetah model with a torso and lined legs, with the objective of forward locomotion and maintaining balance while maximizing speed. In the walker2d environment, the 2D humanoid agent has 2 legs and multiple joints, with the objective of stable bipedal walking without falling. In the ant environment, the agent is a 3D quadrupedal agent with multiple joints and degrees of freedom, with the objective of moving forward efficiently while maintaining balance. For all of these environments, rewards are given for velocity to encourage the agent to move forward efficiently while maintaining balance, and several offline datasets, per <ref type="bibr">[12]</ref>, with varying characteristics, as detailed below, were tested. Fig. <ref type="figure">10</ref> presents snapshots of tested Adroit manipulation tasks: pen, relocate, and door. These environments involve a simulated 28-DoF robotic arm interacting with objects in a 3D space and are characterized by sparse rewards and continuous state and action spaces.</p><p>In the pen environment, the robotic arm is tasked with reorienting a pen to a target orientation in free space. In the relocate environment, the arm must pick up a ball and move it to a target position, requiring coordinated grasping and relocation of an object in 3D space. The door task involves the robotic arm grasping and pulling open a door, necessitating nuanced contact dynamics and manipulation under constraints. For all of these environments, rewards are sparse and typically only given upon task completion, increasing the exploration difficulty.</p></div></body>
		</text>
</TEI>
