WebRL: Training LLM Web Agents via Self-Evolving Online Curriculum Reinforcement Learning

## Abstract

Abstract Large language models (LLMs) have shown remarkable potential as autonomous agents, particularly in web-based tasks.
However, existing LLM web agents heavily rely on expensive proprietary LLM APIs, while open LLMs lack the necessary decision-making capabilities.
This paper introduces WebRL , a self-evolving online curriculum reinforcement learning framework designed to train high-performance web agents using open LLMs. WebRL addresses three key challenges in building LLM web agents, including the scarcity of training tasks, sparse feedback signals, and policy distribution drift in online learning.
Specifically, WebRL incorporates 1) a self-evolving curriculum that generates new tasks from unsuccessful attempts, 2) a robust outcome-supervised reward model (ORM), and 3) adaptive reinforcement learning strategies to ensure consistent improvements.
We apply WebRL to transform open Llama-3.1 and GLM-4 models into proficient web agents. On WebArena-Lite, WebRL improves the success rate of Llama-3.1-8B from 4.8% to 42.4%, and from 6.1% to 43% for GLM-4-9B. These open models significantly surpass the performance of GPT-4-Turbo (17.6%) and GPT-4o (13.9%) and outperform previous state-of-the-art web agents trained on open LLMs (AutoWebGLM, 18.2%).
Our findings demonstrate WebRL ’s effectiveness in bridging the gap between open and proprietary LLM-based web agents, paving the way for more accessible and powerful autonomous web interaction systems.
The code, model, and data are made publicly available at https://github.com/THUDM/WebRL .

## 1 Introduction

Large language models (LLMs) have exhibited not only superior comprehension of human language, commonsense reasoning, and knowledge acquisition, but also significant potential in complex planning and logical reasoning, indicating their promising trajectory towards serving as autonomous LLM agents (Wang et al., ; Liu et al., ).
A diverse array of applications for LLM agents has proliferated, encompassing domains such as code generation (Jimenez et al., ), database manipulation (Zhou et al., ; Gu et al., ), and graphical user interface (GUI) interaction (Rawles et al., ; Yang et al., ; Xie et al., ).
Among these, web agents powered by LLMs (Deng et al., ; Zheng et al., ; Lai et al., ; Pan et al., ) have garnered particular attention due to their extensive application prospects and unique potential for fostering authentic autonomous intelligence within the digital ecosystem.

Notwithstanding these advancements, existing LLM web agents, regardless of their performance metrics or architectural paradigms, remain under-developed.
High-performing LLM web agents predominantly rely on meticulously crafted prompts in conjunction with proprietary LLM APIs (e.g., OpenAI GPT-4) for web page comprehension and manipulation, which is both expensive and time-intensive.
Conversely, open-source LLMs exhibit notable deficiencies in their capability to function as proficient web agents, primarily due to the scarcity of decision-centric data in both pre-training and post-training periods.
Despite recent endeavors (Lai et al., ; Pan et al., ) to train web agents on open LLMs via imitation learning, these approaches insufficiently leverage the inherently online nature of web interactions and fail to yield consistent, continual improvements.

Challenges.
In this work, we propose to train high-performance web agents based on open LLMs within online environments, specifically utilizing WebArena (Zhou et al., ).
Our investigation has identified several critical challenges inherent to this task:
1) Insufficiency of training tasks: In contrast to offline datasets (Deng et al., ; Rawles et al., ) that facilitate agent training and evaluation on human-annotated oracle trajectories, online benchmarks such as WebArena typically provide only a limited test set for evaluation purposes.
This dearth of predefined training tasks significantly impedes the effective training of agents within these environments.
2) Sparsity and cost of feedback signals: The assessment of success for arbitrary web browsing tasks is difficult in the absence of task-specific evaluation functions.
Moreover, unlike tasks in certain GUI datasets (e.g., AITW (Rawles et al., ) and WebShop (Yao et al., )), those in WebArena are typically of long horizons, with oracle solutions averaging about 10 steps. This characteristic introduces substantial sparsity in the available signals during online exploration.
3) Policy distribution drift in online learning: The absence of a predefined training set necessitates online exploration, inevitably leading to distribution drift in the agent’s policy.
This phenomenon is likely to induce catastrophic forgetting and performance degradation over time.

The WebRL Framework.
In response to these challenges, we introduce WebRL, a self-evolving online curriculum reinforcement learning framework designed for training LLM web agents.
To the best of our knowledge, this represents the first systematic framework enabling effective reinforcement learning for LLM web agents from initialization in online web environments.
Through the application of WebRL, we have successfully transformed a Llama-3.1-8B model into a proficient LLM web agent, elevating its success rate (SR) on WebArena-Lite (Zhou et al., ; Liu et al., ) from an initial 4.8% to 42.4% across a diverse set of five websites.
Furthermore, when applied to Llama-3.1-70B, we achieve a remarkable 49.1% SR, significantly surpassing the performance of the most advanced proprietary LLM API (GPT-4-Turbo, 17.6% SR) and the previous state-of-the-art web agents trained on open-source LLMs (AutoWebGLM (Lai et al., ), 18.2% SR).

Figure: Figure 2: Overview of WebRL. WebRL is a self-evolving online curriculum reinforcement learning framework for LLM-based web agents, yielding consistent continual improvements throughout the iterative self-evolution.
Refer to caption: x3.png

The substantial performance gains from WebRL can be attributed to several key architectural designs.
To address the scarcity of web agent training tasks, we have devised a self-evolving online curriculum that harnesses the trial-and-error process inherent in exploration.
This curriculum is underpinned by a robust outcome-supervised reward model (ORM) that we have newly developed.
In each training phase, novel tasks are autonomously generated from unsuccessful attempts in the preceding phase, facilitating a progressive learning trajectory.
To mitigate the policy distribution shift induced by curriculum-based reinforcement learning, we incorporate a KL-divergence term between the reference and actor policies into our learning algorithm, thereby constraining policy updates and promoting stability.
We implement an experience replay buffer augmented with a novel actor confidence filtering strategy to ensure the fidelity of replayed experiences and prevent over-fitting to previously acquired knowledge.
The experimental results confirm the effectiveness of WebRL. In particular, the agent demonstrates improved performance when selecting past experiences of moderate difficulty—neither too simple nor too challenging relative to the agent’s current capabilities. Additionally, the use of a larger KL divergence constraint in the policy update process results in better performance when incorporating past experience.

In summary, our work makes the following significant contributions to the field:

- •
We introduce WebRL, a novel self-evolving online curriculum RL framework for training LLM-based web agents. For the first time, it implements the infrastructure for RL in the WebArena environment, together with a strong ORM, to drive open LLMs to become capable web agents.
- •
WebRL advances the RL for LLM agent training by addressing key challenges including the scarcity of training tasks, sparsity of feedback signals, and distribution drift in online learning. The self-evolving curriculum and adaptive learning strategies allow the consistent continual improvement of LLM web agents during iteration.
- •
We demonstrate WebRL’s substantial performance improvements over existing methodologies such as AWR and DigiRL, achieving state-of-the-art results on the WebArena-Lite benchmark. It surpasses the best proprietary LLM API and previously trained web agent on open LLMs by over 160% relatively.

## 2 WebRL : Self-Evolving Online Curriculum RL

We present a self-evolving online curriculum learning framework designed for training web agents, targeting the WebArena (Zhou et al., ) environment.
In this system, as illustrated in Figure 2, the agent continuously interacts with its environment to collect real-time trajectory data. This interaction is guided by the self-evolving curriculum learning strategy that dynamically generates tasks, effectively mitigating the insufficiency of training tasks. Furthermore, the tasks generated by the self-evolving curriculum learning strategy are tailored to the agent’s current proficiency, thereby increasing the likelihood of receiving positive feedback and alleviating the challenge of sparse feedback signals. Additionally, we train an outcome-supervised reward model (ORM) to evaluate task success. We introduce a KL-constrained policy update algorithm that prevents severe policy shifts during curriculum learning. A replay buffer is also utilized to retain prior knowledge and mitigate the risks of catastrophic forgetting. These techniques enable the agent to improve incrementally, progressively handling more complex tasks.

