SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.02692 · ACL · 2021

Learning to Perturb Word Embeddings for Out-of-distribution QA

Sung Hwang, Kaist, South Korea, Juho Lee, Seanie Lee, Minki Kang

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2105.02692.json · badge: /api/ran/2105.02692.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
seanie12/SWEP canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
to_list Ran
ran; our contract draft was wrong, not the code
seanie12/SWEP/run_squad.py
pointer only (licence: MIT); the stored copy get_code serves, from AI-secure/InfoBERT, is pointer only (licence: NONE) · get_code("9df40357afea56cc")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from AI-secure/InfoBERT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_exact Ran
ran, honoured the contract we drafted
seanie12/SWEP/squad_metrics.py
code served (permissive licence) · get_code("9026d9da5d085bd4")
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) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 re
import string

def normalize_answer(s):
    """Lower text and remove punctuation, articles and extra whitespace."""

    def remove_articles(text):
        regex = re.compile('\\b(a|an|the)\\b', re.UNICODE)
        return re.sub(regex, ' ', text)

    def white_space_fix(text):
        return ' '.join(text.split())

    def remove_punc(text):
        exclude = set(string.punctuation)
        return ''.join((ch for ch in text if ch not in exclude))

    def lower(text):
        return text.lower()
    return white_space_fix(remove_articles(remove_punc(lower(s))))

def compute_exact(a_gold, a_pred):
    return int(normalize_answer(a_gold) == normalize_answer(a_pred))

