Papers › MGTBench: Benchmarking Machine-Generated Text Detection

MGTBench: Benchmarking Machine-Generated Text Detection

26 Mar 2023arXiv:2303.14822archive 2025-07-28

Xinlei He, Xinyue Shen, Zeyuan Chen, Michael Backes, Yang Zhang

Nowadays, powerful large language models (LLMs) such as ChatGPT have demonstrated revolutionary power in a variety of tasks. Consequently, the detection of machine-generated texts (MGTs) is becoming increasingly crucial as LLMs become more advanced and prevalent. These models have the ability to generate human-like language, making it challenging to discern whether a text is authored by a human or a machine. This raises concerns regarding authenticity, accountability, and potential bias. However, existing methods for detecting MGTs are evaluated using different model architectures, datasets, and experimental settings, resulting in a lack of a comprehensive evaluation framework that encompasses various methodologies. Furthermore, it remains unclear how existing detection methods would perform against powerful LLMs. In this paper, we fill this gap by proposing the first benchmark framework for MGT detection against powerful LLMs, named MGTBench. Extensive evaluations on public datasets with curated texts generated by various powerful LLMs such as ChatGPT-turbo and Claude demonstrate the effectiveness of different detection methods. Our ablation study shows that a larger number of words in general leads to better performance and most detection methods can achieve similar performance with much fewer training samples. Moreover, we delve into a more challenging task: text attribution. Our findings indicate that the model-based detection methods still perform well in the text attribution task. To investigate the robustness of different detection methods, we consider three adversarial attacks, namely paraphrasing, random spacing, and adversarial perturbations. We discover that these attacks can significantly diminish detection effectiveness, underscoring the critical need for the development of more robust detection methods.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2303.14822")

Code

Syntology Ran 8 of 26 code samples harvested from 3 repositories linked to this paper; 18 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 7 ran with no contract checked.

By repository: community (archive-listed): 26 samples from 3 repositories, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

xinleihe/mgtbench officialmentioned in papermentioned on GitHubpytorchMIT report
kinit-sk/imgtb mentioned on GitHubpytorch report
michalspiegel/imgtb mentioned on GitHubpytorchMIT report
trustairlab/mgtbench mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

26 samples harvested; 8 ran; 0 honoured the contract we drafted; 18 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
7ran
18unverified

Licence: 0 of the 26 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_supervised_model_prediction_multi_classes michalspiegel/imgtb/methods/abstract_methods/supervised_experiment.py community (archive-listed) ran MIT (permissive) · 68c8b968f55907b7 · report
make_method_names_unique michalspiegel/imgtb/results_analysis.py community (archive-listed) ran MIT (permissive) · 8709358702e01ea5 · report
read_multiple_to_pandas michalspiegel/imgtb/lib/dataset_loader.py community (archive-listed) ran MIT (permissive) · d4bc8c999e20811c · report
run_all_available kinit-sk/imgtb/benchmark.py community (archive-listed) ran · our draft was wrong MIT (permissive) · c032d17914012abc · report
select_train_data michalspiegel/imgtb/methods/utils.py community (archive-listed) ran MIT (permissive) · 416e7dabab64e070 · report
set_pos_bit michalspiegel/imgtb/methods/abstract_methods/supervised_experiment.py community (archive-listed) ran MIT (permissive) · 16e5e8f717e9e63b · report
timeit michalspiegel/imgtb/methods/utils.py community (archive-listed) ran MIT (permissive) · 58ba64be72bc1b9e · report
tokenize_and_mask michalspiegel/imgtb/methods/abstract_methods/pertubation_based_experiment.py community (archive-listed) ran MIT (permissive) · 639b00cb6787d6d0 · report
check_period trustairlab/mgtbench/dataset_loader.py community (archive-listed) unverified MIT (permissive) · ca626759d96b1cf5 · report
count_masks michalspiegel/imgtb/methods/abstract_methods/pertubation_based_experiment.py community (archive-listed) unverified MIT (permissive) · 23c3416429f69fee · report
filter_test_data michalspiegel/imgtb/methods/utils.py community (archive-listed) unverified MIT (permissive) · 3409c93cd092820c · report
get_ll trustairlab/mgtbench/methods/metric_based.py community (archive-listed) unverified MIT (permissive) · 3c45c72617228b17 · report
get_lls trustairlab/mgtbench/methods/metric_based.py community (archive-listed) unverified MIT (permissive) · a82535fe98a7e04b · report
get_rank trustairlab/mgtbench/methods/metric_based.py community (archive-listed) unverified MIT (permissive) · 0c7cd9182dadcefb · report
get_supervised_model_prediction michalspiegel/imgtb/methods/abstract_methods/supervised_experiment.py community (archive-listed) unverified MIT (permissive) · ffed340b4b1b0302 · report
get_supervised_model_prediction trustairlab/mgtbench/methods/supervised.py community (archive-listed) unverified MIT (permissive) · c4c6872281f5e3a2 · report
load_TruthfulQA michalspiegel/imgtb/lib/dataset_loader_attribution.py community (archive-listed) unverified MIT (permissive) · 2eeb7e1b194357da · report
load_multiple_from_file michalspiegel/imgtb/lib/dataset_loader.py community (archive-listed) unverified MIT (permissive) · 5badef7a89b1732c · report
prim_tree trustairlab/mgtbench/methods/IntrinsicDim.py community (archive-listed) unverified MIT (permissive) · 595d1d025c7e692d · report
process_spaces michalspiegel/imgtb/lib/dataset_loader_attribution.py community (archive-listed) unverified MIT (permissive) · c5d3444c3ea71db9 · report
process_string trustairlab/mgtbench/methods/IntrinsicDim.py community (archive-listed) unverified MIT (permissive) · ad5f00016ee9222a · report
process_text_truthfulqa_adv michalspiegel/imgtb/lib/dataset_loader_attribution.py community (archive-listed) unverified MIT (permissive) · dd7573db30a9bd4e · report
read_dir_to_pandas michalspiegel/imgtb/lib/dataset_loader.py community (archive-listed) unverified MIT (permissive) · 9db5a280b863548b · report
replace_masks michalspiegel/imgtb/methods/abstract_methods/pertubation_based_experiment.py community (archive-listed) unverified MIT (permissive) · 3b992344e4b4f98b · report
select_train_data trustairlab/mgtbench/methods/utils.py community (archive-listed) unverified MIT (permissive) · c116b3bbce725a3d · report
tokenize_and_mask trustairlab/mgtbench/methods/detectgpt.py community (archive-listed) unverified MIT (permissive) · 4fed12f8c019459e · report

Tasks

BenchmarkingQuestion AnsweringSentiment AnalysisText ClassificationText Detectiontext-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections