SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.12672 · 2022

Real or Fake Text?: Investigating Human Ability to Detect Boundaries Between Human-Written and Machine-Generated Text

arXiv · PDF · Open in the Atlas

Code that ran

12 of 14 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 12 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2212.12672.json · badge: /api/ran/2212.12672.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
liamdugan/human-detection canonical (classifier label)
classifier basis not recorded on the link
12 ran · 2 no recorded run
FunctionStatusWhere it lives
clean Ran
ran on a synthesized input
liamdugan/human-detection/generation/process_datasets/process-NYT.py
code served (permissive licence) · get_code("0728fceba9b35f2c")
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 torch.nn as nn

torch.manual_seed(0)

# The function 'clean' takes a single parameter 'text' which is a string.
# It performs string operations: replace('\n', ' '), replace('\r', ''), and concatenates '\n'
# So we need to provide a string as the 'text' parameter.

text_input = "Hello\nWorld\rTest"

ARGS = {
    'text': text_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 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
cutoff_prompt Ran
ran on a synthesized input
liamdugan/human-detection/generation/inference_scripts/roft_ctrl_generator.py
code served (permissive licence) · get_code("e3b1a763e169ffeb")
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

ARGS = {
    "prompt": "This is a test prompt for generation. It contains some text.",
    "generation": "This is a test prompt for generation. It contains some text. And here is the generated output that follows the prompt."
}
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 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
determine_outfile Ran
ran on a synthesized input
liamdugan/human-detection/generation/process_datasets/process-Reddit.py
code served (permissive licence) · get_code("3eb12ffcbdba4d96")
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 os
import random
import re

pretraining_output_file_path = './processed/reddit-stories-train.txt'
dev_output_file_path = './processed/reddit-stories-dev.txt'
sampling_output_file_path = './processed/reddit-stories-test.txt'

def determine_outfile(filename):
    if 'train' in filename:
        return pretraining_output_file_path
    elif random.random() < 0.5:
        return dev_output_file_path
    else:
        return sampling_output_file_path

ARGS = {
    'filename': 'train_data.txt'
}
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
fix_quotation_marks Ran
ran on a synthesized input
liamdugan/human-detection/generation/inference_scripts/roft_gpt2_generator.py
code served (permissive licence) · get_code("3d784c8b761ec9af")
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 torch

# The function takes a list of strings (generation) and processes quotation marks
# It doesn't use torch, numpy, scipy, or any ML models - it's just string processing
# Let's create a valid test case

ARGS = {
    "generation": [
        "Hello world",
        '"',
        "This is a quote",
        "More text",
        '"',
        "End"
    ]
}
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 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
get_outfile Ran
ran on a synthesized input
liamdugan/human-detection/generation/process_datasets/process-NYT.py
code served (permissive licence) · get_code("e7e6275255e634a0")
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 os
import json
import random

# The function get_outfile takes a single parameter: filename
# Looking at the function body, it:
# 1. Generates a random number
# 2. Returns one of three hardcoded file paths based on the random value
# The filename parameter is not actually used in the function body

# Set seed for reproducibility
random.seed(0)

# Create the ARGS dictionary with the required parameter
ARGS = {
    'filename': 'test_article.txt'
}
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
is_percentage Ran
ran on a synthesized input
liamdugan/human-detection/processing/filter_data.py
code served (permissive licence) · get_code("ab69574664018456")
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 collections

# The function is_percentage takes:
# 1. annotations: a list/iterable that will be passed to collections.Counter
#    The counter checks for keys 0-9 (digits), so annotations should contain integers 0-9
# 2. percentage: a float between 0 and 1 (used for >= comparison)

# Create a list of digit annotations
annotations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2]  # Some digits repeated to test percentage logic

# Create a percentage threshold (e.g., 0.15 means 15%)
percentage = 0.15

ARGS = {
    "annotations": annotations,
    "percentage": percentage,
}
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
makedirs Ran
ran on a synthesized input
liamdugan/human-detection/generation/process_datasets/process-NYT.py
code served (permissive licence) · get_code("4e8d6dbed9143eea")
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 os
import tempfile

def makedirs(filename):
    """ https://stackoverflow.com/a/12517490 """
    if not os.path.exists(os.path.dirname(filename)):
        try:
            os.makedirs(os.path.dirname(filename))
        except OSError as exc:
            if exc.errno != errno.EEXIST:
                raise
    return filename

# Create a temporary directory to use as base
temp_dir = tempfile.gettempdir()
test_filename = os.path.join(temp_dir, "test_subdir", "test_file.txt")

ARGS = {
    "filename": test_filename
}
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
parse_file Ran
ran on a synthesized input
liamdugan/human-detection/generation/process_datasets/process-Speeches.py
code served (permissive licence) · get_code("8a6414ef46ee5bc8")
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 os
import json
import random
import re
import tempfile

# Create a temporary file with valid XML-like content for testing
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_speech.txt")