ARGS = {
    "a_gold": "The quick brown fox jumps over the lazy dog.",
    "a_pred": "the quick brown fox jumps over the lazy dog"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
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
exact_match_score Ran
ran, violated the contract we drafted
seanie12/SWEP/mrqa_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from sunlab-osu/CliniQG4QA, is pointer only (licence: NONE) · get_code("bf75673211903e14")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sunlab-osu/CliniQG4QA, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

f1_score Ran
ran, honoured the contract we drafted
seanie12/SWEP/mrqa_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from sunlab-osu/CliniQG4QA, is pointer only (licence: NONE) · get_code("cdf4b8c0fec3da02")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sunlab-osu/CliniQG4QA, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_dataloader Ran
ran; our contract draft was wrong, not the code
seanie12/SWEP/run_squad.py
code served (permissive licence) · get_code("f4543e8ffa04b4d5")
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 DataLoader. 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
from torch.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

class Feature:
    def __init__(self, input_ids, input_mask, segment_ids, start_position=None, end_position=None):
        self.input_ids = input_ids
        self.input_mask = input_mask
        self.segment_ids = segment_ids
        self.start_position = start_position
        self.end_position = end_position

class Args:
    def __init__(self, batch_size):
        self.batch_size = batch_size

# Create small features for training
features_train = [
    Feature(
        input_ids=[101, 2054, 2003, 102],
        input_mask=[1, 1, 1, 1],
        segment_ids=[0, 0, 0, 0],
        start_position=1,
        end_position=2
    ),
    Feature(
        input_ids=[101, 2054, 2003, 102],
        input_mask=[1, 1, 1, 1],
        segment_ids=[0, 0, 0, 0],
        start_position=0,
        end_position=1
    )
]

# Create small features for evaluation
features_eval = [
    Feature(
        input_ids=[101, 2054, 2003, 102],
        input_mask=[1, 1, 1, 1],
        segment_ids=[0, 0, 0, 0],
        start_position=None,
        end_position=None
    ),
    Feature(
        input_ids=[101, 2054, 2003, 102],
        input_mask=[1, 1, 1, 1],
        segment_ids=[0, 0, 0, 0],
        start_position=None,
        end_position=None
    )
]

args = Args(batch_size=2)

ARGS = {
    "args": args,
    "features": features_train,
    "is_training": True
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
get_tokens Ran
ran; our contract draft was wrong, not the code
seanie12/SWEP/squad_metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from saptarshi059/cdqa-project, is pointer only (licence: NONE) · get_code("aa6bc32d9c17a2f1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from saptarshi059/cdqa-project, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize_answer Ran
ran; our contract draft was wrong, not the code
seanie12/SWEP/mrqa_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from borealisai/radar-decoding, is pointer only (licence: LGPL-3.0) · get_code("e7e75981cb464788")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from borealisai/radar-decoding, and LGPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize_answer Ran
ran; our contract draft was wrong, not the code
seanie12/SWEP/squad_metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from saptarshi059/cdqa-project, is pointer only (licence: NONE) · get_code("6a96435eba311b08")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from saptarshi059/cdqa-project, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_examples_to_features Not yet run
unverified (harvested, no recorded run)
seanie12/SWEP/squad_utils.py
code served (permissive licence) · get_code("5fa242f804a151c9")
How it ran

no invocation recorded.

process_batch Not yet run
unverified (harvested, no recorded run)
seanie12/SWEP/run_squad.py
code served (permissive licence) · get_code("3ed8b1210b9d20a6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 7 later) and 3 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.

FunctionAlso present inEarliest-datedOthers named
normalize_answer 133 other papers
28 dated earlier, 103 later, 1 same year, order not determinable, 1 undated · 1 only as an assembly brick
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 130 more not named here
exact_match_score 56 other papers
27 dated earlier, 28 later, 1 same year, order not determinable
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 53 more not named here
f1_score 41 other papers
24 dated earlier, 16 later, 1 same year, order not determinable
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 38 more not named here
to_list 41 other papers
17 dated earlier, 2 the same month, 19 later, 3 same year, order not determinable
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1910.06188 (2019-10)
Q8BERT: Quantized 8Bit BERT
1911.02984 (2019-11)
The TechQA Dataset
and 38 more not named here
normalize_answer 37 other papers
12 dated earlier, 24 later, 1 same year, order not determinable · 1 only as an assembly brick
1808.07042 (2018-08)
CoQA: A Conversational Question Answering Challenge
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
and 34 more not named here
get_tokens 25 other papers
8 dated earlier, 16 later, 1 same year, order not determinable
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1908.08962 (2019-08)
Well-Read Students Learn Better: On the Importance of Pre-training Compact Models
and 22 more not named here
compute_exact 11 other papers
2 dated earlier, 9 later
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
2004.07347 (2020-04)
HybridQA: A Dataset of Multi-Hop Question Answering over Tabular and Textual Data
2109.08133 (2021-09)
Phrase Retrieval Learns Passage Retrieval, Too
and 8 more not named here

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

QA models based on pretrained language models have achieved remarkable performance on various benchmark datasets. However, QA models do not generalize well to unseen data that falls outside the training distribution, due to distributional shifts. Data augmentation (DA) techniques which drop/replace words have shown to be effective in regularizing the model from overfitting to the training data. Yet, they may adversely affect the QA tasks since they incur semantic changes that may lead to wrong answers for the QA task. To tackle this problem, we propose a simple yet effective DA method based on a stochastic noise generator, which learns to perturb the word embedding of the input questions and context without changing their semantics. We validate the performance of the QA models trained with our word embedding perturbation on a single source dataset, on five different target domains. The results show that our method significantly outperforms the baseline DA methods. Notably, the model trained with ours outperforms the model trained with more than 240K artificially generated QA pairs. Q: In what year was the Theodore m. Hesburgh library at Notre Dame finished? C: (…) the main building is the 14 -story Theodore m. Hesburgh library, completed in 1963, (…) this mural is popularly known as "touchdown jesus" because of its proximity … Q: In what year was the Theodore m. Hesburgh library at Notre Dame finished? Q: each last year was the Theodore m. Vanroth library at Notre Dame finished. C: (…) the first building is the 14 -story Theodore p von Hesburgh library, completed in 1963 ; (…) this mural is popularly known as our confession jesus christ because all its … C: (…) the main building is the 14 -story Theodore m. Hesburgh library, completed in 1963, (…) this mural is popularly known as "touchdown jesus" because of its proximity …

For agents

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

get_harvested_code_for_paper("2105.02692")
get_code_for_paper("2105.02692")
have("2105.02692")

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

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

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

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

Connect an agent — have() is free.