SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.05700 · EMNLP · 2020

Reformulating Unsupervised Style Transfer as Paraphrase Generation

Kalpesh Krishna, John Wieting, Mohit Iyyer

arXiv · PDF · Open in the Atlas

Code that ran

9 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 6 failures of our instrument; 10 no recorded run), measured 2026-11-24; 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/2010.05700.json · badge: /api/ran/2010.05700.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
martiansideofthemoon/style-transfer-paraphrase marked official in Papers with Code
Papers with Code archive
9 ran · 10 no recorded run
FunctionStatusWhere it lives
Instance Ran
ran on a synthesized input · constructed an object; no result was computed
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("6a7861df4980b949")
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 an instance of its own class, Instance: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
import random

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

# Create a minimal tokenizer stand-in
class MockTokenizer:
    def __init__(self):
        self.pad_token_id = 0
        self.eos_token_id = 1
        self.bos_token_id = 2
        self.additional_special_tokens_ids = [3, 4, 5]  # [global_token, prefix_token, suffix_token]

# Create a minimal args stand-in
class MockArgs:
    def __init__(self):
        self.prefix_input_type = 'original_shuffle'

# Create instance_dict with token sequences
instance_dict = {
    'sent1_tokens': [10, 11, 12],
    'sent2_tokens': [20, 21, 22, 23]
}

# Create config dict
config = {
    'max_prefix_length': 5,
    'max_suffix_length': 6,
    'global_dense_length': 2
}

# Create args
args = MockArgs()

