TL;DR
As large language models (LLMs) produce increasingly fluent text, distinguishing between human and AI-generated content has become a high-stakes game of cat-and-mouse. This paper introduces a robust, model-agnostic detector based on a fascinating geometric property: the intrinsic dimension of text embeddings. The authors discover that human-written text consistently occupies a higher-dimensional manifold than AI-generated text, providing a stable signature for artificial text detection that resists paraphrase attacks and reduces bias against non-native speakers.
What Problem Does This Paper Address?
Existing Artificial Text Detection (ATD) methods struggle with generalization. Supervised classifiers excel at identifying text from the specific model they were trained on, but their accuracy plummets when faced with a new LLM or a different text domain. Zero-shot methods like DetectGPT require access to the generating model's internal probabilities, which is impractical for closed-source commercial APIs. Furthermore, common detectors can be easily bypassed using paraphrasing tools (like DIPPER) and exhibit a troubling bias—frequently misclassifying essays written by non-native English speakers as AI-generated.
The authors address the need for a universal, robust invariant: a property inherent to human language that remains stable across domains, languages, and author proficiency levels, yet clearly separates natural text from machine generations.
Methods
The core idea is to analyze the global geometry of a text sample by treating its token embeddings as a point cloud in Euclidean space.
- Embedding Extraction: The text is passed through a standard pretrained Transformer encoder (RoBERTa-base for English, XLM-R for other languages) to obtain contextualized embeddings for each token.
- Intrinsic Dimension (ID) Estimation: To find the true dimensionality of the manifold underlying these points, the authors leverage Persistent Homology Dimension (PHD) estimation. This topological data analysis technique calculates the dimension based on the growth rate of a Minimal Spanning Tree (MST) constructed over subsets of the point cloud.
- Classification: Unlike complex neural network classifiers, the final detector is a simple, single-feature logistic regression model that thresholds the estimated intrinsic dimension.
Compared to other fractal dimension estimators (like MLE or TwoNN), PHD combines both local and global properties of the dataset, making it uniquely sample-efficient and resilient to noise.
Datasets
The authors evaluated their approach across multiple datasets and languages:
- Human Benchmarks: Wiki40b (Wikipedia articles) and the WritingPrompts dataset (Reddit fiction stories).
- AI Generations: Text generated by GPT-2 XL, OPT-13b, and GPT-3.5 (text-davinci-003) using prompts from Wikipedia, Reddit, and StackExchange.
- WikiM: A new multilingual dataset introduced by the authors, featuring text generated by GPT-3.5-turbo across 10 different languages using Wikipedia headers as prompts.
- Bias Evaluation: A dataset of student essays (TOEFL essays by non-native speakers) originally compiled by Liang et al. (2023).
Key Insights and Ideas
- The Dimension Gap: The intrinsic dimension of natural human text hovers around 9 for alphabet-based languages and around 7 for Chinese. Crucially, AI-generated text consistently scores roughly 1.5 points lower, regardless of the generator model. LLMs, it seems, restrict their generations to a tighter, more predictable manifold.
- Robustness to Paraphrasing: When text is altered by a paraphraser, local statistical artifacts disappear, causing traditional detectors to fail. However, the global geometric structure—the intrinsic dimension—remains largely unchanged or even becomes slightly more distinct, making the PHD detector uniquely immune to paraphrase attacks.
- Mitigating Non-Native Bias: Traditional detectors penalize the lower lexical diversity of non-native English writers, falsely flagging them as AI. Because the PHD estimator looks at global manifold geometry rather than simple word frequencies, it cuts the false positive rate for non-native writers by more than half compared to commercial baselines like GPTZero.
Key Results
- Cross-Model & Cross-Domain Stability: In zero-shot settings, the PHD detector outperformed state-of-the-art baselines (DetectGPT, GPTZero, and OpenAI's detector) by a wide margin. For GPT-3.5 text, it achieved a 40.0% accuracy at a strict 1% False Positive Rate (FPR), compared to GPTZero's 7.1% and DetectGPT's 0.0%.
- Defeating Paraphrase Attacks: Against the DIPPER paraphrase attack, the performance of commercial detectors dropped to near 0%, while the PHD detector's accuracy actually increased slightly (e.g., rising from 40.0% to 41.2% on GPT-3.5).
- Multilingual Performance: The method proved effective across all 10 tested languages, achieving solid Area Under the ROC Curve (ROC-AUC) scores, peaking at 0.83 for Spanish and Italian.
Limitations and Future Work
The authors note three primary limitations:
- Stochasticity and Speed: The PHD estimation algorithm relies on iterative random sampling to maintain stability, which introduces noise and increases computational overhead.
- Sensitivity to Generation Temperature: The detector currently assumes "good," fluent AI text generated at lower temperatures. High-temperature or poorly generated text exhibits a higher intrinsic dimension, which would require separate calibration.
- Language Scope: The evaluation was restricted to relatively high-resource languages; how this geometric property behaves in low-resource languages remains an open question for future research.
Summary updated