Problem Formulation.
We model the process of completing the web task as a finite-horizon Markov Decision Process (MDP), denoted by $(S,A,R,\mathcal{T})$.
Given a user instruction $I$, the agent is required to complete the corresponding task.
The state $s$ is defined as the HTML content of the current web page along with the history of previous actions.
The agent receives a reward of 1 upon successful task completion, and 0 otherwise.
In the finite-horizon setting, the trajectory ends either when the task is accomplished or when the maximum number of interactions $T$ is exceeded.
To explain our method clearly, we introduce the following notation.
The policy $\pi(\cdot|s_{t},I)$ represents the distribution over actions given the state $s_{t}$ and the instruction $I$.
The value function $V(s_{h},I)=\mathbb{E}_{\pi}\left[\sum_{t=h}^{T}r(s_{t},a_{t},I)\right]$ represents the expected cumulative reward from the state $s_{h}$ under policy $\pi$.
The action-value function $Q(s_{t},a_{t},I)$ is the expected cumulative reward for taking action $a_{t}$ on state $s_{t}$ and following policy $\pi$ thereafter: $Q(s_{t},a_{t},I)=r(s_{t},a_{t})+V(s_{t+1},I)$.

ORM Training.
In the curriculum learning process, we need to determine whether the corresponding instruction is completed based on the trajectory generated by the agent.
Due to the lack of feedback from the environment, we train an LLM as the outcome-supervised reward model $\mathcal{M}_{\text{ORM}}$ to automate this task success evaluation.
$\mathcal{M}_{\text{ORM}}$ allows us to assess the agent’s rollout trajectory for any given task, providing a binary reward signal (0 for failure and 1 for success).

Similar to the approach in (Zhang et al., ), we configure $\mathcal{M}_{\text{ORM}}$ to output “YES” or “NO” to indicate whether a trajectory successfully completes a task, leveraging the learned knowledge from the language head of $\mathcal{M}_{\text{ORM}}$.
Given the limited context window of LLMs and the typically long length of HTML documents, we adopt a strategy akin to  (Pan et al., ), keeping the HTML of only the final state to the input.
In addition, the historical actions of agents, which provide information about previous steps of trajectories are also included.
Thus, the input to the model consists of several components: the instruction $I$, historical actions, and HTML of the final state.
We wrap these components into the prompt asking the model to determine whether the trajectory successfully completes the task described by instruction $I$.
To obtain the outcome, we compare the probabilities of generating “YES” and “NO” from $\mathcal{M}_{\text{ORM}}$.
If the probability of generating “YES” is higher than that of generating “NO”, the task is considered successful, and the reward is set to 1.
Otherwise, the reward is set to 0.

### 2.1 Reinforcement Learning for LLMs in Online Web Environments

A typical challenge in training LLM web agents within WebArena is the scarcity of training tasks, resonating with the situation of developing real-world web agents.
Although the recent work (Liu et al., ) has curated a trajectory fine-tuning set for WebArena, it only contains around 1k instructions with oracle trajectories, far from enough for training strong LLM web agents.

Therefore, we set our study to an online curriculum learning setting, where the model progressively encounters and learns a new set of tasks at each phase in the process to improve data efficiency.
Considering the setting, a major challenge here is to avoid excessive policy distribution drift during each learning phase, which could lead to the catastrophic forgetting of previously acquired knowledge.
Traditional approaches typically mitigate the issue by mixing data from different phases.
However, in web agent tasks, intermediate steps do not receive direct process rewards, with only weak signals from the outcome of the final state.
Consequently, even if an intermediate step is executed correctly, an error in later steps can easily lead to the final failure, resulting in misjudgment of the intermediate step and making it difficult to be reused.
As a result, in this work, we primarily seek algorithmic improvements to address policy distribution drift more directly.

A potential solution comes from ideas in reinforcement learning with human feedback (RLHF) (Ouyang et al., ), where the Kullback-Leibler (KL) divergence between two policies is constrained to mitigate policy distribution drift. By adapting this to our curriculum learning setup, we aim to ensure that the policy in the current phase does not deviate too much from the policy in the previous phase, while still optimizing performance on new tasks. Let the policy from the previous phase be denoted as $\pi_{\text{ref}}$, and the current policy being optimized as $\pi_{\theta}$. The instruction distribution for the current phase is represented as $\rho(I)$. The objective for optimizing $\pi_{\theta}$ in the current phase can then be written as follows:

$$ $\max_{\pi_{\theta}}\mathbb{E}_{I\sim\rho(I),a_{t}\sim\pi_{\theta}(\cdot|s_{t}) }\left[\sum_{t=0}^{T}\left(r(s_{t},a_{t},I)+\beta\log\pi_{\text{ref}}(a_{t}|s_ {t},I)\right)+\beta\mathcal{H}(\pi_{\theta})\right]$ (1) $$

where $\beta$ is a coefficient controlling the strength of the KL divergence constraint and $\mathcal{H}(\pi_{\theta})$ represents the entropy of the current policy.

Following the work of (Rafailov et al., ), we can interpret the objective of eq. 1 as a maximum entropy reinforcement learning problem. The optimal policy $\pi^{*}$ for this problem can be expressed as:

$$ $\pi^{*}(a_{t}|s_{t},I)=e^{\left(Q^{*}(s_{t},a_{t},I)-V^{*}(s_{t},I)\right)/\beta}$ (2) $$

where $V^{*}(s_{t},I)$ is the optimal value function, representing the expected cumulative reward under the optimal policy $\pi^{*}$. $Q^{*}(s_{t},a_{t},I)$ is the optimal action-value function. The relationship between $Q^{*}$ and $V^{*}$ is given by:

$$ $Q^{*}(s_{t},a_{t},I)=\begin{cases}r(s_{t},a_{t},I)+\beta\log\pi_{\text{ref}}(a _{t}|s_{t},I)+V^{*}(s_{t+1},I),&\text{if }s_{t+1}\text{ is not terminal}\\ r(s_{t},a_{t},I)+\beta\log\pi_{\text{ref}}(a_{t}|s_{t},I),&\text{if }s_{t+1} \text{ is terminal}\end{cases}$ (3) $$

Based on eq. 2 and eq. 3, we can derive:

$$ $\beta\log\frac{\pi^{*}(a_{t}|s_{t},I)}{\pi_{\text{ref}}(a_{t}|s_{t},I)}=r(s_{t },a_{t},I)$ (4) $$

The work of (Ng et al., ) indicates that two rewards $r$ and $r^{\prime}$ are equal and will yield the same optimal policy if they satisfy $r^{\prime}(s_{t},a_{t})=r(s_{t},a_{t})+\phi(s_{t+1})-\phi(s_{t})$. Consequently, eq. 4 can be rewritten as:

$$ $\beta\log\frac{\pi^{*}(a_{t}|s_{t},I)}{\pi_{\text{ref}}(a_{t}|s_{t},I)}=r(s_{t },a_{t},I)+V^{*}(s_{t+1},I)-V^{*}(s_{t})=A^{*}(s_{t},a_{t},I)$ (5) $$

Here, $A^{*}(s_{t},a_{t},I)$ indicates the advantage of taking action $a_{t}$ in state $s_{t}$ compared to the average reward expected in that state.
Based on the condition, we can formulate the loss function of policy $\pi_{\theta}$ as:

