Hatoun/DistiBERT-finetuned-arxiv-multi-label
Text Classification
•
Updated
•
7
id
stringlengths 10
10
| title
stringlengths 19
148
| summary
stringlengths 345
1.92k
| source
stringlengths 31
31
| authors
sequence | categories
sequence | comment
stringlengths 4
284
⌀ | journal_ref
nullclasses 14
values | primary_category
stringclasses 16
values | published
stringlengths 8
8
| updated
stringlengths 8
8
| content
stringlengths 10k
1.25M
| references
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2210.03945 | Understanding HTML with Large Language Models | Large language models (LLMs) have shown exceptional performance on a variety
of natural language tasks. Yet, their capabilities for HTML understanding --
i.e., parsing the raw HTML of a webpage, with applications to automation of
web-based tasks, crawling, and browser-assisted retrieval -- have not been
fully explored. We contribute HTML understanding models (fine-tuned LLMs) and
an in-depth analysis of their capabilities under three tasks: (i) Semantic
Classification of HTML elements, (ii) Description Generation for HTML inputs,
and (iii) Autonomous Web Navigation of HTML pages. While previous work has
developed dedicated architectures and training procedures for HTML
understanding, we show that LLMs pretrained on standard natural language
corpora transfer remarkably well to HTML understanding tasks. For instance,
fine-tuned LLMs are 12% more accurate at semantic classification compared to
models trained exclusively on the task dataset. Moreover, when fine-tuned on
data from the MiniWoB benchmark, LLMs successfully complete 50% more tasks
using 192x less data compared to the previous best supervised model. Out of the
LLMs we evaluate, we show evidence that T5-based models are ideal due to their
bidirectional encoder-decoder architecture. To promote further research on LLMs
for HTML understanding, we create and open-source a large-scale HTML dataset
distilled and auto-labeled from CommonCrawl. | http://arxiv.org/pdf/2210.03945 | [
"Izzeddin Gur",
"Ofir Nachum",
"Yingjie Miao",
"Mustafa Safdari",
"Austin Huang",
"Aakanksha Chowdhery",
"Sharan Narang",
"Noah Fiedel",
"Aleksandra Faust"
] | [
"cs.LG",
"cs.AI"
] | null | null | cs.LG | 20221008 | 20230519 | UNDERSTANDING HTML WITH LARGE LANGUAGE
MODELS
Izzeddin Gur, Ofir Nachum, Yingjie Miao, Mustafa Safdari, Austin Huang
Aakanksha Chowdhery, Sharan Narang, Noah Fiedel, Aleksandra Faust
Google Research
fizzeddin,ofirnachum,yingjiemiao,msafdari,austinvhuang
chowdhery,sharannarang,nfiedel,sandrafaust g@google.com
ABSTRACT
Large language models (LLMs) have shown exceptional performance on a va-
riety of natural language tasks. Yet, their capabilities for HTML understanding
– i.e., parsing the raw HTML of a webpage, with applications to automation of
web-based tasks, crawling, and browser-assisted retrieval – have not been fully
explored. We contribute HTML understanding models (fine-tuned LLMs) and an
in-depth analysis of their capabilities under three tasks: (i) Semantic Classifica-
tionof HTML elements, (ii) Description Generation for HTML inputs, and (iii)
Autonomous Web Navigation of HTML pages. While previous work has devel-
oped dedicated architectures and training procedures for HTML understanding,
we show that LLMs pretrained on standard natural language corpora transfer re-
markably well to HTML understanding tasks. For instance, fine-tuned LLMs are
12% more accurate at semantic classification compared to models trained exclu-
sively on the task dataset. Moreover, when fine-tuned on data from the MiniWoB
benchmark, LLMs successfully complete 50% more tasks using 192x less data
compared to the previous best supervised model. Out of the LLMs we evalu-
ate, we show evidence that T5-based models are ideal due to their bidirectional
encoder-decoder architecture. To promote further research on LLMs for HTML
understanding, we create and open-source a large-scale HTML dataset distilled
and auto-labeled from CommonCrawl.1
1 I NTRODUCTION
Web crawling (Olston et al., 2010), form-filling (Diaz et al., 2013; Gur et al., 2021), or information
retrieving web agents (Nogueira & Cho, 2016) are important for both automating and assisting
users in web-based tasks. These and similar applications rely on models that can search for specific
content or controls on a web page as well as navigate a website autonomously. Since a web page in
its raw form is represented as an HTML-based text sequence, the success of models for web-based
tasks relies on their ability to understand HTML semantics, structure, and embedded interactions.
The predominant approach to web automation and HTML understanding is to train specialized mod-
els, i.e., gathering application-specific datasets and designing neural network (NN) architectures to
leverage inductive biases of the HTML’s structure; see, e.g., Liu et al. (2018); Toyama et al. (2021);
Gur et al. (2021); Humphreys et al. (2022). However, both dataset collection and neural architecture
design are expensive, time-consuming, and require highly-specialized, domain-specific knowledge.
Meanwhile, in the natural language processing (NLP) literature, large language models (LLMs) have
emerged as a solution to the difficulties of dataset collection and specialized NN design (Kaplan
et al., 2020; Bommasani et al., 2021). A popular paradigm in NLP is to take an off-the-shelf LLM
– pretrained on a large text corpus via an unsupervised and task-agnostic learning objective – and
either fine-tune or prompt the LLM on a small task-specific dataset. This paradigm has shown
exceptional performance on a variety of NLP tasks (Xue et al., 2020; Brown et al., 2020; Austin
et al., 2021). Whether LLMs can be applied to HTML understanding – especially given the much
larger context and sequence lengths – remains an under-explored question.
1See visualizations of the results at https://sites.google.com/view/llm4html/home .
1arXiv:2210.03945v2 [cs.LG] 19 May 2023
<html>
<body>
<form class= "login-form" >
<div>
<label class= "form-label" for= ”uName” >
Enter Email Address
</label>
<label class= "form-label" for= ”pass” >
Enter Password:
</label>
</div>
<div>
<input type= "email" id="uName” >
<input type= "password" id="pass" >
<span class= "hidden" >
Please enter your password.
</span>
</div>
<button type= "submit" >Sign In </button>
</form>
</body>
</html> (a)
<div><label class= "form-label" for= ”uName” >Email Address </label><label
class= "form-label" for= ”pass” >Enter Password: </label></div><div><input
type= "email" id="uName” target ><input type= "password" id="pass" ><span
class= "hidden" >Please enter your password. </span></div> (b)
Figure 1: a) HTML example page with a highlighted salient element, an element of interest (dashed box).
All canonical tasks evaluate a distinct interaction with this element, either by classifying it as one of a set of
categories, generating a text description of its purpose, or applying an action as part of a sequential navigation
of a multi-page website. b) LLM architectures overview. Dashed boxes denote sub-modules that are specific to
either encoder-only or encoder-decoder models. For encoder-only models, we add an extra classification layer.
Decoder-only models (not in the diagram) are similar to encoder-decoder models, the main difference is that
the HTML snippet is fed to the decoder and processed from left-to-right.
In this paper, we investigate whether LLMs can be applied to HTML understanding to produce
better-performing, more sample-efficient HTML understanding models and without the need for
custom NN architecture design. To that end, we present a suite of three benchmarking tasks for
HTML understanding that capture the essence of these applications and require understanding both
structure and content. First, we devise Semantic Classification as a task that requires a model to
classify a given HTML element into one of a set of categories, such as address, email, password
etc., with application to automated form-filling. Second, we present Description Generation , a
label-extraction task where a model is given an HTML snippet and is asked to produce a natural
language description. For instance for an email field, the description might be “Please enter your
email address.” Note that in the majority of web pages, this connection between input elements and
description content is only implicit in the raw HTML code and inferring such links is a prerequisite
for higher-level navigation objectives. The third task is Autonomous Web Navigation (Shi et al.,
2017). A model is presented with an HTML page paired with a natural language command and
must apply appropriate actions on a sequence of HTML pages to satisfy the command. See Figure
1a for a simplified example of these tasks.
With these benchmark tasks in hand, we evaluate the transfer capabilities of a variety of pretrained
LLMs (Table 1), varying in architecture (encoder-only, encoder-decoder, or decoder-only), model
size (from 24.6M to 62B parameters), and training data corpora (both including and excluding pre-
training NLP and HTML corpus). While prior work universally pre-parses the HTML as input to the
model (Gur et al., 2021; Liu et al., 2018; Nakano et al., 2021), ours – to the best of our knowledge – is
the first work that uses raw, unprocessed HTML. Our results show that LLMs demonstrate a remark-
able level of HTML understanding across all tasks, with up to 192more sample-efficiency than
models trained from scratch, and achieving a new SoTA for supervised learning on the MiniWoB
benchmark suite (Shi et al., 2017). The encoder-decoder architectures with bi-directional attention
show the best performance across the board even when their pretraining does not include HTML. In
addition, we show that the performance scales sub-linearly with the model size.
The broader objective of this research is to advance the integration of LLMs with autonomous web
agents. It has only been in the last year that researchers have begun to utilize LLMs outside of
NLP and integrate them as core capabilities in autonomy (Lu et al. (2021); Ahn et al. (2022)). In
this context, LLMs are reasoning engines for sequential decision making agents interacting with
environments.
The present work is the first in the research literature to embed an LLM and train it as an agent for
autonomous web navigation. This requires new implementations to adapt LLM training for behavior
2
cloning in addition to designing interfaces for integrating text generation into a perception-compute-
action cycle operating in a stateful web environment. Our implementation allows us to answer new
questions regarding trade-offs among various model characteristics.
We believe these contributions expand the scope of language models and connect their unique capa-
bilities with autonomous agents for the web. We provide a new perspective on machine learning for
HTML understanding and web automation, showing that pretrained LLMs can achieve significant
performance on such tasks, reducing the need for specialized architectures and training protocols.
To encourage further research in this direction, we open sourced2model weights for agents used in
the WoB environment and our dataset for description generation.
2 R ELATED WORK
HTML Understanding Autonomous web navigation has been a popular application for neural net-
work models, and a variety of works propose simulated websites for training web-based agents, with
application to task fulfillment (Yao et al., 2022; Gur et al., 2021; Burns et al., 2022; Mazumder &
Riva, 2020; Shi et al., 2017; Liu et al., 2018) as well as information retrieval or question-answering
(Adolphs et al., 2021; Nogueira & Cho, 2016). Simulated websites provide an easy way to evaluate
models online, and for this reason we use the existing MiniWoB benchmark (Shi et al., 2017) for our
web navigation setting. However, it is still important to have a mechanism for evaluating models on
a wide variety of real-world websites. This was the key motivation for generating our own dataset
for the description generation task, which is distilled and auto-labeled from CommonCrawl and is a
key contribution of our paper.
Alongside these benchmarks, many works have developed models for web navigation and related
subtasks (Pasupat et al., 2018; Bommasani et al., 2021; He et al., 2021; Gur et al., 2021; Humphreys
et al., 2022; Liu et al., 2018; Jia et al., 2019). These works often rely on specialized neural network
architectures that leverage inductive biases of HTML structure, or on preprocessing of HTML to
make it easier to input to a model (Li et al. (2021a;b)). In contrast, our work takes a minimalist
approach, providing HTML in text form with minimal processing and using widely-adopted trans-
former networks.
LLMs and HTML Works that explore the intersection of LLMs and HTML generally fall into two
categories. The first category uses LLMs to assist web navigation (Nakano et al., 2021; Yao et al.,
2022), and typically relies on a custom preprocessing to map the context and structure of a web page
to natural language, thus severely restricting what HTML pages the model can parse. The second
category pretrains LLMs on a large corpora of HTML text (Aghajanyan et al., 2021). However,
these works typically restrict the model evaluation to standard NLP tasks, e.g., summarization and
question/answering as opposed to tasks more relevant to HTML understanding and web automation.
Our work can be thought of as the reverse: We keep the pretraining of LLMs unchanged and focus
on the mechanisms for transferring the pretrained LLMs to HTML-relevant tasks.
3 B RIEF BACKGROUND ON HTML ASSEMI-STRUCTURED TEXT DATA
HTML is a markup language, used to organize web page structure andcontent . Consider the
example HTML page in Figure 1a. This web page includes two adjacent input elements, one for
e-mail and another for password, with their corresponding label s on a separate branch of the page.
These input s and label s are one of many possible elements that serve as HTML building blocks.
Each element has a set of attributes – key and value pair – that describe the element’s content, such
as style and human-readable text. When rendered in a browser, these attributes will be responsible
for how the element is shown and where it is positioned. In the example in Figure 1a, the first
input has three attributes, tag="input" ,type="email" , and id="uName" , that identify
the element as an email input with an identifier (“uName”) that can be accessed programmatically.
2https://console.cloud.google.com/storage/browser/gresearch/webllm
3
Model
Task Dataset Size Input Architecture Output Task Output
Autonomous Web Navigation MiniWoB Demos (Shi et al., 2017) 12K PageEnc-DecText DictionaryDec
Semantic Classification Annotated Shopping Webpages (Gur et al., 2021) 28K Snippet All Text Category
Description Generation CommonCrawl (new) 85K SnippetEnc-DecText TextDec
Table 1: Task, dataset, and model summary. All models receive raw HTML. Autonomous Web Navigation
receives the entire HTML, while the other tasks receive HTML snippets extracted given salient element.
4 C ANONICAL TASKS FOR HTML U NDERSTANDING
We devise three canonical tasks to study HTML understanding capabilities of LLM-based web
agents. These tasks require correctly interpreting both structure and content to varying degrees
to make predictions, with autonomous navigation being the most challenging capability of the three.
Autonomous Web Navigation . This task evaluates how well a model navigates multi-page web-
sites as a sequential decision-making problem (Shi et al., 2017; Liu et al., 2018). At the beginning
of an episode, the agent is given a natural language instruction, e.g. Enter the username “lyda”
and the password “N22t” into the text fields and press login . The agent applies actions to a se-
quence of HTML pages, where each action is of the form function(selector, text) . The
function is one of click ortype,selector is an integer pointer that uniquely identifies an ele-
ment, and text is a text to input if the type functionality is activated. An episode terminates when
either the page reaches a terminal state (e.g., the ‘sign in’ button is clicked) or the maximum number
of steps is reached.
Semantic Classification .Many HTML understanding applications require a model that can classify
HTML elements into standardized categories. For example, in automated form-filling (Diaz et al.,
2013; Gur et al., 2021), it is useful to identify a ‘submit button’ across many websites (e.g., shopping,
flight booking, utility application) with various button representations (e.g., position, color, or text).
Thus, we formulate Semantic Classification as classifying elements into role categories. Take the
example HTML in Figure 1a which includes two input elements and a submit button . Let’s
pick the first input as an element of interest to be classified by the system, also called a salient
element . The system should classify this element as username , since it appears on a login page and
it has a label with Email Address which is typically associated with the username in form-filling
applications. To solve this, the system can aggregate information from multiple sources in the page
– the label that says Enter Email Address , theinput attributes ( type=“email” andid=“uName” ),
or even the ordering of other elements in the page such as ‘password’ and ‘sign in’.
Description Generation .Motivated by applications in accessibility-minded web browser con-
trol (Jorgensen & Binsted, 2005), we formulate description generation as an extractive problem
where the goal is to locate the textual description of an element in the HTML and generate it as
output. For instance, the description of the salient element in Figure 1a is Enter Email Address ;
when rendered, this label will appear above the ‘email’ input field. HTML provides a large
amount of flexibility, and so in general a descriptive text that appears alongside a specific element
when rendered can be very far from that element when looking at the HTML plaintext. Thus, this
task evaluates a model’s ability to understand the structure of HTML as it would appear to a user,
despite not having access to the rendered web page directly.
5 D ATASETS
Each of our canonical tasks requires a separate dataset, with the description generation task using a
newly contributed, auto-labelled dataset based on CommonCrawl.
Autonomous Web Navigation .We use the 12K demonstrations included in the publicly available
MiniWoB benchmark (Shi et al., 2017), which encompass 62 website applications ranging from
email forwarding to social media interactions. Each demonstration is a sequence of (instruction,
HTML, action) tuples. Every element in a MiniWoB demonstration is accompanied by a reference
number unique within its respective pages. This number can be used as an element selector, making
the action space unified across all tasks and time steps. For instance, the action in Figure 1a would be
4
type(ref=5, ”username@email.com”) , where 5 refers to the index of the input when counted from
top-to-bottom. As model input, we concatenate the natural language instruction and HTML into a
single text input sequence. Similarly, we treat the action as a text sequence for the model to predict.
Semantic Classification .We use a dataset of 28K labelled examples, containing 66 different cat-
egories, of the form (HTML, element, category) , previously used in the context of environment
generation (Gur et al., 2021). The dataset consists of HTMLs from real-world shopping websites
and categories relevant to form-filling during payment and checkout on these websites.
Description Generation .For this task, we derive a dataset from CommonCrawl.3CommonCrawl
does not include renderings or annotations that would reveal what text in the HTML is associated
with which elements. Instead, we infer descriptions of various elements by exploiting a special
attribute in the HTML schema known as for. As an example in Figure 1a, the first label in
the HTML has a for attribute with value uName , which is the idof the element described by
label ; in this case, the idis that of the first input in the page. This annotation does not affect
the rendering of the page and is typically used for accessibility purposes. We utilize the information
given by these for attributes to create a large-scale dataset to study description generation. A small
sample is available in the supplemental material, while the entire dataset will be available upon
publication.
Specifically, we collected 100 WARC (from April 2019) files from the CommonCrawl project and
extracted all HTML label s that have a for attribute. Removing non-Unicode and alphanumeric
text in HTML label s results in a 400K example datset. We balance the distribution of labels,
effectively downsampling the dataset to 85Ksamples. Each example is represented as (HTML,
element, description) , where HTML is the HTML plaintext of the page, element is the element
whose idattribute matches that appearing in the label ’sfor attribute, and description is the text
inside the label element (see example in Figure 1a). More details of the dataset can be found in
Appendix A.1.
6 P RE-PROCESSING
In treating HTML as token sequences, we minimize any HTML tree pre-processing prior to model
input. We thus provide HTML as raw text (i.e., sequences of text tokens) and only apply a snippet
extraction pre-processing for pages which are too large to fit into the typical LLMs context windows.
Snippet Extraction. Real HTML pages can grow extremely large, reaching thousands of elements,
far beyond the context window of the largest LLM that we studied (1920 tokens in PaLM (Chowdh-
ery et al., 2022)). LLMs typically truncate such long sequences, which can be detrimental to HTML
understanding as HTMLs are not linearly structured. We take an element-centric approach and ex-
tract HTML snippets (a small portion of HTML code) surrounding a salient element (Figure 5). A
simple heuristic, which controls the tree’s width and depth, guides the process: Start with a salient
element and traverse its ancestors in the HTML tree until a stopping condition is satisfied. As we
traverse up, we estimate the height of the tree and the increased number of descendants of the new
root. We stop when either metric violates a pre-defined limit and take the resulting sub-tree as the
snippet. We mark the salient element using a special attribute, called target , to distinguish it from
other elements. We perform the snippet extraction for the semantic classification and description
generation datasets, and keep the full HTML pages in MiniWoB because these pages are typically
much smaller than real-world HTML.
HTML un-Parsing. We provide the models with the unparsed plaintext HTML in the form of
a sequence of tokens. This canonical representation does not require specific model architectures
such as hierarchical networks (Liu et al., 2018; Gur et al., 2021) and can be fed into any LLM. We
transform all datasets by converting every HTML page or snippet into a sequence. For MiniWoB,
we additionally concatenate (action history, instruction, HTML) tuples into a single sequence.
3http://commoncrawl.org
5
7 M ODEL TRAINING
We study a variety of transformer-based LLMs (Vaswani et al., 2017) with different sizes and archi-
tectures for HTML understanding tasks (Table 1). In the rest of the text, we prefix models fine-tuned
forAutonomous Web Navigation ,Description Generation , and Semantic Classification with WebN-
, WebD-, and WebC-, respectively. For instance, WebD–T5-3B is the three billion parameter T5
model (Raffel et al., 2020) fine-tuned for the Description Generation task. The rest of this section
elaborates on training details.
Encoder-Decoder and Decoder-only Models. We train encoder-decoder models, i.e., T5 (Raffel
et al., 2020), and decoder-only models, i.e., LaMDA (Thoppilan et al., 2022) and PaLM (Chowdh-
ery et al., 2022), with text input and text output (Figure 1b). Inputs are raw HTML pages or snippet
texts; similarly, outputs are categories, natural language descriptions, or actions represented as text.
Namely, for Semantic Classification we use the textual representation of categories, similar to previ-
ous classification problems in NLP (Raffel et al., 2020). For Autonomous Web Navigation , actions
are converted into text by first converting them into key and value pairs and then concatenating the
pairs.
Many websites in MiniWoB require multiple interactions, such as click-button-sequence orclick-
checkboxes , where each interaction might cause a subtle change in the website state. For instance,
after clicking on a checkbox in the click-checkboxes website, its value flips from positive to negative
or the other way around, which is not always reflected in LLMs’ predictions and leads to action
repetitions. We solve this issue by augmenting tuples in the dataset with a sequence of past actions,
(action history, instruction, HTML, action) , and allowing LLMs to learn from past experience.
Encoder-only Models. We train encoder-only models, i.e., BERT (Devlin et al., 2018), with text
input and categorical output. We keep semantic categories as discrete one-hot classes. To train
encoder-only models, we add a new classification layer after the final encoder layer to produce a
distribution over semantic categories. In addition to the typical BERT models, we study Mobile-
BERT (Sun et al., 2020), distilled from BERT-large with inverted bottlenecks, and Albert-XL (Lan
et al., 2020), with parameter sharing and embedding split.
8 R ESULTS
We now present the results of fine-tuned LLMs for HTML understanding. We compare the models’
performance with the existing baselines where possible (autonomous web navigation) and against
other LLM architectures and training regimes (all tasks). Sections 8.1, 8.2, and 8.3 evaluate task-
specific performance, while Section 8.4 assesses the performance across all the tasks.
Metrics: For autonomous web navigation we evaluate models’ Success Rate , which is averaged over
100 episodes per task. For the other tasks, we use Accuracy to measure exact match between predic-
tion and ground truth. In the description generation task, we additionally provide evaluations using
alternative ‘soft’ text evaluation metrics, BLEU andROUGE-1 , measuring the similarity between
predicted and ground truth text.
8.1 A UTONOMOUS WEBNAVIGATION RESULTS
ForAutonomous Web Navigation we fine-tune two WebN- encoder-decoder architectures (WebN-
T5-large and WebN-T5-3B) on 12k demonstrations from human-annotated real websites. We eval-
uate the models on MiniWob (Liu et al., 2018) benchmark, and compare with specialized architec-
tures trained using supervised learning (SL) on 2.4 million human expert demonstrations CC-Net
(SL) (Humphreys et al., 2022), and two RL models bootstrapped with SL, CC-Net (SL) (CC-Net
(SL & RL) (Humphreys et al., 2022), and WGE (SL & RL) (Liu et al., 2018)). Additionally, we
compare with the decoder-only architecture (WebN-Lambda-1B) and perform an ablation study on
the impact of including the action history in the input.
Comparison to SoTA. Since previous works report success on only a subset of websites in Mini-
WoB, we evaluate on 48 out of 62 websites that are common across all models. Table 8 in the
Appendix reports fine-grained results while Figure 2a presents results averaged over all websites.
Compared to CC-Net (SL) which is trained on all 2.4M demonstrations, WebN-T5-3B improves the
6
2.4M
Demos 12K
Demos (a) Baseline comparison.Model Name Success (%) Model Size
T5-large 18.1 800M
LaMDA-1B 15.6 1B
T5-3B 11.1 3B
WebN-T5-large 46.4 800M
WebN-LaMDA-1B 48.8 1B
WebN-T5-3B 51.8 3B
(b) Pre-training effect.
Figure 2: a) WebN–T5* performance compared to the previous SOTA models on MiniWoB benchmark.
WebN-T5-3B improves the task success 16% while using 192 times less data, compared to the best supervised
learning (SL) model, CC-Net (SL). LLMs performance is only surpassed by works utilizing RL, requiring or-
ders of magnitude more online experience interaction with websites. b) LLMs with and without pretraining
onAutonomous Web Navigation task. Those with pretraining (denoted by the ‘WebN-’ prefix) show a 2.5-4.5x
performance improvement.
Model Name Test (%) Dev (%) Model Size Code in training Corpus
WebC-MobileBERT 78.1 77.7 24.6 M
0%WebC-Albert-XL 83.5 83.1 58.9 M
WebC-BERT-smallest 84.4 83.6 38.7 M
WebC-BERT-small 84.4 85.2 52.8 M
WebC-BERT-medium 85.2 84.5 67 M
WebC-BERT-base 83.9 84.8 109.5 M
WebC-BERT-large 84.1 85.8 335.2 M
WebC-T5-base 86.8 89.9 250 M
WebC-T5-large 87.0 89.3 800 M
WebC-T5-3B 87.7 90.3 3 B
WebC-LaMDA-1B 87.4 87.1 1 B 12.5% Code
WebC-PaLM-8B 86.6 89.9 8 B 5% Code (0.875% HTML)
WebC-PaLM-62B 88.7 90.5 62 B 5% Code (0.875% HTML)
T5-large 76.4 75.2 800 M
0% T5-3B 77.2 73.8 3 B
PaLM-8B 73.3 70.1 8 B
Table 2: LLMs performance on the Semantic Classification task. Fine-tuning off-the-shelf pretrained LLMs
(model names with prefix ‘Web*’) helps LLMs transfer better compared to training the same architecture from
scratch on the HTML dataset (model names without prefix ‘Web*’), improving the accuracy of PaLM-8B more
than 12%. While WebC-PaLM-62B clearly performed better than all other models, we found WebC-T5-large
to be competitive with much larger models such as WebC-LaMDA-1B or WebC-PaLM-8B.
success 16% while only training on 12K publicly-available demonstrations, yielding over 192x im-
provement in sample-efficiency. We find that all choices of LLMs outperform previous SL models.
Notably, WebN-T5-3B significantly improves on websites requiring multiple-action sequences such
asclick checkboxes or websites requiring entering text such as login user (Table 8). We observe that
the performance of LLMs is only surpassed by previous works utilizing RL, which require orders of
magnitude more online experience interaction. Extending our fine-tuned LLMs to an RL setting is
a promising avenue for future work.
Action history ablation. Across all LLMs we consistently observe a decrease in success, on av-
erage 6.4%, when past actions are excluded from the inputs (Figure 2a). Action history helps with
websites that require entering multiple texts, as well as understanding minor changes that could be
difficult to detect (e.g. click checkboxes andmulti layout ).multi layout requires entering 3 different
texts in the website where the layout is randomized at each episode, yet, surprisingly, even the (rel-
atively smaller) WebN-T5-large model without action history outperforms the CC-Net (SL) model;
illustrating that incorporating action history is not the only contributing factor for the better success.
7
Categories Figure 3: Accuracy per classification category of the WebC-T5-3B model on the development dataset.
New Height Test (%) Dev (%)
descendants (%)
25 3 87.7 90.3
25 4 88.6 89.2
50 3 88.4 90.0
50 4 89.3 89.2
300 5 87.8 88.8
500 7 75.8 74.5
(a)
Data SizeAccuracy
55606570758085
500 1000 1500 2000WebC-PaLM WebC-T5-3B
T5-3B (full data / no pretraining) (b)
Figure 4: a) Effect of snippet extraction parameters on WebC-T5-3B. Increases above 50% in new descendants
and height of 4. Large increases in both parameters lead to large snippets and decrease in accuracy. b) Accu-
racy over training data size. Using only 1000 labeled examples (4.4% of all training dataset), WebC-T5-3B
outperforms T5-3B (full data without pretraining) which is trained on allavailable labeled data (approximately
30k examples), and outperforms WebC-PaLM-8B which is an order of magnitude larger.
8.2 S EMANTIC CLASSIFICATION TASK RESULTS
To evaluate the Semantic Classification task, we compare the T5 encoder-decoder architecture’s
three size variants (WebC-T5-base, WebC-T5-large, and WebC-T5-3B) fine-tuned on 22K real,
human-labeled training websites. We compare with a fine-tuned encoder only architectures
(WebC-*BERT*), three fine-tuned decoder-only architectures (WebC-LaMDA and PaLM), and both
encoder-decoder and decoder-only models trained on human labeled websites from scratch. Results
are presented in Table-2, where we find that all WebC-LLMs perform well and significantly better
than the same architectures without pretraining.
Accuracy per category. In Figure 3, we present accuracy distribution of the WebC-T5-3B model
on the development dataset. The fine-tuned encoder-decoder model performs strongly on a majority
of the categories (Figure 3), even on those with very few samples. For instance, the model is 100%
accurate on password newwhich has only 56 training examples, because the class is unambiguous.
On the other hand, unsurprisingly, the performance drops when the category is ambiguous, such as
in the email category which is frequently mistaken as username .
Snippet generation ablation. Two hyper-parameters govern snippet generation: percentage of
new descendants and height of the new root. While small variations of both parameters do not
change the performance, increasing both degrades the performance significantly (Table 4a). With
new descendants up to 500% and height up to 7, the performance drops by more than 15%. Note
that snippet generation returns the full-page HTML when both parameters increase indefinitely.
Data size impact. When varying the fine-tuning training data sizes (1, 5, 10, 20, or 50 samples per
class) in Figure 4b, WebC-T5-3B slightly outperforms WebC-PaLM-8B which is an order of mag-
nitude larger. Compared to T5-3B that is trained on all available HTML data without pretraining,
WebC-T5-3B achieves better performance while using only 3.4% of labeled data (1000 samples),
8
Test Dev
Model Name Accuracy (%) BLEU ROUGE-1 Accuracy (%) BLEU ROUGE-1
WebD-T5-large 83.2 90.2 90.5 84.3 91.7 91.5
WebD-LaMDA-1B 83.3 87.5 90.2 84.3 88.6 91.2
WebD-T5-3B 84 90.8 90.9 85.2 92.1 91.9
Closest Description 57.4 24.4 59.2 60.8 23.9 62.1
Table 3: Description generation accuracy of LLMs.
thus highlighting the benefit of using standard off-the-shelf pretrained LLMs for HTML understand-
ing.
8.3 D ESCRIPTION GENERATION TASK RESULTS
ForDescription Generation we split the CommonCrawl dataset based on URL top-level domains to
test LLMs’ capabilities to generalize to unseen HTML. We fine-tune encoder-decoder architectures
(WebD–T5*) and decoder-only models (WebD–LaMDA*), with results presented in Table 3. We
also evaluate a strong heuristic baseline which simply finds the description closest to the salient
element in the HTML text (Closest Description).
Accuracy and Similarity Performance We show results of our evaluations in Table 3. All models
achieve high scores across all metrics, achieving 84% on the accuracy in terms of exact match and
a higher non-exact match score based on BLEU and ROUGE-1 ( 91%). This difference indicates
that the models are capable of locating the descriptions, but not always generating the exact output.
8.4 HTML U NDERSTANDING LLM SPERFORMANCE ANALYSIS ACROSS TASKS
We now analyze our results in aggregate to derive our main conclusions.
8.4.1 P RETRAINING EFFECT : PRETRAINING ON LARGE TEXT CORPORA MATTERS
Fine-tuned pretrained LLMs outperform LLMs trained on HTML-only data, improving the perfor-
mance by more than 34.1% on the Autonomous Web Navigation (Table 2b), and 10% to 12.7% on
theSemantic Classification task (Table 2).
Since Autonomous Web Navigation is the most difficult task, the improved performance is an en-
couraging evidence of the value of LLMs in HTML understanding tasks. Specifically, we observe
that LLMs without pretraining are comparable to fine-tuned pretrained models only on websites that
require simple text matching. In contrast, for websites such as click checkboxes , text matching is
harder and we find that pretraining is key to good performance. We also found that without pretrain-
ing, model outputs were frequently in an incorrect format such as invalid dictionaries or invalid refs
with non-integer values. This suggests that the large corpora used for pretraining helps models to
learn general HTML structure.
8.4.2 A RCHITECTURE EFFECT : T5- BASED MODELS PERFORM BESTACROSS ALLTASKS
Encoder-decoder T5 based models perform better across all three tasks. On the Autonomous Web
Navigation task, encoder-decoder (WebN-T5) architectures are better or comparable to WebN-
LaMDA-1B (Figure 2a). On the Semantic Classification , the smallest encoder-decoder model
(WebC-T5-base) performs comparably to much larger decoder-only models (WebC-LaMDA-1B or
WebC-PaLM-8B) and the largest encoder-only model (WebC-BERT-large) which has 85M more pa-
rameters (Table 2). We also observe that decoder-only PaLM-8B performs worse than much-smaller
encoder-decoder T5-large when trained only on HTML data. Finally, on the Description Generation
encoder-decoder architecture has higher BLEU score.
One possible explanation for the strong performance of T5-based moels is the encoder-decoder
architecture of these models. Namely, T5 models utilize an encoder with a bidirectional attention
mechanism, not present in the LaMDA and PaLM decoders. The bidirectional attention mechanism
can process HTML pages from both ends, potentially overcoming the loss of information when
tree-structured HTML pages are converted into a fixed linear text sequences.
9
8.4.3 M ODEL SIZEEFFECT : SIZE(SUB-LINEARLY ) M ATTERS
Across the tasks it appears that the architecture plays an important role in the model performance.
Model size and performance are also positively correlated, although they reach diminishing returns.
For instance, the model performance is roughly O(log log n)with respect to model size on Seman-
tic Classification (Figure 4b in Appendix). On the Autonomous Web Navigation task, performance
grows slowly with the model size (Table 8), while on the Description Generation it plateaus (Ta-
ble 3).
8.5 D ISCUSSION
Bi-directional attention vs training corpora: Pretraining on large corpora matters, yielding 4.5x
performance improvements. Larger models tend to be better and we credit the bidirectional attention
for T5’s best overall performance across the tasks. PaLM and LaMDA include HTML and other
code in their pretraining corpora, while BERT and T5 architectures did not, showing that pretraining
on HTML is not necessary for strong performance when fine-tuned for HTML understanding. This
strengthens the hypothesis behind the role of the bidirectional attention, and opens up the possibility
to further improve the performance of T5 architectures by pretraining them on corpora with HTML.
Practical impact on labeling: When available, the pretrained LLMs need very little new expert
data (200x and 30x reduction on the web navigation and classification tasks, respectively). This has
a big potential impact on practical applications, reducing the data collection time and cost by orders
of magnitude.
Bigger is not always better: When choosing the model size, the expected performance gains (sub-
linear at best and asymptotic at worst) should be considered alongside the model’s training and
inference time and cost. For instance, on the classification task, the largest model WebC-PaLM-62B
takes several days to fine-tune, and evaluates at 30 Hz, while WebC-T5-large fine-tunes in several
hours and evaluates at 700 Hz – an order of magnitude more expensive for a single percent uplift in
accuracy. BERT models on the other hand train in minutes. If the application does not require high
precision, these might be a good choice.
Context window is a bottleneck: The major bottleneck for the HTML understanding tasks seems to
be the context window length that the current LLMs support, even with models that accept 1000+ to-
kens. It remains prohibitive to evaluate web navigation tasks on real websites that are orders of mag-
nitude larger than pages in MiniWob. Similarly, we observed that increasing the snippet size leads
to major performance degradation. This makes HTML understanding an interesting benchmark for
future LLM development. For instance, new methods may need to be developed to compress the
state representation of web content for use in LLM context windows.
9 C ONCLUSION
We presented canonical tasks and fine-tuned LLMs for HTML understanding. The comprehensive
evaluations and analyses over a range of architectures, dataset sizes, and baselines yields practical
findings and highlights current limitations of these models. We find that a) pretraining is critical for
the performance and can reduce labeled data requirements, improving sample efficiency up to 200x;
b) model architecture is the second-most important factor, and T5 models with bidirectional attention
and encoder-decoder architecture perform the best across the board; c) given a choice, model size
should be evaluated in the context of the model’s training and inference performance, as the model
size sub-linearly correlates with its performance. Finally, the proposed HTML understanding tasks
highlight the relatively short context window that limits current LLMs, suggesting possibilities for
future research that incorporate or eliminate this constraint.
REFERENCES
Leonard Adolphs, Benjamin Boerschinger, Christian Buck, Michelle Chen Huebscher, Massimil-
iano Ciaramita, Lasse Espeholt, Thomas Hofmann, and Yannic Kilcher. Boosting search engines
with interactive agents. arXiv preprint arXiv:2109.00527 , 2021.
10
Armen Aghajanyan, Dmytro Okhonko, Mike Lewis, Mandar Joshi, Hu Xu, Gargi Ghosh, and Luke
Zettlemoyer. Htlm: Hyper-text pre-training and prompting of language models. arXiv preprint
arXiv:2107.06955 , 2021.
Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar, Omar Cortes, Byron David, Chelsea
Finn, Keerthana Gopalakrishnan, Karol Hausman, Alex Herzog, et al. Do as i can, not as i say:
Grounding language in robotic affordances. arXiv preprint arXiv:2204.01691 , 2022.
Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan,
Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language
models. arXiv preprint arXiv:2108.07732 , 2021.
Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx,
Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportu-
nities and risks of foundation models. arXiv preprint arXiv:2108.07258 , 2021.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal,
Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are
few-shot learners. Advances in neural information processing systems , 33:1877–1901, 2020.
Andrea Burns, Deniz Arsan, Sanjna Agrawal, Ranjitha Kumar, Kate Saenko, and Bryan A Plummer.
Interactive mobile app navigation with uncertain or under-specified natural language commands.
arXiv preprint arXiv:2202.02312 , 2022.
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam
Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm:
Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311 , 2022.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep
bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 , 2018.
Oscar Diaz, Itziar Otaduy, and Gorka Puente. User-driven automation of web form filling. In
International Conference on Web Engineering , pp. 171–185. Springer, 2013.
Izzeddin Gur, Natasha Jaques, Yingjie Miao, Jongwook Choi, Manoj Tiwari, Honglak Lee, and
Aleksandra Faust. Environment generation for zero-shot compositional reinforcement learning.
Advances in Neural Information Processing Systems , 34:4157–4169, 2021.
Zecheng He, Srinivas Sunkara, Xiaoxue Zang, Ying Xu, Lijuan Liu, Nevan Wichers, Gabriel Schu-
biner, Ruby Lee, and Jindong Chen. Actionbert: Leveraging user actions for semantic under-
standing of user interfaces. In Proceedings of the AAAI Conference on Artificial Intelligence ,
volume 35, pp. 5931–5938, 2021.
Peter C Humphreys, David Raposo, Tobias Pohlen, Gregory Thornton, Rachita Chhaparia, Alistair
Muldal, Josh Abramson, Petko Georgiev, Adam Santoro, and Timothy Lillicrap. A data-driven
approach for learning to control computers. In International Conference on Machine Learning ,
pp. 9466–9482. PMLR, 2022.
Sheng Jia, Jamie Ryan Kiros, and Jimmy Ba. DOM-q-NET: Grounded RL on structured lan-
guage. In International Conference on Learning Representations , 2019. URL https://
openreview.net/forum?id=HJgd1nAqFX .
Chuck Jorgensen and Kim Binsted. Web browser control using emg based sub vocal speech recog-
nition. In Proceedings of the 38th Annual Hawaii International Conference on System Sciences ,
pp. 294c–294c. IEEE, 2005.
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child,
Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language
models. arXiv preprint arXiv:2001.08361 , 2020.
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Sori-
cut. Albert: A lite bert for self-supervised learning of language representations. In International
Conference on Learning Representations , 2020.
11
Chenliang Li, Bin Bi, Ming Yan, Wei Wang, Songfang Huang, Fei Huang, and Luo Si. Structurallm:
Structural pre-training for form understanding. arXiv preprint arXiv:2105.11210 , 2021a.
Junlong Li, Yiheng Xu, Lei Cui, and Furu Wei. Markuplm: Pre-training of text and markup language
for visually-rich document understanding. arXiv preprint arXiv:2110.08518 , 2021b.
Evan Zheran Liu, Kelvin Guu, Panupong Pasupat, Tianlin Shi, and Percy Liang. Reinforcement
learning on web interfaces using workflow-guided exploration. arXiv preprint arXiv:1802.08802 ,
2018.
Kevin Lu, Aditya Grover, Pieter Abbeel, and Igor Mordatch. Pretrained transformers as universal
computation engines. arXiv preprint arXiv:2103.05247 , 2021.
Sahisnu Mazumder and Oriana Riva. Flin: A flexible natural language interface for web navigation.
arXiv preprint arXiv:2010.12844 , 2020.
Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christo-
pher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, et al. Webgpt: Browser-assisted
question-answering with human feedback. arXiv preprint arXiv:2112.09332 , 2021.
Rodrigo Nogueira and Kyunghyun Cho. End-to-end goal-driven web navigation. Advances in neural
information processing systems , 29, 2016.
Christopher Olston, Marc Najork, et al. Web crawling. Foundations and Trends® in Information
Retrieval , 4(3):175–246, 2010.
Panupong Pasupat, Tian-Shun Jiang, Evan Zheran Liu, Kelvin Guu, and Percy Liang. Mapping
natural language commands to web elements. arXiv preprint arXiv:1808.09132 , 2018.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi
Zhou, Wei Li, Peter J Liu, et al. Exploring the limits of transfer learning with a unified text-to-text
transformer. J. Mach. Learn. Res. , 21(140):1–67, 2020.
Tianlin Shi, Andrej Karpathy, Linxi Fan, Jonathan Hernandez, and Percy Liang. World of bits: An
open-domain platform for web-based agents. In International Conference on Machine Learning ,
pp. 3135–3144. PMLR, 2017.
Zhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu, Yiming Yang, and Denny Zhou. Mobile-
BERT: a compact task-agnostic BERT for resource-limited devices. In Proceedings of the 58th
Annual Meeting of the Association for Computational Linguistics . Association for Computational
Linguistics, 2020.
Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze
Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven
Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin,
James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Yanqi
Zhou, Chung-Ching Chang, Igor Krivokon, Will Rusch, Marc Pickett, Kathleen S. Meier-
Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny So-
raker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Olson,
Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravi Rajakumar, Alena Butryna,
Matthew Lamm, Viktoriya Kuzmina, Joe Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil,
Blaise Aguera-Arcas, Claire Cui, Marian Croak, Ed H. Chi, and Quoc Le. Lamda: Language
models for dialog applications. CoRR , 2022.
Daniel Toyama, Philippe Hamel, Anita Gergely, Gheorghe Comanici, Amelia Glaese, Zafarali
Ahmed, Tyler Jackson, Shibl Mourad, and Doina Precup. Androidenv: a reinforcement learn-
ing platform for android. arXiv preprint arXiv:2105.13231 , 2021.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural informa-
tion processing systems , 30, 2017.
12
e xpand
o ne l e v el
up s ali en t
el emen t s s nip pe t
g ener a t i o n <html>
<body>
<form class= "login-form" >
<div>
<label class= "form-label" for= ”uName” >
Enter Email Address
</label>
<label class= "form-label" for= ”pass” >
Enter Password:
</label>
</div>
<div>
<input type= "email" id="uName” >
<input type= "password" id="pass" >
<span class= "hidden" >
Please enter your password.
</span>
</div>
<button type= "submit" >Sign In </button>
</form>
</body>
</html> HTML
<input name= "uName" >
<input name= "pass" >
<button type= "submit" ><input type= "email" id="uName” >if e xpand ab l e :
e xpand
<div>
<input type= "email" id="uName” >
<input type= "password" id="pass" >
<span class= "hidden" >
Please enter your password.
</span>
</div> o t her wis e
o u t p u t <input type= "email"
id="uName” target >
Figure 5: High-level overview of our pre-processing pipeline for generating snippets from a full HTML web-
page. Given the page, we detect salient elements and for each one of them we extract snippets by recursively
moving up in the HTML tree until a validation heuristic fails.
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi,
Pierric Cistac, Tim Rault, R ´emi Louf, Morgan Funtowicz, and Jamie Brew. Huggingface’s
transformers: State-of-the-art natural language processing. CoRR , abs/1910.03771, 2019. URL
http://arxiv.org/abs/1910.03771 .
Linting Xue, Noah Constant, Adam Roberts, Mihir Kale, Rami Al-Rfou, Aditya Siddhant, Aditya
Barua, and Colin Raffel. mt5: A massively multilingual pre-trained text-to-text transformer. arXiv
preprint arXiv:2010.11934 , 2020.
Shunyu Yao, Howard Chen, John Yang, and Karthik Narasimhan. Webshop: Towards scalable real-
world web interaction with grounded language agents. arXiv preprint arXiv:2207.01206 , 2022.
A A PPENDIX
A.1 D ATASET DETAIL
Examining the description distribution, we found the original 400Kdataset to be very skewed; only
20 descriptions (such as Email andPassword ) were covering 50% of the dataset. We sub-sampled the
dataset so that each unique description has at most 10 data points. We also found that for attributes
are almost always defined for HTML label s. This could cause a model to overfit and just find the
label element in the HTML and ignore everything else. To avoid this sort of ‘cheating’ we replace
the tags of HTML label s by randomly sampling from fdiv, span, a, label g. These tags
are also frequently used to inject text in HTML but they are very rarely used with for attributes.
Finally, we removed examples where there are only a single text in the HTML since models can
trivially generate descriptions by finding the only text in the HTML, which biases model weights
and evaluation metrics. After this final step, we have a total of 85Klabeled examples.
A.1.1 S NIPPET GENERATION
In Figure 5, we give a high-level overview of our snippet generation procedure.
A.2 A DDITIONAL RESULTS
A.2.1 S EMANTIC CLASSIFICATION
Error Analysis. We manually examined 50 errors of T5-3B model over the development set (Ta-
ble 4) and assigned them into one of the 9 error types that we devised. We found that 32% of the
errors are due to lack of information in the HTML snippets, which is mainly the result of lost in-
formation during snippet extraction process. Annotation errors or email/username ambiguity make
up 30% of the errors. These can’t be improved without revising the annotated data or adding extra
information to resolve the ambiguity. We also found that the model sometimes picks a more general
category, or a nearby text misleads the model; the latter usually happens when the HTML snippet is
long where majority of the elements are noise.
13
Error Type Percentage of Examples
Not enough information in the HTML snippet 30
Incorrect annotation (ex: ”unknown role” instead of ”organization”) 12
Annotation tool translates user selection incorrectly 8
Email/Username ambiguity 10
More general category (ex: ”header” instead of ”cart header”) 8
Immediate neighboring text misleads 8
Incorrect date formatting (ex: ”mm” instead of ”mmm”) 4
No information in the HTML snippet 2
Others 18
Table 4: Types of errors over 50 manually examined examples. 32% of errors are due to lack of information
in HTML snippets, 30% of errors are related to annotations or can’t be improved due to ambiguity (email/user-
name), and the remaining errors are incorrect predictions by the model.
Few-Shot Prompting In Table 5, we present few-shot prompting performance of a 540B PaLM
model. We probe the model using a prompt template <html> Role: <category> with 1 ex-
ample per category and generate categories using greedy-decoding. In our preliminary experiments,
we found that few-shot prompting achieves only 45.6 accuracy, much lower than a model fine-tuned
on the same data (Figure 6). We found two common problems – the model is not able to canonicalize
predictions into categories and many of the examples are dropped due to context length.
Model Name Test Dev
PaLM-540B 64.2 60.3
- w/o Example Cleaning 57.9 57.2
- w/o Category Rewriting 52.1 50.7
- w/o Dictionary Mapping 45.6 45.1
Table 5: Few-shot prompting performance with differ-
ent pre- and post-processing steps.We developed post-processing methods to al-
leviate the canonicalization problem and pre-
processing methods to reduce lengths of ex-
amples. Adding a dictionary-based mapping
on predictions – a manually curated paraphrase
dictionary – improves the performance to 52.1.
We also tried rewriting predictions by chang-
ing the order of tokens around ” ” such as
name firsttofirst name which further improved
the performance to 57.9. Finally, we cleaned
examples in the prompt by removing certain el-
ements such as ”svg”, ”path”, ”img” , and ”iframe” and also removing class attribute from every
element; this pre-processing step gives 64.2.
Figure 6: Performance comparison w.r.t. increasing model size. As the model size increases, we
observe an increase in overall accuracy with PaLM-62B model achieving the highest accuracy while
being 7x larger than PaLM-8B.
14
A.3 S AMPLE EPISODES FROM MINIWOB
See Table 6 for an example episode of web navigation inferred by a fine-tuned LLM.
A.4 D ETAILED MINIWOB R ESULTS
See Table 7 for detailed performance of various models on MiniWob.
A.5 R ESOURCE REQUIREMENTS
See Table 8.
A.6 S TRUCTURE DEPENDENCE ABLATION STUDY
We conducted an ablation study to examine the sensitivity of model performance to preserving
structural information. To do so, we evaluate the model’s performance on HTML input with criti-
cal structure components removed. We kept the order of elements and their attributes fixed while
corrupting the nesting structure by removing closing tags.
Removing closing tags corresponds to a valid traversal (BFS) and keeps the order of elements the
same as the text based input.
As a simple example:
<div id="form"><div><input id="username"></div></div>
would be converted into:
<div id="form"><div><input id="username">
We evaluated the trained WebN-T5-3B model on the same set of synthetic websites from the
MiniWoB benchmark with this aspect of structure removed from the HTML pages. WebN-T5-
3B achieves a 45.4% success rate, 6% lower than before, suggesting that WebN-T5-3B is at least
partially dependent on the DOM topology.
A.7 T ASK-SPECIFIC MODELS
An alternative to LLMs is to adapt bespoke task-specific architectures tailored towards processing
of structured documents and HTML (Li et al. (2021b;a)).
StructuralLM (Li et al. (2021a)) is an approach specifically tailored for document understanding
(i.e., combinations of images and text), and thus makes several simplifying assumptions for its model
that limit its applicability to HTML understanding (i.e., trees of elements with a richer structure and
functionality). It is trained only on the textual content of a document - the markup information is
ignored. For example, any input field or dropdown in a document would be missing from the model
inputs. All of the tasks we study require knowledge of this information. For example, in autonomous
navigation the model needs to interact with input elements (e.g. text, checkboxes, dropdowns) such
as username and password in the login-user task in MiniWoB. Typically, a “type” action with a
reference to an element and a text argument is generated by the model. Without knowing which
input elements are available in the page, it is impossible to generate a reference to any input element.
While MarkupLM (Li et al. (2021b)) is better tailored for understanding HTML pages, it has similar
drawbacks as StructuralLM in that it focuses solely on text and structure of text while ignoring
everything else in the markup. To illustrate our point better, we used the open source implementation
of MarkupLM from the HuggingFace library (Wolf et al. (2019)) to process the sample HTML
snippet in Figure-1(b). The MarkupLM ignores all input elements, both username and password,
and generates <s>Email AddressEnter Password:Please enter your password. </s>which is the
text input to the MarkupLM Transformer. Classifying this text as username or password is not
possible without the additional context on which input element is the salient element (in this context
it is the username). See below for the code to reproduce our result.
15
from transformers import MarkupLMProcessor
processor = MarkupLMProcessor.from_pretrained(f"microsoft/markuplm-base")
snippet = ’’’<div><label class="form-label" for="uName">Email Address
</label><label class="form-label" for="pass">Enter Password:
</label></div><div><input type="email" id="uName" target><input
type="password" id="pass"><span class="hidden">Please enter your password.
</span></div>’’’
encoding = processor(snippet)
print(processor.batch_decode(encoding["input_ids"]))
MarkupLM is also evaluated on NLP-like tasks such as QA or entity classification where understand-
ing page content is paramount, whereas we focus on HTML understanding tasks such as autonomous
navigation where both content and the page’s layout structure need to be understood.
We perform a quantitative evaluation of MarkupLM on our tasks to understand how significant
these limitations are. We fine-tune the MarkupLM-base model on the semantic classification task,
using the same setup as other WebC models but with the suggested hyperparameters from (Li et al.
(2021b)). We use the MarkupLM implementation from the HuggingFace library (Wolf et al. (2019)).
On development and test sets, MarkupLM-base achieves 65% and 66% accuracy, respectively. These
results are more than 16% lower compared to similar size WebC-BERT-base results that we report
in our work. This suggests that although domain specific models may be suitable for processing
HTML for NLP tasks, the generality, flexibility, and sample efficiency LLMs provide advantages
for autonomous navigation tasks.
16
Table 6: A sample web page and corresponding episode using the T5-3B model. At each time step,
previous actions, instruction, and HTML are concatenated into a single HTML text. Note that at the
beginning of episode, there is no past actions and we simply concatenate instruction and HTML.
Action is generated as a sequence of tokens which is later parsed into a dictionary. The refin the
action points to an element that has a refattribute with the same value. For instance, at the beginning
of episode, ref: 6 corresponds to an input with ref=6 . At the end of the episode, the model clicks on
the submit button and the episode terminates.
Web page
HTML Text Action Text
faction: click, ref: 6 g
faction: click, ref: 10 g
faction: click, ref: 12 g
faction: click, ref: 14 g 17
faction: click, ref: 16 g
faction: click, ref: 17 g
18
Table 7: Success rate comparison of various models in MiniWoB tasks. Baseline results are borrowed from
(Humphreys et al., 2022). Note that these are normalized between 0 and 1.
TASK Human CC-Net CC-Net World Workflow Learning DOM-Q-Net Workflow Learning Aggregated Aggregated
WebN-T5-3B WebN-T5-3B (SL & RL) (SL) of guided to (RL) guided to SOTA SOTA
(no history) bits exploration navigate exploration navigate (SL & RL) (Augmented)
(SL & RL) (SL & RL) the web (Augmented) the web
(RL) (Augmented)
bisect-angle 0.92 n/a n/a 0.97 0.29 0.8 n/a n/a n/a n/a n/a 0.8 0.8
book-flight 0.87 0 0 0.87 0 0 0 n/a n/a 0 1 0 1
chase-circle 0.82 n/a n/a 0.93 0.8 1 n/a n/a n/a n/a n/a 1 1
choose-date-easy 0.99 0.03 0.05 0.99 0.42 n/a n/a n/a n/a n/a n/a n/a n/a
choose-date-medium 0.98 0 0 0.99 0.26 n/a n/a n/a n/a n/a n/a n/a n/a
choose-date 0.97 0 0 0.97 0.12 0 0 n/a 1 0 n/a 1 1
choose-list 0.98 0.26 0.14 0.99 0.19 0.25 0.16 0.26 n/a 0.16 0.26 0.26 0.26
circle-center 0.96 n/a n/a 0.97 0.36 0.98 n/a n/a n/a n/a n/a 0.98 0.98
click-button-sequence 0.94 1 1 1 0.47 0.22 0.99 n/a 1 1 n/a 1 1
click-button 0.98 1 0.96 1 0.78 0.62 1 1 1 1 1 1 1
click-checkboxes-large 0.87 0.22 0 0.71 0 n/a 0.68 n/a n/a 0.84 n/a 0.68 0.84
click-checkboxes-soft 0.73 0.54 0.43 0.95 0.04 n/a 0.51 n/a n/a 0.94 n/a 0.51 0.94
click-checkboxes-transfer 0.98 0.63 0.34 0.99 0.36 n/a 0.64 n/a n/a 0.64 n/a 0.64 0.64
click-checkboxes 0.97 0.96 0.84 0.98 0.32 0.48 0.98 n/a 1 1 n/a 1 1
click-collapsible-2 0.97 0 0.01 0.98 0.17 0.11 0.65 n/a n/a 0.99 n/a 0.65 0.99
click-collapsible 0.99 0 0.01 1 0.81 0.98 1 1 n/a 1 1 1 1
click-color 0.97 0.27 0.23 1 0.82 0.23 1 n/a n/a 1 n/a 1 1
click-dialog-2 0.99 0.24 0.35 1 0.88 0.53 1 n/a n/a 1 n/a 1 1
click-dialog 1 1 1 1 0.95 1 1 1 1 1 1 1 1
click-link 0.99 1 0.96 0.99 0.59 0.31 1 1 1 1 1 1 1
click-menu-2 0.98 n/a n/a 0.83 0.52 0.16 n/a n/a n/a n/a n/a 0.16 0.16
click-menu 0.97 0.37 0.38 0.94 0.22 0.13 n/a n/a n/a n/a n/a 0.13 0.13
click-option 0.99 0.87 0.78 0.99 0.21 0.28 1 n/a 1 1 n/a 1 1
click-pie 0.98 0.51 0.14 0.97 0.15 0.15 0.32 1 n/a 0.32 1 1 1
click-scroll-list 0.91 0 0 0.6 0.01 0.07 n/a n/a n/a n/a n/a 0.07 0.07
click-shades 0.91 0 0 1 0.04 0.27 0.22 n/a n/a 0.99 n/a 0.27 0.99
click-shape 0.88 0.53 0.54 0.95 0.11 0.11 0.64 n/a n/a 0.64 n/a 0.64 0.64
click-tab-2-easy 0.99 n/a n/a 0.99 0.61 n/a n/a n/a n/a n/a n/a n/a n/a
click-tab-2-hard 0.96 0.12 0.13 0.98 0.19 n/a n/a n/a n/a n/a n/a n/a n/a
click-tab-2-medium 0.97 n/a n/a 0.99 0.54 n/a n/a n/a n/a n/a n/a n/a n/a
click-tab-2 0.97 0.18 0.09 0.98 0.27 0.08 0.64 n/a 1 0.98 n/a 1 1
click-tab 0.99 0.74 1 1 0.95 0.97 0.55 1 1 1 1 1 1
click-test-2 0.99 1 1 1 0.95 0.83 1 n/a 1 1 n/a 1 1
click-test-transfer 0.99 n/a n/a 1 0.94 n/a n/a n/a n/a n/a n/a n/a n/a
click-test 1 1 1 1 1 1 1 n/a 1 1 n/a 1 1
click-widget 0.83 1 0.97 1 0.56 0.34 0.93 n/a 1 0.93 n/a 1 1
copy-paste-2 0.94 n/a n/a 0.63 0.01 0 n/a n/a n/a n/a n/a 0 0
copy-paste 0.94 n/a n/a 0.79 0.04 0 n/a n/a n/a n/a n/a 0 0
count-shape 0.82 0.41 0.43 0.85 0.21 0.18 0.59 n/a n/a 0.76 n/a 0.59 0.76
count-sides 0.98 n/a n/a 1 0.74 0.3 n/a n/a n/a n/a n/a 0.3 0.3
drag-box 0.99 n/a n/a 1 0.61 0.31 n/a n/a n/a n/a n/a 0.31 0.31
drag-cube 0.99 n/a n/a 0.79 0.23 0.18 n/a n/a n/a n/a n/a 0.18 0.18
drag-item 0.98 n/a n/a 1 0.61 n/a n/a n/a n/a n/a n/a n/a n/a
drag-items-grid 0.87 n/a n/a 0.98 0.05 0.01 n/a n/a n/a n/a n/a 0.01 0.01
drag-items 0.93 n/a n/a 0.99 0.13 0.41 n/a n/a n/a n/a n/a 0.41 0.41
drag-shapes 0.96 n/a n/a 0.99 0.26 0.92 n/a n/a n/a n/a n/a 0.92 0.92
drag-sort-numbers 0.92 n/a n/a 0.97 0.11 0.66 n/a n/a n/a n/a n/a 0.66 0.66
email-inbox-delete 0.99 n/a n/a 1 0.22 n/a n/a n/a 1 n/a n/a 1 1
email-inbox-forward-nl-turk 0.88 0.33 0.09 1 0 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox-forward-nl 0.91 0.60 0.09 1 0 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox-forward 0.96 n/a n/a 1 0.01 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox-important 0.99 n/a n/a 1 0.3 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox-nl-turk 0.93 0.23 0.26 1 0.05 n/a 0.77 n/a n/a 0.93 n/a 0.77 0.93
email-inbox-noscroll 0.96 n/a n/a 1 0.13 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox-reply 0.91 n/a n/a 1 0 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox-star-reply 0.95 n/a n/a 1 0.11 n/a n/a n/a n/a n/a n/a n/a n/a
email-inbox 0.96 0.38 0.21 1 0.09 0.03 0.43 n/a 0.54 0.99 n/a 0.54 0.99
enter-date 0.97 0 0 1 0.02 0.61 0 1 n/a 0.96 1 1 1
enter-password 0.96 0.97 0.92 1 0.02 0 0.99 1 1 1 1 1 1
enter-text-2 0.91 n/a n/a 0.98 0.04 0 n/a n/a n/a n/a n/a 0 0
enter-text-dynamic 0.97 0.98 0.92 1 0.39 1 1 1 1 1 1 1 1
enter-text 0.98 0.89 0.99 1 0.35 0 1 n/a 1 1 n/a 1 1
enter-time 0.98 0 0.01 0.97 0.04 0.08 0.52 n/a n/a 0.9 n/a 0.52 0.9
find-midpoint 0.94 n/a n/a 0.97 0.35 0.31 n/a n/a n/a n/a n/a 0.31 0.31
find-word 0.96 n/a n/a 0.88 0.05 0 n/a n/a n/a n/a n/a 0 0
focus-text-2 0.99 1 1 1 0.96 0.83 1 n/a 1 1 n/a 1 1
focus-text 1 1 1 1 0.99 0.95 1 n/a 1 1 n/a 1 1
grid-coordinate 0.87 0.49 0.42 1 0.66 0.26 1 n/a n/a 1 n/a 1 1
guess-number 0.99 0 0 1 0.21 0.2 0 n/a n/a 0 n/a 0.2 0.2
highlight-text-2 0.97 n/a n/a 1 0.4 0.13 n/a n/a n/a n/a n/a 0.13 0.13
highlight-text 0.97 n/a n/a 1 0.51 0.9 n/a n/a n/a n/a n/a 0.9 0.9
identify-shape 0.98 0.88 0.89 1 0.68 0.36 0.9 n/a n/a 1 n/a 0.9 1
login-user-popup 0.94 0.72 0.40 1 0.02 n/a n/a n/a n/a n/a n/a n/a n/a
login-user 0.96 0.82 0.64 1 0 0 0.99 1 1 1 1 1 1
moving-items 0.18 n/a n/a 0.88 0.13 0.78 n/a n/a n/a n/a n/a 0.78 0.78
multi-layouts 0.95 0.83 0.48 1 0 n/a 0.99 n/a n/a 1 n/a 0.99 1
multi-orderings 0.96 0.88 0.64 1 0 n/a 0.05 n/a n/a 1 n/a 0.05 1
navigate-tree 0.98 0.91 0.99 0.99 0.32 0.2 0.99 1 1 0.99 1 1 1
number-checkboxes 0.96 n/a n/a 0.99 0 0.16 n/a n/a n/a n/a n/a 0.16 0.16
read-table-2 0.95 n/a n/a 0.94 0 0 n/a n/a n/a n/a n/a 0 0
read-table 0.97 n/a n/a 0.97 0.01 0 n/a n/a n/a n/a n/a 0 0
resize-textarea 0.94 n/a n/a 1 0.27 0.11 n/a n/a n/a n/a n/a 0.11 0.11
right-angle 0.87 n/a n/a 0.98 0.26 0.38 n/a n/a n/a n/a n/a 0.38 0.38
scroll-text-2 0.97 n/a n/a 1 0.88 0.96 n/a n/a n/a n/a n/a 0.96 0.96
scroll-text 0.97 n/a n/a 0.96 0.04 0 n/a n/a n/a n/a n/a 0 0
search-engine 0.97 0.34 0.34 1 0.15 0 0.26 n/a 1 0.99 n/a 1 1
simon-says 0.62 n/a n/a 0 0.02 0.28 n/a n/a n/a n/a n/a 0.28 0.28
simple-algebra 0.86 n/a n/a 0.75 0.03 0.04 n/a n/a n/a n/a n/a 0.04 0.04
simple-arithmetic 0.96 n/a n/a 0.86 0.38 0.07 n/a n/a n/a n/a n/a 0.07 0.07
social-media-all 0.89 0 0 0.75 0 n/a 0.01 n/a n/a 0.01 1 0.01 1
social-media-some 0.91 0.02 0 0.85 0.01 n/a 0.01 n/a n/a 0.42 n/a 0.01 0.42
social-media 0.96 0.21 0.24 0.9 0.03 0.23 0.39 n/a 1 1 n/a 1 1
terminal 0.88 n/a n/a -0.01 0 0 n/a n/a n/a n/a n/a 0 0
text-editor 0.88 n/a n/a 0.98 0.11 0.01 n/a n/a n/a n/a n/a 0.01 0.01
text-transform 0.86 n/a n/a 0.6 0.19 0 n/a n/a n/a n/a n/a 0 0
tic-tac-toe 0.71 0.48 0.40 0.83 0.32 0.34 0.37 n/a n/a 0.47 n/a 0.37 0.47
unicode-test 0.99 n/a n/a 1 0.86 n/a n/a n/a n/a n/a n/a n/a n/a
use-autocomplete 0.98 0.22 0.15 1 0.07 0 0.78 n/a n/a 0.98 n/a 0.78 0.98
use-colorwheel-2 0.94 n/a n/a 0.95 0.38 1 n/a n/a n/a n/a n/a 1 1
use-colorwheel 0.9 n/a n/a 0.98 0.68 1 n/a n/a n/a n/a n/a 1 1
use-slider-2 0.97 n/a n/a 0.95 0.03 0.15 n/a n/a n/a n/a n/a 0.15 0.15
use-slider 0.98 n/a n/a 0.91 0.18 0.51 n/a n/a n/a n/a n/a 0.51 0.51
use-spinner 0.98 0.07 0.05 1 0.47 0.17 0.04 n/a n/a 0.04 n/a 0.17 0.17
visual-addition 0.97 n/a n/a 0.99 0.36 0.01 n/a n/a n/a n/a n/a 0.01 0.01
19
Table 8: Resource requirements and running time of LLMs.
Model Name Model Size TPU version Batch size Input sequence length Examples per sec (training) Examples per sec (inference)
PaLM 62B TPU v4 8 1920 9.313 30.51
PaLM 8B TPU v4 32 1920 64.4 184.3
T5 3B TPU v4 128 512 163.8 734.5
LaMDA 1B TPU v2 128 512 363.1 1416
20 | [
{
"id": "2107.06955"
},
{
"id": "2204.02311"
},
{
"id": "2204.01691"
},
{
"id": "2010.11934"
},
{
"id": "1802.08802"
},
{
"id": "2110.08518"
},
{
"id": "2105.11210"
},
{
"id": "2210.03945"
},
{
"id": "2109.00527"
},
{
"id": "2001.08361"
},
{
"id": "2112.09332"
},
{
"id": "1810.04805"
},
{
"id": "2202.02312"
},
{
"id": "2105.13231"
},
{
"id": "2108.07732"
},
{
"id": "2010.12844"
},
{
"id": "2108.07258"
},
{
"id": "2207.01206"
},
{
"id": "1808.09132"
},
{
"id": "2103.05247"
}
] |
1711.05101 | Decoupled Weight Decay Regularization | L$_2$ regularization and weight decay regularization are equivalent for
standard stochastic gradient descent (when rescaled by the learning rate), but
as we demonstrate this is \emph{not} the case for adaptive gradient algorithms,
such as Adam. While common implementations of these algorithms employ L$_2$
regularization (often calling it "weight decay" in what may be misleading due
to the inequivalence we expose), we propose a simple modification to recover
the original formulation of weight decay regularization by \emph{decoupling}
the weight decay from the optimization steps taken w.r.t. the loss function. We
provide empirical evidence that our proposed modification (i) decouples the
optimal choice of weight decay factor from the setting of the learning rate for
both standard SGD and Adam and (ii) substantially improves Adam's
generalization performance, allowing it to compete with SGD with momentum on
image classification datasets (on which it was previously typically
outperformed by the latter). Our proposed decoupled weight decay has already
been adopted by many researchers, and the community has implemented it in
TensorFlow and PyTorch; the complete source code for our experiments is
available at https://github.com/loshchil/AdamW-and-SGDW | http://arxiv.org/pdf/1711.05101 | [
"Ilya Loshchilov",
"Frank Hutter"
] | [
"cs.LG",
"cs.NE",
"math.OC"
] | Published as a conference paper at ICLR 2019 | null | cs.LG | 20171114 | 20190104 | Published as a conference paper at ICLR 2019
DECOUPLED WEIGHT DECAY REGULARIZATION
Ilya Loshchilov & Frank Hutter
University of Freiburg
Freiburg, Germany,
filya,fhg@cs.uni-freiburg.de
ABSTRACT
L2regularization and weight decay regularization are equivalent for standard
stochastic gradient descent (when rescaled by the learning rate), but as we demon-
strate this is notthe case for adaptive gradient algorithms, such as Adam. While
common implementations of these algorithms employ L 2regularization (often
calling it “weight decay” in what may be misleading due to the inequivalence we
expose), we propose a simple modification to recover the original formulation of
weight decay regularization by decoupling the weight decay from the optimization
steps taken w.r.t. the loss function. We provide empirical evidence that our pro-
posed modification (i) decouples the optimal choice of weight decay factor from
the setting of the learning rate for both standard SGD and Adam and (ii) substan-
tially improves Adam’s generalization performance, allowing it to compete with
SGD with momentum on image classification datasets (on which it was previously
typically outperformed by the latter). Our proposed decoupled weight decay has
already been adopted by many researchers, and the community has implemented
it in TensorFlow and PyTorch; the complete source code for our experiments is
available at https://github.com/loshchil/AdamW-and-SGDW
1 I NTRODUCTION
Adaptive gradient methods, such as AdaGrad (Duchi et al., 2011), RMSProp (Tieleman & Hinton,
2012), Adam (Kingma & Ba, 2014) and most recently AMSGrad (Reddi et al., 2018) have become
a default method of choice for training feed-forward and recurrent neural networks (Xu et al., 2015;
Radford et al., 2015). Nevertheless, state-of-the-art results for popular image classification datasets,
such as CIFAR-10 and CIFAR-100 Krizhevsky (2009), are still obtained by applying SGD with
momentum (Gastaldi, 2017; Cubuk et al., 2018). Furthermore, Wilson et al. (2017) suggested that
adaptive gradient methods do not generalize as well as SGD with momentum when tested on a
diverse set of deep learning tasks, such as image classification, character-level language modeling
and constituency parsing. Different hypotheses about the origins of this worse generalization have
been investigated, such as the presence of sharp local minima (Keskar et al., 2016; Dinh et al.,
2017) and inherent problems of adaptive gradient methods (Wilson et al., 2017). In this paper, we
investigate whether it is better to use L 2regularization or weight decay regularization to train deep
neural networks with SGD and Adam. We show that a major factor of the poor generalization of the
most popular adaptive gradient method, Adam, is due to the fact that L 2regularization is not nearly
as effective for it as for SGD. Specifically, our analysis of Adam leads to the following observations:
L2regularization and weight decay are not identical. The two techniques can be made equiv-
alent for SGD by a reparameterization of the weight decay factor based on the learning
rate; however, as is often overlooked, this is not the case for Adam. In particular, when
combined with adaptive gradients, L 2regularization leads to weights with large historic
parameter and/or gradient amplitudes being regularized less than they would be when us-
ing weight decay.
L2regularization is not effective in Adam. One possible explanation why Adam and other
adaptive gradient methods might be outperformed by SGD with momentum is that common
deep learning libraries only implement L 2regularization, not the original weight decay.
Therefore, on tasks/datasets where the use of L 2regularization is beneficial for SGD (e.g.,
1arXiv:1711.05101v3 [cs.LG] 4 Jan 2019
Published as a conference paper at ICLR 2019
on many popular image classification datasets), Adam leads to worse results than SGD with
momentum (for which L 2regularization behaves as expected).
Weight decay is equally effective in both SGD and Adam. For SGD, it is equivalent to L 2
regularization, while for Adam it is not.
Optimal weight decay depends on the total number of batch passes/weight updates. Our
empirical analysis of SGD and Adam suggests that the larger the runtime/number of batch
passes to be performed, the smaller the optimal weight decay.
Adam can substantially benefit from a scheduled learning rate multiplier. The fact that Adam
is an adaptive gradient algorithm and as such adapts the learning rate for each parameter
does notrule out the possibility to substantially improve its performance by using a global
learning rate multiplier, scheduled, e.g., by cosine annealing.
The main contribution of this paper is to improve regularization in Adam by decoupling the weight
decay from the gradient-based update . In a comprehensive analysis, we show that Adam generalizes
substantially better with decoupled weight decay than with L 2regularization, achieving 15% relative
improvement in test error (see Figures 2 and 3); this holds true for various image recognition datasets
(CIFAR-10 and ImageNet32x32), training budgets (ranging from 100 to 1800 epochs), and learning
rate schedules (fixed, drop-step, and cosine annealing; see Figure 1). We also demonstrate that our
decoupled weight decay renders the optimal settings of the learning rate and the weight decay factor
much more independent, thereby easing hyperparameter optimization (see Figure 2).
The main motivation of this paper is to improve Adam to make it competitive w.r.t. SGD with
momentum even for those problems where it did not use to be competitive. We hope that as a result,
practitioners do not need to switch between Adam and SGD anymore, which in turn should reduce
the common issue of selecting dataset/task-specific training algorithms and their hyperparameters.
2 D ECOUPLING THE WEIGHT DECAY FROM THE GRADIENT -BASED UPDATE
In the weight decay described by Hanson & Pratt (1988), the weights decay exponentially as
t+1= (1 )t rft(t); (1)
wheredefines the rate of the weight decay per step and rft(t)is thet-th batch gradient to be
multiplied by a learning rate . For standard SGD, it is equivalent to standard L 2regularization:
Proposition 1 (Weight decay = L 2reg for standard SGD) .Standard SGD with base learning rate
executes the same steps on batch loss functions ft()with weight decay (defined in Equation 1)
as it executes without weight decay on freg
t() =ft() +0
2kk2
2, with0=
.
The proofs of this well-known fact, as well as our other propositions, are given in Appendix A.
Due to this equivalence, L 2regularization is very frequently referred to as weight decay, including
in popular deep learning libraries. However, as we will demonstrate later in this section, this equiva-
lence does nothold for adaptive gradient methods. One fact that is often overlooked already for the
simple case of SGD is that in order for the equivalence to hold, the L 2regularizer0has to be set to
, i.e., if there is an overall best weight decay value , the best value of 0is tightly coupled with
the learning rate . In order to decouple the effects of these two hyperparameters, we advocate to
decouple the weight decay step as proposed by Hanson & Pratt (1988) (Equation 1).
Looking first at the case of SGD, we propose to decay the weights simultaneously with the update
oftbased on gradient information in Line 9 of Algorithm 1. This yields our proposed variant of
SGD with momentum using decoupled weight decay ( SGDW ). This simple modification explicitly
decouplesand(although some problem-dependent implicit coupling may of course remain as
for any two hyperparameters). In order to account for a possible scheduling of both and, we
introduce a scaling factor tdelivered by a user-defined procedure SetScheduleMultiplier (t).
Now, let’s turn to adaptive gradient algorithms like the popular optimizer Adam Kingma & Ba
(2014), which scale gradients by their historic magnitudes. Intuitively, when Adam is run on a loss
functionfplus L 2regularization, weights that tend to have large gradients in fdo not get regularized
as much as they would with decoupled weight decay, since the gradient of the regularizer gets scaled
2
Published as a conference paper at ICLR 2019
Algorithm 1 SGD with L 2regularization and SGD with decoupled weight decay (SGDW) , both
with momentum
1:given initial learning rate 2I R, momentum factor 12I R, weight decay/L 2regularization factor 2I R
2:initialize time stept 0, parameter vector t=02I Rn, first moment vector mt=0 0, schedule
multipliert=02I R
3:repeat
4:t t+ 1
5:rft(t 1) SelectBatch (t 1) .select batch and return the corresponding gradient
6: gt rft(t 1)+t 1
7:t SetScheduleMultiplier (t) .can be fixed, decay, be used for warm restarts
8: mt 1mt 1+tgt
9: t t 1 mt tt 1
10:until stopping criterion is met
11:return optimized parameters t
Algorithm 2 Adam with L 2regularization and Adam with decoupled weight decay (AdamW)
1:given= 0:001;1= 0:9;2= 0:999;= 10 8;2I R
2:initialize time stept 0, parameter vector t=02I Rn, first moment vector mt=0 0, second moment
vector vt=0 0, schedule multiplier t=02I R
3:repeat
4:t t+ 1
5:rft(t 1) SelectBatch (t 1) .select batch and return the corresponding gradient
6: gt rft(t 1)+t 1
7: mt 1mt 1+ (1 1)gt .here and below all operations are element-wise
8: vt 2vt 1+ (1 2)g2
t
9: ^mt mt=(1 t
1) . 1is taken to the power of t
10: ^vt vt=(1 t
2) . 2is taken to the power of t
11:t SetScheduleMultiplier (t) .can be fixed, decay, or also be used for warm restarts
12: t t 1 t
^mt=(p^vt+)+t 1
13:until stopping criterion is met
14:return optimized parameters t
along with the gradient of f. This leads to an inequivalence of L 2and decoupled weight decay
regularization for adaptive gradient algorithms:
Proposition 2 (Weight decay6=L2reg for adaptive gradients) .LetOdenote an optimizer that has
iteratest+1 t Mtrft(t)when run on batch loss function ft()without weight decay,
andt+1 (1 )t Mtrft(t)when run on ft()with weight decay, respectively, with
Mt6=kI(wherek2R). Then, forOthere exists no L 2coefficient0such that running Oon batch
lossfreg
t() =ft()+0
2kk2
2without weight decay is equivalent to running Oonft()with decay
2R+.
We decouple weight decay and loss-based gradient updates in Adam as shown in line 12 of Algo-
rithm 2; this gives rise to our variant of Adam with decoupled weight decay ( AdamW ).
Having shown that L 2regularization and weight decay regularization differ for adaptive gradient
algorithms raises the question of how they differ and how to interpret their effects. Their equivalence
for standard SGD remains very helpful for intuition: both mechanisms push weights closer to zero,
at the same rate. However, for adaptive gradient algorithms they differ: with L 2regularization, the
sums of the gradient of the loss function and the gradient of the regularizer (i.e., the L 2norm of the
weights) are adapted, whereas with decoupled weight decay, only the gradients of the loss function
are adapted (with the weight decay step separated from the adaptive gradient mechanism). With
L2regularization both types of gradients are normalized by their typical (summed) magnitudes, and
therefore weights xwith large typical gradient magnitude sare regularized by a smaller relative
amount than other weights. In contrast, decoupled weight decay regularizes all weights with the
same rate, effectively regularizing weights xwith largesmore than standard L 2regularization
3
Published as a conference paper at ICLR 2019
does. We demonstrate this formally for a simple special case of adaptive gradient algorithm with a
fixed preconditioner:
Proposition 3 (Weight decay = scale-adjusted L2reg for adaptive gradient algorithm with fixed
preconditioner) .LetOdenote an algorithm with the same characteristics as in Proposition 2, and
using a fixed preconditioner matrix Mt=diag(s) 1(withsi>0for alli). Then,Owith base
learning rate executes the same steps on batch loss functions ft()with weight decay as it
executes without weight decay on the scale-adjusted regularized batch loss
fsreg
t() =ft() +0
2
ps
2
2; (2)
whereandpdenote element-wise multiplication and square root, respectively, and 0=
.
We note that this proposition does notdirectly apply to practical adaptive gradient algorithms, since
these change the preconditioner matrix at every step. Nevertheless, it can still provide intuition about
the equivalent loss function being optimized in each step: parameters iwith a large inverse pre-
conditionersi(which in practice would be caused by historically large gradients in dimension i) are
regularized relatively more than they would be with L 2regularization; specifically, the regularization
is proportional topsi.
3 J USTIFICATION OF DECOUPLED WEIGHT DECAY VIA A VIEW OF
ADAPTIVE GRADIENT METHODS AS BAYESIAN FILTERING
We now discuss a justification of decoupled weight decay in the framework of Bayesian filtering for
a unified theory of adaptive gradient algorithms due to Aitchison (2018). After we posted a prelim-
inary version of our current paper on arXiv, Aitchison noted that his theory “gives us a theoretical
framework in which we can understand the superiority of this weight decay over L2regularization,
because it is weight decay, rather than L2regularization that emerges through the straightforward ap-
plication of Bayesian filtering.”(Aitchison, 2018). While full credit for this theory goes to Aitchison,
we summarize it here to shed some light on why weight decay may be favored over L2regulariza-
tion.
Aitchison (2018) views stochastic optimization of nparameters1;:::;nas a Bayesian filtering
problem with the goal of inferring a distribution over the optimal values of each of the parameters i
given the current values of the other parameters i(t)at time stept. When the other parameters do
not change this is an optimization problem, but when they do change it becomes one of “tracking”
the optimizer using Bayesian filtering as follows. One is given a probability distribution P(tj
y1:t)of the optimizer at time step tthat takes into account the data y1:tfrom the first tmini
batches, a state transition prior P(t+1jt)reflecting a (small) data-independent change in this
distribution from one step to the next, and a likelihood P(yt+1jt+1)derived from the mini batch
at stept+ 1. The posterior distribution P(t+1jy1:t+1)of the optimizer at time step t+ 1
can then be computed (as usual in Bayesian filtering) by marginalizing over tto obtain the one-
step ahead predictions P(t+1jy1:t)and then applying Bayes’ rule to incorporate the likelihood
P(yt+1jt+1). Aitchison (2018) assumes a Gaussian state transition distribution P(t+1jt)and
an approximate conjugate likelihood P(yt+1jt+1), leading to the following closed-form update
of the filtering distribution’s mean:
post=prior +postg; (3)
wheregis the gradient of the log likelihood of the mini batch at time t. This result implies a precon-
ditioner of the gradients that is given by the posterior uncertainty postof the filtering distribution:
updates are larger for parameters we are more uncertain about and smaller for parameters we are
more certain about. Aitchison (2018) goes on to show that popular adaptive gradient methods, such
as Adam and RMSprop, as well as Kronecker-factorized methods are special cases of this frame-
work.
Decoupled weight decay very naturally fits into this unified framework as part of the state-transition
distribution: Aitchison (2018) assumes a slow change of the optimizer according to the following
Gaussian:
P(t+1jt) =N((I A)t;Q); (4)
4
Published as a conference paper at ICLR 2019
Figure 1: Adam performs better with decoupled weight decay (bottom row, AdamW) than with L2
regularization (top row, Adam). We show the final test error of a 26 2x64d ResNet on CIFAR-10
after 100 epochs of training with fixed learning rate (left column), step-drop learning rate (with drops
at epoch indexes 30, 60 and 80, middle column) and cosine annealing (right column). AdamW leads
to a more separable hyperparameter search space, especially when a learning rate schedule, such as
step-drop and cosine annealing is applied. Cosine annealing yields clearly superior results.
whereQis the covariance of Gaussian perturbations of the weights, and Ais a regularizer to avoid
values growing unboundedly over time. When instantiated as A=I, this regularizer Aplays
exactly the role of decoupled weight decay as described in Equation 1, since this leads to multiplying
the current mean estimate tby(1 )at each step. Notably, this regularization is also directly
applied to the prior and does not depend on the uncertainty in each of the parameters (which would
be required for L2regularization).
4 E XPERIMENTAL VALIDATION
We now evaluate the performance of decoupled weight decay under various training budgets
and learning rate schedules. Our experimental setup follows that of Gastaldi (2017), who pro-
posed, in addition to L 2regularization, to apply the new Shake-Shake regularization to a 3-branch
residual DNN that allowed to achieve new state-of-the-art results of 2.86% on the CIFAR-10
dataset (Krizhevsky, 2009). We used the same model/source code based on fb.resnet.torch1. We
always used a batch size of 128 and applied the regular data augmentation procedure for the CI-
FAR datasets. The base networks are a 26 2x64d ResNet (i.e. the network has a depth of 26, 2
residual branches and the first residual block has a width of 64) and a 26 2x96d ResNet with 11.6M
and 25.6M parameters, respectively. For a detailed description of the network and the Shake-Shake
method, we refer the interested reader to Gastaldi (2017). We also perform experiments on the Im-
ageNet32x32 dataset (Chrabaszcz et al., 2017), a downsampled version of the original ImageNet
dataset with 1.2 million 32 32 pixels images.
4.1 E VALUATING DECOUPLED WEIGHT DECAY WITHDIFFERENT LEARNING RATE
SCHEDULES
In our first experiment, we compare Adam with L2regularization to Adam with decoupled weight
decay (AdamW), using three different learning rate schedules: a fixed learning rate, a drop-step
1https://github.com/xgastaldi/shake-shake
5
Published as a conference paper at ICLR 2019
Figure 2: The Top-1 test error of a 26 2x64d ResNet on CIFAR-10 measured after 100 epochs. The
proposed SGDW and AdamW (right column) have a more separable hyperparameter space.
schedule, and a cosine annealing schedule (Loshchilov & Hutter, 2016). Since Adam already adapts
its parameterwise learning rates it is not as common to use a learning rate multiplier schedule with
it as it is with SGD, but as our results show such schedules can substantially improve Adam’s per-
formance, and we advocate not to overlook their use for adaptive gradient algorithms.
For each learning rate schedule and weight decay variant, we trained a 2x64d ResNet for 100 epochs,
using different settings of the initial learning rate and the weight decay factor . Figure 1 shows
that decoupled weight decay outperforms L2regularization for all learning rate schedules, with
larger differences for better learning rate schedules. We also note that decoupled weight decay leads
to a more separable hyperparameter search space, especially when a learning rate schedule, such
as step-drop and cosine annealing is applied. The figure also shows that cosine annealing clearly
outperforms the other learning rate schedules; we thus used cosine annealing for the remainder of
the experiments.
4.2 D ECOUPLING THE WEIGHT DECAY AND INITIAL LEARNING RATEPARAMETERS
In order to verify our hypothesis about the coupling of and, in Figure 2 we compare the perfor-
mance of L 2regularization vs. decoupled weight decay in SGD (SGD vs. SGDW, top row) and in
Adam (Adam vs. AdamW, bottom row). In SGD (Figure 2, top left), L 2regularization is not decou-
pled from the learning rate (the common way as described in Algorithm 1), and the figure clearly
shows that the basin of best hyperparameter settings (depicted by color and top-10 hyperparameter
settings by black circles) is not aligned with the x-axis or y-axis but lies on the diagonal. This sug-
gests that the two hyperparameters are interdependent and need to be changed simultaneously, while
only changing one of them might substantially worsen results. Consider, e.g., the setting at the top
left black circle ( = 1=2,= 1=80:001); only changing either orby itself would worsen
results, while changing both of them could still yield clear improvements. We note that this coupling
of initial learning rate and L 2regularization factor might have contributed to SGD’s reputation of
being very sensitive to its hyperparameter settings.
In contrast, the results for SGD with decoupled weight decay (SGDW) in Figure 2 (top right) show
that weight decay and initial learning rate are decoupled. The proposed approach renders the two
hyperparameters more separable: even if the learning rate is not well tuned yet (e.g., consider the
value of 1/1024 in Figure 2, top right), leaving it fixed and only optimizing the weight decay factor
6
Published as a conference paper at ICLR 2019
Figure 3: Learning curves (top row) and generalization results (bottom row) obtained by a 26
2x96d ResNet trained with Adam and AdamW on CIFAR-10. See text for details. SuppFigure 4 in
the Appendix shows the same qualitative results for ImageNet32x32.
would yield a good value (of 1/4*0.001). This is not the case for SGD with L 2regularization (see
Figure 2, top left).
The results for Adam with L 2regularization are given in Figure 2 (bottom left). Adam’s best hy-
perparameter settings performed clearly worse than SGD’s best ones (compare Figure 2, top left).
While both methods used L 2regularization, Adam did not benefit from it at all: its best results ob-
tained for non-zero L 2regularization factors were comparable to the best ones obtained without the
L2regularization, i.e., when = 0. Similarly to the original SGD, the shape of the hyperparameter
landscape suggests that the two hyperparameters are coupled.
In contrast, the results for our new variant of Adam with decoupled weight decay (AdamW) in
Figure 2 (bottom right) show that AdamW largely decouples weight decay and learning rate. The
results for the best hyperparameter settings were substantially better than the best ones of Adam
with L 2regularization and rivaled those of SGD and SGDW.
In summary, the results in Figure 2 support our hypothesis that the weight decay and learning rate
hyperparameters can be decoupled, and that this in turn simplifies the problem of hyperparameter
tuning in SGD and improves Adam’s performance to be competitive w.r.t. SGD with momentum.
4.3 B ETTER GENERALIZATION OF ADAM W
While the previous experiment suggested that the basin of optimal hyperparameters of AdamW is
broader and deeper than the one of Adam, we next investigated the results for much longer runs of
1800 epochs to compare the generalization capabilities of AdamW and Adam.
We fixed the initial learning rate to 0.001 which represents both the default learning rate for Adam
and the one which showed reasonably good results in our experiments. Figure 3 shows the results
for 12 settings of the L 2regularization of Adam and 7 settings of the normalized weight decay of
AdamW (the normalized weight decay represents a rescaling formally defined in Appendix B.1; it
amounts to a multiplicative factor which depends on the number of batch passes). Interestingly,
while the dynamics of the learning curves of Adam and AdamW often coincided for the first half
of the training run, AdamW often led to lower training loss and test errors (see Figure 3 top left
and top right, respectively). Importantly, the use of L 2weight decay in Adam did not yield as good
7
Published as a conference paper at ICLR 2019
Figure 4: Top-1 test error on CIFAR-10 (left) and Top-5 test error on ImageNet32x32 (right).
For a better resolution and with training loss curves, see SuppFigure 5 and SuppFigure 6 in the
supplementary material.
results as decoupled weight decay in AdamW (see also Figure 3, bottom left). Next, we investigated
whether AdamW’s better results were only due to better convergence or due to better generalization.
The results in Figure 3 (bottom right) for the best settings of Adam and AdamW suggest that AdamW
did not only yield better training loss but also yielded better generalization performance for similar
training loss values . The results on ImageNet32x32 (see SuppFigure 4 in the Appendix) yield the
same conclusion of substantially improved generalization performance.
4.4 A DAM WR WITH WARM RESTARTS FOR BETTER ANYTIME PERFORMANCE
In order to improve the anytime performance of SGDW and AdamW we extended them with the
warm restarts we introduced in Loshchilov & Hutter (2016), to obtain SGDWR and AdamWR, re-
spectively (see Section B.2 in the Appendix). As Figure 4 shows, AdamWR greatly sped up AdamW
on CIFAR-10 and ImageNet32x32, up to a factor of 10 (see the results at the first restart). For the
default learning rate of 0.001, AdamW achieved 15% relative improvement in test error compared to
Adam both on CIFAR-10 (also see SuppFigure 5) and ImageNet32x32 (also see SuppFigure 6).
AdamWR achieved the same improved results but with a much better anytime performance. These
improvements closed most of the gap between Adam and SGDWR on CIFAR-10 and yielded com-
parable performance on ImageNet32x32.
4.5 U SE OF ADAM WON OTHER DATASETS AND ARCHITECTURES
Several other research groups have already successfully applied AdamW in citable works. For exam-
ple, Wang et al. (2018) used AdamW to train a novel architecture for face detection on the standard
WIDER FACE dataset (Yang et al., 2016), obtaining almost 10x faster predictions than the previous
state of the art algorithms while achieving comparable performance. V ¨olker et al. (2018) employed
AdamW with cosine annealing to train convolutional neural networks to classify and characterize
error-related brain signals measured from intracranial electroencephalography (EEG) recordings.
While their paper does not provide a comparison to Adam, they kindly provided us with a direct
comparison of the two on their best-performing problem-specific network architecture Deep4Net
and a variant of ResNet. AdamW with the same hyperparameter setting as Adam yielded higher
test set accuracy on Deep4Net (73.68% versus 71.37%) and statistically significantly higher test
set accuracy on ResNet (72.04% versus 61.34%). Radford et al. (2018) employed AdamW to train
Transformer (Vaswani et al., 2017) architectures to obtain new state-of-the-art results on a wide
range of benchmarks for natural language understanding. Zhang et al. (2018) compared L 2reg-
ularization vs. weight decay for SGD, Adam and the Kronecker-Factored Approximate Curvature
(K-FAC) optimizer (Martens & Grosse, 2015) on the CIFAR datasets with ResNet and VGG archi-
tectures, reporting that decoupled weight decay consistently outperformed L 2regularization in cases
where they differ.
8
Published as a conference paper at ICLR 2019
5 C ONCLUSION AND FUTURE WORK
Following suggestions that adaptive gradient methods such as Adam might lead to worse generaliza-
tion than SGD with momentum (Wilson et al., 2017), we identified and exposed the inequivalence
of L 2regularization and weight decay for Adam. We empirically showed that our version of Adam
with decoupled weight decay yields substantially better generalization performance than the com-
mon implementation of Adam with L 2regularization. We also proposed to use warm restarts for
Adam to improve its anytime performance.
Our results obtained on image classification datasets must be verified on a wider range of tasks,
especially ones where the use of regularization is expected to be important. It would be interesting
to integrate our findings on weight decay into other methods which attempt to improve Adam, e.g,
normalized direction-preserving Adam (Zhang et al., 2017). While we focused our experimental
analysis on Adam, we believe that similar results also hold for other adaptive gradient methods,
such as AdaGrad (Duchi et al., 2011) and AMSGrad (Reddi et al., 2018).
6 A CKNOWLEDGMENTS
We thank Patryk Chrabaszcz for help with running experiments with ImageNet32x32; Matthias
Feurer and Robin Schirrmeister for providing valuable feedback on this paper in several iterations;
and Martin V ¨olker, Robin Schirrmeister, and Tonio Ball for providing us with a comparison of
AdamW and Adam on their EEG data. We also thank the following members of the deep learning
community for implementing decoupled weight decay in various deep learning libraries:
Jingwei Zhang, Lei Tai, Robin Schirrmeister, and Kashif Rasul for their implementations
in PyTorch (see https://github.com/pytorch/pytorch/pull/4429 )
Phil Jund for his implementation in TensorFlow described at
https://www.tensorflow.org/api_docs/python/tf/contrib/opt/
DecoupledWeightDecayExtension
Sylvain Gugger, Anand Saha, Jeremy Howard and other members of fast.ai for their imple-
mentation available at https://github.com/sgugger/Adam-experiments
Guillaume Lambard for his implementation in Keras available at https://github.
com/GLambard/AdamW_Keras
Yagami Lin for his implementation in Caffe available at https://github.com/
Yagami123/Caffe-AdamW-AdamWR
This work was supported by the European Research Council (ERC) under the European Union’s
Horizon 2020 research and innovation programme under grant no. 716721, by the German Research
Foundation (DFG) under the BrainLinksBrainTools Cluster of Excellence (grant number EXC 1086)
and through grant no. INST 37/935-1 FUGG, and by the German state of Baden-W ¨urttemberg
through bwHPC.
REFERENCES
Laurence Aitchison. A unified theory of adaptive stochastic gradient descent as Bayesian filtering.
arXiv:1507.02030 , 2018.
Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of ImageNet as an
alternative to the CIFAR datasets. arXiv:1707.08819 , 2017.
Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment:
Learning augmentation policies from data. arXiv preprint arXiv:1805.09501 , 2018.
Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize
for deep nets. arXiv:1703.04933 , 2017.
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and
stochastic optimization. The Journal of Machine Learning Research , 12:2121–2159, 2011.
9
Published as a conference paper at ICLR 2019
Xavier Gastaldi. Shake-Shake regularization. arXiv preprint arXiv:1705.07485 , 2017.
Stephen Jos ´e Hanson and Lorien Y Pratt. Comparing biases for minimal network construction with
back-propagation. In Proceedings of the 1st International Conference on Neural Information
Processing Systems , pp. 177–185, 1988.
Gao Huang, Yixuan Li, Geoff Pleiss, Zhuang Liu, John E Hopcroft, and Kilian Q Weinberger.
Snapshot ensembles: Train 1, get m for free. arXiv:1704.00109 , 2017.
Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Pe-
ter Tang. On large-batch training for deep learning: Generalization gap and sharp minima.
arXiv:1609.04836 , 2016.
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980 ,
2014.
Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
Hao Li, Zheng Xu, Gavin Taylor, and Tom Goldstein. Visualizing the loss landscape of neural nets.
arXiv preprint arXiv:1712.09913 , 2017.
Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with warm restarts.
arXiv:1608.03983 , 2016.
James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate
curvature. In International conference on machine learning , pp. 2408–2417, 2015.
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep
convolutional generative adversarial networks. arXiv:1511.06434 , 2015.
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language un-
derstanding by generative pre-training. URL https://s3-us-west-2. amazonaws. com/openai-
assets/research-covers/language-unsupervised/language understanding paper. pdf , 2018.
Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. On the convergence of adam and beyond. Inter-
national Conference on Learning Representations , 2018.
Leslie N Smith. Cyclical learning rates for training neural networks. arXiv:1506.01186v3 , 2016.
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running
average of its recent magnitude. COURSERA: Neural networks for machine learning , 4(2):26–
31, 2012.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Infor-
mation Processing Systems , pp. 5998–6008, 2017.
Martin V ¨olker, Ji ˇr´ı Hammer, Robin T Schirrmeister, Joos Behncke, Lukas DJ Fiederer, Andreas
Schulze-Bonhage, Petr Marusi ˇc, Wolfram Burgard, and Tonio Ball. Intracranial error detection
via deep learning. arXiv preprint arXiv:1805.01667 , 2018.
Jianfeng Wang, Ye Yuan, Gang Yu, and Sun Jian. Sface: An efficient network for face detection in
large scale variations. arXiv preprint arXiv:1804.06559 , 2018.
Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nathan Srebro, and Benjamin Recht. The
marginal value of adaptive gradient methods in machine learning. arXiv:1705.08292 , 2017.
Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich
Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual
attention. In International Conference on Machine Learning , pp. 2048–2057, 2015.
Shuo Yang, Ping Luo, Chen-Change Loy, and Xiaoou Tang. Wider face: A face detection bench-
mark. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pp.
5525–5533, 2016.
10
Published as a conference paper at ICLR 2019
Guodong Zhang, Chaoqi Wang, Bowen Xu, and Roger Grosse. Three mechanisms of weight decay
regularization. arXiv preprint arXiv:1810.12281 , 2018.
Zijun Zhang, Lin Ma, Zongpeng Li, and Chuan Wu. Normalized direction-preserving adam.
arXiv:1709.04546 , 2017.
Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V . Le. Learning transferable architectures
for scalable image recognition. In arXiv:1707.07012 [cs.CV] , 2017.
11
Published as a conference paper at ICLR 2019
Appendix
A F ORMAL ANALYSIS OF WEIGHT DECAY VS L2REGULARIZATION
Proof of Proposition 1
The proof for this well-known fact is straight-forward. SGD without weight decay has the following
iterates onfreg
t() =ft() +0
2kk2
2:
t+1 t rfreg
t(t) =t rft(t) 0t: (5)
SGD with weight decay has the following iterates on ft():
t+1 (1 )t rft(t): (6)
These iterates are identical since 0=
.
Proof of Proposition 2
Similarly to the proof of Proposition 1, the iterates of Owithout weight decay on freg
t() =ft() +
1
20kk2
2andOwith weight decay onftare, respectively:
t+1 t 0Mtt Mtrft(t): (7)
t+1 (1 )t Mtrft(t): (8)
The equality of these iterates for all twould imply t=0Mtt. This can only hold for all t
ifMt=kI, withk2R, which is not the case for O. Therefore, no L 2regularizer0kk2
2exists
that makes the iterates equivalent.
Proof of Proposition 3
Owithout weight decay has the following iterates on fsreg
t() =ft() +0
2
ps
2
2:
t+1 t rfsreg
t(t)=s (9)
=t rft(t)=s 0ts=s (10)
=t rft(t)=s 0t; (11)
where the division by sis element-wise. Owith weight decay has the following iterates on ft():
t+1 (1 )t rf(t)=s (12)
=t rf(t)=s t; (13)
These iterates are identical since 0=
.
B A DDITIONAL PRACTICAL IMPROVEMENTS OF ADAM
Having discussed decoupled weight decay for improving Adam’s generalization, in this section we
introduce two additional components to improve Adam’s performance in practice.
B.1 N ORMALIZED WEIGHT DECAY
Our preliminary experiments showed that different weight decay factors are optimal for different
computational budgets (defined in terms of the number of batch passes). Relatedly, Li et al. (2017)
demonstrated that a smaller batch size (for the same total number of epochs) leads to the shrinking
effect of weight decay being more pronounced. Here, we propose to reduce this dependence by nor-
malizing the values of weight decay. Specifically, we replace the hyperparameter by a new (more
robust) normalized weight decay hyperparameter norm , and use this to set as=normq
b
BT,
wherebis the batch size, Bis the total number of training points and Tis the total number of
epochs.2Thus,norm can be interpreted as the weight decay used if only one batch pass is al-
lowed. We emphasize that our choice of normalization is merely one possibility informed by few
experiments; a more lasting conclusion we draw is that using some normalization can substantially
improve results.
2In the context of our AdamWR variant discussed in Section B.2, Tis the total number of epochs in the
current restart.
1
Published as a conference paper at ICLR 2019
B.2 A DAM WITH COSINE ANNEALING AND WARM RESTARTS
We now apply cosine annealing and warm restarts to Adam, following our recent work (Loshchilov
& Hutter, 2016). There, we proposed Stochastic Gradient Descent with Warm Restarts (SGDR) to
improve the anytime performance of SGD by quickly cooling down the learning rate according to a
cosine schedule and periodically increasing it. SGDR has been successfully adopted to lead to new
state-of-the-art results for popular image classification benchmarks (Huang et al., 2017; Gastaldi,
2017; Zoph et al., 2017), and we therefore already tried extending it to Adam shortly after proposing
it. However, while our initial version of Adam with warm restarts had better anytime performance
than Adam, it was not competitive with SGD with warm restarts, precisely because L 2regularization
was not working as well as in SGD. Now, having fixed this issue by means of the original weight
decay regularization (Section 2) and also having introduced normalized weight decay (Section B.1),
our original work on cosine annealing and warm restarts directly carries over to Adam.
In the interest of keeping the presentation self-contained, we briefly describe how SGDR schedules
the change of the effective learning rate in order to accelerate the training of DNNs. Here, we
decouple the initial learning rate and its multiplier tused to obtain the actual learning rate at
iterationt(see, e.g., line 8 in Algorithm 1). In SGDR, we simulate a new warm-started run/restart of
SGD onceTiepochs are performed, where iis the index of the run. Importantly, the restarts are not
performed from scratch but emulated by increasing twhile the old value of tis used as an initial
solution. The amount by which tis increased controls to which extent the previously acquired
information (e.g., momentum) is used. Within the i-th run, the value of tdecays according to a
cosine annealing (Loshchilov & Hutter, 2016) learning rate for each batch as follows:
t=(i)
min+ 0:5((i)
max (i)
min)(1 + cos(Tcur=Ti)); (14)
where(i)
minand(i)
max are ranges for the multiplier and Tcuraccounts for how many epochs have
been performed since the last restart. Tcuris updated at each batch iteration tand is thus not
constrained to integer values. Adjusting (e.g., decreasing) (i)
minand(i)
max at everyi-th restart (see
also Smith (2016)) could potentially improve performance, but we do not consider that option here
because it would involve additional hyperparameters. For (i)
max= 1and(i)
min= 0, one can simplify
Eq. (14) to
t= 0:5 + 0:5 cos(Tcur=Ti): (15)
In order to achieve good anytime performance, one can start with an initially small Ti(e.g., from
1% to 10% of the expected total budget) and multiply it by a factor of Tmult (e.g.,Tmult = 2) at
every restart. The (i+ 1) -th restart is triggered when Tcur=Tiby settingTcurto 0. An example
setting of the schedule multiplier is given in C.
Our proposed AdamWR algorithm represents AdamW (see Algorithm 2) with tfollowing Eq. (15)
andcomputed at each iteration using normalized weight decay described in Section B.1. We note
that normalized weight decay allowed us to use a constant parameter setting across short and long
runs performed within AdamWR and SGDWR (SGDW with warm restarts).
C A NEXAMPLE SETTING OF THE SCHEDULE MULTIPLIER
An example schedule of the schedule multiplier tis given in SuppFigure 1 for Ti=0= 100 and
Tmult = 2. After the initial 100 epochs the learning rate will reach 0 because t=100 = 0. Then,
sinceTcur=Ti=0, we restart by resetting Tcur= 0, causing the multiplier tto be reset to 1 due
to Eq. (15). This multiplier will then decrease again from 1 to 0, but now over the course of 200
epochs because Ti=1=Ti=0Tmult = 200 . Solutions obtained right before the restarts, when t= 0
(e.g., at epoch indexes 100, 300, 700 and 1500 as shown in SuppFigure 1) are recommended by the
optimizer as the solutions, with more recent solutions prioritized.
D A DDITIONAL RESULTS
We investigated whether the use of much longer runs (1800 epochs) of “standard Adam” (Adam
with L 2regularization and a fixed learning rate) makes the use of cosine annealing unnecessary.
2
Published as a conference paper at ICLR 2019
200 400 600 800 1000 1200 140000.20.40.60.81
EpochsLearning rate multiplier ηT0=100, Tmult=2
SuppFigure 1: An example schedule of the learning rate multiplier as a function of epoch index.
The first run is scheduled to converge at epoch Ti=0= 100 , then the budget for the next run is
doubled asTi=1=Ti=0Tmult = 200 , etc.
SuppFigure 2 shows the results of standard Adam for a 4 by 4 logarithmic grid of hyperparame-
ter settings (the coarseness of the grid is due to the high computational expense of runs for 1800
epochs). Even after taking the low resolution of the grid into account, the results appear to be at best
comparable to the ones obtained with AdamW with 18 times less epochs and a smaller network (see
SuppFigure 3, top row, middle). These results are not very surprising given Figure 1 in the main
paper (which demonstrates both the improvements possible by using some learning rate schedule,
such as cosine annealing, and the effectiveness of decoupled weight decay).
Our experimental results with Adam and SGD suggest that the total runtime in terms of the number
of epochs affect the basin of optimal hyperparameters (see SuppFigure 3). More specifically, the
greater the total number of epochs the smaller the values of the weight decay should be. SuppFigure
4 shows that our remedy for this problem, the normalized weight decay defined in Eq. (15), sim-
plifies hyperparameter selection because the optimal values observed for short runs are similar to
the ones for much longer runs. We used our initial experiments on CIFAR-10 to suggest the square
root normalization we proposed in Eq. (15) and double-checked that this is not a coincidence on the
ImageNet32x32 dataset (Chrabaszcz et al., 2017), a downsampled version of the original ImageNet
dataset with 1.2 million 32 32 pixels images, where an epoch is 24 times longer than on CIFAR-10.
This experiment also supported the square root scaling: the best values of the normalized weight de-
cay observed on CIFAR-10 represented nearly optimal values for ImageNet32x32 (see SuppFigure
3). In contrast, had we used the same raw weight decay values for ImageNet32x32 as for CIFAR-
10 and for the same number of epochs, without the proposed normalization, would have been
roughly 5 times too large for ImageNet32x32, leading to much worse performance . The optimal
normalized weight decay values were also very similar (e.g., norm = 0:025andnorm = 0:05)
across SGDW and AdamW. These results clearly show that normalizing weight decay can substan-
tially improve performance; while square root scaling performed very well in our experiments we
emphasize that these experiments were not very comprehensive and that even better scaling rules
are likely to exist.
SuppFigure 4 is the equivalent of Figure 3 in the main paper, but for ImageNet32x32 instead of for
CIFAR-10. The qualitative results are identical: weight decay leads to better training loss (cross-
entropy) than L 2regularization, and to an even greater improvement of test error.
SuppFigure 5 and SuppFigure 6 are the equivalents of Figure 4 in the main paper but supplemented
with training loss curves in its bottom row. The results show that Adam and its variants with decou-
pled weight decay converge faster (in terms of training loss) on CIFAR-10 than the corresponding
SGD variants (the difference for ImageNet32x32 is small). As is discussed in the main paper, when
the same values of training loss are considered, AdamW demonstrates better values of test error than
Adam. Interestingly, SuppFigure 5 and SuppFigure 6 show that the restart variants AdamWR and
SGDWR also demonstrate better generalization than AdamW and SGDW, respectively.
3
Published as a conference paper at ICLR 2019
SuppFigure 2: Performance of “standard Adam”: Adam with L 2regularization and a fixed learning
rate. We show the final test error of a 26 2x96d ResNet on CIFAR-10 after 1800 epochs of the
original Adam for different settings of learning rate and weight decay used for L 2regularization.
4
Published as a conference paper at ICLR 2019
SuppFigure 3: Effect of normalized weight decay. We show the final test Top-1 error on CIFAR-
10 (first two rows for AdamW without and with normalized weight decay) and Top-5 error on
ImageNet32x32 (last two rows for AdamW and SGDW, both with normalized weight decay) of a
26 2x64d ResNet after different numbers of epochs (see columns). While the optimal settings of the
raw weight decay change significantly for different runtime budgets (see the first row), the values
of the normalized weight decay remain very similar for different budgets (see the second row) and
different datasets (here, CIFAR-10 and ImageNet32x32), and even across AdamW and SGDW.
5
Published as a conference paper at ICLR 2019
SuppFigure 4: Learning curves (top row) and generalization results (Top-5 errors in bottom row)
obtained by a 26 2x96d ResNet trained with Adam and AdamW on ImageNet32x32.
6
Published as a conference paper at ICLR 2019
SuppFigure 5: Test error curves (top row) and training loss curves (bottom row) for CIFAR-10.
7
Published as a conference paper at ICLR 2019
SuppFigure 6: Test error curves (top row) and training loss curves (bottom row) for Ima-
geNet32x32.
8 | [
{
"id": "1707.08819"
},
{
"id": "1705.08292"
},
{
"id": "1507.02030"
},
{
"id": "1711.05101"
},
{
"id": "1712.09913"
},
{
"id": "1709.04546"
},
{
"id": "1805.01667"
},
{
"id": "1608.03983"
},
{
"id": "1804.06559"
},
{
"id": "1609.04836"
},
{
"id": "1810.12281"
},
{
"id": "1705.07485"
},
{
"id": "1805.09501"
},
{
"id": "1703.04933"
},
{
"id": "1704.00109"
},
{
"id": "1511.06434"
},
{
"id": "1707.07012"
},
{
"id": "1506.01186"
}
] |
2305.17493 | The Curse of Recursion: Training on Generated Data Makes Models Forget | Stable Diffusion revolutionised image creation from descriptive text. GPT-2,
GPT-3(.5) and GPT-4 demonstrated astonishing performance across a variety of
language tasks. ChatGPT introduced such language models to the general public.
It is now clear that large language models (LLMs) are here to stay, and will
bring about drastic change in the whole ecosystem of online text and images. In
this paper we consider what the future might hold. What will happen to GPT-{n}
once LLMs contribute much of the language found online? We find that use of
model-generated content in training causes irreversible defects in the
resulting models, where tails of the original content distribution disappear.
We refer to this effect as Model Collapse and show that it can occur in
Variational Autoencoders, Gaussian Mixture Models and LLMs. We build
theoretical intuition behind the phenomenon and portray its ubiquity amongst
all learned generative models. We demonstrate that it has to be taken seriously
if we are to sustain the benefits of training from large-scale data scraped
from the web. Indeed, the value of data collected about genuine human
interactions with systems will be increasingly valuable in the presence of
content generated by LLMs in data crawled from the Internet. | http://arxiv.org/pdf/2305.17493 | [
"Ilia Shumailov",
"Zakhar Shumaylov",
"Yiren Zhao",
"Yarin Gal",
"Nicolas Papernot",
"Ross Anderson"
] | [
"cs.LG",
"cs.AI",
"cs.CL",
"cs.CR",
"cs.CV"
] | null | null | cs.LG | 20230527 | 20230531 | THECURSE OF RECURSION :
TRAINING ON GENERATED DATA MAKES MODELS FORGET
Ilia Shumailov*
University of OxfordZakhar Shumaylov*
University of CambridgeYiren Zhao
Imperial College LondonYarin Gal
University of Oxford
Nicolas Papernot
University of Toronto & Vector InstituteRoss Anderson
University of Cambridge & University of Edinburgh
ABSTRACT
Stable Diffusion revolutionised image creation from descriptive text. GPT-2 ,GPT-3(.5) andGPT-4
demonstrated astonishing performance across a variety of language tasks. ChatGPT introduced such
language models to the general public. It is now clear that large language models (LLMs) are here to
stay, and will bring about drastic change in the whole ecosystem of online text and images. In this
paper we consider what the future might hold. What will happen to GPT-{n}once LLMs contribute
much of the language found online? We find that use of model-generated content in training causes
irreversible defects in the resulting models, where tails of the original content distribution disappear.
We refer to this effect as model collapse1and show that it can occur in Variational Autoencoders,
Gaussian Mixture Models and LLMs. We build theoretical intuition behind the phenomenon and
portray its ubiquity amongst all learned generative models. We demonstrate that it has to be taken
seriously if we are to sustain the benefits of training from large-scale data scraped from the web.
Indeed, the value of data collected about genuine human interactions with systems will be increasingly
valuable in the presence of content generated by LLMs in data crawled from the Internet.
1 Introduction
A lot of human communication happens online. Billions of emails are exchanged daily, along with billions of social-
media messages and millions of news articles. Almost all of this material was produced and curated only by humans in
the early years of the worldwide web, yet since the turn of the century search engines have come to determine what
people can find, and in the past decade smart text editors with spelling and grammar correction have helped tweak what
we produce. Now, text can not only be groomed and analysed efficiently; it can also be generated – by large language
models (LLMs). These models now (arguably) pass a weaker form of the Turing test in the sense that their output
cannot be reliably distinguished from text written by humans [Solaiman et al., 2019].
The development of LLMs is quite involved and requires masses of training data. Anecdotally, some powerful recent
models are trained using scrapes of much of the Internet, then further fine-tuned with reinforcement learning from
human feedback (RLHF) [Griffith et al., 2013, OpenAI, 2023]. This further boosts the effective dataset size. Yet while
current LLMs [Devlin et al., 2018, Liu et al., 2019, Brown et al., 2020, Zhang et al., 2022], including GPT-4 , were
trained on predominantly human-generated text, this may change in the future. If most future models’ training data
is also scraped from the web, then they will inevitably come to train on data produced by their predecessors. In this
paper, we investigate what happens when text produced, e.g.by a version of GPT, forms most of the training dataset of
following models. What happens to GPTversions GPT-{ n}as generation nincreases?2
1The name is inspired by the Generative Adversarial Networks (GAN) literature on mode collapse, where GANs start producing
a limited set of outputs that all trick the discriminator. Model Collapse is a process whereby models eventually converge to a state
similar to that of a GAN Mode Collapse. The original version of this paper referred to this effect as ‘model dementia’, but we decided
to change this following feedback that it trivialised the medical notion of ‘dementia’ and could cause offence.
2This is not limited to text models; one can also consider what happens when music created by human composers and played by
human musicians trains models whose output trains other models.arXiv:2305.17493v2 [cs.LG] 31 May 2023
Model Collapse
We discover that learning from data produced by other models causes model collapse – a degenerative process whereby,
over time, models forget the true underlying data distribution, even in the absence of a shift in the distribution over time.
We give examples of model collapse for Gaussian Mixture Models (GMMs), Variational Autoencoders (V AE) and
Large Language models (LLMs). We show that over time we start losing information about the true distribution, which
first starts with tails disappearing, and over the generations learned behaviours start converging to a point estimate with
very small variance. Furthermore, we show that this process is inevitable, even for cases with almost ideal conditions
for long-term learning i.e.no function estimation error.
Figure 1: Model Collapse refers to a degenerative learning
process where models start forgetting improbable events
over time, as the model becomes poisoned with its own
projection of reality.Finally, we discuss the broader implications of model
collapse . We note that access to the original data dis-
tribution is crucial: in learning where the tails of the
underlying distribution matter, one needs access to real
human-produced data. In other words, the use of LLMs
at scale to publish content on the Internet will pollute
the collection of data to train them: data about human
interactions with LLMs will be increasingly valuable.
This paper is structured as follows. First, in Sections 3
and 4 we describe the reasons why model collapse hap-
pens. To best describe the intuition, we present a simple
example of a single-dimensional Gaussian where errors
due to sampling inevitably cause model collapse , which
are then extended to a multidimensional generative model
under some assumptions. Under both models, similar
lower bounds are derived on the risk, defined in terms of
the Wasserstein distance from the true distribution. Next,
we turn to GMMs and V AEs to show that additional
functional approximation errors further exacerbate model
collapse . Finally, we discuss the most commonly used
setting of fine-tuned language models, where we report
that only early signs of model collapse can be detected, if models are fine-tuned as opposed to trained from scratch.
In this paper we make the following contributions:
• We demonstrate the existence of a degenerative process in learning and name it model collapse ;
• We demonstrate that model collapse exists in a variety of different model types and datasets;
• We show that, to avoid model collapse , access to genuine human-generated content is essential.
2 Related work
In this section we are going to cover two closest concepts to model collapse from existing literature: catastrophic
forgetting and data poisoning. Neither is able to explain the phenomenon of model collapse fully, as the setting is
fundamentally different, but they provide another perspective on the observed phenomenon.
2.1 Continual learning and catastrophic forgetting
Unlike traditional machine learning which seeks to learn from a static data distribution, continual learning attempts
to learn from a dynamic one, where data are supplied in a sequential fashion [Van de Ven and Tolias, 2019]. This
tends to be task-based, where data are provided with delineated task boundaries; e.g., classifying dogs from cats and
recognising handwritten digits. Our work is more similar to task-free continual learning [Aljundi et al., 2019] where
data distributions gradually change without the notion of separate tasks. Our work examines a particular scenario in
which the changed data distributions arise from the model itself, as a result of training in the previous iteration.
2
Model Collapse
Example of text outputs of an OPT-125m model affected by Model Collapse – models degrade over generations,
where each new generation is trained on data produced by the previous generation.
Input: some started before 1360 — was typically accomplished by a master mason and a small team of
itinerant masons, supplemented by local parish labourers, according to Poyntz Wright. But other
authors reject this model, suggesting instead that leading architects designed the parish church towers
based on early examples of Perpendicular
Outputs:
Gen 0: Revival architecture such as St. John’s Cathedral in London. The earliest surviving example of
Perpendicular Revival architecture is found in the 18th @-@ century Church of Our Lady of Guernsey,
which dates from the late 19th century. There are two types of perpendicular churches : those
Gen 1: architecture such as St. Peter’s Basilica in Rome or St. Peter’s Basilica in Buenos Aires. There is no
evidence that any of these buildings were built during the reign of Pope Innocent III, but it is possible
that they may have been built during the reign of his successor, Pope Innocent
Gen 7: architecture in England. In an interview with The New York Times, Wright said : " I don ’t think
there is anything wrong with me being able to do what I want to do. It just doesn ’t work for me. " He
added : " I don ’t know if you can call it funny,
Gen 9: architecture. In addition to being home to some of the world’s largest populations of black @-@ tailed
jackrabbits, white @-@ tailed jackrabbits, blue @-@ tailed jackrabbits, red @-@ tailed jackrabbits,
yellow @-
A typical challenge in continual learning is that the model forgets previous samples when learning new information; this
is known as catastrophic forgetting [Kirkpatrick et al., 2017]. A typical way of preventing it is to use regularisations
(Memory Aware Synpass [Aljundi et al., 2018]) or just rely on data ( e.g.Learning without Forgetting [Li and Hoiem,
2017]). This has an indirect connection to our work, yet differs since the data in the process of model collapse are
generated by different generations of models.
2.2 Data poisoning
Poisoning attacks are crafted and inserted during training in order to degrade the model’s performance when de-
ployed [Biggio et al., 2012]. Malicious data can be inserted into training data to induce unintended behaviors that can
be activated by special triggers [Gu et al., 2017]. The early literature on data poisoning focused mainly on supervised
learning, where classifiers are trained with labeled samples. But with the emergence of contrastive learning [Radford
et al., 2021] and LLMs [Brown et al., 2020], more recent models are trained with large-scale web crawls, making data
poisoning attacks more feasible on these untrustworthy web sources. Recent studies have demonstrated that web-scale
datasets can be poisoned by introducing malicious data into a small percentage of samples [Carlini and Terzis, 2021,
Carlini et al., 2023].
3 What is Model Collapse ?
Definition 3.1 (Model Collapse ).Model Collapse is a degenerative process affecting generations of learned generative
models, where generated data end up polluting the training set of the next generation of models; being trained on
polluted data, they then mis-perceive reality. We separate two special cases: early model collapse andlatemodel
collapse . In early model collapse the model begins losing information about the tails of the distribution; in the late model
collapse model entangles different modes of the original distributions and converges to a distribution that carries little
resemblance to the original one, often with very small variance.
Note that this process is different from the process of catastrophic forgetting in that we are considering multiple models
over time, in which our models do not forget previously learned data, but rather start misinterpreting what they believe
to be real, by reinforcing their own beliefs.
This process occurs due to two specific sources of error compounding over generations and causing deviation from the
original model. Of these, one source of error plays a primary role, and in the absence of it, the process would not occur
beyond the first generation.
3
Model Collapse
Figure 2: The high-level description of the feedback mechanism in the learning process. Here, data are assumed to be
human-curated and start off clean; then model 0is trained and data are sampled from it; at step n, data are added to the
overall data from step n−1, and this ensemble is used to train model n. Data obtained with Monte Carlo sampling
should ideally be statistically close to the original, provided fitting andsampling procedures are perfect. This process
depicts what happens in real life with the Internet – model-generated data become pervasive.
3.1 Causes of model collapse
There are two main causes for model collapse , one primary and one secondary, which we describe now. Further
mathematical intuition is provided in Section 4 to explain how these give rise to the errors observed, how different
sources can compound and how we can quantify the average model divergence rate.
•Statistical approximation error – this is the primary type of error, which arises due to the number of samples
being finite, and disappears as the number of samples tends to infinity. This occurs due to a non-zero probability
that information can get lost at every step of re-sampling. Figure 12 shows an example of an approximation
error. Here, a single-dimensional Gaussian is being approximated from a finite number of samples. Despite
using a very large number of points, the errors remain significant; with 107samples we estimate the mean to
be0.00024899 ±1.89382984 e−4, when the true value is 0.
•Functional approximation error – this is a secondary type of error, which stems from our function approx-
imators being insufficiently expressive (or sometimes too expressive outside of the original distribution
support [Nguyen et al., 2015]). It is well known that neural networks are universal functional approximators
in the limit, but in practice this is not always true. In particular, a neural network can introduce non-zero
likelihood outside of the support of the original distribution. A simple example of this error is if we were to try
fitting a mixture of two Gaussians with a single Gaussian. Even if we have perfect information about the data
distribution, model errors will be inevitable. It is important to also note that in the absence of statistical error,
functional approximation error only occurs at the first generation. Once the new distribution belongs to the
image of functional approximator, it remains exactly the same over the generations.
Each of the above can cause model collapse to get worse or better. Better approximation power can even be a double-
edged sword – better expressiveness may counteract statistical noise, resulting in a good approximation of the true
distribution, but it can equally compound this noise. More often then not, we get a cascading effect where combined
individual inaccuracy causes the overall error to grow. Overfitting the density model will cause the model to extrapolate
incorrectly and might give high density to low-density regions not covered in the training set support; these will then be
sampled with arbitrary frequency.
It is worth mentioning that modern computers also have a further computational error coming from the way floating
point numbers are represented. This error is not evenly spread across different floating point ranges, making it hard to
estimate the precise value of a given number. Such errors are smaller in magnitude and are fixable with more precise
hardware, making them less influential on model collapse .
4
Model Collapse
4 Theoretical intuition
In this section we aim to provide a theoretical intuition for the phenomenon of model collapse . We argue that the process
ofmodel collapse is universal among generative models that recursively train on data generated by previous generations.
We construct toy mathematical models, which prove to be simple enough to provide analytical expressions for quantities
of interest, but also portray the phenomenon of model collapse . We aim to quantify how different sources of error can
affect the overall end approximation of the original distribution. As discussed in Section 3.1, there are two main sources
we are interested in – statistical error and functional error. Since in the real world one rarely has infinite samples,
quantifying the functional approximation error alone is of little interest for discussion of model collapse . Therefore, we
will examine two simple cases: a discrete distribution in the absence of functional approximation error and a single
dimensional Gaussian case, which portrays how functional approximation error can compound with statistical error.
The overall stochastic process we are going to be considering (which we call Learning with Generational Data ) is
the following. Assume that at generation iwe have a dataset Dicomprising of i.i.d. random variables Xi
j, where
j∈ {1, . . . , M i}denotes the sample number at generation iandMi≥2. We will denote the distribution of Xiaspi.
Here we assume that p0denotes the original distribution, from which the data comes from. Going from generation i
to generation i+ 1, we aim to estimate the distribution of samples in Di, with an approximation pθi+1. This step is
what we refer to as functional approximation Fθ:pi→pθi+1. We then resample the dataset Di+1from the distribution
pi+1=αipθi+1+βipi+γip0, with non-negative parameters αi, βi, γisumming up to 1,i.e.they represent proportions
of data used from different generations. This corresponds to a mixing of data coming from the original distribution ( γi),
data used by the previous generation ( βi) and data generated by the new model ( αi). We refer to this as the sampling
step. For the mathematical models to come, we consider αi=γi= 0i.e.data only from a single step is used, while
numerical experiments are performed on more realistic choices of parameters.
4.1 Discrete distributions with exact approximation
In this subsection we consider a discrete probability distribution, which is represented by a histogram, e.g.as shown on
Figure 3. In what follows we consider the stochastic process in absence of functional approximation error, i.e.F(p) =p.
In this case, model collapse arises only due to statistical errors from the sampling step. At first, the tails (low probability
events) begin to disappear due to low probability of sampling them, and over time the distribution becomes a delta
function. Denoting the sample size as M, if we consider state iwith probability q≤1
M, the expected number of
samples with value icoming from those events will be less than 1, which means that in practice we will lose information
about them. This is portrayed on Figure 3, where infrequent events get cut off. Considering more generally some state
iwith probability q, using standard conditional probability one can show that the probability of losing information
(i.e.sampling no data at some generation) is equal to 1−q. But this in turn means that we must converge to a delta
function positioned at some state, and the probability of ending up at a certain state is equal to the probability of
sampling said state from the original distribution.
But how do we show directly that this process is going to turn our distribution into a delta function? By considering the
process as going from Xi→ F θ→pi+1→Xi+1, we see that this forms a Markov Chain, as Xi+1only depends on
Xi. Furthermore, if all the Xi
jhave the same value, then at the next generation the approximated distribution will be
exactly a delta function, and therefore all of Xi+1
jwill also have the same value. This implies that the Markov chain
contains at least one absorbing state, and therefore with probability 1 it will converge to one of the absorbing states.
This is a well-known fact, of which a proof is provided in Appendix A.1. For this chain, the only absorbing states are
those corresponding to delta functions. As a result, as we follow the progress of model collapse , we are guaranteed
to end up in a constant state, having lost all the information of the original distribution when the chain is absorbed.3
Based on the discussion above we see how both early and late stage model collapse must arise in the case of discrete
distributions with perfect functional approximation.
4.2 Single dimensional Gaussian
Following the discussion about discrete distributions, we now move on to considering how both functional approximation
error and sampling error can compound (or cancel out) the process of model collapse .
To demonstrate this, consider a single dimensional Gaussian X0∼ N(µ, σ2). If we have full faith in the data we
observe, the functional approximation involves estimating sample mean and variance and fitting a single dimensional
3This argument also works in general due to floating point representations being discrete, making the Markov Chain over the
parameters of the model discrete. Thus as long as the model parameterisation allows for delta functions, we willget to it, as due to
sampling errors the only possible absorbing states are delta functions.
5
Model Collapse
10
5
0 5 1001234567log(Count)Real distribution 1
10
5
0 5 1001234567log(Count)Real distribution 2
10
5
0 5 1001234567Resampled 1 and 2
log M
Figure 3: Shown in the middle is a histogram plot of samples from a Gaussian mixture with means (−4,4)and variances
of1. To the left of it is a similar distribution, but with ’fatter’ tails, and on the right the same histograms are shown, but
with low probability events being cut off due to finite resampling. Although distributions 1 and 2 are very different,
when resampled (only assuming the expected behaviour), the tails get cut off, leading to the same observed distribution.
In this case this is all states with probability less than 1/M, or equivalently, bins with logCount ≤logM.
Gaussian. We can estimate them using the unbiased sample mean and variance estimators:
µi+1=1
MiX
jXi
j;σ2
i+1=1
Mi−1X
j(Xi
j−µi+1)2. (1)
Note here, that if we were to use maximum likelihood estimation, we would instead arrive at a biased variance estimator.
With these estimates, the functional approximation step simply corresponds to considering a normal distribution with
these parameters, which we can sample from:
Xi+1
j|µi+1, σi+1∼ N(µi+1, σ2
i+1). (2)
This provides us with the conditional distribution of Xi
j, which allows us to calculate the full distribution of Xi
j. From
Equation (3), we see that even after the first approximation, the distribution of Xi
jis no longer normal, it follows a
variance-gamma distribution [Fischer et al., 2023]. However, instead of writing the probability density function at each
generation, we can explicitly construct them in terms of independent random variables. In particular, it is well known
[Cochran, 1934] that µ1andσ1are independent, with µ1∼ N(µ,σ2
M0)and(M0−1)σ2
1∼σ2Γ(M0−1
2,1
2). In what
follows we will denote with Zrandom variables that are distributed with N(0,1)and with Sirandom variables that are
distributed with1
Mi−1−1Γ(Mi−1−1
2,1
2).
X0
j=µ+σZ0
j;X1
j=µ+σ√M0Z1+σ√
S1Z1
j;. . . (3)
Xn
j=µ+σ√M0Z1+σ√M1√
S1Z2+···+σp
Mn−1p
S1× ··· × Sn−1Zn+σp
S1× ··· × SnZn
j.
These are not joint distributions, as ZnandSndepend directly on Zn−1
j, but when considering Xn
jon its own the
formula above provides all the information about the full distribution.
The first thing we may try calculating is the variance. It is possible to find its exact value, but the mean and variance of
the square root of gamma distribution are expressed in terms of gamma functions, making the result quite clunky. In
what follows, we will expand everything to second order in each of (1/Mi)as we assume each sample size to be large
(in practice this becomes quite accurate after M∼100). We then find that
1
σ2Var(Xn
j) =1
M0+1
M1+···+1
Mn−1+ 1 + O(2).
And if we were to assume that Mi=Mare constant, we would find that:
Var(Xn
j) =σ2
1 +n
M
;E(Xn
j) =µ.
6
Model Collapse
100101102103
evolution0.00.20.40.60.8| |
estimation of a (=0,=1)
(a) Mean estimation
100101102103
evolution0.00.20.40.60.81.0| |
estimation of a (=0,=1)
100
500
1000
10000
100000
1000000
10000000 (b) Standard Deviation
Figure 4: Recursive fitting-sampling of a 1D Gaussian with different numbers of samples drawn. We find that unless
sampled a very large number of times, i.e.<100000, both standard deviation and mean get significantly affected. Here
we report a single run; while re-running the experiment changes the initial performance, both µandσdrift over time.
The overall graph looks quite similar to that of a Gaussian random walk.
100101102103
evolution0.00.10.20.30.4| |
estimation of a (=0,=1)
(a) Mean estimation
100101102103
evolution0.000.050.100.150.200.250.30| |
estimation of a (=0,=1)
100
500
1000
10000 (b) Standard Deviation
Figure 5: Recursive fitting-sampling of a 1D Gaussian with different numbers of samples drawn. In this plot data get
accumulated in a pool, from which a fixed sample is drawn. In other words, a model ngets data sampled, its output is
mixed with data sampled from models 1. . . n , and then the mix gets sampled to fit the model n+ 1. The uncertainty
arising from all of the different modalities appearing in data causes the distribution parameters to jump around quite
significantly.
100101102103
evolution0.000.020.040.060.080.10| |
estimation of a (=0,=1)
(a) Mean estimation
100101102103
evolution0.0000.0250.0500.0750.1000.1250.1500.175| |
estimation of a (=0,=1)
100
500
1000
10000 (b) Standard Deviation
Figure 6: Recursive fitting-sampling of a 1D Gaussian with different number of samples drawn. In this plot data are
accumulated in a pool, all of which is used to fit a model. In other words, a model ngets data sampled, its output mixed
with data sampled from models 1. . . n , and then the result is used to fit the model n+ 1. Over time the variance in
estimates reduces due to linear growth of data.7
Model Collapse
This means that as n→ ∞ , the variance diverges linearly. This is the same scaling as for a single dimensional Gaussian
random walk. We can further see the similarities in numerical experiments shown on Figure 4 for a range of different
sample sizes, confirming these theoretical intuitions.
Even though the variance of Xn
jdiverges, it does not provide us with any information of what the corresponding
estimates of µn+1andσ2
n+1are, or how far they are from the original µandσ. In particular, we may want to consider
what the distance would be between the true distribution and the approximated distribution at step n+ 1. To measure
this we can consider the Wasserstein-2 distance between two normals:
Rn+1
W2:=W2
2
N(µ, σ2),N(µn+1, σ2
n+1)
=∥µn+1−µ∥2+∥σn+1−σ∥2
Now we can calculate the risk that occurs due to finite sampling, i.e.what the expected value of the distance is
(expanding in 1/Mi):
Eµn+1,σ2
n+1
Rn+1
W2
=σ21
M0+1
M1+···+3
2Mn
+O(2), (4)
Varµn+1,σ2
n+1
Rn+1
W2
=σ4
2
M2
0+2
M2
1+···+3
M2n+X
i̸=j3
MiMj
+O(3). (5)
This result allows us to interpret exactly what occurs in this formulation of model collapse . To be precise, due to errors
occurring from re-sampling the approximated distribution, each generation ends up corresponding to a new step in a
random walk of model parameters. The risk that occurs in this model ends up diverging for a constant sample size at
each generation. In order for the end distribution approximation to be accurate, and for the distance to be finite, the
sampling rate Mineeds to increase superlinearly, i.e.one needs to collect increasingly more samples over time, perhaps
quadratically. However, even in that case the expected distance after nsteps remains non-zero and the only case in
which it does in fact end up being 0is when sampling is infinite at each step. Overall, this only shows us how far on
average we go from the original distribution, but the process can only ’terminate’ if the estimated variance at a certain
generation becomes small enough, i.e.we effectively turn into a delta function.
Shown on Figures 5 and 6 are different runs of this process for different values of parameters of αi, βi, γifor different
sample sizes, which was investigated numerically to see whether they can be enough to overcome model collapse ,
however even in those cases the changes are inevitable, although attenuated.
4.3 Noisy approximation model
With the simple example out of the way, we can now construct a lower bound on the distance of generation ndistribution
from the original and show that without superlinear sampling it similarly diverges in the limit of large n. A nice property
of Wasserstein-2 distance is that Gaussians provide a universal lower bound for the Wasserstein distance [Gelbrich,
1990]. In particular, for κandνprobability measures on a Euclidean N-dimensional space with µκandµνmeans, Σκ
andΣνcovariance matrices, we have that
W2
2(κ, ν)≥ ∥µκ−µν∥2+ Tr
Σκ+ Σv−2
Σ1/2
κΣvΣ1/2
κ1/2
≥ ∥µκ−µν∥2
With this, instead of quantifying the distance exactly, we can instead lower bound it. The only limitation is that we are
going to have to specify a functional approximation model. In order to achieve a W2bound, we will be required to
specify how the mean changes between generations. In the scenario where we only have access to the sample mean, we
would approximate the mean of the next generation distribution as Equation (1). However, as more information arrives,
or the model begins using it better, we may end up diverging from the sample mean. We would still require that the
model have good performance, i.e.on average the mean estimate is the same. We will also have to specify expected
behaviour of the model over the the variance calculation, which once again will be chosen such that it averages out.
Thus, we will adopt the following evolution over generations:
µi+1=1
MiX
jXi
j+εi+1=Σ1/2
i√MiTi+1+µi+εi+1;EXi
j(Σi+1) = Σ i (6)
where we define Ti+1to satisfy the equation above, i.e.Ti+1=Σ−1/2
i√MiP
j
Xi
j−µi
. With this normalisation Thas
mean 0and covariance INand by the central limit theorem (CLT) we would have Ti+1|µi,ΣiD→ N (0, IN), however
the lower bound will not rely on this. To arrive at a lower bound for the risk, similar to that of Equation (4), we are
going to have to make a few assumptions about the form of εi+1.
Assumptions :
8
Model Collapse
1. On average we can capture the mean to be the same as at the iteration prior:
E[εi+1|µi,Σi] = 0 (7)
2. Given all of Xi
j, epsilon must be constant, i.e.it is a function of only the data:
εi+1=εi+1
Xi
j
(8)
In particular, it is dependent on µiandΣionly through the data.
3.The extra noise is orthogonal to the sample mean in the sense of random variables. This is effectively assuming
that the noise does not contain any first moment information, i.e.we have:
Cov(εi+1, Ti+1|µi,Σi) = 0 (9)
This may seem like a rather strong assumption, compared to the previous ones, however this property can
be shown to hold true when imposing CLT on Ti+1in the limit of large Mi(note here that Mican only be
assumed to be large , and not infinite) and assuming that εis strictly a function of moments higher than first.
Furthermore, a property of this type is necessary to actually provide any information, since prior to it there
would be no need to separate into an epsilon term and a sample mean term, since all could be absorbed into ε.
In Appendix A.2, we further provide an alternative to Assumption 3, wherein by bounding the size of noise we are able
to recover a similar bound, but only as an expansion in 1/Mi.
With all the assumptions in place, we now have the following bound:
E
Ri+1
W2
≥E
∥µi+1−µ∥2
(10)
=E
∥µi−µ∥2
+E
∥εi+1∥2
+1
MiE
(Ti+1)⊤Σi(Ti+1)
+ (11)
+2√MiE
(εi+1)⊤Σ1/2
iTi+1+ (µi−µ)⊤Σ1/2
iTi+1
(12)
=E
∥µi−µ∥2
+Tr Σ
Mi+E
∥εi+1∥2
+2√MiE
(εi+1)⊤Σ1/2
iTi+1
(13)
Now the only quantity to evaluate is
2√MiE
(εi+1)⊤Σ1/2
iTi+1
=2√MiZ
dΣip(Σi) Trh
Σ1/2
iCov(εi+1, Ti+1|Σi)i
= 0, (14)
by Assumption 3. Therefore, the overall bound would be similar to the Gaussian case, but with extra noise variance
terms:
Eµn+1,σ2
n+1
Rn+1
W2
≥Tr Σ1
M0+1
M1+···+1
Mn
+n+1X
i=1E
∥εi∥2
(15)
As a result, we have shown that the same superlinear scaling would be required to minimise the lower bound on model
collapse even in the case of more generic models of approximation, in which the mean at step i+ 1can be separated
orthogonally into the sample mean and ’extra’.
Overall, the message of this section can be summarised as follows:
When learning on generational data, due to finite sampling, we are only able to approximate the original distribution.
While on average we should recover the original distribution, the variance arising from this is non-zero. As a result,
over the generations, the average distance of n’th generation from the original grows and can become infinite in the
limit since errors compound over time.
5 Evaluation
5.1 Training from scratch with GMMs and V AEs
Gaussian Mixture Models. In this subsection we evaluate the performance of Gaussian Mixture Models (GMM)
[Reynolds et al., 2009]. The underlying task here is that a given GMM tries to separate two artificially-generated
Gaussians. Figure 7 shows the progression of the GMM fitting process over time. The left-most plot shows the
original two Gaussians with the ground truth labels. The next plot shows the GMM fitted on the original data with
no cross-generational data used i.e.αi=γi= 0, where the error is minimal. Yet, within 50 iterations of re-sampling
we arrive to a point where the underlying distribution is mis-perceived. The performance worsens over time and by
iteration 2000 we arrive at a point estimate of the distribution with very little variance. The L2 distance between the
original GMM and its descendants is plotted in Figure 13.
9
Model Collapse
2
0 23
2
1
0123
Real Data
2
0 23
2
1
0123
0
2
0 23
2
1
0123
50
2
0 23
2
1
0123
100
2
0 23
2
1
0123
150
2
0 23
2
1
0123
200
2
0 23
2
1
0123
350
2
0 23
2
1
0123
2000
Figure 7: An examples of GMM fitting data at iterations {0,50,100,150,200,350,2000}. At first the model fits data
very well as is shown on the left; yet even at generation 50 the perception of the underlying distribution completely
changes. At generation 2000 it converges to a state with very little variance. GMM is sampled a thousand times.
(a) Original model
(b) Generation 5
(c) Generation 10
(d) Generation 20
Figure 9: Random latent reconstructions from V AEs. No training data comes from the original distribution. Over the
generations, different modes of the original distribution get entangled and generated data starts looking unimodal.
3
2
1
0 1 2 30.00.20.40.60.81.01.21.41.6DensityGeneration 0
Generation 1
Generation 2
Generation 3
Generation 4
Generation 5
Generation 6
Generation 7
Generation 8
Generation 9
Figure 8: Changing distribution of latents over the learning
process with generated data as perceived by the original
encoder. Just as with the Gaussian case described above,
the tails get washed away and the model arrives at the mean
representation of the underlying data.Variational Autoencoders. In this subsection we turn to
Variational Autoencoders (V AE). As before, we train an
autoencoder on an original data source, which we later
sample. Here, we generate latents from a Gaussian dis-
tribution which are then used by the decoder to generate
data for the subsequent generation. Figure 9 on the left
shows an example of generated data using the setting
described by Kingma and Welling.
Having performed the process a number of times we ar-
rive at a representation that has very little resemblance of
the original classes learned from data. On the right, one
sees the generated images from generation 20, which ap-
pear to be a mix of all of the different digits. Interestingly,
the original encoder perceives the generated data from its
descendant with ever-growing confidence – the encoder
places such data closer and closer to the mean. Figure 8
shows the density of the latent representation of the orig-
inal model when presented with data generated by its
descendants. As with single-dimensional Gaussians, tails
disappear over time and all of the density shifts towards
the mean.
5.2 Language Models
By now it is clear that Model Collapse is universal across
different families of ML models. Yet if small models such as GMMs and V AEs are normally trained from scratch,
LLMs are different. They are so expensive to retrain from scratch that they are typically initialised with pre-trained
10
Model Collapse
Real 123456789
Trained on dataset from a given generation354045505560Perplexity ±
Real wikitext2 test dataset
run 1
run 2
run 3
run 4
run 5
(a) No data preserved, 5 epochs
Real 123456789
Trained on dataset from a given generation323436384042Perplexity ±
Real wikitext2 test dataset
run 1
run 2
run 3
run 4
run 5 (b) 10% data preserved, 10 epochs
Figure 10: Performance of OPT-125m models of different generations evaluated using the original wikitext2 test
dataset. Perplexity is shown on the y-axis and for each independent run the graph of the mean and its standard deviation
is shown with error bars. x-axis refers to the generation of the model – ‘Real’ refers to the ‘model 0’ trained on the
original wikitext2 dataset; model 1 was trained on the data produced by model 0; model 2 was trained on data
produced by model 1 etc. with all generated datasets equal in size. We find that models trained on generated data are
able to learn some of the original task, but with errors, as seen from the increase in perplexity.
models such as BERT [Devlin et al., 2018], RoBERTa [Liu et al., 2019], or GPT2 [Brown et al., 2020], which are trained
on large text corpora. They are then fine-tuned to various downstream tasks [Bommasani et al., 2022].
In this subsection we explore what happens with language models when they are sequentially fine-tuned with data
generated by other models4. We evaluate the most common setting of training a language model – a fine-tuning setting
where each of the training cycles starts from a pre-trained model with recent data. Data here comes from another
fine-tuned pre-trained model. Since training is restricted to produce models that are close to the original pre-trained
model and datapoints generated by the models will generally produce very small gradients, the expectation here may be
that the model should only change moderately after fine-tuning. We fine-tune the OPT-125m causal language model
made available by Meta through Huggingface [Zhang et al., 2022].
We fine-tune the model on the wikitext2 dataset. For data generation from the trained models we use a 5-way
beam-search. We block training sequences to be 64 tokens long; then for each token sequence in the training set, we
ask the model to predict the next 64 tokens. We go through all of the original training dataset and produce an artificial
dataset of the same size. Since we go though all of the original dataset and predict all of the blocks, if the model had
0.0error it would produce the original wikitext2 dataset. Training for each of the generations starts with generation
from the original training data. Each experiment is ran 5 times and the results are shown as 5 separate runs. The
original model fine-tuned with real wikitext2 data gets 34mean perplexity, from the zero-shot baseline of 115,i.e.it
successfully learns the task. Finally, to be as realistic as possible, we use the best performing model on the original task,
evaluated using the original wikitext2 validation set, as the base model for the subsequent generations, meaning in
practice observed Model Collapse can be even more pronounced.
Here we consider two different settings:
5 epochs, no original training data – Here, the model is trained for 5 epochs on the original dataset and no original
data. The overall original task performance is presented in Figure 10.(a). We find that training with generated data
allows one to adapt to the underlying task, losing some performance – from 20to28perplexity points.
10 epochs, 10% of original training data preserved – Here the model is trained for 10 epochs on the original dataset
and every new generation of training, a random 10% of the original data points are sampled. The overall original
4One can easily replicate an experiment described in Section 5.1 with a language model to demonstrate model collapse . Given
that training a single moderately large model produces twice the American lifetime worth of CO 2[Strubell et al., 2019], we opted
to not run such an experiment and instead focus on a more realistic setting for a proof-of-concept. Note that just the language
experiments described in the paper took weeks to run.
11
Model Collapse
100101102
Perplexity of generated datapoints0.00.20.40.6ProbabilityPerplexity of generated datapoints
evaluated by model trained with
real wikitext2
Generation 0
Generation 1
Generation 2
Generation 3
Generation 5
Generation 9
(a) No data preserved
100101102
Perplexity of generated datapoints0.00.10.20.3ProbabilityPerplexity of generated datapoints
evaluated by model trained with
real wikitext2
Generation 0
Generation 1
Generation 2
Generation 3
Generation 5
Generation 9 (b) 10% data preserved
Figure 11: Histograms of perplexities of each individual data training sequence produced by different generations as is
evaluated by the very first model trained with the real data. Over the generations models tend to produce samples that
the original model trained with real data is more likely to produce. At the same time, a much longer tail appears for later
generations – later generations start producing samples that would never be produced by the original model i.e.they
start misperceiving reality based on errors introduced by their ancestors. Same plots are shown in 3D in Figure 15.
task performance is presented in Figure 10.(b). We find that preservation of the original data allows for better model
fine-tuning and leads to only minor degradation of performance.
Both training regimes lead to degraded performance in our models, yet we do find that learning with generated data
is possible and models can successfully learn (some of) the underlying task. We now turn to consider the underlying
perception of probable events for each generation of our models.
Figure 11 shows histograms of individual datapoint perplexities generated by the models of different generations as
is evaluated by the first model developed with real wikitext2 training data. Here over the generations models tend
to produce more sequences that the original model would produce with the higher likelihood. The observed effect is
similar to that described for V AEs and GMMs in Section 5.1, where over the generations models started to produce
samples that would be produced with higher probabilities by the original model. At the same time, we discover that
generated data has much longer tails, suggesting that some of the data would never be produced by the original model –
these are the errors that accumulate because of the learning with generational data .
We find that data generated by language models in our experiments end up containing a large number of repeating
phrases. The repeating problem has been observed in nearly all text generation models [Keskar et al., 2019, Shumailov
et al., 2021] and to rule this out as the cause of Model Collapse , we further provide numerical experiments when models
are explicitly encouraged to produce non-repeating sequences with repeating penalty of 2.0. We find that this causes the
models to produce lower score continuations to avoid using repeats, which as a result causes the consequent models
to perform even worse. Figure 14 show model perplexities shift across the generations towards more probable token
sequences. In particular, enforcing this for the LLM experiments causes the perplexity to double, compared to the
original. Models remain as susceptible to Model Collapse , if not more.
The described process demonstrates that fine-tuning of language models does not curb the effects of Model Collapse and
models that are being fine-tuned are also vulnerable. We find that over the generations models tend to produce more
probable sequences from the original data and start introducing their own improbable sequences i.e.errors.
6 Discussion and Conclusion
We now discuss the implications of Model Collapse on the underlying learning dynamics of LLMs. Long-term
poisoning attacks on language models are not new. For example, we saw the creation of click, content, and troll farms –
a form of human ‘language models’, whose job is to misguide social networks and search algorithms. The negative
effect these poisoning attacks had on search results led to changes in search algorithms: e.g., Google downgraded
12
Model Collapse
farmed articles5, putting more emphasis on content produced by trustworthy sources e.g.education domains, while
DuckDuckGo removed them altogether6.
What is different with the arrival of LLMs is the scale at which such poisoning can happen once it is automated.
Preserving the ability of LLMs to model low-probability events is essential to the fairness of their predictions:
such events are often relevant to marginalised groups. Low-probability events are also vital to understand complex
systems [Taleb, 2007].
Our evaluation suggests a “first mover advantage” when it comes to training models such as LLMs. In our work we
demonstrate that training on samples from another generative model can induce a distribution shift, which over time
causes Model Collapse . This in turn causes the model to mis-perceive the underlying learning task. To make sure that
learning is sustained over a long time period, one needs to make sure that access to the original data source is preserved
and that additional data not generated by LLMs remain available over time. The need to distinguish data generated
by LLMs from other data raises questions around the provenance of content that is crawled from the Internet: it is
unclear how content generated by LLMs can be tracked at scale. One option is community-wide coordination to ensure
that different parties involved in LLM creation and deployment share the information needed to resolve questions of
provenance. Otherwise, it may become increasingly difficult to train newer versions of LLMs without access to data
that was crawled from the Internet prior to the mass adoption of the technology, or direct access to data generated by
humans at scale.
Acknowledgements
We want to thank Anvith Thudi, David Glukhov, Peter Zaika, and Darija Barak for useful discussions and feedback.
References
Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware
synapses: Learning what (not) to forget. In Proceedings of the European conference on computer vision (ECCV) ,
pages 139–154, 2018.
Rahaf Aljundi, Klaas Kelchtermans, and Tinne Tuytelaars. Task-free continual learning. In Proceedings of the
IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 11254–11263, 2019.
Battista Biggio, Blaine Nelson, and Pavel Laskov. Poisoning attacks against support vector machines. arXiv preprint
arXiv:1206.6389 , 2012.
Rishi Bommasani, Drew A. Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S. Bernstein,
Jeannette Bohg, Antoine Bosselut, Emma Brunskill, Erik Brynjolfsson, Shyamal Buch, Dallas Card, Rodrigo
Castellon, Niladri Chatterji, Annie Chen, Kathleen Creel, Jared Quincy Davis, Dora Demszky, Chris Donahue,
Moussa Doumbouya, Esin Durmus, Stefano Ermon, John Etchemendy, Kawin Ethayarajh, Li Fei-Fei, Chelsea Finn,
Trevor Gale, Lauren Gillespie, Karan Goel, Noah Goodman, Shelby Grossman, Neel Guha, Tatsunori Hashimoto,
Peter Henderson, John Hewitt, Daniel E. Ho, Jenny Hong, Kyle Hsu, Jing Huang, Thomas Icard, Saahil Jain, Dan
Jurafsky, Pratyusha Kalluri, Siddharth Karamcheti, Geoff Keeling, Fereshte Khani, Omar Khattab, Pang Wei Koh,
Mark Krass, Ranjay Krishna, Rohith Kuditipudi, Ananya Kumar, Faisal Ladhak, Mina Lee, Tony Lee, Jure Leskovec,
Isabelle Levent, Xiang Lisa Li, Xuechen Li, Tengyu Ma, Ali Malik, Christopher D. Manning, Suvir Mirchandani, Eric
Mitchell, Zanele Munyikwa, Suraj Nair, Avanika Narayan, Deepak Narayanan, Ben Newman, Allen Nie, Juan Carlos
Niebles, Hamed Nilforoshan, Julian Nyarko, Giray Ogut, Laurel Orr, Isabel Papadimitriou, Joon Sung Park, Chris
Piech, Eva Portelance, Christopher Potts, Aditi Raghunathan, Rob Reich, Hongyu Ren, Frieda Rong, Yusuf Roohani,
Camilo Ruiz, Jack Ryan, Christopher Ré, Dorsa Sadigh, Shiori Sagawa, Keshav Santhanam, Andy Shih, Krishnan
Srinivasan, Alex Tamkin, Rohan Taori, Armin W. Thomas, Florian Tramèr, Rose E. Wang, William Wang, Bohan
Wu, Jiajun Wu, Yuhuai Wu, Sang Michael Xie, Michihiro Yasunaga, Jiaxuan You, Matei Zaharia, Michael Zhang,
Tianyi Zhang, Xikun Zhang, Yuhui Zhang, Lucia Zheng, Kaitlyn Zhou, and Percy Liang. On the opportunities and
risks of foundation models, 2022.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan,
Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural
information processing systems , 33:1877–1901, 2020.
Nicholas Carlini and Andreas Terzis. Poisoning and backdooring contrastive learning. arXiv preprint arXiv:2106.09667 ,
2021.
5https://googleblog.blogspot.com/2011/02/finding-more-high-quality-sites-in.html
6https://www.technologyreview.com/2010/07/26/26327/the-search-engine-backlash-against-content-mills/
13
Model Collapse
Nicholas Carlini, Matthew Jagielski, Christopher A Choquette-Choo, Daniel Paleka, Will Pearce, Hyrum Anderson,
Andreas Terzis, Kurt Thomas, and Florian Tramèr. Poisoning web-scale training datasets is practical. arXiv preprint
arXiv:2302.10149 , 2023.
W. G. Cochran. The distribution of quadratic forms in a normal system, with applications to the analysis of
covariance. Mathematical Proceedings of the Cambridge Philosophical Society , 30(2):178–191, 1934. doi:
10.1017/S0305004100016595.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional
transformers for language understanding. arXiv preprint arXiv:1810.04805 , 2018.
Adrian Fischer, Robert E. Gaunt, and Andrey Sarantsev. The variance-gamma distribution: A review, 2023.
Matthias Gelbrich. On a formula for the l2 wasserstein metric between measures on euclidean and hilbert spaces.
Mathematische Nachrichten , 147(1):185–203, 1990.
Shane Griffith, Kaushik Subramanian, Jonathan Scholz, Charles L Isbell, and Andrea L Thomaz. Policy shaping:
Integrating human feedback with reinforcement learning. In C.J. Burges, L. Bottou, M. Welling, Z. Ghahra-
mani, and K.Q. Weinberger, editors, Advances in Neural Information Processing Systems , volume 26. Cur-
ran Associates, Inc., 2013. URL https://proceedings.neurips.cc/paper_files/paper/2013/file/
e034fb6b66aacc1d48f445ddfb08da98-Paper.pdf .
Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Identifying vulnerabilities in the machine learning
model supply chain. arXiv preprint arXiv:1708.06733 , 2017.
Nitish Shirish Keskar, Bryan McCann, Lav R. Varshney, Caiming Xiong, and Richard Socher. Ctrl: A conditional
transformer language model for controllable generation, 2019.
Diederik P Kingma and Max Welling. Auto-encoding variational bayes, 2022.
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran
Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in
neural networks. Proceedings of the national academy of sciences , 114(13):3521–3526, 2017.
Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine
intelligence , 40(12):2935–2947, 2017.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer,
and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692 ,
2019.
Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for
unrecognizable images, 2015.
OpenAI. Gpt-4 technical report, 2023.
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda
Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In
International conference on machine learning , pages 8748–8763. PMLR, 2021.
Douglas A Reynolds et al. Gaussian mixture models. Encyclopedia of biometrics , 741(659-663), 2009.
Ilia Shumailov, Yiren Zhao, Daniel Bates, Nicolas Papernot, Robert Mullins, and Ross Anderson. Sponge examples:
Energy-latency attacks on neural networks. In 2021 IEEE European Symposium on Security and Privacy (EuroS&P) ,
pages 212–231. IEEE, 2021.
Irene Solaiman, Miles Brundage, Jack Clark, Amanda Askell, Ariel Herbert-V oss, Jeff Wu, Alec Radford, Gretchen
Krueger, Jong Wook Kim, Sarah Kreps, Miles McCain, Alex Newhouse, Jason Blazakis, Kris McGuffie, and Jasmine
Wang. Release strategies and the social impacts of language models, 2019.
Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp.
arXiv preprint arXiv:1906.02243 , 2019.
Nassim Nicholas Taleb. Black swans and the domains of statistics. The American Statistician , 61(3):198–200, 2007.
Gido M Van de Ven and Andreas S Tolias. Three scenarios for continual learning. arXiv preprint arXiv:1904.07734 ,
2019.
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab,
Xian Li, Xi Victoria Lin, et al. Opt: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068 ,
2022.
14
Model Collapse
A Appendix
A.1 Absorbing Markov Chain
The subsection explains a well-known fact about absorbing Markov chains, that they converge to an absorbing state
with probability one. Assume that Xmform a Markov chain. In order to reason about this chain we need to consider
the transition probabilities. In general, these correspond to our functional approximation scheme. Due to the stochastic
nature of the Markov chain, we expect to have the variance go up and down. But as the variance decreases, the newly
sampled data, due to its finiteness, will be more concentrated, leading in the limit to a set of i.e.a delta functions. This
argument assumes that the approximation scheme is good and can converge to delta functions. If not, the errors in
approximation may prevent the propagation of errors in stochasticity.
As discussed in the previous section, we can model the process of repeated ‘sampling’ and ‘fitting’ as a Markov chain.
In this subsection, we explain how such a process can converge to a stationary state i.e.the absorbing state of a Markov
Chain. In this derivation we follow Allan Yashinski7. Suppose we have an absorbing Markov Chain with rtransient
states t1, . . . , t randsabsorbing states a1, . . . , a s. The whole Markov chain has r+sstates, ordered as follows:
t1, . . . , t r, a1, . . . , a s. The transition matrix is then defined as
T=
Q0r×s
R I s
, (16)
where
•Qis anr×rmatrix holds the probabilities of moving from a transient state to another transient state
•Ris ans×rmatrix which holds the probabilities of moving from a transient state to an absorbing state.
•0r×sis the r×smatrix of all 0’s. There 0’s represent the probabilities of moving from an absorbing state to a
transient state (which is impossible by definition).
•Isholds the probabilities of transitioning between the absorbing states. As transition is impossible, this is just
thes×sidentity matrix.
We are interested in limk→∞Tk(X0). For a given k, the matrix becomes
Tk=
Qk0r×s
R+RQ+···+RQk−1Is
=Qk0r×s
RPk−1
i=0QiIs
. (17)
Finally, for an absorbing Markov chain with T=
Q0r×s
R I s
,
we have limk→∞Tk=
0r×r 0r×s
R(Ir−Q)−1Is
.
Since in the limit the transition probabilities to transient states are zero, we end up converging to absorbing states and
staying there. In the case of discrete distributions, where we can perfectly approximate a zero-variance dataset ( i.e.a
delta function), the absorbing states are delta functions centered at any non-zero probability point from the original
distribution. In practice, we would like to know the expected number of steps before being absorbed, which may be
large. But without knowing our fitting procedure it is impossible to calculate the matrix Qand therefore the average
length of time before collapse.
A.2 Alternative assumption for noisy approximations
This subsection will cover an alternative assumption, which may be more realistic in some settings, in contrast to
assumption 3 from Section 4.3, and this subsection mostly acts as an extension, rather than an alternative. In particular,
instead of imposing orthogonality, we can instead impose a certain size requirement on the noise term. This in turn
allows us to arrive to a similar result.
To be more precise, we will consider the same setting as in Section 4.3, but we will now replace Assumption 3 with
Assumption 3*:
7www.math.umd.edu/~immortal/MATH401/book/ch_absorbing_markov_chains.pdf
15
Model Collapse
101102103104105106107
log(number of samples)104
103
102
101
log(| |)
estimation of a (=0,=1)
Figure 12: Approximation of a single-dimensional Gaussian N(0,1)as a function of number of points. The mean
estimator and its standard deviation are calculated from running the procedure 10000 times.
0 500 1000 1500 2000
Generation106
104
102
100102log(||GMM0,GMMevolution||2)Distance between the original GMM and its approximation
as function of a number of data samples
500
1000
10000
50000
200000
Figure 13: Progressive fitting of a GMM with different number of samples. On the y-axis is shown the logarithm of L2
distance between the two GMM distributions. Over the generations the distance begins to grow and can become quite
large. The jumps in the distance for large sample sizes occur due to the fixed number of iterations and precision for the
expectation maximization algorithm.
16
Model Collapse
Assumptions :
3*.The extra noise is going to be assumed to be bounded and of the order larger than the sample mean deviation.
To be precise we will have a constant K(not dependent on generation i), such that for all i:
∥εi+1∥ ≤K
Mi(18)
Now with the alternative assumption in place, we can follow the exact same calculations to arrive at
E
Ri+1
W2
≥E
∥µi−µ∥2
+Tr Σ
Mi+E
∥εi+1∥2
+2√MiE
(εi+1)⊤Σ1/2
iTi+1
(19)
Similar to before, we need to evaluate (which we instead bound this time):
2√MiE
(εi+1)⊤Σ1/2
iTi+1
=2√MiZ
dΣip(Σi) Trh
Σ1/2
iCov(εi+1, Ti+1|Σi)i
̸= 0 (20)
≥ −2√
N√MiZ
dΣip(Σi)q
Tr
ΣiΣϵi+1
(21)
≥ −2√
N√Miq
E
ε⊤
i+1Σiεi+1
, (22)
≥ −2√
N√Mis
K2Tr Σ
M2
i=−2K√
N
Mi√Mi√
Tr Σ, (23)
where we used the Cauchy-Schwarz and Jensen inequalities. Note that this is far from optimal inequality, since instead
of using the expected value of the largest eigenvalue, we instead bounded it by Tr Σ . In particular, the per step bound is
then:
E
Ri+1
W2
≥E
∥µi−µ∥2
+Tr Σ
Mi+E
∥εi+1∥2
−2K√
N
Mi√Mi√
Tr Σ. (24)
Without knowledge of the specific values of K,NorTr Σ , the best we can do is consider what this means for the bound
asMibecomes large. In particular, contribution from the last two terms will be of order at most 3/2. As a result we
recover a bound similar to all of the ones observed so far:
Eµn+1,σ2
n+1[RW2]≥Tr Σ1
M0+1
M1+···+1
Mn
+O(3/2) (25)
In particular, we find in the same way, that superlinear scaling would be required to minimise the lower bound on model
collapse even in the case of more generic models of approximation, in which the mean at step i+ 1can be separated
into the sample mean and an extra bounded term of order at most 1/Mi.
17
Model Collapse
101
Perplexity of generated datapoints0.00.10.20.30.40.5ProbabilityPerplexity of generated datapoints
evaluated by model trained with
real wikitext2
Generation 0
Generation 1
Generation 2
Generation 3
Generation 5
Generation 9
(a) Overlaid histograms
Generation
0246810
Perplexity
0246810Probability (b) 3D view
Figure 14: Histogram of perplexities of each individual data training sequence produced by different generations as is
evaluated by the very first model trained with the real data. Over the generations models tend to produce samples that
the original model (trained with real data) is more likely to produce. At the same time, a much longer tail appears for
later generations – later generations start producing samples that would never be produced by the original model i.e.they
start misperceiving reality based on errors introduced by their ancestors. Models here are explicitly forced to not repeat
sequences with a penalty of 2.0.
Generation
0246810
Perplexity
0246810Probability
(a) Figure 11.a in 3D. No data preserved.
Generation
0246810
Perplexity
0246810Probability (b) Figure 11.b in 3D. 10% original data preserved.
Figure 15: Histogram of perplexities of each individual data training sequence produced by different generations as is
evaluated by the very first model trained with the real data. Over the generations models tend to produce samples that
the original model (trained with real data) is more likely to produce. At the same time, a much longer tail appears for
later generations – later generations start producing samples that would never be produced by the original model i.e.they
start misperceiving reality based on errors introduced by their ancestors.
18 | [
{
"id": "1906.02243"
},
{
"id": "1810.04805"
},
{
"id": "2305.17493"
},
{
"id": "2302.10149"
},
{
"id": "2205.01068"
},
{
"id": "1907.11692"
},
{
"id": "2106.09667"
},
{
"id": "1708.06733"
},
{
"id": "1904.07734"
}
] |
2205.09712 | Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoning | "Large language models (LLMs) have been shown to be capable of impressive\nfew-shot generalisation t(...TRUNCATED) | http://arxiv.org/pdf/2205.09712 | [
"Antonia Creswell",
"Murray Shanahan",
"Irina Higgins"
] | [
"cs.AI",
"cs.CL"
] | null | null | cs.AI | 20220519 | 20220519 | "2022-5-20\nSelection-Inference: Exploiting Large\nLanguage Models for Interpretable Logical\nReason(...TRUNCATED) | [{"id":"2205.09712"},{"id":"2112.03753"},{"id":"1907.03950"},{"id":"2005.00683"},{"id":"1904.12584"}(...TRUNCATED) |
2104.06001 | Gender Bias in Machine Translation | "Machine translation (MT) technology has facilitated our daily tasks by\nproviding accessible shortc(...TRUNCATED) | http://arxiv.org/pdf/2104.06001 | [
"Beatrice Savoldi",
"Marco Gaido",
"Luisa Bentivogli",
"Matteo Negri",
"Marco Turchi"
] | [
"cs.CL"
] | "Accepted for publication in Transaction of the Association for\n Computational Linguistics (TACL),(...TRUNCATED) | null | cs.CL | 20210413 | 20210507 | "Gender Bias in Machine Translation\nBeatrice Savoldi1,2, Marco Gaido1,2, Luisa Bentivogli2, Matteo (...TRUNCATED) | [{"id":"2104.06001"},{"id":"2012.15859"},{"id":"2010.14465"},{"id":"1901.10002"},{"id":"2102.06788"}(...TRUNCATED) |
2002.02878 | "I love your chain mail! Making knights smile in a fantasy game world: Open-domain goal-oriented dia(...TRUNCATED) | "Dialogue research tends to distinguish between chit-chat and goal-oriented\ntasks. While the former(...TRUNCATED) | http://arxiv.org/pdf/2002.02878 | ["Shrimai Prabhumoye","Margaret Li","Jack Urbanek","Emily Dinan","Douwe Kiela","Jason Weston","Arthu(...TRUNCATED) | [
"cs.AI",
"cs.CL",
"stat.ML"
] | null | null | cs.AI | 20200207 | 20200210 | "I love your chain mail! Making knights smile in a fantasy game world:\nOpen-domain goal-oriented di(...TRUNCATED) | [{"id":"1903.03094"},{"id":"1801.07243"},{"id":"1606.03152"},{"id":"1909.04499"},{"id":"1905.01969"}(...TRUNCATED) |
1611.09268 | MS MARCO: A Human Generated MAchine Reading COmprehension Dataset | "We introduce a large scale MAchine Reading COmprehension dataset, which we\nname MS MARCO. The data(...TRUNCATED) | http://arxiv.org/pdf/1611.09268 | ["Payal Bajaj","Daniel Campos","Nick Craswell","Li Deng","Jianfeng Gao","Xiaodong Liu","Rangan Majum(...TRUNCATED) | [
"cs.CL",
"cs.IR"
] | null | null | cs.CL | 20161128 | 20181031 | "MS MARCO: A Human Generated MAchine\nReading COmprehension Dataset\nPayal Bajaj, Daniel Campos, Nic(...TRUNCATED) | [{"id":"1809.08267"},{"id":"1609.05284"},{"id":"1810.12885"},{"id":"1806.03822"},{"id":"1603.01547"}(...TRUNCATED) |
2205.01663 | Adversarial Training for High-Stakes Reliability | "In the future, powerful AI systems may be deployed in high-stakes settings,\nwhere a single failure(...TRUNCATED) | http://arxiv.org/pdf/2205.01663 | ["Daniel M. Ziegler","Seraphina Nix","Lawrence Chan","Tim Bauman","Peter Schmidt-Nielsen","Tao Lin",(...TRUNCATED) | [
"cs.LG",
"cs.AI",
"cs.CL"
] | 30 pages, 7 figures, NeurIPS camera-ready | null | cs.LG | 20220503 | 20221110 | "Adversarial training for high-stakes reliability\nDaniel M. Ziegler∗Seraphina Nix Lawrence Chan(...TRUNCATED) | [{"id":"2204.01691"},{"id":"2203.15556"},{"id":"2202.06626"},{"id":"1910.03771"},{"id":"2202.03286"}(...TRUNCATED) |
2109.07445 | Challenges in Detoxifying Language Models | "Large language models (LM) generate remarkably fluent text and can be\nefficiently adapted across N(...TRUNCATED) | http://arxiv.org/pdf/2109.07445 | ["Johannes Welbl","Amelia Glaese","Jonathan Uesato","Sumanth Dathathri","John Mellor","Lisa Anne Hen(...TRUNCATED) | [
"cs.CL",
"cs.AI",
"cs.CY",
"cs.LG",
"I.2.6; I.2.7"
] | 23 pages, 6 figures, published in Findings of EMNLP 2021 | null | cs.CL | 20210915 | 20210915 | "Challenges in Detoxifying Language Models\nJohannes Welbl\u0003Amelia Glaese\u0003Jonathan Uesato\u(...TRUNCATED) | [{"id":"1906.02243"},{"id":"2104.08758"},{"id":"2102.04257"},{"id":"1911.03891"},{"id":"2012.07805"}(...TRUNCATED) |
2301.03728 | Scaling Laws for Generative Mixed-Modal Language Models | "Generative language models define distributions over sequences of tokens that\ncan represent essent(...TRUNCATED) | http://arxiv.org/pdf/2301.03728 | ["Armen Aghajanyan","Lili Yu","Alexis Conneau","Wei-Ning Hsu","Karen Hambardzumyan","Susan Zhang","S(...TRUNCATED) | [
"cs.CL",
"cs.AI",
"cs.LG"
] | null | null | cs.CL | 20230110 | 20230110 | "SCALING LAWS FOR GENERATIVE MIXED -MODAL\nLANGUAGE MODELS\nArmen Aghajanyan\u0003y, Lili Yu\u0003y,(...TRUNCATED) | [{"id":"2301.03728"},{"id":"2203.13131"},{"id":"2212.07143"},{"id":"2208.07339"},{"id":"2210.08402"}(...TRUNCATED) |
The AI ArXiv dataset contains a selection of papers on the topics of AI and LLMs.
You can find a heavily upgraded v2 dataset here. The v2 dataset improves both data quality and dataset size.