SpecDetect: Simple, Fast, and Training-Free Detection of LLM-Generated Text via Spectral Analysis
作者: Haitong Luo, Weiyao Zhang, Suhang Wang, Wenji Zou, Chungang Lin, Xuying Meng, Yujun Zhang
分类: cs.CL
发布日期: 2025-08-15 (更新: 2025-08-18)
备注: Under Review
💡 一句话要点
提出SpecDetect以解决LLM生成文本检测问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 文本检测 信号处理 频域分析 大型语言模型 鲁棒性增强
📋 核心要点
- 现有的LLM生成文本检测方法多依赖表面统计,忽视了文本生成的信号特性,导致检测效果有限。
- 本文提出将检测视为信号处理问题,通过频域分析标记对数概率序列,利用DFT和STFT提取文本的谱特性。
- 实验结果显示,SpecDetect在性能上超越了现有模型,且运行时间减少近一半,展现出高效性和可解释性。
📝 摘要(中文)
随着大型语言模型(LLM)生成高质量文本的普及,可靠且高效的检测方法变得愈发重要。现有的无训练方法虽然有前景,但往往依赖表面统计,忽视文本生成过程的基本信号特性。本文将检测重新框定为信号处理问题,提出了一种新范式,通过频域分析标记对数概率序列。利用全局离散傅里叶变换(DFT)和局部短时傅里叶变换(STFT)系统分析信号的谱特性,发现人类写作的文本在谱能量上显著高于LLM生成文本。基于这一关键洞察,我们构建了SpecDetect,利用DFT总能量这一单一特征进行检测,并提出了增强版SpecDetect++,通过采样差异机制进一步提升鲁棒性。大量实验表明,我们的方法在运行时间上几乎减少了一半,且性能超越了现有最先进模型。
🔬 方法详解
问题定义:本文旨在解决LLM生成文本的检测问题,现有方法往往依赖于表面统计特征,无法有效捕捉文本生成过程的深层信号特性。
核心思路:我们将文本检测重新定义为信号处理问题,通过分析标记对数概率序列的频域特性,发现人类文本与LLM生成文本在谱能量上的显著差异。
技术框架:整体流程包括数据预处理、频域转换(DFT和STFT)、谱特性提取和分类决策。主要模块包括信号分析和特征提取。
关键创新:最重要的创新在于利用DFT总能量作为单一特征进行检测,这一方法与传统依赖多特征的检测方法本质上不同,提供了更高的效率和可解释性。
关键设计:在SpecDetect++中引入了采样差异机制,以增强模型的鲁棒性。参数设置经过多次实验优化,确保在不同文本类型上均能保持高效性能。
📊 实验亮点
实验结果表明,SpecDetect在检测性能上显著优于现有最先进模型,且运行时间减少近50%。具体而言,模型在不同文本类型上的准确率均超过了90%,展现出良好的鲁棒性和适应性。
🎯 应用场景
该研究的潜在应用领域包括社交媒体内容监测、学术不端检测以及自动化内容审核等。通过提供高效的LLM生成文本检测工具,能够有效防止虚假信息传播,维护信息的真实性和可靠性,具有重要的社会价值和实际意义。
📄 摘要(原文)
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 demonstrate 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.