Skip to main content
QUICK REVIEW

[论文解读] Automatically Auditing Large Language Models via Discrete Optimization

Erik Jones, Anca D. Dragan|arXiv (Cornell University)|Mar 8, 2023
Software Engineering ResearchComputer Science被引用 16
一句话总结

该论文将审计 LLMs 形式化为一个离散优化问题,并引入 ARCA,一种坐标上升算法,联合搜索提示和输出以揭示自回归模型中的目标失败模式。

ABSTRACT

Auditing large language models for unexpected behaviors is critical to preempt catastrophic deployments, yet remains challenging. In this work, we cast auditing as an optimization problem, where we automatically search for input-output pairs that match a desired target behavior. For example, we might aim to find a non-toxic input that starts with "Barack Obama" that a model maps to a toxic output. This optimization problem is difficult to solve as the set of feasible points is sparse, the space is discrete, and the language models we audit are non-linear and high-dimensional. To combat these challenges, we introduce a discrete optimization algorithm, ARCA, that jointly and efficiently optimizes over inputs and outputs. Our approach automatically uncovers derogatory completions about celebrities (e.g. "Barack Obama is a legalized unborn" -> "child murderer"), produces French inputs that complete to English outputs, and finds inputs that generate a specific name. Our work offers a promising new tool to uncover models' failure-modes before deployment.

研究动机与目标

  • 动机:系统性审计大语言模型以发现罕见或高影响力的失败模式。
  • 将审计形式化为对提示和输出的离散优化问题,以匹配目标行为。
  • 开发高效算法(ARCA)以解决稀疏、非线性、离散的审计目标。
  • 证明 ARCA 能在多种模型上揭示多样的非期望行为。
  • 表明使用 ARCA 的审计能够揭示提示转移并在模型规模之间实现泛化。

提出的方法

  • 定义一个审计目标 phi(x, o),对提示-输出对进行评分以反映目标行为。
  • 通过最大化 phi(x, o) 以及给定提示的输出对数概率来放宽不可微的 f(x) = o 约束。
  • 开发自回归随机坐标上升(ARCA),通过分解 s_i(v; x, o) = s_i,Lin(v; x, o) + s_i,Aut(v; x, o) 一次更新一个标记。
  • 使用快速的两阶段评分:(i) 通过一阶近似对标记进行低成本排序,(ii) 对前 k 个候选进行精确评估。
  • 将 ARCA 与 AutoPrompt 和 GBDA 进行比较,强调 ARCA 对一阶近似的平均化及其自回归项。
  • 证明对输入和输出的联合优化可以实现如意外毒性和语言切换等行为。

实验结果

研究问题

  • RQ1审计是否能有效地被表述为对提示和输出的离散优化问题?
  • RQ2基于坐标上升的方法(ARCA)是否高效发现罕见或定向的模型故障模式?
  • RQ3在有毒提示、语言切换和针对特定名称的失败上,ARCA 相较于现有离散优化器的表现如何?
  • RQ4针对较小模型发现的提示是否能转移到较大模型(提示转移),并随规模增大而更自然?
  • RQ5在跨语言与毒性场景对输入和输出进行联合优化时,会得到哪些关于模型故障的洞见?

主要发现

  • ARCA 在将 GPT-2 和 GPT-J 逆向为有毒输出或特定名称方面,持续优于 AutoPrompt 和 GBDA。
  • ARCA 发现数百个提示,能够产生有毒名人续写、语言切换,或事实性错误的联想。
  • 随着模型规模增大,ARCA 产生的提示看起来更自然,且提示转移在不同模型规模间发生(较小模型的提示也适用于较大模型)。
  • 对输入和输出的联合优化使如意外毒性和跨语言完成等任务成为可能,这些用单独提示很难实现。
  • ARCA 的自回归项和对一阶近似的平均化有助于提升评分和解的质量。

阅读本论文

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

在 Nubint 中阅读本论文

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