Source-linked AI summary
MGTBench: Benchmarking Machine-Generated Text Detection
Xinlei He, Xinyue Shen, Zeyuan Chen, Michael Backes, Yang Zhang
TL;DR
MGTBench addresses the lack of a comprehensive evaluation framework for detecting machine-generated text from powerful LLMs. It benchmarks metric- and model-based methods across datasets, models, attribution, and adversarial settings, finding strong performance from the LM Detector but substantial vulnerability to attacks and short texts.
Problem
Existing MGT detection methods have been evaluated with different models, datasets, and settings, leaving their performance against powerful LLMs insufficiently assessed.
Method
MGTBench is a modular benchmark that evaluates detection methods on human- and LLM-generated texts across datasets, models, attribution, and adversarial attacks.
Results
The LM Detector consistently excels across datasets, model-based methods outperform metric-based methods for attribution, and adversarial attacks substantially reduce detection effectiveness.
Takeaways & Limitations
Detection performance improves with longer texts and can remain satisfactory with fewer training samples, while robust detection against adversarial attacks remains necessary.
Takeaways & Limitations
The study covers six representative LLMs and thirteen detection methods across three datasets, while newer approaches such as prompt tuning and in-context learning remain for future integration.
Abstract
from arXiv · showhide
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.
1 Introduction
MGTBench addresses the need for holistic evaluation of machine-generated text detection against powerful LLMs. Its evaluations identify strong detection performance while exposing weaknesses in short texts, training-data requirements, attribution, and adversarial robustness.
- 1 Introduction: The LM Detector outperforms other detection methods in both machine-generated text detection and text attribution tasks.The broader evaluation covers 13 detection methods, 6 LLMs, and 3 benchmark datasets.
- 1 Introduction: Longer texts generally improve detection, with 200 words sufficient for satisfactory performance, while most methods remain comparable with far fewer training samples.For example, Log-Likelihood reaches 0.967 F1-score with 10 training samples versus 0.970 with full training data on the cited task.
- 1 Introduction: Model-based methods perform much better than metric-based methods for the more challenging text attribution task.On Essay, LM Detector achieves 0.927 F1-score, compared with 0.208 for Rank and 0.387 for GLTR.
- 1 Introduction: Paraphrasing, random spacing, and adversarial perturbation substantially reduce the effectiveness of current detection methods.The findings identify adversarial robustness as a major unresolved challenge for MGT detection.
- 1 Introduction: MGTBench benchmarks machine-generated text detection and attribution against powerful LLMs using a modular framework.The framework integrates detection methods, datasets, and models for broader evaluation.
2 Preliminary and Related Work
The paper situates MGT detection within advances in LLM text generation and distinguishes metric-based from model-based approaches. It reviews representative methods and emphasizes broader evaluation across powerful LLMs.
- 2.1 Text Generation with Large Language Models: Recent transformer-based LLMs, including GPT-series models and ChatGPT, generate coherent, contextually appropriate, and human-like text across many tasks.ChatGPT builds on GPT-3.5 and uses reinforcement learning from human feedback to improve generation.
- 2.2 Machine-Generated Text Detection: MGT detection methods divide into metric-based approaches that extract statistical features and model-based approaches trained on human- and machine-written texts.Metric-based features include word rank and entropy, whereas model-based methods use classification models.
- 2.2 Machine-Generated Text Detection: The reviewed metric-based methods include Log-Likelihood, Rank, Log-Rank, Entropy, GLTR, DetectGPT, LRR, and NPR.These methods use likelihood, rank, entropy, perturbation, or combinations of complementary signals.
- 2.2 Machine-Generated Text Detection: The study extends prior work by integrating more detection methods and evaluating them against powerful LLMs such as ChatGPT-turbo and Claude.This broader scope targets performance and robustness across a wider range of LLMs.
3 MGTBench
MGTBench is a modular framework for benchmarking MGT detection methods. Its input, detection, and evaluation modules standardize dataset handling, method integration, and performance analysis.
- 3 MGTBench: MGTBench provides input, detection, and evaluation modules for benchmarking machine-generated text detection methods.The modules collectively support dataset preparation, standardized method interfaces, and performance measurement.
- 3 MGTBench: The input module supports dataset-specific preprocessing and compatibility with datasets from HuggingFace.This design facilitates incorporating datasets for future users and developments.
- 3 MGTBench: The detection module standardizes inputs and outputs for metric-based and model-based methods.The current implementation supports ten detection methods.
- 3 MGTBench: The evaluation module reports accuracy, precision, recall, F1-score, and AUC, with sample-level logging for detailed analysis.These metrics support classification assessment and more granular inspection of results.
- 3.2 Using MGTBench: MGTBench is designed to support reusable datasets, new detection methods, and updates through standardized APIs and HuggingFace integration.The framework is intended for both dataset risk assessment and evaluation of new detection or generation methods.
4 Experimental Settings
The experiments evaluate detection methods on human-written and LLM-generated texts across three datasets and six representative LLMs. The setup includes binary detection, text attribution, and multiple evaluation metrics.
- 4.1 Datasets: The study uses Essay, WP, and Reuters datasets containing human-written texts and LLM-generated texts.Each dataset includes human text and generated text obtained by querying LLMs with constructed prompts.
- 4.1 Datasets: Each dataset entry supplies one human text and six LLM-generated texts, with entries split into 80% training and 20% testing sets.Only entries with more than one word in both human and generated texts are retained.
- 4.2 Detection Methods: The primary task is binary classification between human-written text and text generated by each individual LLM, while text attribution identifies the precise generating model.The attribution task is treated as a more complex extension of detection.
- 4.2 Detection Methods: The experiments use GPT2-medium for metric extraction with logistic regression, while model-based methods rely on publicly available pretrained detectors.The model-based methods include OpenAI Detector, ChatGPT Detector, LM Detector, and ConDA among the reviewed approaches.
- 4.3 Evaluation Metrics: MGTBench supports accuracy, precision, recall, F1-score, and AUC, with F1-score used as the main metric unless otherwise stated.The framework therefore supports multiple views of classification performance.
5 Evaluation
Across benchmark evaluations, LM Detector generally achieves the strongest detection performance, while robustness varies with text length, training data, datasets, and language models. Model-based methods perform better for text attribution, but adversarial perturbations can sharply reduce detection effectiveness.
- MGT Detection: LM Detector generally achieves the best detection performance, including 0.993 F1-score against ChatGPT-turbo on Essay.Log-Likelihood reaches 0.968 on the same task, while LM Detector also maintains relatively low time cost compared with slower methods.
- Ablation Studies: Larger texts improve detection, with 200 words generally sufficient for near-best performance; Claude detection reached 0.800 at 200 words versus 0.834 on full-length texts.For ChatGLM with Entropy, F1-score increased from 0.150 at 10 words to 0.809 at 200 words.
- Ablation Studies: Ten training samples often suffice for metric-based methods, whereas LM Detector improved from 0.121 with 10 samples to 0.984 with full training data.Log-Likelihood reached 0.967 with 10 samples compared with 0.970 using full training data for ChatGLM.
- Ablation Studies: Transferability differs by dataset: WP transfers best and Reuters worst, while model-based methods are relatively robust across dataset shifts.LM Detector trained on Essay dropped 0.010 on WP and 0.144 on Reuters, whereas Entropy dropped 0.285 and 0.139.
- Ablation Studies: Metric-based methods are more robust across language-model shifts, while OpenAI Detector achieved 0.941 F1-score when trained on ChatGPT-turbo and tested on Claude.The OpenAI Detector’s performance dropped only 0.034 in that transfer setting.
- Text Attribution: Model-based methods outperform metric-based methods for text attribution, although attribution remains challenging for some source categories such as Dolly.ConDA achieved 0.926 F1-score on WP, and model-based methods exceeded 0.928 accuracy for identifying human texts.
- Adversarial Robustness: Adversarial perturbation was the most effective tested attack, degrading LM Detector’s Essay F1-score by 0.97 against ChatGPT-turbo.The evaluation measured attack effectiveness through F1-score degradation.
6 Limitations and Discussions
The study is limited to selected LLMs, detection methods, and datasets, while recognizing that broader domains and newer approaches remain important directions. It also discusses the security relevance and broader research implications of standardized MGT evaluation.
- Choice of LLM/Methods/Datasets: The study covers 6 representative LLMs, 13 detection methods, and 3 benchmark datasets, limiting its empirical scope.The authors note that experiments with newer billion-parameter LLMs were beyond their technical capabilities.
- Choice of LLM/Methods/Datasets: The implemented methods mainly use predefined metrics or pretrained language models, leaving prompt tuning and in-context learning for future integration.The modular design is presented as enabling later expansion with new methods and LLMs.
- Choice of LLM/Methods/Datasets: The current datasets span news articles and creative prompts but do not cover all domains, topics, word counts, or languages.
- Security Implication: MGT detection has security relevance because it may help address automated misinformation, phishing, and scam messages generated with AI.The paper frames these applications as security implications rather than evaluated outcomes.
- Broader Implication in Generative AI: MGTBench provides a uniform platform for comparing detection methods and may guide refinement of both detection techniques and generative models.
7 Conclusion
MGTBench systematically evaluates machine-generated text detectors against powerful LLMs and extends the analysis to text attribution and adversarial robustness. The results identify method-specific strengths while exposing substantial vulnerability to attacks.
- Conclusion: LM Detector consistently excels across datasets, while metric-based methods adapt better across LLMs and model-based methods transfer better across datasets.
- Conclusion: Model-based methods significantly outperform metric-based methods on the more complex text attribution task.The paper attributes this advantage to better capture of semantic and syntactic nuances.
- Conclusion: Paraphrasing, random spacing, and adversarial perturbation expose pronounced vulnerabilities across detection methods, motivating more robust approaches.
- Conclusion: MGTBench integrates detection methods and datasets in a modular framework intended to accelerate future research on detection and LLM training.