Local Entropy Fluctuations for Black-Box LLM-Generated Text Detection
Organizations: University of Virginia
Abstract
Zero-shot detection of machine-generated text is vital for mitigating the risks of large language models (LLMs) misuse. While the state-of-the-art dual-model detectors and resampling-based detectors outperform single-model statistical detectors on unprompted continuations, they suffer a catastrophic breakdown on instruction-conditioned text in the black-box setting, where the source model is unknown. We analyze this failure and trace it to poor prompt conditioning for resampling-based methods and diminished cross-model discrepancy for dual-model detectors. Motivated by recent studies that human writing maintains a steady, uniform information flow, whereas machine-generated text exhibits sharp, localized entropy fluctuations, we propose a new metric, the Relative Peak Prominence Rate (RelPPR) to capture this structural contrast along the entropy trajectory and further leverage it as a signal for LLM-generated text detection. Extensive evaluations across diverse model families and datasets demonstrate that RelPPR achieves state-of-the-art black-box detection performance and remains the most reliable detector under various practical situations. Our code is available at https://github.com/brushing-git/entropy-llm-detector.
Figures & tables
| Methods | XSum | WritingP | SQuAD | WikiText | CNN/DM | ELI5 | PubMedQA | Avg |
|---|---|---|---|---|---|---|---|---|
| Entropy | 0.822 | 0.812 | 0.813 | 0.788 | 0.817 | 0.929 | 0.703 | 0.812 |
| Likelihood | 0.787 | 0.801 | 0.787 | 0.752 | 0.775 | 0.902 | 0.600 | 0.772 |
| LogRank | 0.786 | 0.764 | 0.782 | 0.767 | 0.782 | 0.894 | 0.595 | 0.767 |
| LRR | 0.739 | 0.613 | 0.731 | 0.781 | 0.756 | 0.831 | 0.550 | 0.714 |
| GECScore | 0.712 | 0.673 | 0.684 | 0.648 | 0.688 | 0.839 | 0.558 | 0.686 |
| LastDE | 0.755 | 0.767 | 0.783 | 0.785 | 0.767 | 0.890 | 0.590 | 0.762 |
| OLMo3 | OLMo3.1 | Gemma4 | Mistral | Qwen3.5 | Avg | |
| 7B | 32B | 31B | 119B | 35B | ||
| Entropy | 0.780 | 0.837 | 0.811 | 0.841 | 0.790 | 0.812 |
| Likelihood | 0.693 | 0.794 | 0.803 | 0.848 | 0.723 | 0.772 |
| LogRank | 0.699 | 0.789 | 0.786 | 0.838 | 0.723 | 0.767 |
| LRR | 0.687 | 0.740 | 0.692 | 0.763 | 0.689 | 0.714 |
| GECScore | 0.646 | 0.679 | 0.743 | 0.631 | 0.731 | 0.686 |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Condition | Variant | XSum | SQuAD | WritingP | CNN/DM | ELI5 | WikiText | PubMedQA | Average | |
|---|---|---|---|---|---|---|---|---|---|---|
| w/o Instruction | 0.766 | 0.753 | 0.769 | 0.708 | 0.683 | 0.609 | 0.719 | 0.715 | 0.007 | |
| 0.794 | 0.749 | 0.774 | 0.707 | 0.687 | 0.615 | 0.728 | 0.722 | |||
| w/ Instruction | 0.569 | 0.514 | 0.494 | 0.497 | 0.556 | 0.509 | 0.465 | 0.515 | ||
| 0.569 | 0.502 | 0.501 | 0.500 | 0.552 | 0.510 | 0.469 | 0.515 |
| OLMo-7B | OLMo-32B | Gemma-4-31B | Qwen-35B-MoE | Mistral-119B | |
|---|---|---|---|---|---|
| ELI5 | |||||
| PubMedQA |
| Dataset | Instruction Prompt Template |
|---|---|
| XSum | “ Continue the following text for about {word_target} words. Output ONLY the continuation – do not repeat or restate any of the given text: {prefix} ” |
| CNN/DM | “ Continue the following text for about {word_target} words. Output ONLY the continuation – do not repeat or restate any of the given text: {prefix} ” |
| WikiText | “ Continue the following text for about {word_target} words. Output ONLY the continuation – do not repeat or restate any of the given text: {prefix} ” |
| SQuAD | “ Continue the following text for about {word_target} words. Output ONLY the continuation – do not repeat or restate any of the given text: {prefix} ” |
| WritingPrompts | “ Please write a story of about {word_target} words based on the following writing prompt: {prefix} . Output ONLY the story – do not repeat or restate any of the given text: {prefix} ” |
| ELI5 | “ Please explain the following question in about {word_target} words: {prefix} . Output ONLY the explanation – do not repeat or restate any of the given text: {prefix} ” |
| Methods | Qwen3.5 | Qwen3.5 | Qwen3.5 | Gemma4 | Gemma4 | Gemma4 | Falcon3 | Ministral3 | Falcon | Avg |
|---|---|---|---|---|---|---|---|---|---|---|
| 2B | 9B | 35B-MoE | 12B | 31B | 26B-MoE | 7B | 8B | 7B | ||
| Entropy | 0.837 | 0.847 | 0.788 | 0.804 | 0.780 | 0.765 | 0.761 | 0.788 | 0.414 | 0.754 |
| Likelihood | 0.794 | 0.814 | 0.746 | 0.722 | 0.728 | 0.720 | 0.671 | 0.772 | 0.526 | 0.721 |
| LogRank | 0.789 | 0.814 | 0.749 | 0.732 | 0.731 | 0.723 | 0.687 | 0.770 | 0.535 | 0.726 |
| LastDE | 0.781 | 0.812 | 0.755 | 0.761 | 0.769 | 0.760 | 0.684 | 0.796 | 0.657 | 0.753 |
| Fast-DetectGPT | 0.515 | 0.513 | 0.456 | 0.507 | 0.230 | 0.301 | 0.653 | 0.625 | 0.825 | 0.514 |
| Baseline | XSum | WritingP | SQuAD | WikiText | CNN/DM | ELI5 | PubMedQA | Avg |
|---|---|---|---|---|---|---|---|---|
| Entropy | 0.803 | 0.856 | 0.589 | 0.683 | 0.724 | 0.855 | 0.667 | 0.740 |
| Likelihood | 0.931 | 0.911 | 0.708 | 0.913 | 0.920 | 0.907 | 0.574 | 0.838 |
| LogRank | 0.926 | 0.901 | 0.697 | 0.909 | 0.915 | 0.896 | 0.601 | 0.835 |
| LRR | 0.798 | 0.797 | 0.614 | 0.767 | 0.777 | 0.811 | 0.620 | 0.741 |
| LastDE | 0.887 | 0.882 | 0.794 | 0.941 | 0.908 | 0.890 | 0.534 | 0.834 |
| LastDE++ | 0.416 | 0.555 | 0.245 | 0.414 | 0.485 | 0.381 | 0.426 | 0.418 |
| Baseline | OLMo3 | OLMo3.1 | Gemma4 | Qwen3.5 | Avg |
|---|---|---|---|---|---|
| 7B | 32B | 31B | 35B | ||
| Entropy | 0.791 | 0.805 | 0.552 | 0.810 | 0.740 |
| Likelihood | 0.901 | 0.870 | 0.776 | 0.803 | 0.838 |
| LogRank | 0.906 | 0.866 | 0.758 | 0.809 | 0.835 |
| LRR | 0.791 | 0.791 | 0.590 | 0.790 | 0.741 |
| LastDE | 0.893 | 0.884 | 0.745 | 0.813 | 0.834 |
AI-Generated Text Detection
AI-generated text detection develops methods to distinguish human-written, machine-generated, and AI-edited text.
See all 170 papers