Training-free LLM-generated Text Detection by Mining Token Probability Sequences

Yihuai Xu, Yongwei Wang, Yifei Bi, Huangsen Cao, Zhouhan Lin, Yu Zhao, Fei Wu

Introduction

As Large Language Models (LLMs) become increasingly indistinguishable from human writers, the risks of "AI-washing"—using AI for fake news, academic dishonesty, or polluting training data—have skyrocketed. Researchers have developed Lastde, a novel training-free detector that identifies LLM-generated text by treating token probabilities as a time series. By capturing the "local" temporal dynamics of how a model predicts words, Lastde reveals that human writing is significantly more erratic and dynamic than machine output. This approach achieves state-of-the-art accuracy across diverse languages and models without needing a labeled training set.

The Challenge of AI Text Detection

Existing detection methods generally fall into two camps: training-based and training-free.

  • Training-based methods rely on classifiers trained on "AI vs. Human" datasets. They are notorious for overfitting; they work well on the specific models they were trained on but often fail when a new model (like GPT-4o) is released.
  • Training-free methods use statistical tests and generalize better. However, they have historically relied on global statistics, such as the average likelihood of a sentence. These methods often miss the local nuances—the specific rhythm and flow of probabilities—that distinguish a human's unpredictable word choices from an LLM’s optimized, low-perplexity output.

Methodology: Token Probabilities as Time Series

The authors introduce a novel perspective: treating Token Probability Sequences (TPS) as time series. When an LLM evaluates a text, it assigns a probability to every token. The sequence of these probabilities forms a distinct signal.

Architecture of the Lastde detector

To quantify the fluctuations in these sequences, the researchers utilize Diversity Entropy (DE), a technique borrowed from fields like fault diagnosis and ECG analysis:

  1. Multiscale Processing: The system analyzes the TPS at different "scales" (averaging adjacent probabilities) to capture both fine-grained and broad patterns.
  2. Diversity Entropy (DE): For each scale, a sliding window compares segments of the sequence. If neighboring segments are highly dissimilar, the entropy is high.
  3. Lastde Score: This local entropy measure is combined with the global log-likelihood to produce a final detection score.
  4. Lastde++: For "black-box" scenarios where the original model's probabilities are unavailable, the authors propose an efficient alternative. It uses a fast-sampling technique to normalize the score against an open-source proxy model, making it robust for real-world use.

Key Insights: The "Noise" of Human Thought

The core insight of Lastde is that LLMs are trained to be statistically "boring." They are optimized to minimize perplexity, leading to smoother probability transitions. Humans, by contrast, make creative leaps that create unpredictable "spikes" in the probability sequence.

Token Probability Sequences for Human vs. LLM text

While previous methods asked, "Is this whole paragraph likely?", Lastde asks, "Does the way the probability changes from word to word look machine-like?" Because the method relies on these fundamental statistical discrepancies rather than learned patterns, it doesn't break when a new model is released. It effectively turns the LLM's own internal optimization logic against it.

Experimental Setup and Key Results

The study evaluated Lastde across a broad spectrum of datasets and models:

  • Datasets: Standard benchmarks (XSum, SQuAD, WritingPrompts, Reddit ELI5), cross-lingual data (WMT16 English/German), and a newly gathered Chinese benchmark from Zhihu to test non-English contexts.
  • Models: Tested against 18 different models, ranging from 1.3B parameter open-source models to giants like GPT-4 and Claude-3.

Performance Highlights: * Superior Accuracy: Lastde consistently outperformed established baselines like DetectGPT and DNA-GPT. In white-box settings, it achieved an average AUROC of ~95.89% across 12 models. * Black-Box Champion: In the more difficult black-box setting (using a proxy model), Lastde++ improved the average AUROC by 5.8% over the previous state-of-the-art, Fast-DetectGPT. * Robustness to Attacks: Lastde++ showed significantly less performance degradation under "paraphrasing attacks" (using another AI to rewrite the text) compared to other methods. * Efficiency: Lastde++ achieves these results using only 100 contrast samples—1/100th of what original sampling-based methods required—making it highly viable for real-time detection.

Limitations and Future Work

Like most statistical methods, Lastde struggles with very short snippets of text (e.g., under 30 words) because there isn't enough signal in the time series to calculate reliable entropy. Additionally, in black-box settings, the choice of the proxy model impacts performance; if the proxy is too architecturally different from the source, accuracy can dip.

Future work will explore more advanced time-series features beyond Diversity Entropy and investigate better ways to aggregate local and global statistics to improve detection on shorter texts.

Summary updated

BibTeX
@inproceedings{xu2025training,
  author = {Yihuai Xu and Yongwei Wang and Yifei Bi and Huangsen Cao and Zhouhan Lin and Yu Zhao and Fei Wu},
  title = {{Training-free LLM-generated Text Detection by Mining Token Probability Sequences}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=vo4AHjowKi},
}
Figure