Skip to main content
QUICK REVIEW

[论文解读] Truth is Universal: Robust Detection of Lies in LLMs

Lennart Bürger, Fred A. Hamprecht|arXiv (Cornell University)|Jul 3, 2024
Law, Economics, and Judicial SystemsEconomics, Econometrics and Finance被引用 3
一句话总结

本文提出了一种鲁棒且通用的大型语言模型(LLMs)谎言检测方法,通过识别模型激活中的通用二维真实子空间实现。该方法名为真实调谐投影检测器(TTPD),利用一种广义真实方向($\mathbf{t}ₛesubG₀$),可在多种主题和陈述类型之间分离真实与虚假陈述,对简单陈述的准确率达到94%,对现实世界角色扮演谎言的准确率达到95%。

ABSTRACT

Large Language Models (LLMs) have revolutionised natural language processing, exhibiting impressive human-like capabilities. In particular, LLMs are capable of "lying", knowingly outputting false statements. Hence, it is of interest and importance to develop methods to detect when LLMs lie. Indeed, several authors trained classifiers to detect LLM lies based on their internal model activations. However, other researchers showed that these classifiers may fail to generalise, for example to negated statements. In this work, we aim to develop a robust method to detect when an LLM is lying. To this end, we make the following key contributions: (i) We demonstrate the existence of a two-dimensional subspace, along which the activation vectors of true and false statements can be separated. Notably, this finding is universal and holds for various LLMs, including Gemma-7B, LLaMA2-13B, Mistral-7B and LLaMA3-8B. Our analysis explains the generalisation failures observed in previous studies and sets the stage for more robust lie detection; (ii) Building upon (i), we construct an accurate LLM lie detector. Empirically, our proposed classifier achieves state-of-the-art performance, attaining 94% accuracy in both distinguishing true from false factual statements and detecting lies generated in real-world scenarios.

研究动机与目标

  • 为解决LLMs中对鲁棒、可泛化谎言检测的迫切需求,特别是应对策略性欺骗的风险。
  • 解决先前谎言检测器在否定句或分布外陈述上泛化失败的问题。
  • 识别一种跨主题、陈述类型和模型架构均能泛化的、关于真实性的通用内部表征。
  • 开发一种既准确又对输入陈述分布变化具有鲁棒性的谎言检测方法。

提出的方法

  • 在LLM激活空间中识别一个二维子空间,其中真实与虚假陈述可通过线性可分性分离,该子空间由广义真实方向($\mathbf{t}ₛesubG₀$)和极性方向($\mathbf{t}ₛesubP₀$)定义。
  • 通过分析内部层的激活向量,实证表明$\mathbf{t}ₛesubG₀$在多个LLM(包括Gemma-7B、LLaMA2-13B和LLaMA3-8B)中具有通用性。
  • 构建真实调谐投影检测器(TTPD),一种将输入激活向量投影到$\mathbf{t}ₛesubG₀$上并使用阈值分类陈述为真实或虚假的分类器。
  • 通过投影与极性估计的线性组合提升检测性能,尽管极性估计仍是实现完整二维应用的挑战。
  • 在包含肯定句与否定句的合成数据集,以及具有说谎激励的现实世界角色扮演场景上训练并评估分类器。
  • 采用基于温度的解码策略生成模型完成内容,并通过人工将响应分类为真实、说谎、模糊或其他类别以供评估。
Figure 1 : Top left: The activation vectors of multiple statements projected onto the 2D subspace spanned by our orthonormalized estimates for $\mathbf{t}_{G}$ and $\mathbf{t}_{P}$ . Purple squares correspond to false statements and orange triangles to true statements. Top center: The activation vec
Figure 1 : Top left: The activation vectors of multiple statements projected onto the 2D subspace spanned by our orthonormalized estimates for $\mathbf{t}_{G}$ and $\mathbf{t}_{P}$ . Purple squares correspond to false statements and orange triangles to true statements. Top center: The activation vec

实验结果

研究问题

  • RQ1LLM激活空间中是否存在一个跨主题和陈述类型(包括否定句)的通用真实方向?
  • RQ2基于此类真实方向的谎言检测器能否超越训练分布泛化,特别是对未见的陈述类型和现实世界欺骗场景?
  • RQ3为何先前的分类器无法泛化到否定句?这种失败是否可由存在多个狭窄真实方向来解释?
  • RQ4在多大程度上可利用真实子空间构建对分布变化不敏感的鲁棒、高精度谎言检测器?

主要发现

  • 在多个LLM(包括Gemma-7B、LLaMA2-13B和LLaMA3-8B)中均存在一个通用的二维真实子空间,其中真实与虚假陈述可线性分离。
  • 广义真实方向$\mathbf{t}ₛesubG₀$实现了鲁棒的谎言检测,能从肯定句泛化到否定句,解决了先前的泛化失败问题。
  • 所提出的TTPD分类器在简单真假陈述上达到94%的准确率,在具有欺骗激励的真实世界角色扮演谎言上达到95%的准确率。
  • 在现实世界谎言检测基准上,TTPD优于基线方法(如逻辑回归LR和CCS),后者的准确率分别为79%和73%。
  • 该方法基于内部真实表征检测谎言,而非仅依赖外部激励,经人工分类模型响应验证。
  • 真实方向$\mathbf{t}ₛesubG₀$在模型和任务之间保持稳定且可迁移,表明LLMs中存在一种关于真实性的基础内部编码。
Figure 2 : Ratio of the between-class variance and within-class variance of activations corresponding to true and false statements, across residual stream layers, averaged over all dimensions of the respective layer.
Figure 2 : Ratio of the between-class variance and within-class variance of activations corresponding to true and false statements, across residual stream layers, averaged over all dimensions of the respective layer.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。