SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2024.findings-emnlp.839 · EMNLP Findings · 2024

LLMs to Replace Crowdsourcing For Parallel Data Creation? The Case of Text Detoxification

Skoltech, Alexander Panchenko, Daniil Moskovskiy, Sergey Pletenev

Code that ran

7 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-24; 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/2024.findings-emnlp.839.json · badge: /api/ran/2024.findings-emnlp.839.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
s-nlp/pseudoparadetox canonical (classifier label)
classifier basis: census
7 ran · 3 no recorded run
FunctionStatusWhere it lives
collate_test_batch Ran
ran on a synthesized input
s-nlp/pseudoparadetox/src/utils/training_utils.py
code served (permissive licence) · get_code("4e5da0074426ce22")
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 torch

torch.manual_seed(0)

# The function expects a batch which is a list of dicts,
# where each dict has 'input_ids' and 'attention_mask' keys
# containing torch tensors that can be stacked.

batch = [
    {
        'input_ids': torch.randint(0, 100, (4,)),
        'attention_mask': torch.ones(4, dtype=torch.long)
    },
    {
        'input_ids': torch.randint(0, 100, (4,)),
        'attention_mask': torch.ones(4, dtype=torch.long)
    }
]

ARGS = {
    'batch': batch
}
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
default_chooser Ran
ran; our contract draft was wrong, not the code
s-nlp/pseudoparadetox/src/multilingual_condBERT.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from skoltech-nlp/detox, is pointer only (licence: NONE) · get_code("da47f8d108073a00")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from skoltech-nlp/detox, 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.

group_by_first_token Ran
ran; our contract draft was wrong, not the code
s-nlp/pseudoparadetox/src/multilingual_condBERT.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from skoltech-nlp/detox, is pointer only (licence: NONE) · get_code("0617b9bc6327cd77")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from skoltech-nlp/detox, 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.

load_config Ran
ran on a synthesized input
s-nlp/pseudoparadetox/src/utils/training_utils.py
code served (permissive licence) · get_code("c14b041b0c04e712")
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 json
import tempfile
import os

# Create a temporary JSON config file
temp_dir = tempfile.mkdtemp()
config_file_path = os.path.join(temp_dir, "config.json")

# Create a valid config file
config_data = {
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 10,
    "model_name": "transformer",
    "hidden_dim": 256,
    "dropout": 0.1
}

with open(config_file_path, 'w') as f:
    json.dump(config_data, f)

ARGS = {
    "config_file_path": config_file_path
}
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 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
prepare_target_label Ran
ran on a synthesized input
s-nlp/pseudoparadetox/src/utils/evaluate.py
code served (permissive licence) · get_code("8cd996672e45a2b8")
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
import torch.nn as nn

class MockConfig:
    def __init__(self):
        self.id2label = {0: "positive", 1: "negative", 2: "neutral"}
        self.label2id = {"positive": 0, "negative": 1, "neutral": 2}

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = MockConfig()
    
    def forward(self, x):
        return x

torch.manual_seed(0)
model = MockModel()
target_label = "positive"

ARGS = {
    "model": model,
    "target_label": target_label
}
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
split_by_language Ran
ran on a synthesized input
s-nlp/pseudoparadetox/src/utils/data_utils.py
code served (permissive licence) · get_code("e84e8dab31d8f583")
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.

import pandas as pd
import numpy as np

# Create a small sample DataFrame with multiple languages
data = pd.DataFrame({
    'lang': ['en', 'en', 'en', 'fr', 'fr', 'fr', 'de', 'de', 'de'],
    'text': ['hello', 'world', 'test', 'bonjour', 'monde', 'essai', 'hallo', 'welt', 'test'],
    'label': [0, 1, 0, 1, 0, 1, 0, 1, 0]
})

