SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2109.03858 · 2021

Collecting a Large-Scale Gender Bias Dataset for Coreference Resolution and Machine Translation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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, 2 violated it and 0 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.03858.json · badge: /api/ran/2109.03858.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
slab-nlp/bug canonical (classifier label)
classifier basis: classifier_2025
5 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_row_to_conll Ran
ran; our contract draft was wrong, not the code
slab-nlp/bug/src/converters/convert_to_conll.py
code served (permissive licence) · get_code("06b402319a08e6f3")
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 str. 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 collections import namedtuple

# Create a mock row object with the required attributes
Row = namedtuple('Row', [
    'profession_first_index',
    'g_first_index',
    'sentence_text',
    'profession',
    'g'
])

# Create a row instance with test data
row = Row(
    profession_first_index=2,
    g_first_index=4,
    sentence_text='The person was a teacher and she worked hard',
    profession='Teacher',
    g='She'
)

# Override __getitem__ to support dictionary-like access
class RowWithDict(dict):
    def __init__(self, profession_first_index, g_first_index, sentence_text, profession, g):
        super().__init__()
        self['profession'] = profession
        self['g'] = g
        self.profession_first_index = profession_first_index
        self.g_first_index = g_first_index
        self.sentence_text = sentence_text
        
    def __getitem__(self, key):
        return super().__getitem__(key)

row = RowWithDict(
    profession_first_index=2,
    g_first_index=4,
    sentence_text='The person was a teacher and she worked hard',
    profession='Teacher',
    g='She'
)

doc_name = 'example_document'

ARGS = {
    'row': row,
    'doc_name': doc_name
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
find_cluster_ind Ran
ran, honoured the contract we drafted
slab-nlp/bug/src/evaluations/evaluate_coref.py
code served (permissive licence) · get_code("c44744a932822198")
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 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)

# clusters is a list of clusters, where each cluster is a list of entities
# each entity is a tuple (start, end) representing a span
# word_ind is an integer representing the word index to search for

clusters = [
    [(0, 5), (10, 15)],      # cluster 0: two entities
    [(20, 25), (30, 35)],    # cluster 1: two entities
    [(40, 45)]               # cluster 2: one entity
]

word_ind = 12  # this word index falls within the span (10, 15) in cluster 0

ARGS = {
    "clusters": clusters,
    "word_ind": word_ind
}
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 1, dtype family int — 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_acc Ran
ran, violated the contract we drafted
slab-nlp/bug/src/evaluations/evaluate_coref.py
code served (permissive licence) · get_code("b892b3937d808e74")
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 float, ndim 0, dtype family float, 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 torch
import numpy as np

torch.manual_seed(0)

# The function get_acc expects:
# - vals: a sequence of binary values (0s and 1s, or True/False)
#   It sums them, divides by length, multiplies by 100 for accuracy percentage

vals = [1, 1, 0, 1, 1, 0]  # Binary scores/predictions

ARGS = {
    "vals": vals
}
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 float, ndim 0, dtype family float, 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
is_correct_pred Ran
ran, honoured the contract we drafted
slab-nlp/bug/src/evaluations/evaluate_coref.py
code served (permissive licence) · get_code("18358eda7d56ca10")
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 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 torch

torch.manual_seed(0)

# Construct clusters: list of lists of tuples (start, end indices)
# Each cluster contains entity mentions represented as (start_index, end_index) tuples
clusters = [
    [(0, 2), (5, 7)],      # cluster 0: entity spans from 0-2 and 5-7
    [(10, 12), (15, 16)],  # cluster 1: entity spans from 10-12 and 15-16
    [(20, 22)]             # cluster 2: entity span from 20-22
]

# Construct the prediction dict
pred = {
    'clusters': clusters
}

# Construct the row dict with profession_first_index and g_first_index
# These are word indices that should fall within (or outside of) cluster spans
row = {
    'profession_first_index': 1,   # falls within cluster 0's first span (0-2)
    'g_first_index': 6             # falls within cluster 0's second span (5-7)
}

# Construct the line dict
line = {
    'pred': pred,
    'row': row
}

ARGS = {
    'line': line
}
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 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
validate_row Ran
ran, violated the contract we drafted
slab-nlp/bug/src/converters/convert_to_conll.py
code served (permissive licence) · get_code("f275b143001bb6c6")
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 bool, ndim 0, dtype family float, 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 logging

class Row:
    def __init__(self, profession_first_index, g_first_index, sentence_text, profession, g):
        self.profession_first_index = profession_first_index
        self.g_first_index = g_first_index
        self.sentence_text = sentence_text
        self._data = {
            'profession': profession,
            'g': g
        }
    
    def __getitem__(self, key):
        return self._data[key]

row = Row(
    profession_first_index=0,
    g_first_index=2,
    sentence_text="doctor is a profession",
    profession="doctor",
    g="a"
)

ARGS = {
    'row': row
}
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 bool, ndim 0, dtype family float, 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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 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

Recent works have found evidence of gender bias in models of machine translation and coreference resolution using mostly synthetic diagnostic datasets. While these quantify bias in a controlled experiment, they often do so on a small scale and consist mostly of artificial, out-of-distribution sentences. In this work, we find grammatical patterns indicating stereotypical and non-stereotypical gender-role assignments (e.g., female nurses versus male dancers) in corpora from three domains, resulting in a first large-scale gender bias dataset of 108K diverse real-world English sentences. We manually verify the quality of our corpus and use it to evaluate gender bias in various coreference resolution and machine translation models. We find that all tested models tend to over-rely on gender stereotypes when presented with natural inputs, which may be especially harmful when deployed in commercial systems. Finally, we show that our dataset lends itself to finetuning a coreference resolution model, finding it mitigates bias on a held out set. Our dataset and models are publicly available at www.github.com/SLAB-NLP/BUG. We hope they will spur future research into gender bias evaluation mitigation techniques in realistic settings.

For agents

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

get_harvested_code_for_paper("2109.03858")
get_code_for_paper("2109.03858")
have("2109.03858")

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

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

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

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

Connect an agent — have() is free.