SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.03521 · ACL · 2021

REDDITBIAS: A Real-World Resource for Bias Evaluation and Debiasing of Conversational Language Models

Ivan Vulić, Anne Lauscher, Goran Glavaš, Soumya Barikeri

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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, 1 violated it and 4 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-23; 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/2106.03521.json · badge: /api/ran/2106.03521.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
umanlp/RedditBias canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
get_comment_thread_sent Ran
ran on a synthesized input
umanlp/RedditBias/DataPreparation/reddit_conv_praw.py
code served (permissive licence) · get_code("acb11975e6b115c7")
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. 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.

class MockComment:
    def __init__(self, comment_id, body):
        self.id = comment_id
        self.body = body


class MockComments:
    def __init__(self, comments):
        self.comments = comments
    
    def list(self):
        return self.comments


class MockSubmission:
    def __init__(self, comments):
        self.comments = MockComments(comments)


# Create mock comment objects
comment1 = MockComment("abc123", "This is the first comment")
comment2 = MockComment("def456", "This is the second comment")
comment3 = MockComment("ghi789", "This is the third comment")

# Create mock submission object with comments
subm = MockSubmission([comment1, comment2, comment3])

# Create comment threads with IDs in path format (split by '/')
comment_thread = [
    "root/abc123/def456",
    "root/ghi789",
    "root/abc123/ghi789/def456"
]

ARGS = {
    "comment_thread": comment_thread,
    "subm": subm
}
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 tuple — a tuple output has no array shape of its own; none is 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_dist Ran
ran on a synthesized input
umanlp/RedditBias/DataExploration/sent_plots.py
code served (permissive licence) · get_code("4c322db1733a4954")
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 pandas as pd

# Create a small dataframe with a 'comments_processed' column
# The column contains lists of strings (processed comments)
df = pd.DataFrame({
    'comments_processed': [
        ['good', 'fast', 'reliable'],
        ['bad', 'slow'],
        ['good', 'expensive'],
        ['reliable', 'fast'],
    ]
})

# Create a list of attributes to search for
attributes = ['good', 'fast', 'reliable', 'bad']

