The proliferation of high-quality text from Large Language Models (LLMs) demands reliable and efficient detection methods. While existing training-free approaches show promise, they often rely on surface-level statistics and overlook fundamental signal properties of the text generation process. In this work, we reframe detection as a signal processing problem, introducing a novel paradigm that analyzes the sequence of token log-probabilities in the frequency domain. By systematically analyzing the signal's spectral properties using the global Discrete Fourier Transform (DFT) and the local Short-Time Fourier Transform (STFT), we find that human-written text consistently exhibits significantly higher spectral energy. This higher energy reflects the larger-amplitude fluctuations inherent in human writing compared to the suppressed dynamics of LLM-generated text. Based on this key insight, we construct SpecDetect, a detector built on a single, robust feature from the global DFT: DFT total energy. We also propose an enhanced version, SpecDetect++, which incorporates a sampling discrepancy mechanism to further boost robustness. Extensive experiments show that our approach outperforms the state-of-the-art model while running in nearly half the time. Our work introduces a new, efficient, and interpretable pathway for LLM-generated text detection, showing that classical signal processing techniques offer a surprisingly powerful solution to this modern challenge.
翻译:大型语言模型(LLM)生成的高质量文本的激增,对可靠且高效的检测方法提出了迫切需求。现有的无训练检测方法虽展现出潜力,但通常依赖表层统计特征,忽视了文本生成过程的基本信号特性。本研究将检测问题重新定义为信号处理任务,提出一种在频域分析词元对数概率序列的新范式。通过使用全局离散傅里叶变换(DFT)与局部短时傅里叶变换(STFT)系统分析信号的频谱特性,我们发现人类撰写的文本始终表现出显著更高的频谱能量。这种更高的能量反映了人类写作固有的更大振幅波动,与LLM生成文本被抑制的动态特性形成对比。基于这一关键发现,我们构建了SpecDetect检测器,其仅采用全局DFT提取的单一稳健特征:DFT总能量。同时提出了增强版本SpecDetect++,通过引入采样差异机制进一步提升鲁棒性。大量实验表明,我们的方法在检测性能上优于当前最优模型,且运行时间减少近半。本研究为LLM生成文本检测开辟了一条新颖、高效且可解释的技术路径,证明经典信号处理技术能为这一现代挑战提供出人意料的强大解决方案。