Skip to main content
QUICK REVIEW

[论文解读] Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvature

Guangsheng Bao, Yanbin Zhao|arXiv (Cornell University)|Oct 8, 2023
Topic ModelingComputer Science被引用 19
一句话总结

Fast-DetectGPT 将条件概率曲率引入以在零-shot 设置中检测机器生成文本,在比 DetectGPT 更高的准确性同时大幅降低计算量(高达 340x 更快)。

ABSTRACT

Large language models (LLMs) have shown the ability to produce fluent and cogent content, presenting both productivity opportunities and societal risks. To build trustworthy AI systems, it is imperative to distinguish between machine-generated and human-authored content. The leading zero-shot detector, DetectGPT, showcases commendable performance but is marred by its intensive computational costs. In this paper, we introduce the concept of conditional probability curvature to elucidate discrepancies in word choices between LLMs and humans within a given context. Utilizing this curvature as a foundational metric, we present **Fast-DetectGPT**, an optimized zero-shot detector, which substitutes DetectGPT's perturbation step with a more efficient sampling step. Our evaluations on various datasets, source models, and test conditions indicate that Fast-DetectGPT not only surpasses DetectGPT by a relative around 75% in both the white-box and black-box settings but also accelerates the detection process by a factor of 340, as detailed in Table 1. See \url{https://github.com/baoguangsheng/fast-detect-gpt} for code, data, and results.

研究动机与目标

  • 通过在不同领域和模型之间区分机器生成文本与人类撰写文本来促进可信任的 AI。
  • 提出一个新特征——条件概率曲率,用于捕捉人类与机器在措辞选择上的差异。
  • 开发一个高效的零-shot 检测器(Fast-DetectGPT),通过避免重复的模型评估来减少计算。
  • 在白盒与黑盒设置、解码策略和真实世界模型上展示鲁棒性。
  • 提供经验证的准确性提升和对先前检测器的显著加速的实证证据。

提出的方法

  • 将条件概率曲率定义为机器生成文本与人类生成文本之间的令牌级差异度量。
  • 用在单次前向传播中评估的条件概率项 p(˜x|x) 替换 DetectGPT 中基于扰动的评分。
  • 使用采样模型 qφ(˜x|x) 对给定 x 条件下采样替代令牌,并在样本中从 log pθ(˜x|x) 计算 μ̃ 与 σ̃。
  • 计算曲率 d̂x = (log pθ(x) − μ̃)/σ̃ 来判定文本是机器生成还是人类撰写。
  • 证明当采样与评分使用同一模型时,曲率简化为 Likelihood 与 Entropy 基线的组合。
  • 提供利用令牌级独立性得到 μ̃ 与 σ̃ 的解析解,避免重复的模型调用。
Figure 1: Distribution of conditional probability curvatures of the original human-written passages and the machine-generated passages by four source models on 30-token prefix from XSum.
Figure 1: Distribution of conditional probability curvatures of the original human-written passages and the machine-generated passages by four source models on 30-token prefix from XSum.

实验结果

研究问题

  • RQ1在零-shot 设置中,条件概率曲率能否可靠地区分机器生成文本与人类撰写文本?
  • RQ2与 DetectGPT 相比,Fast-DetectGPT 是否在保持或提升检测准确性的同时降低计算成本?
  • RQ3在白盒与黑盒设置下以及跨多样数据集和源模型时,该方法的表现如何?
  • RQ4该方法对不同的解码策略和改写攻击是否具有鲁棒性?
  • RQ5基于曲率的检测与传统基线(如 Likelihood 与 Entropy)之间有什么关系?

主要发现

  • Fast-DetectGPT 在多数据集与多模型上获得比 DetectGPT 更高的 AUROC(平均提升约 75%)。
  • 在白盒设置中,Fast-DetectGPT 在 5 模型与 ChatGPT/GPT-4 生成上均获得更高的 AUROC(如 0.9887 对 0.9554)。
  • 在黑盒设置下,Fast-DetectGPT 的表现优于 DetectGPT(例如使用 GPT-J/Neo-2.7 评分,平均 AUROC 提升约 74%)。
  • 该方法在基于 XSum 的基准测试中实现显著加速,最快比 DetectGPT 快 340 倍。
  • 在现实世界场景中,使用 GPT-3、ChatGPT 和 GPT-4 时,Fast-DetectGPT 保持优越的检测性能,AUROC 常常超越有监督检测器。
  • Fast-DetectGPT 在解码策略(Top-p、Top-k、温度)下显示出鲁棒性能,并且在相对于其他零-shot 检测器时对改写攻击仍具韧性。
Figure 2: Fast-DetectGPT v.s. DetectGPT (Mitchell et al., 2023 ) . Fast-DetectGPT uses a conditional probability function $p(\tilde{x}|x)$ as defined in Eq. 2 . Notably, Fast-DetectGPT invokes the sampling GPT once to generate all samples and similarly calls the scoring GPT once to evaluate all samp
Figure 2: Fast-DetectGPT v.s. DetectGPT (Mitchell et al., 2023 ) . Fast-DetectGPT uses a conditional probability function $p(\tilde{x}|x)$ as defined in Eq. 2 . Notably, Fast-DetectGPT invokes the sampling GPT once to generate all samples and similarly calls the scoring GPT once to evaluate all samp

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。