Adversarial Environment Generation for Learning to Navigate the Web

Izzeddin Gur, Natasha Jaques, Kevin Malta, Manoj Tiwari, Honglak Lee, Aleksandra Faust

Abstract

Training reinforcement learning (RL) agents to autonomously navigate the web is notoriously difficult due to the sheer diversity and combinatorial complexity of real-world websites. This paper introduces a novel Adversarial Environment Generation (AEG) approach, Flexible b-PAIRED, which trains an adversary to automatically build a curriculum of increasingly difficult web pages. By dynamically tailoring website complexity to the agent's current skill level, the method achieves state-of-the-art success rates on complex, unseen web navigation tasks.

Introduction

Imagine asking an AI assistant to "Buy me a plane ticket to LA leaving on Friday." To execute this, an RL agent must interact directly with the Document Object Model (DOM) of a website, navigating a massive state-action space to find the right forms, dropdowns, and buttons.

Historically, researchers have relied on behavior cloning from expert demonstrations to train these agents. However, this approach is brittle and doesn't scale—websites update constantly, and it's impossible to collect human demonstrations for the entire internet. To generalize to unseen websites, agents need to train on a massive, diverse curriculum of web environments. Manually designing this curriculum is tedious and error-prone, while simple domain randomization often misses critical edge cases. The authors tackle the challenge of automatically generating a curriculum of websites that are "just the right difficulty" to continuously push the agent's capabilities without overwhelming it.

Methods

The authors frame website generation as an Adversarial Environment Generation (AEG) problem and introduce several key innovations:

  • gMiniWoB Framework: A new environment that allows an autoregressive LSTM-based adversary to build websites by placing compositional DOM "primitives" (e.g., navigation bars, text boxes, product carousels). Primitives are either active (require interaction) or passive (distractors).
  • Flexible PAIRED: Standard minimax adversaries tend to generate impossible environments. PAIRED uses three agents (an adversary, a protagonist, and an antagonist) and trains the adversary to maximize regret (the difference in score between the antagonist and protagonist). The authors propose Flexible PAIRED, which drops strict roles and dynamically calculates regret against whichever agent is currently performing best, providing a more stable learning signal.
  • Budget Enforcing (b-PAIRED): To prevent the adversary from spamming complex elements when agents are struggling, a budget mechanism is introduced. The adversary is penalized for making complex environments if the agents are failing, and rewarded with a higher "budget" for complexity only when the agents start succeeding.
Compositional DOM primitives used in the gMiniWoB framework to build diverse web environments.

Datasets and Evaluation

  • gMiniWoB: Built on the concepts of the existing MiniWoB++ benchmarks, this environment is uniquely designed to support compositional, automated website generation using 40 different design primitives.
  • Test Environments: The agents are evaluated on a set of unseen, hand-crafted websites representing real-world tasks: 'Login', 'Enter Address', 'Flight Booking', 'Enter Payment', and 'Shopping'. Each task is presented in four difficulty levels.

Key Insights

  • Regret vs. Minimax: If an adversary just wants to make an agent fail (minimax), it will build broken or impossible websites. By optimizing for regret, the adversary is forced to build websites that at least one agent can solve, naturally creating a learnable curriculum.
  • Dynamic Roles: In standard PAIRED, if the designated "antagonist" gets stuck in a local minimum, the adversary stops generating useful environments. Flexible PAIRED's dynamic swapping ensures the bar is always set by the best-performing policy in the pool.
  • Complexity Must Be Earned: The budget mechanism is crucial. It forces the adversary to wait for the agent to master the basics before introducing high-complexity distractors.
  • Emergent Curriculum: Over the course of training, the adversary naturally learns to shift its design strategy. It starts by placing mostly random/passive primitives and gradually increases the density of active, task-oriented elements as the agents become more competent.
The emergent curriculum generated by the adversary, showing increasing complexity from early to late training.

Results

Flexible b-PAIRED significantly outperforms standard PAIRED, Domain Randomization (DR), and Curriculum Learning (CL) baselines on unseen test websites. The proposed method achieves over 80% task success on difficulty level 1 environments. Crucially, as test environments scale up to difficulty level 4, Flexible b-PAIRED agents maintain consistent, strong performance, whereas baseline methods like Curriculum Learning see their performance crash because they scale difficulty independently of the agent's actual skill level.

Conclusion

While gMiniWoB is a significant step forward for procedural web generation, it still relies on a finite set of 40 predefined DOM primitives. Real-world websites contain infinitely more idiosyncratic structures and non-standard elements. However, the success of Flexible b-PAIRED demonstrates the potential for automated curriculum design in complex, compositional environments beyond just web navigation.

Summary updated

BibTeX
@misc{gur2021adversarial,
  author = {Izzeddin Gur and Natasha Jaques and Kevin Malta and Manoj Tiwari and Honglak Lee and Aleksandra Faust},
  title = {{Adversarial Environment Generation for Learning to Navigate the Web}},
  year = {2021},
  eprint = {2103.01991},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.01991},
}
Figure