ARGS = {
    'data': data,
    'random_seed': 42,
    'test_size': 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn — 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
tokenize_and_encode Ran
ran on a synthesized input
s-nlp/pseudoparadetox/src/utils/training_utils.py
code served (permissive licence) · get_code("75e54b5a1e8011b5")
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 Series. 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 pandas as pd
from transformers import PreTrainedTokenizer

torch.manual_seed(0)

class MockTokenizer:
    """Mock tokenizer that mimics PreTrainedTokenizer behavior"""
    
    def __call__(self, text, padding=None, max_length=None, truncation=None, 
                 return_tensors=None, return_attention_mask=True, return_token_type_ids=True):
        """Mock tokenization that returns input_ids and attention_mask"""
        if isinstance(text, str):
            # Single string case
            input_ids = torch.randint(0, 1000, (1, 10))
        elif isinstance(text, list):
            # List of strings case
            input_ids = torch.randint(0, 1000, (len(text), 10))
        else:
            input_ids = torch.randint(0, 1000, (1, 10))
        
        result = {'input_ids': input_ids}
        
        if return_attention_mask:
            result['attention_mask'] = torch.ones_like(input_ids)
        
        if return_token_type_ids:
            result['token_type_ids'] = torch.zeros_like(input_ids)
        
        return result


# Create example pandas Series with required columns
example = pd.Series({
    'lang': ['en', 'es'],
    'toxic_sentence': ['This is bad', 'Esto es malo'],
    'neutral_sentence': ['This is good', 'Esto es bueno']
})

# Create mock tokenizer
tokenizer = MockTokenizer()

ARGS = {
    'example': example,
    'tokenizer': tokenizer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
classify_texts Not yet run
unverified (harvested, no recorded run)
s-nlp/pseudoparadetox/src/utils/evaluate.py
code served (permissive licence) · get_code("94df471b4ae2fde8")
How it ran

no invocation recorded.

evaluate_style Not yet run
unverified (harvested, no recorded run)
s-nlp/pseudoparadetox/src/utils/evaluate.py
code served (permissive licence) · get_code("5936b58b09345eae")
How it ran

no invocation recorded.

translate_batch Not yet run
unverified (harvested, no recorded run)
s-nlp/pseudoparadetox/src/utils/data_utils.py
code served (permissive licence) · get_code("a9849d2fc7633281")
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, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 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
default_chooser 2 other papers
2 dated earlier · 1 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2109.08914 (2021-09)
Text Detoxification using Large Pre-trained Neural Models
group_by_first_token 2 other papers
2 dated earlier · 1 only as an assembly brick
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
2109.08914 (2021-09)
Text Detoxification using Large Pre-trained Neural Models
classify_texts 1 other paper
1 later
2502.06394 (2025-02)
SynthDetoxM: Modern LLMs are Few-Shot Parallel Detoxification Data Annotators
prepare_target_label 1 other paper
1 later
2502.06394 (2025-02)
SynthDetoxM: Modern LLMs are Few-Shot Parallel Detoxification Data Annotators

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

Repositories linked to this paper

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

Abstract

The lack of high-quality training data remains a significant challenge in NLP. Manual annotation methods, such as crowdsourcing, are costly, require intricate task design skills, and, if used incorrectly, may result in poor data quality. From the other hand, LLMs have demonstrated proficiency in many NLP tasks, including zero-shot and few-shot data annotation. However, they often struggle with text detoxification due to alignment constraints and fail to generate the required detoxified text. This work explores the potential of modern open source LLMs to annotate parallel data for text detoxification. Using the recent technique of activation patching, we generate a pseudo-parallel detoxification dataset based on ParaDetox. The detoxification model trained on our generated data shows comparable performance to the original dataset in automatic detoxification evaluation metrics and superior quality in manual evaluation and side-by-side comparisons. * Equal contribution.

For agents

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

get_harvested_code_for_paper("2024.findings-emnlp.839")
get_code_for_paper("2024.findings-emnlp.839")
have("2024.findings-emnlp.839")

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

curl https://syntology.ai/api/ran/2024.findings-emnlp.839.json

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

[![Syntology run record](https://syntology.ai/api/ran/2024.findings-emnlp.839.svg)](https://syntology.ai/paper/2024.findings-emnlp.839)

Connect an agent — have() is free.