SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.01171 · ACL Findings · 2022

Why Exposure Bias Matters: An Imitation Learning Perspective of Error Accumulation in Language Generation

Jackie Chi, Kit Cheung, Kushal Arora, Layla El Asri, Hareesh Bahuleyan

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2204.01171.json · badge: /api/ran/2204.01171.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
kushalarora/quantifying_exposure_bias canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
generate_list Ran
ran on a synthesized input
kushalarora/quantifying_exposure_bias/quant_exp_bias/commands/quantify_exposure_bias_pretrained.py
code served (permissive licence) · get_code("8a0fcb322a884bdf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct arguments for generate_list function
# The function takes:
# - lst: a list to iterate through
# - counts: a list of counts (divisors)
# - clen: appears unused in the function body

lst = [10, 20, 30, 40]
counts = [2, 0, 5, 1]
clen = 4

ARGS = {
    "lst": lst,
    "counts": counts,
    "clen": clen
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_mean_std_results Ran
ran on a synthesized input
kushalarora/quantifying_exposure_bias/decoding_experiments.py
code served (permissive licence) · get_code("159431fbc9468675")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import wandb
import torch

torch.manual_seed(0)

# Construct run_metrics dictionary with all required keys
run_metrics = {
    'target_model_xent_till_len': [
        (0, 1.2),
        (1, 1.5),
    ],
    'target_kl_till_len_norm': [
        (0, 0.3),
        (1, 0.4),
    ],
    'kl_till_len_norm': [
        (0, 0.25),
        (1, 0.35),
    ],
    'kl': 0.32,
    'target_kl': 0.35,
    'excess_err': 0.15,
    'corr_target_err_xent': 0.78,
    'corr_model_err_xent': 0.82,
    'Hmm': 2.1,
    'Hmo': 2.3,
    'target_Hmm': 2.2,
    'target_Hmo': 2.4,
    'human_oracle_nll': 1.8,
    'oracle_nll': 1.9,
    'seq-rep-1': 0.45,
    'seq-rep-4': 0.52,
    'human-seq-rep-1': 0.48,
    'human-seq-rep-4': 0.55,
    'uniq-seq': 128,
    'human-uniq-seq': 132,
    'rep/16': 0.22,
    'rep/32': 0.31,
    'rep/128': 0.58,
    'rep/512': 0.72,
    'wrep/16': 0.20,
    'wrep/32': 0.29,
    'wrep/128': 0.56,
    'wrep/512': 0.70,
    'hrep/16': 0.23,
    'hrep/32': 0.32,
    'hrep/128': 0.59,
    'hrep/512': 0.73,
    'uniq': 256,
    'human-uniq': 260,
}

prefix = 'exp_bias'

extras = {
    'custom_metric_1': 0.99,
    'custom_metric_2': 1.05,
}

ARGS = {
    'run_metrics': run_metrics,
    'prefix': prefix,
    'extras': extras,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, wandb — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ngram_metrics Ran
ran on a synthesized input
kushalarora/quantifying_exposure_bias/quant_exp_bias/metrics/exposure_bias.py
code served (permissive licence) · get_code("78547cca84bfae83")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from nltk import ngrams
from collections import defaultdict, Counter

# Construct token_list - a list of tokens (strings)
# The function calls ngrams() on it and uses len() on the result
token_list = ['hello', 'world', 'hello', 'python', 'world', 'hello']

# Construct pad parameter - an integer with default value 1
pad = 1

ARGS = {
    'token_list': token_list,
    'pad': pad,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
repeat_at_1 Ran
ran on a synthesized input
kushalarora/quantifying_exposure_bias/quant_exp_bias/metrics/exposure_bias.py
code served (permissive licence) · get_code("b8c2bcd9e75d4e4a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Construct the arguments for repeat_at_1 function
# predictions: a 1D tensor of predicted tokens
# targets: a 1D tensor of target tokens
# context_length: an integer specifying the context window

predictions = torch.tensor([1, 2, 3, 4])
targets = torch.tensor([1, 2, 5, 4])
context_length = 2

ARGS = {
    "predictions": predictions,
    "targets": targets,
    "context_length": context_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Current language generation models suffer from issues such as repetition, incoherence, and hallucinations. An often-repeated hypothesis for this brittleness of generation models is that it is caused by the training and the generation procedure mismatch, also referred to as exposure bias. In this paper, we verify this hypothesis by analyzing exposure bias from an imitation learning perspective. We show that exposure bias leads to an accumulation of errors during generation, analyze why perplexity fails to capture this accumulation of errors, and empirically show that this accumulation results in poor generation quality. 1 * A part of this work was done when the author was an intern at Borealis AI. † During a part of this work, the author was an employee at Borealis AI.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2204.01171")
get_code_for_paper("2204.01171")
have("2204.01171")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2204.01171.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2204.01171.svg)](https://syntology.ai/paper/2204.01171)

Connect an agent — have() is free.