ARGS = {
    'attributes': attributes,
    'df': df,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
insertSpace Ran
ran; our contract draft was wrong, not the code
umanlp/RedditBias/DataPreparation/create_data_mwoz.py
code served (permissive licence) · get_code("d7503a387ec4bc30")
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 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 re

def insertSpace(token, text):
    sidx = 0
    while True:
        sidx = text.find(token, sidx)
        if sidx == -1:
            break
        if sidx + 1 < len(text) and re.match('[0-9]', text[sidx - 1]) and re.match('[0-9]', text[sidx + 1]):
            sidx += 1
            continue
        if text[sidx - 1] != ' ':
            text = text[:sidx] + ' ' + text[sidx:]
            sidx += 1
        if sidx + len(token) < len(text) and text[sidx + len(token)] != ' ':
            text = text[:sidx + 1] + ' ' + text[sidx + 1:]
        sidx += 1
    return text

ARGS = {
    "token": ".",
    "text": "The price is 3.14 dollars and 2.5 euros."
}
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 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
is_ascii Ran
ran, violated the contract we drafted
umanlp/RedditBias/DataPreparation/create_data_mwoz.py
code served (permissive licence) · get_code("1b465b9239cb631c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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.

ARGS = {
    "s": "Hello, World! This is an ASCII string with numbers 12345 and symbols @#$%"
}
Setup block drafted by
a language model, Claude Sonnet 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 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
process_reddit Ran
ran on a synthesized input
umanlp/RedditBias/Analysis/trial_code.py
code served (permissive licence) · get_code("1c2240dd8878998c")
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 re

def process_reddit(comment):
    comment = comment.encode('ascii', errors='ignore').decode()
    comment = re.sub('[^A-Za-z,. ]+', '', comment)
    return comment

ARGS = {
    'comment': 'Hello, this is a Reddit comment! With some special chars @#$ 123'
}
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 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
replace_with_caps Ran
ran on a synthesized input
umanlp/RedditBias/DataPreparation/reddit_data_caps.py
code served (permissive licence) · get_code("27e6c4ac8204fa11")
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

torch.manual_seed(0)

# Analyze the function:
# - text: a string that will be replaced
# - replacements: a dict where keys are strings to find and values are strings to replace with

text = "hello world hello"
replacements = {
    "hello": "HELLO",
    "world": "WORLD"
}

ARGS = {
    "text": text,
    "replacements": replacements
}
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
get_pushshift_data Not yet run
unverified (harvested, no recorded run)
umanlp/RedditBias/Analysis/trial_code.py
code served (permissive licence) · get_code("c04299904f408b85")
How it ran

no invocation recorded.

get_pushshift_submissions Not yet run
unverified (harvested, no recorded run)
umanlp/RedditBias/Analysis/trial_code.py
code served (permissive licence) · get_code("7f37a1b4dfcfa87b")
How it ran

no invocation recorded.

normalize Not yet run
unverified (harvested, no recorded run)
umanlp/RedditBias/DataPreparation/create_data_mwoz.py
code served (permissive licence) · get_code("c99ace056d9e2b0b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
is_ascii 9 other papers
5 dated earlier, 4 later
1911.08151 (2019-11)
Retrospective and Prospective Mixture-of-Generators for Task-oriented Dialogue Response Generation
2020.acl-main.53 (2020 (year only))
Efficient Dialogue State Tracking by Selectively Overwriting Memory
2005.00796 (2020-05)
A Simple Language Model for Task-Oriented Dialogue
and 6 more not named here
insertSpace 5 other papers
3 dated earlier, 2 later
2020.acl-main.53 (2020 (year only))
Efficient Dialogue State Tracking by Selectively Overwriting Memory
2101.09374 (2021-01)
Slot Self-Attentive Dialogue State Tracking
2104.00773 (2021-04)
MultiWOZ 2.4: A Multi-Domain Task-Oriented Dialogue Dataset with Essential Annotation Corrections to Improve State Tracking Evaluation
and 2 more not named here
normalize 3 other papers
1 dated earlier, 2 later
2020.acl-main.53 (2020 (year only))
Efficient Dialogue State Tracking by Selectively Overwriting Memory
2205.10475 (2022-05)
DEEPSTRUCT: Pretraining of Language Models for Structure Prediction
2407.21633 (2024-07)
Zero-Shot Cross-Domain Dialogue State Tracking via Dual Low-Rank Adaptation

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-23.

Repositories linked to this paper

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

Abstract

Text representation models are prone to exhibit a range of societal biases, reflecting the noncontrolled and biased nature of the underlying pretraining data, which consequently leads to severe ethical issues and even bias amplification. Recent work has predominantly focused on measuring and mitigating bias in pretrained language models. Surprisingly, the landscape of bias measurements and mitigation resources and methods for conversational language models is still very scarce: it is limited to only a few types of bias, artificially constructed resources, and completely ignores the impact that debiasing methods may have on the final performance in dialog tasks, e.g., conversational response generation. In this work, we present REDDITBIAS, the first conversational data set grounded in the actual human conversations from Reddit, allowing for bias measurement and mitigation across four important bias dimensions: gender, race, religion, and queerness. Further, we develop an evaluation framework which simultaneously 1) measures bias on the developed REDDITBIAS resource, and 2) evaluates model capability in dialog tasks after model debiasing. We use the evaluation framework to benchmark the widely used conversational DialoGPT model along with the adaptations of four debiasing methods. Our results indicate that DialoGPT is biased with respect to religious groups and that some debiasing techniques can remove this bias while preserving downstream task performance.

For agents

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

get_harvested_code_for_paper("2106.03521")
get_code_for_paper("2106.03521")
have("2106.03521")

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

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

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

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

Connect an agent — have() is free.