Skip to main content
QUICK REVIEW

[论文解读] The Butterfly Effect of Altering Prompts: How Small Changes and Jailbreaks Affect Large Language Model Performance

Abel Salinas, Fred Morstatter|arXiv (Cornell University)|Jan 8, 2024
Topic ModelingComputer Science被引用 3
一句话总结

本文研究了微小提示变化(如格式请求、微小文本扰动及越狱技术)如何影响大语言模型(LLM)的预测结果。通过在11个文本分类任务中使用24种提示变体,研究发现即使添加一个空格或请求JSON输出等微小变化,也会改变模型的预测结果,而越狱攻击则导致显著的性能下降,部分方法的拒绝率高达90%,凸显了基于LLM的标注系统中关键的可靠性问题。

ABSTRACT

Large Language Models (LLMs) are regularly being used to label data across many domains and for myriad tasks. By simply asking the LLM for an answer, or ``prompting,'' practitioners are able to use LLMs to quickly get a response for an arbitrary task. This prompting is done through a series of decisions by the practitioner, from simple wording of the prompt, to requesting the output in a certain data format, to jailbreaking in the case of prompts that address more sensitive topics. In this work, we ask: do variations in the way a prompt is constructed change the ultimate decision of the LLM? We answer this using a series of prompt variations across a variety of text classification tasks. We find that even the smallest of perturbations, such as adding a space at the end of a prompt, can cause the LLM to change its answer. Further, we find that requesting responses in XML and commonly used jailbreaks can have cataclysmic effects on the data labeled by LLMs.

研究动机与目标

  • 研究在格式、扰动和越狱等微小提示变化下LLM预测的可靠性。
  • 评估这些变化对多样本文本分类任务中模型准确率和一致性的影响。
  • 探究标注者意见分歧是否与不同提示变体下的预测变化相关。
  • 识别哪些提示修改会导致LLM输出发生最大幅度的改变。
  • 为设计更鲁棒的提示集成方法和更具弹性的LLM系统提供依据。

提出的方法

  • 本研究在11个基准文本分类任务(包括BoolQ、CoLA和Jigsaw Toxicity)中评估了24种提示变体。
  • 变体被划分为四类:输出格式(如JSON、XML)、微小扰动(如添加空格或'谢谢')、提示诱导(tipping prompts)以及越狱技术(如Evil Confidant、AIM、Dev Mode v2)。
  • 通过比较不同变体下的模型预测,测量预测变化率和准确率损失。
  • 使用多维缩放(MDS)基于响应相似性对提示变体进行嵌入,以支持聚类分析。
  • 对人工标注样本计算标注者熵,以评估混淆程度,并使用皮尔逊相关系数计算其与预测熵的相关性。
  • 统计分析识别出提示变体类型与预测不稳定性之间的显著相关性,尤其在越狱和格式请求方面。
Figure 1: Number of predictions that change (out of 11,000) compared to No Specified Format style. Red bars correspond to the number of invalid responses provided by the model.
Figure 1: Number of predictions that change (out of 11,000) compared to No Specified Format style. Red bars correspond to the number of invalid responses provided by the model.

实验结果

研究问题

  • RQ1像添加空格或请求特定输出格式这样的微小提示变化,如何影响LLM预测的一致性?
  • RQ2越狱技术在多大程度上改变了LLM的预测并降低了模型性能?
  • RQ3标注者意见分歧更高的样本是否对提示变化表现出更大的敏感性?
  • RQ4不同提示变体在响应空间中如何聚类?这揭示了模型可靠性的哪些信息?
  • RQ5能否在不同提示类型下可靠地从标注者分歧预测预测熵?

主要发现

  • 即使是最微小的扰动,如在提示末尾添加一个空格,也会导致LLM在高达15%的案例中改变预测结果。
  • 请求以XML或CSV格式输出,相比基线,平均准确率下降了5个百分点。
  • 像Dev Mode v2和AIM这样的越狱技术导致拒绝率约为90%,严重降低了模型的可用性。
  • 尽管拒绝率较低(<3%),Evil Confidant和Refusal Suppression越狱方法仍导致相比基线准确率下降超过10个百分点。
  • 如'以感谢结束'和'重述为陈述'等扰动变体产生了显著不同的输出,在MDS嵌入中与主簇明显分离。
  • 在标注者分歧与预测变化可能性之间发现弱负相关性(r = -0.3779,p = 0.00),表明更模糊的样本在提示变化下更不容易发生预测改变。
Figure 2: Number of predictions that change (out of 11,000) compared to the Python List style. Red bars correspond to the number of invalid responses provided by the model.
Figure 2: Number of predictions that change (out of 11,000) compared to the Python List style. Red bars correspond to the number of invalid responses provided by the model.

阅读本论文

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

在 Nubint 中阅读本论文

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