$$ $\mathcal{L}(\pi_{\theta})=\mathbb{E}_{\nu}\left[\left(\beta\log\frac{\pi_{ \theta}(a|s,I)}{\pi_{\text{ref}}(a|s,I)}-A^{*}(s,a,I)\right)^{2}\right]$ (6) $$

where $\nu(s)$ represents the distribution of experience in this phase.

What Does The Update Do? To gain a mechanistic understanding of the loss function, we analyze the gradient of the loss function, $\mathcal{L}(\pi_{\theta})$. The gradient with respect to the parameters $\theta$ can be expressed as:

$$ $\nabla_{\theta}\mathcal{L}(\pi_{\theta})=-2\beta\mathbb{E}_{\nu}\Big{[} \underbrace{\big{(}A^{*}(s,a,I)\vphantom{\frac{\pi_{\theta}(a|s,I)}{\pi_{\text {ref}}(a|s,I}}}_{\smash{\text{update direction}}}-\underbrace{\beta\log\frac{ \pi_{\theta}(a|s,I)}{\pi_{\text{ref}}(a|s,I)}}_{\smash{\text{KL divergence constraint}}}\big{)}\underbrace{\nabla_{\theta}\log\pi_{\theta}(a|s,I) \vphantom{\frac{\pi_{\theta}(a|s,I)}{\pi_{\text{ref}}(a|s,I}}}_{\smash{\text{ sft loss}}}\Big{]}$ (7) $$

The gradient demonstrates the following attributions:

- $\bullet$
When the advantage $A^{*}(s,a,I)>0$, action $a$ is valuable, so its probability should increase. If $\pi_{\theta}$ is lower than $\pi_{\text{ref}}$, this increase will be amplified, especially as the gap between them grows. If $\pi_{\theta}$ is already higher than $\pi_{\text{ref}}$, the increase will be moderated to avoid excessive deviation.
- $\bullet$
When $A^{*}(s,a,I)<0$, the action is suboptimal, so its probability should decrease. If $\pi_{\theta}$ is lower than $\pi_{\text{ref}}$, the KL divergence constraint will limit how much it can be reduced to avoid a large divergence. If $\pi_{\theta}$ is higher than $\pi_{\text{ref}}$, a larger decrease will be allowed.
- $\bullet$
The parameter $\beta$ controls the strength of the KL divergence constraint. Adjusting $\beta$ can help fine-tune this constraint. For instance, increasing $\beta$ can prevent unnecessary boosts in action probabilities when $\pi_{\text{ref}}$ already assigns a high probability to an action.

Training a Reliable Advantage Estimator.
A reliable advantage estimator is essential for effective policy updates. We train a value network $V(s_{t},I)$ and use Generalized Advantage Estimation (GAE) (Schulman et al., ) to compute the advantage. In our setting, we only receive a binary reward (0 or 1) at the final step, with no intermediate rewards (i.e., intermediate rewards are effectively zero). Following recent approaches (Farebrother et al., ), we train the value network using a cross-entropy objective. The loss function for the value network $V$ is defined as:

$$ $\mathcal{L}(V)=-\mathbb{E}_{\nu}\Big{[}r(s_{T},a_{T},I)\log V(s,a,I)+(1-r(s_{T },a_{T},I))\log(1-V(s,a,I))\Big{]}$ (8) $$

In line with (Bai et al., ), we focus solely on the next-step and final-step advantage estimators, since there is no intermediate reward.

$$ $A(s_{t},a_{t},I)=\lambda\big{(}r(s_{t},a_{t},I)+V(s_{t+1},I)-V(s_{t},I)\big{)} +(1-\lambda)\big{(}r(s_{T},a_{T},I)-V(s_{t},I)\big{)}$ (9) $$

where $\lambda$ is a balancing factor that controls the trade-off between bias and variance in advantage estimation. We set $\lambda$ as 0.5 in our work.

Experience Replay Buffer with Actor Confidence Filtering.
In addition to controlling the policy distribution drift at the algorithmic level through KL, we also implement an adaptive replay buffer to alleviate knowledge forgetting at the data level.
Specifically, we only store those successful trajectories (which can be sparse) from each phase in the replay buffer.
During phase $i$, we use the actor from the last phase to compute the perplexity of all actions in the buffer. Actions with a perplexity within the range of 1/0.95 to 1/0.5, along with their corresponding states, are added to the training data for the current phase. This filtering process excludes both over-familiar data and data that remains too challenging for the actor. Additionally, by storing only successful trajectories, we avoid the challenge of accurately estimating intermediate states for incorrect trajectories from previous phases.

### 2.2 Self-evolving New Instruction for Curriculum Learning

To achieve continuous improvement, we implement a self-evolving curriculum-learning strategy that generates instructions tailored to the agent’s current skill level. This strategy incrementally enhances the agent’s capabilities by progressively adapting and advancing the complexity of tasks in accordance with the agent’s development. In each phase, we implement a two-step process of generation and filtering, to produce tasks that are incrementally more challenging, while still being suitable for the agent’s current capability. During the generation phase, we use the in-breadth evolving approach (Xu et al., ) to create new instructions. We select instructions the model failed to complete in the previous interaction phase as seeds for generating new instructions. Detailed prompts are provided in the Appendix § C.
To ensure that the generated instructions are both feasible in the target environment and aligned with the desired difficulty level, we first filter them using the trained critic. Specifically, we use the critic to evaluate each new instruction by considering its initial state. We select instructions with critic scores between 0.05 and 0.75, ensuring that only tasks meeting our difficulty criteria are retained. Then, we manually check the instructions to eliminate instructions that are clearly unreasonable or impossible to accomplish. The resulting set of instructions is used for interaction and training in the next phase.

## 3 Experiments

### 3.1 Environments and Baselines

Environments. The effectiveness of WebRL and baseline methods is evaluated using the WebArena environment (Zhou et al., ). WebArena is particularly well-suited to our needs, as it provides a highly interactive platform that supports online learning. Additionally, WebArena encompasses a variety of websites, including OpenStreetMap (Map), Reddit, GitLab, online store content management system (CMS), and OneStopShop (OSS), making it an ideal benchmark for comprehensively assessing model performance on web tasks.
In the original WebArena environment, a total of 812 instructions are provided. Considering the cost of testing, we use 165 test cases from WebArena-Lite (Liu et al., ) for evaluation.

Baselines.
We compare WebRL with proprietary LLMs utilizing prompting techniques, as well as open-sourced LLMs trained with alternative methods. For proprietary models, we select GPT-4-Turbo-2024-0409 (GPT-4-Turbo) (Achiam et al., ) and [GPT-4o](https://openai.com/index/hello-gpt-4o/). In addition to AWM (Wang et al., ) and WebPilot (Zhang et al., ), we also use the results of models under the simple prompt as baselines. Details of the simple prompt can be seen in Appendix § C.
For the open-source models, in addition to using these models with the simple prompt as baselines, we also train Llama3.1 (Dubey et al., ) and GLM-4-9B (GLM et al., ) using various approaches as baselines. Specifically, we employ imitation learning, also referred to as supervised fine-tuning (SFT), to train these models. The training data is derived from publicly available human-labeled demonstrations, sourced from the WebArena-Lite.
In addition, we also explore several reinforcement learning methods for comparison, including Filtered Behavior Cloning (Filtered BC) (Pan et al., ), advantage-weighted regression (AWR) (Peng et al., ) and DigiRL (Bai et al., ). For WebRL and the reinforcement learning-based baselines, we utilize the SFT-trained model as the initial model for the actor. The critic is similarly based on the SFT-trained model, with the addition of a randomly initialized value head. The training details of WebRL and baselines can be found in Appendix § A.

**Table 1: Task success rate (SR) of WebRL and other comparison methods, evaluated on WebArena-Lite (Zhou et al., ; Liu et al., ), a human-verified subset of WebArena (* denotes results on full WebArena taken from literature reporting). The best and second-best models are highlighted.**
| Models | #Params | Reddit | Gitlab | CMS | Map | OSS | Avg. SR |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Proprietary LLMs |  |  |  |  |  |  |  |
| GPT-4-Turbo | N/A | 10.5 | 16.7 | 14.3 | 36.7 | 13.3 | 17.6 |
| GPT-4o | N/A | 10.5 | 10.0 | 20.0 | 20.0 | 11.1 | 13.9 |
| AWM + GPT-4-0613^∗ (Wang et al., ) | N/A | 50.9 | 31.8 | 29.1 | 43.3 | 30.8 | 35.5 |
| WebPilot + GPT-4o^∗ (Zhang et al., ) | N/A | 65.1 | 39.4 | 24.7 | 33.9 | 36.9 | 37.2 |
| Open-sourced LLMs |  |  |  |  |  |  |  |
| AutoWebGLM (Lai et al., ) | 6B | 9.4 | 15.0 | 28.6 | 24.8 | 17.1 | 18.2 |
| GLM-4-Chat (GLM et al., ) | 9B | 5.3 | 10.0 | 6.7 | 3.3 | 6.7 | 6.1 |
| GLM-4 + SFT (BC) | 9B | 47.4 | 13.3 | 31.4 | 23.3 | 13.3 | 22.4 |
| GLM-4 + Filtered BC | 9B | 52.6 | 10.0 | 31.4 | 26.7 | 20.0 | 24.8 |
| GLM-4 + AWR (Peng et al., ) | 9B | 52.6 | 16.7 | 34.3 | 30.0 | 22.2 | 27.9 |
| GLM-4 + DigiRL (Bai et al., ) | 9B | 63.2 | 30.0 | 34.3 | 26.7 | 26.7 | 31.5 |
| GLM-4 + WebRL (ours) | 9B | 57.9 | 50.0 | 48.6 | 36.7 | 37.8 | 43.0 |
| Llama3.1-Instruct (Dubey et al., ) | 8B | 0.0 | 3.3 | 2.9 | 3.3 | 11.1 | 4.8 |
| Llama3.1 + SFT (BC) | 8B | 36.8 | 6.7 | 20.0 | 33.3 | 17.8 | 20.6 |
| Llama3.1 + Filtered BC | 8B | 52.6 | 20.0 | 31.4 | 23.3 | 8.9 | 23.0 |
| Llama3.1 + AWR (Peng et al., ) | 8B | 57.9 | 26.7 | 31.4 | 26.7 | 17.8 | 28.5 |
| Llama3.1 + DigiRL (Bai et al., ) | 8B | 57.9 | 26.7 | 37.1 | 33.3 | 17.8 | 30.3 |
| Llama3.1 + WebRL (ours) | 8B | 63.2 | 46.7 | 54.3 | 36.7 | 31.1 | 42.4 |
| Llama3.1-Instruct (Dubey et al., ) | 70B | 10.5 | 16.7 | 17.1 | 20.0 | 4.4 | 12.7 |
| Llama3.1 + SFT (BC) | 70B | 52.6 | 20.0 | 20.0 | 26.7 | 13.3 | 23.0 |
| Llama3.1 + WebRL (ours) | 70B | 78.9 | 50.0 | 54.3 | 40.0 | 44.4 | 49.1 |

ORM.
WebArena-Lite (Liu et al., ) provides training samples along with a corresponding reward function. We further enhance this set of data by introducing task rewrites, as well as modifying certain data variables, such as place names and product names. We also make adjustments to the associated reward function. $\mathcal{M}_{\text{ORM}}$ is trained using rollouts of WebRL and part of baseline methods on this set of tasks, with evaluation results determined by the reward function. More details can be found in Appendix § A.

### 3.2 Main Results

Our main results, presented in Table 1, show that Llama3.1-8B trained using WebRL achieves an average accuracy of 42.4%, surpassing all baselines, including prompting and training alternatives. Notably, WebRL excels in specific tasks such as Gitlab (46.7%) and CMS (54.3%), demonstrating its ability to address complex web tasks effectively.
Reinforcement learning-based approaches outperform those based on imitation learning, including SFT and Filtered BC, which tend to over-repeat certain actions. For instance, in the table analysis task of CMS, SFT-trained models often over-optimize the “Scroll Down” action, which occurs with high frequency. This over-optimize can cause the model to become
trapped in local loops, thereby hindering its ability to achieve the overall task objective effectively. In contrast, reinforcement learning mitigates this by using a critic to estimate the value of each step, optimizing for long-term cumulative rewards, hence enabling more effective handling of complex, multi-step tasks. Furthermore, WebRL consistently outperforms DigiRL. A significant limitation of DigiRL is that it conducts policy updates on a predefined, fixed set of tasks, which may not align with the model’s current skill level. Some of these tasks are particularly challenging for the model to learn due to the sparse reward situations.
This misalignment can cause the model
to converge to suboptimal solutions and restrict its capacity for exploration and skill advancement. WebRL addresses this limitation by employing self-evolving curriculum learning, adjusting the task complexity based on the model’s current abilities. This strategy promotes wider exploration and supports continuous improvement. A similar phenomenon is also observed in the case of the GLM-4-9B, providing evidence that the benefits of WebRL extend across different model architectures, validating its robustness and adaptability.

### 3.3 Scaling Effect of WebRL

We further validate the effectiveness of WebRL on larger-scale models by training Llama3.1-70B using WebRL. The specific results are presented in Table 1. After training with WebRL, Llama3.1-70B achieves an overall accuracy of 49.1%, reflecting a 26.1% improvement over the accuracy achieved with SFT. This indicates that WebRL is scalable and can be effectively applied to larger-scale models.
Furthermore, when comparing the performance improvement from Llama3.1-8B to Llama3.1-70B achieved through SFT, WebRL demonstrates even greater performance gains as the model scale increases.

### 3.4 Distribution Analysis of Error Types

We compare the performance of Llama 3.1-8B trained with WebRL against baseline methods across different error types: “Fail to Recover”, “Get Stuck Midway”, “Stop at Wrong Page”, and “Fail to Make Reasonable Attempt”, as shown in Figure 3.
WebRL demonstrates significant advantages in reducing the “Get Stuck Midway” error, especially compared to SFT and Filtered BC. The “Get Stuck Midway” error typically arises when the model gets trapped in a loop, repeatedly executing the same action without making progress. Reinforcement learning helps mitigate this issue by optimizing each action while considering its overall impact on the task, enabling the model to make more effective decisions.
Additionally, the model trained with WebRL demonstrates enhanced robustness in handling the “Fail to Recover” error. Through curriculum learning, the model gradually learns how to adapt its actions when encountering failures. For example, when the search query “Pharmacy near CMU within a 20-minute walking distance” does not yield the desired results, the model learns to modify the query to “Pharmacy near CMU” and attempts the search again, rather than repeating ineffective actions.
In addition, WebRL exhibits the lowest error rate on both “Stop at Wrong Page” and “Fail to Make Reasonable Attempt” errors, indicating the model trained with WebRL has a more profound comprehension of the relationship between tasks and web pages. It can better identify the correct page needed to complete a specific task, reducing the chances of mistakenly stopping on the wrong page or navigating to an incorrect page.

Figure: Figure 3: Distribution analysis of error types for WebRL and baseline methods.
Refer to caption: x4.png

### 3.5 Performance on Tasks with Varying Step Requirements

We evaluate the performance of Llama3.1-8B, trained using WebRL and baseline methods, on tasks with varying step requirements. To determine the required step count for each task, we exclude tasks that no model completes and use the trajectory with the fewest steps as the required step count for each remaining task. The results are shown in Figure 5.
It can be seen that the performance of models trained with SFT and Filtered BC shows a noticeable decline as the task length increases. This is likely because these models optimize individual steps without considering the cumulative impact, making them less effective on long-horizon tasks. DigiRL-trained model improves performance on medium-length tasks but struggles with longer tasks (more than 10 steps). This limitation may stem from DigiRL’s online learning on a fixed set of tasks. Even when the model executes intermediate steps correctly, it doesn’t receive positive rewards if errors occur in later steps, making it harder for the model to learn how to complete tasks that require many steps effectively.
In contrast, WebRL overcomes this issue with curriculum learning, progressively increasing task difficulty. This approach enhances the model’s ability to handle long sequences, leading to significant performance improvements on tasks requiring long-term planning compared to other methods.

Figure: Figure 4: Accuracy of WebRL and baselines for tasks requiring different steps.
Refer to caption: x5.png

### 3.6 Performance on Tasks with Varying Complexity

Figure: Figure 6: Accuracy of WebRL and baselines for tasks with different complexity.
Refer to caption: x7.png

We further analyze the performance of WebRL and baselines across instructions of varying complexity, as shown in Figure 6. Instruction complexity is measured by the number of requirements in the task. For example, the instruction “What are the top-3 best-selling products in Jan 2023” has two requirements: identifying the top-3 products and specifying the timeframe, giving it a complexity level of 2.
Our results show that WebRL performs well across different complexity levels, particularly excelling in more complex instructions. In contrast, while DigiRL uses online learning, it struggles with higher complexity due to its focus on a predefined set of tasks that do not align with the model’s capabilities, limiting its adaptability. This highlights the effectiveness of our self-evolving curriculum learning strategy, which progressively increases task complexity based on the model’s capacity, enabling better performance on challenging tasks.

### 3.7 Ablation Study

We conduct an ablation study to evaluate the impact of the replay buffer, KL-constrained policy update algorithm, and the curriculum learning strategy on WebRL. To assess their contributions, we compare WebRL with four alternative models: (1) WebRL w/o replay buffer, where training uses only the current interaction trajectory, (2) WebRL w/o KL, where the policy is updated using SFT but retains the replay buffer, (3) WebRL w/o KL & replay buffer, which uses neither a replay buffer nor the KL-constrained policy update algorithm, and (4) DigiRL, which employ online learning on a fixed set of instructions and AWR algorithm to update the policy.

The results, shown in Figure 5, demonstrate that all the components used by WebRL are essential. (1) The role of the replay buffer. The results reveal that when the replay buffer is removed, both WebRL w/o replay buffer and WebRL w/o KL & replay buffer experience worsening performance over time. This decline occurs because the models lose access to earlier experiences and focus only on recent data, leading to knowledge degradation.
(2) The role of the KL-constrained policy update algorithm. Comparing WebRL and WebRL w/o KL, WebRL consistently performs better, due to the incorporation of KL-constrained policy update algorithm. While both use the replay buffer, WebRL benefits from reinforcement learning, which allows it to extract valuable information even from failed trajectories, unlike imitation learning in SFT, which discards error trajectories entirely.
When the replay buffer is not used, the KL-constrained policy update algorithm degrades more slowly than SFT because it better retains past knowledge by controlling KL divergence. In contrast, SFT quickly overfits the current phase’s data and consistently underperforms its initial value. Overall, the KL-constrained policy update algorithm is more effective at balancing the retention of past knowledge with the learning of new information.
(3) The role of the self-evolving curriculum learning strategy. When comparing WebRL to DigiRL, both exhibit an overall upward trend due to online learning. However, DigiRL progresses more slowly and reaches a lower performance ceiling because it operates within a fixed task framework, whereas WebRL generates new tasks that adapt to its evolving capabilities. This highlights the effectiveness of our self-evolving curriculum learning approach.

**Table 2: The impact of perplexity in replay buffer filtering of WebRL.**
| $\mathbf{[1,\infty]}$ | $\mathbf{[1,\frac{1}{0.95}]}$ | $\mathbf{[\frac{1}{0.95},\!\frac{1}{0.5}]}$ | $\mathbf{[\frac{1}{0.5},\!\infty]}$ |
| --- | --- | --- | --- |
| 29.1 | 27.9 | 31.5 | 23.0 |

The influence of perplexity.
We analyze the impact of using perplexity to select data from the replay buffer for training. Various perplexity thresholds are tested in the first learning phase, and the results are summarized in Table 2. It can be observed that training on data with very low perplexity (range [1, 1/0.95]) leads to performance deterioration. This suggests that repeatedly learning overly familiar data harms the model. Similarly, training exclusively on data with high perplexity (above 1/0.5) also degrades performance, likely due to the model struggling with unfamiliar data, causing a significant shift in policy distribution and hindering generalization. Optimal performance is achieved when training on data with a perplexity range of [1/0.95, 1/0.5], indicating that a balance between simple and complex data enhances model performance by focusing on moderately difficult examples.

Figure: Figure 7: The impact of $\beta$ of KL-constrained policy update algorithm on the model’s performance.
Refer to caption: x8.png

The impact of $\beta$.
We investigate the effect of $\beta$ on performance with and without the replay buffer, as shown in Figure 7. The study is conducted on curriculum learning in one phase.
First, when $\beta$ is too small (e.g., $\beta$ = 0.01), model performance deteriorates, regardless of whether a replay buffer is used. This decline occurs because a small $\beta$ imposes a weak control over the KL divergence, causing the model to overfit the current data.
Second, without the replay buffer, performance initially improves as $\beta$ increases but then declines when $\beta$ becomes too large, indicating that large $\beta$ (e.g., $\beta\geq 1$) will overly restrict KL divergence, limiting the model’s ability to update its policy effectively.
In contrast, with the replay buffer, performance stays high even at larger $\beta$ values. The historical experiences stored in the replay buffer facilitate more frequent and diverse parameter updates, supporting a stable improvement process, even as the $\beta$ value increases.

**Table 3: Evaluation on output-supervised methods (baselines adopted from (Pan et al., )). Our ORM, without accessing proprietary GPT-4, performs the best among all.**
|  | Our ORM (8B) | GPT-4 | Captioner + GPT-4 | GPT-4V |
| --- | --- | --- | --- | --- |
| Test Dataset (%) | 80.8 | 71.9 | 72.6 | 71.2 |
| Rollout (%) | 79.4 | 71.2 | 73.3 | 70.5 |

### 3.8 Evaluation of ORM

In the WebRL framework, continuous improvement depends significantly on the effectiveness of the ORM, which plays a crucial role in evaluating interaction trajectories to guide the agent’s learning process. To assess ORM’s effectiveness, we compare its performance with several baseline models, including GPT-4-Turbo using identical inputs of our ORM, Captioner + GPT-4-Turbo, and GPT-4V, both using the same prompts with Pan et al. ().
We evaluate ORM and the baselines on two datasets: the WebArena-Lite test set and 100 sampled rollouts which are manually labeled. For the WebArena-Lite test data, we use its reward function outputs as labels. The results, shown in Table 3, indicate that while the baseline models consistently achieve an accuracy slightly above 70%, our ORM surpasses them with an accuracy of approximately 80%.

### 3.9 Case Study

Figure: Figure 8: Examples of instructions generated in different phases under self-evolving curriculum learning.
Refer to caption: x9.png

Figure 8 presents some instructions generated by the self-evolving curriculum learning strategy across different phases. Although these instructions are grouped by phase, the instructions shown in phase $i+1$ are not necessarily generated using the instructions from phase $i$ as seeds.
As the phase increases, two types of augmentation occur for previously incomplete instructions. In one case, new instructions with similar task requirements are generated, enabling the model to complete the previously unfinishable instructions after working through these newly generated ones. For example,
In phase 2, the instruction improves upon the phase 1 instruction by offering a clearer task description and explicitly requiring results in “yearly interval”. This enhancement enables the model to complete the task successfully by removing ambiguity. Additionally, with the positive feedback from the clarified phase 2 instruction, the model can better understand and accurately perform the original Phase 1 task as well.
In another case, the model generates tasks with increased complexity and greater diversity, which the agent is unable to complete successfully. This task complication facilitates a continuous improvement in the model’s capabilities by challenging its performance boundaries.
Therefore, the process of instruction generation exhibits such a pattern: for tasks that the model is unable to perform, analogous tasks are created to provide incremental steps that facilitate learning how to accomplish that type of task. Furthermore, tasks that remain challenging for the model are also generated and undergo the aforementioned iterative process. Through this iterative approach, the model’s capabilities gradually improve, enabling it to perform increasingly complex tasks over time.

## 4 Related Works

Adopting LLMs as Agent.
As LLMs capabilities advance, their applications extend beyond text generation (Zheng et al., ) and complex reasoning (Zelikman et al., ; Zhang et al., ), and increasingly involve acting as agents for device control. Current research in this area falls into two main categories: training-free and training-based approaches.
Training-free methods enhance pre-existing LLMs through prompt engineering (Yan et al., ; He et al., ; Zhang et al., ) and constructing complex systems (Liu et al., ; Wang et al., ; Yang et al., ; Wu et al., ; Iong et al., ; Zhang et al., ). However, their performance is constrained by the limitations of the underlying LLMs, and the absence of fine-tuning restricts further improvement (Chen et al., ; Zeng et al., ; Xie et al., ).
Training-based approaches, primarily relying on imitation learning, require extensive expert demonstrations (Gur et al., ; Zhang & Zhang, ; Deng et al., ; Hong et al., ; Rawles et al., ; Zhang et al., ), which are costly to obtain. Although some methods use powerful LLMs like GPT-4 to generate demonstrations (Chen et al., ), their accuracy remains insufficient for complex tasks. These methods often maximize the likelihood of individual actions without adequately considering long-term effects, limiting generalization (Ghosh et al., ; Bai et al., ).
To mitigate this, some studies use sampling-based methods to estimate long-term effects (Lai et al., ; Putta et al., ), while others, like ours, leverage reinforcement learning (Bai et al., ; Pan et al., ; Zhai et al., ). However, most existing methods rely on static task sets, which hinder the agent’s continuous improvement as its capabilities evolve. To overcome this, we propose a dynamic task generation framework that adjusts task complexity based on the agent’s progress, alongside a KL-constrained policy-update algorithm for ongoing performance enhancement.

Reinforcement Learning for LLMs.
Reinforcement learning has gained traction in training LLMs, with applications ranging from preference optimization (Ouyang et al., ; Casper et al., ) to complex reasoning (Hao et al., ; Pang et al., ). A growing area of interest involves using RL for device control tasks, which require multi-step interactions where the model selects appropriate actions based on the device state. This sequential decision-making aligns well with RL techniques.
Existing research has explored RL-trained LLM agents for complex device control, primarily using online learning methods. For instance, AgentQ (Putta et al., ) uses DPO (Rafailov et al., ) for policy updates based on interaction data, while other methods (Bai et al., ; Zhou et al., ; Zhai et al., ) utilize actor-critic architectures, which we also adopt. However, in web tasks, feedback is often limited to binary success or failure after multiple interaction rounds. This can penalize correct intermediate actions due to later mistakes, complicating the reuse of previous data.
Moreover, current research mainly applies reinforcement learning techniques on predefined fixed task sets, far from fully exploring its potential for continuous improvement through trial and error. To address this, we propose an autonomous curriculum learning mechanism that dynamically generates tasks based on the agent’s evolving skills, fostering ongoing progress. Additionally, we introduce a KL-constrained policy update algorithm and a specialized replay buffer to reuse valuable historical data and prevent knowledge forgetting during iterative curriculum updates.

## 5 Conclusion

In this work, we introduce WebRL, a novel self-evolving online curriculum reinforcement learning framework for training LLM-based web agents. By addressing key challenges including the scarcity of training tasks, feedback signal sparsity, and policy distribution drift, WebRL enables continual and consistent improvement in agent performance within online environments like WebArena. Our approach demonstrates substantial performance gains, significantly surpassing existing state-of-the-art web agents and proprietary LLM APIs. These results highlight the effectiveness of WebRL in advancing the capabilities of open-source LLMs for web-based tasks.

Acknowledgments.
We would like to thank Zhipu AI for sponsoring the computation resources and annotation cost used in this work.

## Appendix A Training Details

WebRL and baselines: For RL-based baselines (except DigiRL), the interaction data from WebRL’s first phase is used, while DigiRL is trained using the first-phase instructions in an online learning setup. Hence, except for DigiRL, the other RL baselines fall under offline reinforcement learning.
We reproduce the same framework used in DigiRL within the WebArena environment. Specifically, we use the same components, including the (AWR) method, the instruction-level and step-level value functions, and the replay buffer described in DigiRL. The main modifications we make are adjusting the data format to align with /model and tweaking certain hyperparameters.

In each phase of learning within WebRL, 500 new instructions that meet the filtering criteria are selected from those generated by GPT-4o. Both newly generated interaction data and historical data with perplexity between 1/0.95 and 1/0.5 from the replay buffer are used to train the actor and critic, with the replay data limited to twice the size of current interaction data. The hyperparameters employed in WebRL and all baselines are presented in Table 4.

The specific input and output format of WebRL and baselines is shown in Figure 9. The input is composed of task instruction, action history, and HTML of the current page. We process the HTML, simplifying its structure and assigning distinct element IDs to all clickable elements. This facilitates the model’s ability to identify and indicate which specific element requires manipulation. The output specifies the action that needs to be performed on the webpage. The available actions are the same as those defined in WebArena-Lite. The target element for the action is determined by the ”element” argument. To provide more detailed information about the action, we include comments labeled with “# Element:” in the action, which describe the operated element. Similarly, we include comments labeled “# Note:”, which quote relevant information from the current webpage that supports completing the instruction.

ORM: To train the $\mathcal{M}_{\text{ORM}}$, we enhance the WebArena-Lite training dataset by rewriting both the instructions and their associated reward functions. Additionally, we supplement the dataset with examples from WebArena, excluding any cases that are part of the WebArena-Lite test set. Subsequently, we collect rollouts from all baseline methods and WebRL on this augmented dataset, resulting in a total of 12,200 samples. These samples are subsequently used to train the ORM, with the specific hyperparameters listed in Table 5. The prompt for $\mathcal{M}_{\text{ORM}}$ is shown in Figure 18. $\mathcal{M}_{\text{ORM}}$ is required to produce either “YES” or “NO” as its output. To determine the evaluation result, we compare the probabilities assigned to “YES” and “NO” and select the one with the higher probability.

Figure: Figure 9: The input and output format of WebRL and baselines, where the input is composed of task instruction (in green), action history (in blue), and HTML of the current webpage (in orange). The output (in red) is the action taken on the current webpage.
Refer to caption: x10.png

**Table 4: The hyperparameters we employ in WebRL and baselines.**
| Method | Hyperparameter | Value |
| --- | --- | --- |
| SFT | learning rate | 1e-5 |
| lr scheduler type | cosine |  |
| warmup ratio | 0.1 |  |
| batch size | 128 |  |
| training epoch | 1 |  |
| cutoff length | 16384 |  |
| Filtered BC | learning rate | 1e-6 |
| lr scheduler type | constant |  |
| batch size | 128 |  |
| training epoch | 1 |  |
| cutoff length | 16384 |  |
| filtering threshold | 70th percentile |  |
| AWR | actor learning rate | 1e-6 |
| actor lr scheduler type | constant |  |
| critic learning rate | 1e-6 |  |
| critic lr scheduler type | constant |  |
| batch size | 128 |  |
| discount factor | 0.9 |  |
| actor training epoch | 1 |  |
| critic training epoch | 1 |  |
| DigiRL | actor learning rate | 1e-6 |
| actor lr scheduler type | constant |  |
| critic learning rate | 1e-6 |  |
| critic lr scheduler type | constant |  |
| instruction value function lr | 1e-6 |  |
| instruction value function lr scheduler type | constant |  |
| batch size | 128 |  |
| discount factor | 0.9 |  |
| actor training epoch | 1 |  |
| critic training epoch | 1 |  |
| instruction value function epoch | 1 |  |
| rollout temperature | 1 |  |
| replay buffer size | 100000 |  |
| WebRL | actor learning rate | 1e-6 |
| actor lr scheduler type | constant |  |
| critic learning rate | 1e-6 |  |
| critic lr scheduler type | constant |  |
| batch size | 128 |  |
| discount factor | 0.9 |  |
| actor training epoch | 1 |  |
| critic training epoch | 1 |  |
| rollout temperature | 1 |  |

**Table 5: The hyperparameters we employ to train the ORM.**
| Hyperparameter | Value |
| --- | --- |
| learning rate | 5e-6 |
| lr scheduler type | cosine |
| warmup ratio | 0.1 |
| batch size | 128 |
| training epoch | 4 |
| cutoff length | 16384 |

## Appendix B Other Quantitative Experiments

Figure 10 illustrates the performance variation curves of Llama3.1-8B trained with WebRL on each website. It can be seen that in all the sites except for Map, there is a clear upward trend. However, in the case of Map, there is an initial upward trend followed by a decline. We hypothesize that the final decline is caused by a significant increase in OSS and CMS implementation, which creates a trade-off. This trade-off leads to a performance drop in Map and a slight decline in GitLab.

Figure: Figure 10: Performance variation curves of Llama3.1-8B on each website under WebRL training.
Refer to caption: x11.png

## Appendix C Prompts Employed in WebRL

The simple prompt we use to test models including GPT-4-Turbo, GPT-4o, Llama3.1-8B-Instruct, Llama3.1-70B-Instruct, and GLM-4-9B-Chat is shown in Figure 11.

Figure: Figure 11: The simple prompt employed in baselines.
Refer to caption: x12.png

The prompt for generating new instructions is presented in Figure 12.

Figure: Figure 12: Prompts for instruction generation.
Refer to caption: x13.png

The prompt used for $\mathcal{M}_{\text{ORM}}$ is shown in Figure 18.

Figure: Figure 13: Prompts for $\mathcal{M}_{\text{ORM}}$ to assess the completion of Instructions.
Refer to caption: x14.png

## Appendix D Qualitative Examples

We list one example of WebRL on each of the five sites in WebArena.

Figure: Figure 14: CMS Example.
Refer to caption: extracted/5977238/figure/appendix/combined_image_cms.png

Figure: Figure 15: Gitlab Example.
Refer to caption: extracted/5977238/figure/appendix/combined_image_gitlab.png

Figure: Figure 16: MAP Example.
Refer to caption: extracted/5977238/figure/appendix/combined_image_map.png

Figure: Figure 17: Reddit Example.
Refer to caption: extracted/5977238/figure/appendix/combined_image_reddit.png

Figure: Figure 18: OSS Example.
Refer to caption: extracted/5977238/figure/appendix/combined_image_oss.png

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 6
presentation: 2
questions: * Why do you develop a new RL approach, rather than applying PPO (or a similar algorithm) to the KL-regularized reward?
* Why are the success rates in Figure 5 so low? Shouldn’t they be around 40% on average for WebRL, to be consistent with Table 1? Perhaps the denominator in Figure 5 was accidentally set to “all tasks” rather than tasks at the appropriate complexity level.
soundness: 2
strengths: * Training LLMs to navigate the web is an important area of research
* The results in the paper appear to be quite strong.
* The experimental results involve a good variety of baselines and ablations.
summary: This paper proposes WebRL: a framework for training agents that can navigate the web using reinforcement learning. They apply their framework to train Llama-3 8B and Llama-3 70B agents that navigate the web, with strong performance on WebArena-Lite.

The overall process for training the agents is:

1. Run the agent on an initial set of instructions from the WebArena-Lite training set, and score them with the WebArena-Lite reward function. Initialize the replay buffer with successful trajectories. Initialize the failure set with instructions from the failing trajectories. Train an outcome-supervised generative reward model (ORM) using these trajectories to predict whether a task has been successfully completed. 
2. Generate 500 new instructions using GPT-4o, prompting it to create instructions similar to the ones from the failure set, but more diverse.
3. Filter the generated instructions. First filter them using the trained critic (value function), keeping instructions which the critic predicts are difficult but possible (between 0.05 and 0.75). Then filter through manual human review, to eliminate bad instructions.
4. Run the agent on the instructions to generate a set of trajectories to generate a training set. Extend the training set with actions from the replay buffer whose perplexity is between 1/0.95 and 1/0.5.
5. Update the agent policy on these trajectories using an RL algorithm that combines policy gradients, advantage estimation, and replay buffers.
6. Add successful trajectories to the replay buffer, and add instructions from failing trajectories to the failure set.
7. Go back to step 2 to begin a new phase.

The authors compare against a variety of baselines, including imitation learning and DigiRL, as well as a variety of ablations of their method.
weaknesses: ## RL algorithm

There are a few weaknesses with the RL approach (Section 2.1):

* It’s not clear to me why the authors derive a new RL algorithm. I don’t see what benefits this would have over the approach of using PPO with the KL-regularized reward (as in [Ziegler et al](https://arxiv.org/abs/1909.08593)). In fact, I believe that the authors’ algorithm is nearly equivalent to REINFORCE with a value function baseline – the only difference I see is that in the authors’ algorithm, the gradient is multiplied by a factor of $\beta$, which seems undesirable to me (ideally the scale of the gradient wouldn’t be sensitive to $\beta$).
* In addition, this new algorithm is an on-policy algorithm – but it is used alongside a replay buffer, which is naturally off-policy. Presumably an off-policy correction term would be needed.
* Also, the math used to derive the new algorithm is flawed. Specifically, to derive Equation (5) from Equation (4), the authors rely on the result that the optimal policy in an RL environment is unaffected by potential shaping. However, this result does not hold in the KL-regularized RL setting, so this step is invalid.

## Presentation

I found the paper somewhat hard to understand – it was hard to tell what the various components were and how they fit together. Figure 1 is quite helpful in clarifying this with an architecture diagram, but I would recommend that the authors also include an algorithm description, similarly to the outline provided in my summary above. (Please do also let me know if my summary is wrong.)

It is somewhat misleading to say that the task distribution is “self-evolving” when it involves a manual step (L261):

> Then, we manually check the instructions to eliminate instructions that are clearly unreasonable or impossible to accomplish.

## Other

**Single benchmark.** Since the authors only evaluate on a single task (WebArena-Lite) it is hard to tell which aspects of their setup are specific to WebArena and which are generalizable to any LLM control environment. Given the importance of browser control, and the diversity of tasks within WebArena, this is only a minor weakness. However, it could be addressed by applying the WebRL recipe to similar settings, such as Android (in which DigiRL was evaluated).

**Task complexity results.** On lines 392-396 the authors say:

> Our results show that WEBRL performs well across different complexity levels, particularly excelling in more complex instructions. In contrast, while DigiRL uses online learning, it struggles with higher complexity due to its focus on a fixed set of tasks, limiting its adaptability.

However, this doesn’t seem to be supported by Figure 5, where it appears that both WebRL and DigiRL see significantly lower task success rates at higher complexity levels.

**KL ablation.** The authors say they consider a version of WebRL without the KL regularization – however, they say that this involves running SFT. This seems like the wrong way to do it – instead, the policy should be trained with an RL algorithm, but without the KL regularization. This would produce a similar gradient as SFT, except that it would be weighted by the advantage function. The baseline reported in the paper is also interesting, though it should be called “WebRL-SFT” or something similar rather than “WebRL w/out KL”.

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 4
questions: See weaknesses and the question about Digi-RL.
soundness: 3
strengths: This paper tackles a very important topic.
It is well written, I enjoyed reading it.
Authors showcase an impressive performance gap over considered baselines.
Authors present an in-depth analysis of their approach, which is valuable
summary: Authors present WebRL, a new framework to fine-tune LLMs for interactive web tasks with sparse rewards. WebRL leverages a curriculum learning setup to perform online actor-critic RL over generated task sets of increasing difficulty. The completion of these generated tasks is assessed autonomously using a learned reward model. Experimental studies are conducted on WebArena-Lite. There, authors showcase the performance advantages of their approach wrt prompt-based method and learning-based methods such as imitation learning or reinforcement learning.
weaknesses: ### Comparison to no-curriculum RL

The no-curriculum reinforcement learning baseline considered in this paper is Digi-RL. It is in my opinion the most important baseline. It would be good to better understand the differences between Digi-RL and WebRL. Is WebRL  == "Digi-RL with a Curriculum Learning (CL) setup, a KL loss and a replay buffer" ? If no, what are the differences ? What I mean behind this question is that ideally to propose a new CL method it is better to plug the CL method on a well known learner, rather than proposing a new learner AND a curriculum learning method.

### Reliance on human-filtering for curriculum steps

An important weakness is that the curriculum learning process is not autonomous: generated new tasks are ultimately curated by a human. It does not mean the approach is not interesting, but it might be good to emphasize a bit more this limitation, which is only mentioned on line l.261

### Decision

Despite these issues I believe the paper is interesting enough to be accepted. I will go for a weak accept and look forward to the discussion to update my score.


### minor/typos

Be careful about citing journals/conferences and not arxiv, i.e. "Agentbench: Evaluating llms as agents" was published at ICLR 2024. Many arxiv citations in the current version

"(Rawles et al., 2024;Yang et al., 2023; Xie et al., 2024)." --> always cite from oldest to newest

l.162 "progressive" --> progressively

l257 "Detailed prompts are provided in the Appendix § A.3." --> Appendix A.3 is empty of text, although I managed to find the figures. Make sure to reference and briefly discuss each figure in the appendix text.0

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 1
questions: 1. What is the performance of WebRL without curriculum learning and DigiRL with curriculum learning?
2. In lines 77-79 “those in WebArena are typically of long horizons, with oracle solutions averaging 10 steps. This characteristic introduces substantial sparsity in the available signals during online exploration”. How can 10-step-long tasks be counted as long horizons in decision-making tasks? 
3. What is the clear definition of phase? 
4. Could you provide more analysis and insight into how RL mitigates the issue in lines 365-366?
5. Why discount factor is not applied in the value function?
6. In Lines 243-244, how to calculate the perplexity of the action?
7. In lines 304-305, where do the data come from?
8. What is the advantage of the loss shown in equation (6) compared to the standard loss function with KL?
9. How is the generalizbility of WebRL. Can the trained agent be deployed to other tasks or even to the real PC?
soundness: 2
strengths: 1. WebRL is an online RL framework, which greatly saves the need for dataset preparation in SFT.
2. WebRL outperformed baseline methods on WebArena-Lite benchmark and also has the ability to scale up.
summary: This paper proposed WebRL, an online RL framework to train LLM-based web agents. It applies a curriculum learning for agents’ continual improvement with a trained outcome reward model. It applies a KL divergence to prevent the actor from deviating too much from the previous policy and a replay buffer to prevent catastrophic forgetting. Empirical studies show that WebRL outperformed baseline methods on WebArena-Lite benchmark and also has the ability to scale up.
weaknesses: 1. The authors claimed that WebRL is a self-evolving framework, mainly due to its curriculum learning module. However, the generated instructions need to be checked manually to eliminate unreasonable or impossible instructions. This manual check greatly weakens the term, self-evolving, which is one of the key contributions in this paper. It is also unknown to what extent this manual check impacts the overall training process.

2. The experimental results are not conducted fairly. All the RL-based methods, except for WebRL are only trained on the generated 500 instructions in the first phase, whereas WebRL is trained iteratively on multiple phases. Training curves (steps VS success rate) and error bars are also not provided in the paper. The RL-based methods need to report the results with several seeds.

3. The ablation study is not sufficient. In lines 342-346, the authors contribute the limitation of DigiRL to the lack of self-evolving curriculum learning, however, in the ablation study, the authors did not ablate the curriculum learning.

4. Limited training details are reported in the paper and appendix, such as the hyperparameter for the experiments, observation and action space, how to train the ORM, how to use the replay buffer, etc. I am highly concerned with the reproducibility of this work.

5. The writing needs improving, which is confusing and difficult to understand, especially in the introduction of ORM and curriculum learning, where curriculum learning should be introduced first in the second section. Due to the lack of examples, it is difficult to understand the difference of the generated instruction and the original tasks in the benchmark and the necessity of the ORM model.

6. A number of RL for LLMs works are not mentioned in the related works, which are not limited to GLAM[1], TWOSOME[2], RL4VLM[3] and ArCHer[4].

[1] Carta, Thomas, et al. "Grounding large language models in interactive environments with online reinforcement learning." International Conference on Machine Learning. PMLR, 2023.

[2] Tan, Weihao, et al. "True Knowledge Comes from Practice: Aligning Large Language Models with Embodied Environments via Reinforcement Learning." The Twelfth International Conference on Learning Representations.

[3] Zhai, Yuexiang, et al. "Fine-Tuning Large Vision-Language Models as Decision-Making Agents via Reinforcement Learning." arXiv preprint arXiv:2405.10292 (2024).

[4] Zhou, Yifei, et al. "Archer: Training language model agents via hierarchical multi-turn rl." arXiv preprint arXiv:2402.19446 (2024).

Meta-review: (a) This paper introduces WebRL, a new framework for fine-tuning LLMs for interactive web tasks. The authors propose an actor-critic RL method learning with a self-evolving online curriculum that generates new tasks from unsuccessful attempts. This allows WebRL to operate over sets of generated tasks that become increasingly difficult as training progresses. To assess whether the generated tasks are completed, the authors use a trained outcome reward model. The paper focuses on training open-source LLMs as agents for web navigation and claims to achieve impressive performance on WebArena-Lite, outperforming both prompt-based and learning-based methods.

(b) Strengths:
- Strong performance on WebArena-Lite, significantly outperforming existing state-of-the-art web agents, including those based on proprietary LLMs.
- Addressing key challenges: WebRL tackles critical issues in training web agents, such as the scarcity of training tasks, sparse feedback signals, and policy distribution drift in online learning.
- Novel framework: The paper proposes a novel self-evolving online curriculum RL framework, which dynamically adjusts task complexity.

(c) Weaknesses:
- Clarity on algorithm design: Reviewers found the paper somewhat difficult to understand, particularly regarding why to propose a new RL method for off-policy learning.
- Experimental limitations: The reliance on a single benchmark (WebArena-Lite) makes it difficult to assess the generalizability of the findings to other web environments, especially with the manual intervention steps for each web environment.
- Limited ablation studies and training details: Reviewers identified insufficient ablation studies, particularly regarding the curriculum learning strategy and the impact of individual design choices. Additionally, the paper lacked details about the training process for the outcome reward model (ORM).
- Experimental limitations: Using single benchmark (WebArena)

(d) Given the novelty and strong performance of the paper, I think there is a consensus that the strengths outweigh the weaknesses.

Decision: Accept (Poster)