# Write test data with proper title and date tags
test_content = """<title="The State of the Union">
<date="January 20, 2021">
This is the body of the speech.
It contains multiple lines of text.
And more content here."""

with open(temp_file, 'w') as f:
    f.write(test_content)

# Define the arguments for parse_file function
ARGS = {
    'path': temp_file,
    'president': 'John Doe'
}
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
remap_familiarity_labels Ran
ran on a synthesized input
liamdugan/human-detection/processing/process_database_dump.py
code served (permissive licence) · get_code("dc5677aaab1a689d")
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 numpy as np

# Analyze the function: remap_familiarity_labels takes a single parameter x
# and performs string comparisons to return an integer value.
# The function expects x to be a string (or at least something comparable to strings).

ARGS = {
    "x": "I've used them before (either with the OpenAI API, HuggingFace Transformers, etc.)."
}
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 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
remap_genre_fam_labels Ran
ran on a synthesized input
liamdugan/human-detection/processing/process_database_dump.py
code served (permissive licence) · get_code("03dae20394246fc3")
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)

ARGS = {
    'x': 'Daily'
}
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
roft_prompts_json_to_dataset Ran
ran on a synthesized input
liamdugan/human-detection/generation/finetuning_scripts/roft_gpt2_finetuning.py
code served (permissive licence) · get_code("e4ec01aaf7c17a31")
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 Dataset. 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
from datasets import Dataset

# Create a temporary JSON file with the expected structure
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)
data = {
    'prompts': [
        ['hello', 'world'],
        ['foo', 'bar', 'baz'],
        ['test', 'prompt']
    ]
}
json.dump(data, temp_file)
temp_file.close()

ARGS = {
    'file_path': temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset 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
sliding_window Ran
ran on a synthesized input
liamdugan/human-detection/processing/filter_data.py
code served (permissive licence) · get_code("6e414eceb5070e90")
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 set. 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
import collections

# Create a minimal DataFrame that sliding_window expects
# The function filters by 'annotator', sorts by 'date', and accesses 'predicted_boundary_index'
data = {
    'annotator': ['Alice', 'Alice', 'Alice', 'Alice', 'Bob', 'Bob'],
    'date': pd.to_datetime(['2023-01-01', '2023-01-02', '2023-01-03', '2023-01-04', '2023-01-01', '2023-01-02']),
    'predicted_boundary_index': [1, 2, 3, 1, 5, 6]
}
df = pd.DataFrame(data)

# Parameters for sliding_window
annotator = 'Alice'
percentage = 0.5  # 50% threshold
n = 2  # window size

ARGS = {
    'df': df,
    'annotator': annotator,
    'percentage': percentage,
    'n': n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
content_filter Not yet run
unverified (harvested, no recorded run)
liamdugan/human-detection/generation/content_filter.py
code served (permissive licence) · get_code("036b76d1aab8ff74")
How it ran

no invocation recorded.

download_sampling_file Not yet run
unverified (harvested, no recorded run)
liamdugan/human-detection/generation/finetuning_scripts/roft_gpt2_finetuning.py
code served (permissive licence) · get_code("188bfe6cd3c544b2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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
content_filter 1 other paper
1 dated earlier
1911.00650 (2019-11)
Automatic Detection of Generated Text is Easiest when Humans are Fooled
cutoff_prompt 1 other paper
1 dated earlier
1911.00650 (2019-11)
Automatic Detection of Generated Text is Easiest when Humans are Fooled
download_sampling_file 1 other paper
1 dated earlier
1911.00650 (2019-11)
Automatic Detection of Generated Text is Easiest when Humans are Fooled
fix_quotation_marks 1 other paper
1 dated earlier
1911.00650 (2019-11)
Automatic Detection of Generated Text is Easiest when Humans are Fooled
roft_prompts_json_to_dataset 1 other paper
1 dated earlier
1911.00650 (2019-11)
Automatic Detection of Generated Text is Easiest when Humans are Fooled

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

As text generated by large language models proliferates, it becomes vital to understand how humans engage with such text, and whether or not they are able to detect when the text they are reading did not originate with a human writer. Prior work on human detection of generated text focuses on the case where an entire passage is either human-written or machine-generated. In this paper, we study a more realistic setting where text begins as human-written and transitions to being generated by state-of-the-art neural language models. We show that, while annotators often struggle at this task, there is substantial variance in annotator skill and that given proper incentives, annotators can improve at this task over time. Furthermore, we conduct a detailed comparison study and analyze how a variety of variables (model size, decoding strategy, fine-tuning, prompt genre, etc.) affect human detection performance. Finally, we collect error annotations from our participants and use them to show that certain textual genres influence models to make different types of errors and that certain sentence-level features correlate highly with annotator selection. We release the RoFT dataset: a collection of over 21,000 human annotations paired with error classifications to encourage future work in human detection and evaluation of generated text.

For agents

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

get_harvested_code_for_paper("2212.12672")
get_code_for_paper("2212.12672")
have("2212.12672")

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

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

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

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

Connect an agent — have() is free.