SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.13880 · EMNLP · 2021

Single-dataset Experts for Multi-dataset Question Answering

Danqi Chen, Dan Friedman, Ben Dodge

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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; 1 honoured the contract we drafted, 1 violated it and 8 have no contract verdict; 1 failure 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/2109.13880.json · badge: /api/ran/2109.13880.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
princeton-nlp/MADE canonical (classifier label)
classifier basis not recorded on the link
11 ran · 0 no recorded run
FunctionStatusWhere it lives
asdict_ Ran
ran on a synthesized input
princeton-nlp/MADE/src/models/trainer.py
code served (permissive licence) · get_code("f99a8dce39e0242c")
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.

from dataclasses import dataclass
import torch

torch.manual_seed(0)

# The function asdict_ takes a single parameter 'd' which can be either:
# 1. A dict (returned as-is)
# 2. A dataclass instance (converted to dict via asdict)

@dataclass
class SampleDataclass:
    name: str
    value: int
    tensor: torch.Tensor

# Create test instances
dict_input = {"key1": "value1", "key2": 42}
dataclass_input = SampleDataclass(
    name="test",
    value=123,
    tensor=torch.randn(2, 4)
)

# ARGS mapping the parameter 'd' to a value
ARGS = {
    "d": dataclass_input
}
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 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
char_span_to_token_span Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/data_utils.py
code served (permissive licence) · get_code("164518300be9d42f")
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
import numpy as np

# Analyze the function: char_span_to_token_span takes offsets_mapping, l, r, context_start
# offsets_mapping is indexed and each element is unpacked as (cl, cr)
# So it's a sequence of 2-tuples representing character offsets for each token
# l and r are character positions (integers)
# context_start is an index into offsets_mapping (integer)

# Create a simple offsets_mapping that represents token-to-character span mappings
# Each tuple is (char_start, char_end) for a token
offsets_mapping = [
    (0, 2),    # token 0: chars 0-2
    (3, 5),    # token 1: chars 3-5
    (6, 9),    # token 2: chars 6-9
    (10, 12),  # token 3: chars 10-12
    (13, 15),  # token 4: chars 13-15
]

# Character span we want to find in tokens
l = 6   # left boundary of character span
r = 11  # right boundary of character span

# Starting context position in the offsets_mapping
context_start = 0

ARGS = {
    "offsets_mapping": offsets_mapping,
    "l": l,
    "r": r,
    "context_start": context_start,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
exact_match_score Ran
ran, violated the contract we drafted
princeton-nlp/MADE/src/utils/metrics.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
princeton-nlp/MADE/src/utils/metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from stacy027/coiecd, is pointer only (licence: NONE) · get_code("a8ef93fef742e557")
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 stacy027/coiecd, 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_handler Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/logging.py
code served (permissive licence) · get_code("12246540982c0879")
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 FileHandler. 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 logging
import tempfile
import os

# Create a temporary file for the FileHandler case
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.log')
temp_filename = temp_file.name
temp_file.close()

# Define arguments for the get_handler function
ARGS = {
    'fn': temp_filename,  # File path for FileHandler
    'stream': None  # Stream argument (not used when fn is provided)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 FileHandler — a FileHandler output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FileHandler 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_logger Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/logging.py
code served (permissive licence) · get_code("13444437d74ae65b")
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 Logger. 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 logging
import tempfile
import os

def get_handler(fn=None, stream=None):
    formatter = logging.Formatter(fmt='%(levelname).1s %(asctime)s %(name)s:%(lineno)d: %(message)s', datefmt='%Y-%m-%dT%H:%M:%S')
    h = logging.FileHandler(fn, mode='w') if fn else logging.StreamHandler(stream=stream)
    h.setLevel(logging.INFO)
    h.setFormatter(formatter)
    return h

def get_logger(name):
    logging.basicConfig(handlers=[get_handler(stream=None)], level=logging.INFO)
    return logging.getLogger(name)

# Create a temporary file for logging output
temp_dir = tempfile.gettempdir()
log_file = os.path.join(temp_dir, "test_logger.log")

ARGS = {
    "name": "test_logger"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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_resume_name Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/logging.py
code served (permissive licence) · get_code("266398f337ae2bc4")
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 PosixPath. 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 tempfile
from pathlib import Path

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Define the arguments dictionary
ARGS = {
    'output_dir': temp_dir,
    's': 'output.log'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
marginal_ll Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/model_utils.py
code served (permissive licence) · get_code("101cd5b769362370")
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 Tensor, ndim 1, dtype family float, shape (2,) 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 torch

torch.manual_seed(0)

# Create small tensors for testing marginal_ll
# log_probs: shape (batch_size, num_classes) - log probabilities
# mask: shape (batch_size, num_classes) - boolean mask

batch_size = 2
num_classes = 4

# log_probs: tensor of log probabilities
log_probs = torch.randn(batch_size, num_classes)

# mask: boolean tensor indicating which positions are valid
mask = torch.tensor([
    [True, True, False, True],
    [True, False, True, True]
])

ARGS = {
    "log_probs": log_probs,
    "mask": mask
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
max_ll Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/model_utils.py
code served (permissive licence) · get_code("4526f5f32fe3ec45")
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 Tensor, ndim 1, dtype family float, shape (2,) 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 torch

torch.manual_seed(0)

# Construct arguments for max_ll function
# The function takes log_probs (a tensor) and mask (a boolean tensor)
# It performs masked_fill on log_probs using ~mask, then takes max over dim=-1

log_probs = torch.randn(2, 4)  # batch_size=2, sequence_length=4
mask = torch.ones(2, 4, dtype=torch.bool)  # boolean mask same shape as log_probs
mask[0, 2] = False  # mask out one position to test masked_fill

ARGS = {
    "log_probs": log_probs,
    "mask": mask,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
normalize_answer Ran
ran; our contract draft was wrong, not the code
princeton-nlp/MADE/src/utils/metrics.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.

to_device Ran
ran on a synthesized input
princeton-nlp/MADE/src/utils/model_utils.py
code served (permissive licence) · get_code("c5fd58d7377e99ce")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# Build a nested dictionary with tensors at various levels
d = {
    'tensor_1': torch.randn(2, 4),
    'tensor_2': torch.randn(3, 5),
    'nested_dict': {
        'tensor_3': torch.randn(2, 6),
        'scalar_tensor': torch.tensor(42.0),
        'deep_nested': {
            'tensor_4': torch.randn(4, 7)
        }
    },
    'non_tensor_value': 'some_string',
    'number': 123
}

ARGS = {
    'd': d,
    'device_': None
}
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 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

Also present in other papers' code

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

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

Many datasets have been created for training reading comprehension models, and a natural question is whether we can combine them to build models that (1) perform better on all of the training datasets and (2) generalize and transfer better to new datasets. Prior work has addressed this goal by training one network simultaneously on multiple datasets, which works well on average but is prone to over-or under-fitting different subdistributions and might transfer worse compared to source models with more overlap with the target dataset. Our approach is to model multi-dataset question answering with an ensemble of single-dataset experts, by training a collection of lightweight, dataset-specific adapter modules (Houlsby et al., 2019) that share an underlying Transformer model. We find that these Multi-Adapter Dataset Experts (MADE) outperform all our baselines in terms of in-distribution accuracy, and simple methods based on parameter-averaging lead to better zero-shot generalization and few-shot transfer performance, offering a strong and versatile starting point for building new reading comprehension systems. 1

For agents

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

get_harvested_code_for_paper("2109.13880")
get_code_for_paper("2109.13880")
have("2109.13880")

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

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

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

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

Connect an agent — have() is free.