SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.15004 · 2023

LLMDet: A Third Party Large Language Models Generated Text Detection Tool

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 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 0 have no contract verdict; 1 failure 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/2305.15004.json · badge: /api/ran/2305.15004.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
trustedllm/llmdet canonical (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
FunctionStatusWhere it lives
perplexity Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
trustedllm/llmdet/llmdet/detector.py
code served (permissive licence) · get_code("77f51d6b5b8208af")
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 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 numpy as np
import math

# Build n_grams_probability structure
# The function expects a dict with keys 0-5 containing n-gram data
# Keys 0, 2, 4 map n-gram tuples to numpy arrays of next token IDs
# Keys 1, 3, 5 map n-gram tuples to numpy arrays of probabilities

n_grams_probability = {}

# 1-gram (unigram): key 0 -> next tokens, key 1 -> probabilities
n_grams_probability[0] = {
    (5,): np.array([10, 11, 12]),
    (6,): np.array([13, 14]),
}
n_grams_probability[1] = {
    (5,): np.array([0.3, 0.4, 0.2]),
    (6,): np.array([0.5, 0.3]),
}

# 2-gram (bigram): key 2 -> next tokens, key 3 -> probabilities
n_grams_probability[2] = {
    (5, 10): np.array([11, 12, 13]),
    (6, 14): np.array([15, 16]),
}
n_grams_probability[3] = {
    (5, 10): np.array([0.25, 0.35, 0.3]),
    (6, 14): np.array([0.4, 0.4]),
}

# 3-gram (trigram): key 4 -> next tokens, key 5 -> probabilities
n_grams_probability[4] = {
    (5, 10, 11): np.array([12, 13, 14]),
    (6, 14, 15): np.array([16, 17]),
}
n_grams_probability[5] = {
    (5, 10, 11): np.array([0.2, 0.3, 0.4]),
    (6, 14, 15): np.array([0.5, 0.3]),
}

# Build text_set_token_ids - list of token ID sequences
text_set_token_ids = [
    [5, 10, 11, 12, 13, 14, 15],
    [6, 14, 15, 16, 17, 18, 19],
]

# Vocabulary size
vocab_size = 100

ARGS = {
    "text_set_token_ids": text_set_token_ids,
    "n_grams_probability": n_grams_probability,
    "vocab_size": vocab_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, tqdm — 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
generate Not yet run
unverified (harvested, no recorded run)
trustedllm/llmdet/main-experiment/run_main.py
code served (permissive licence) · get_code("0985978d9c86c7ad")
How it ran

no invocation recorded.

generate_seq2seq Not yet run
unverified (harvested, no recorded run)
trustedllm/llmdet/main-experiment/run_main.py
code served (permissive licence) · get_code("013b74b1329e7d23")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 3 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 0 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
generate 1 other paper
1 same year, order not determinable
2023.findings-emnlp.139 (2023 (year only))
LLMDet: A Third Party Large Language Models Generated Text Detection Tool
generate_seq2seq 1 other paper
1 same year, order not determinable
2023.findings-emnlp.139 (2023 (year only))
LLMDet: A Third Party Large Language Models Generated Text Detection Tool
perplexity 1 other paper
1 same year, order not determinable
2023.findings-emnlp.139 (2023 (year only))
LLMDet: A Third Party Large Language Models Generated Text Detection Tool

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

Generated texts from large language models (LLMs) are remarkably close to high-quality human-authored text, raising concerns about their potential misuse in spreading false information and academic misconduct. Consequently, there is an urgent need for a highly practical detection tool capable of accurately identifying the source of a given text. However, existing detection tools typically rely on access to LLMs and can only differentiate between machine-generated and human-authored text, failing to meet the requirements of fine-grained tracing, intermediary judgment, and rapid detection. Therefore, we propose LLMDet, a model-specific, secure, efficient, and extendable detection tool, that can source text from specific LLMs, such as GPT-2, OPT, LLaMA, and others. In LLMDet, we record the next-token probabilities of salient n-grams as features to calculate proxy perplexity for each LLM. By jointly analyzing the proxy perplexities of LLMs, we can determine the source of the generated text. Experimental results show that LLMDet yields impressive detection performance while ensuring speed and security, achieving 98.54% precision and x5.0 faster for recognizing human-authored text. Additionally, LLMDet can effortlessly extend its detection capabilities to a new open-source model. We will provide an open-source tool at https://github.com/TrustedLLM/LLMDet.

For agents

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

get_harvested_code_for_paper("2305.15004")
get_code_for_paper("2305.15004")
have("2305.15004")

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

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

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

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

Connect an agent — have() is free.