# Define ARGS dict with all parameters for Instance.__init__
ARGS = {
    'args': args,
    'config': config,
    'instance_dict': instance_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Instance — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Instance 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
InverseInstance Ran
ran on a synthesized input · constructed an object; no result was computed
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("da737618d1e1daf8")
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 an instance of its own class, InverseInstance: the run constructed the object and did not call it, so no result was computed. 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 numpy as np
import random

class SimpleTokenizer:
    def __init__(self):
        self.pad_token_id = 0
        self.eos_token_id = 1
        self.bos_token_id = 2
        self.additional_special_tokens_ids = [3, 4, 5]

class SimpleArgs:
    def __init__(self):
        self.prefix_input_type = 'original_shuffle'

random.seed(0)
np.random.seed(0)

config = {
    'max_prefix_length': 8,
    'max_suffix_length': 10,
    'global_dense_length': 3
}

instance_dict = {
    'sentence': np.array([10, 11, 12, 13], dtype=np.int32),
    'prefix_sentence': '5 6 7',
    'suffix_style': 'formal',
    'original_style': 'informal',
    'sent1_tokens': [5, 6, 7],
    'sent2_tokens': [10, 11, 12, 13]
}

args = SimpleArgs()

ARGS = {
    'args': args,
    'config': config,
    'instance_dict': instance_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type InverseInstance — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InverseInstance 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
datum_to_dict Ran
ran; our contract draft was wrong, not the code
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("00fe2bc10e1c057f")
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
import numpy as np

class SimpleTokenizer:
    def tokenize(self, text):
        return text.split()
    
    def convert_tokens_to_ids(self, tokens):
        return [hash(token) % 1000 for token in tokens]

config = {
    'keys': [
        {
            'position': 0,
            'key': 'text_field',
            'tokenize': True,
            'metadata': True
        },
        {
            'position': 1,
            'key': 'label_field',
            'tokenize': False,
            'metadata': True
        }
    ]
}

datum = [
    'hello world example',
    'positive'
]

tokenizer = SimpleTokenizer()

ARGS = {
    'config': config,
    'datum': datum,
    'tokenizer': tokenizer
}
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 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
get_label_dict Ran
ran; our contract draft was wrong, not the code
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("2bbb692e4df7275d")
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 tuple, ndim 1, dtype family float; 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 tempfile
import os

# Create a temporary directory with a dict.txt file
temp_dir = tempfile.mkdtemp()
dict_file_path = os.path.join(temp_dir, 'dict.txt')

# Write a sample dict.txt file with some labels
with open(dict_file_path, 'w') as f:
    f.write('label1 some_info\n')
    f.write('label2 some_info\n')
    f.write('madeupword should_be_skipped\n')
    f.write('label3 some_info\n')

ARGS = {
    'data_dir': temp_dir
}
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 tuple, ndim 1, dtype family float — 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
left_padding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("0f4714b5270ebbcb")
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 ndarray, ndim 1, dtype family int, shape (10,) 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 numpy as np

# Construct arguments for left_padding function
data = np.array([1, 2, 3, 4, 5])
pad_token = 0
total_length = 10

ARGS = {
    "data": data,
    "pad_token": pad_token,
    "total_length": total_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) 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
limit_dataset_size Ran
ran; our contract draft was wrong, not the code
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("0c411c0cbc455a4f")
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. 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 logging

logging.basicConfig(level=logging.INFO)

class SimpleDataset:
    """Stand-in dataset class that supports slicing."""
    def __init__(self, data):
        self.data = data
    
    def __getitem__(self, idx):
        return self.data[idx]
    
    def __len__(self):
        return len(self.data)

# Create a simple dataset with 10 examples
dataset_data = [
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
]

dataset = SimpleDataset(dataset_data)

ARGS = {
    "dataset": dataset,
    "limit_examples": 5
}
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 — a list 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
limit_styles Ran
ran; our contract draft was wrong, not the code
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("edd024a002d4a67a")
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 float; 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 logging

logger = logging.getLogger(__name__)

# Create a small dataset with the required structure
dataset = [
    {'suffix_style': 0, 'text': 'sample text 1'},
    {'suffix_style': 1, 'text': 'sample text 2'},
    {'suffix_style': 0, 'text': 'sample text 3'},
    {'suffix_style': 2, 'text': 'sample text 4'},
]

# Create a reverse_label_dict mapping style IDs to author names
reverse_label_dict = {
    0: 'author_a',
    1: 'author_b',
    2: 'author_c',
}

# Define arguments for the function
ARGS = {
    'dataset': dataset,
    'specific_style_train': '0,1',
    'split': 'train',
    'reverse_label_dict': reverse_label_dict,
}
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 list, ndim 1, dtype family float — 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
right_padding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("9649a6762f963f5f")
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 ndarray, ndim 1, dtype family int, shape (10,) 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 numpy as np

# Construct arguments for right_padding function
data = np.array([1, 2, 3, 4, 5])
pad_token = 0
total_length = 10

ARGS = {
    "data": data,
    "pad_token": pad_token,
    "total_length": total_length
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) 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
string_to_ids Ran
ran, honoured the contract we drafted
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("b7409c44eb4a2139")
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
import torch.nn as nn

class MockTokenizer:
    def __init__(self):
        self.vocab = {
            'hello': 101,
            'world': 102,
            '[CLS]': 103,
            '[SEP]': 104,
            '!': 105,
        }
    
    def tokenize(self, text):
        # Simple tokenization: split on spaces and punctuation
        tokens = text.lower().split()
        result = []
        for token in tokens:
            if token in self.vocab:
                result.append(token)
            else:
                # Handle unknown tokens by breaking into characters
                for char in token:
                    if char in self.vocab:
                        result.append(char)
        return result if result else ['hello']
    
    def convert_tokens_to_ids(self, tokens):
        return [self.vocab.get(token, 100) for token in tokens]

text = "hello world"
tokenizer = MockTokenizer()

ARGS = {
    'text': text,
    'tokenizer': tokenizer,
}
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
InverseParaphraseDatasetText Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("e7079d8451ccc4d5")
How it ran

no invocation recorded.

ParaphraseDatasetText Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("da589bfb4f6b001e")
How it ran

no invocation recorded.

_rotate_checkpoints Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("dccd30ac77058a66")
How it ran

no invocation recorded.

evaluate Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("ac6daf9ad34bb23b")
How it ran

no invocation recorded.

get_global_dense_features Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("a7dee514f4d344df")
How it ran

no invocation recorded.

load_and_cache_examples Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("f9b01438cd540c30")
How it ran

no invocation recorded.

save_model Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("aae21f24cb4514be")
How it ran

no invocation recorded.

set_seed Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("6f807f86c26692bd")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("dc55a6c3d8f5d0f0")
How it ran

no invocation recorded.

update_config Not yet run
unverified (harvested, no recorded run)
martiansideofthemoon/style-transfer-paraphrase/style_paraphrase/run_lm_finetuning.py
code served (permissive licence) · get_code("7c7abf4a7961c307")
How it ran

no invocation recorded.

Also present in other papers' code

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

Modern NLP defines the task of style transfer as modifying the style of a given sentence without appreciably changing its semantics, which implies that the outputs of style transfer systems should be paraphrases of their inputs. However, many existing systems purportedly designed for style transfer inherently warp the input's meaning through attribute transfer, which changes semantic properties such as sentiment. In this paper, we reformulate unsupervised style transfer as a paraphrase generation problem, and present a simple methodology based on fine-tuning pretrained language models on automatically generated paraphrase data. Despite its simplicity, our method significantly outperforms state-of-the-art style transfer systems on both human and automatic evaluations. We also survey 23 style transfer papers and discover that existing automatic metrics can be easily gamed and propose fixed variants. Finally, we pivot to a more real-world style transfer setting by collecting a large dataset of 15M sentences in 11 diverse styles, which we use for an in-depth analysis of our system.

For agents

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

get_harvested_code_for_paper("2010.05700")
get_code_for_paper("2010.05700")
have("2010.05700")

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

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

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

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

Connect an agent — have() is free.