[论文解读] On the Worst Prompt Performance of Large Language Models
本文提出 RobustAlpacaEval,一个基准测试,用于评估大语言模型(LLMs)在语义等价的案例级查询上的表现,以衡量最坏情况下的提示性能。结果揭示了极端的性能波动——最佳提示与最差提示之间最高达 45.48% 的差异,表明现有提示工程与一致性方法的改进效果有限,而基于投票的生成方法虽计算成本高昂,但能有效提升最坏情况下的性能。
The performance of large language models (LLMs) is acutely sensitive to the phrasing of prompts, which raises significant concerns about their reliability in real-world scenarios. Existing studies often divide prompts into task-level instructions and case-level inputs and primarily focus on evaluating and improving robustness against variations in tasks-level instructions. However, this setup fails to fully address the diversity of real-world user queries and assumes the existence of task-specific datasets. To address these limitations, we introduce RobustAlpacaEval, a new benchmark that consists of semantically equivalent case-level queries and emphasizes the importance of using the worst prompt performance to gauge the lower bound of model performance. Extensive experiments on RobustAlpacaEval with ChatGPT and six open-source LLMs from the Llama, Mistral, and Gemma families uncover substantial variability in model performance; for instance, a difference of 45.48% between the worst and best performance for the Llama-2-70B-chat model, with its worst performance dipping as low as 9.38%. We further illustrate the difficulty in identifying the worst prompt from both model-agnostic and model-dependent perspectives, emphasizing the absence of a shortcut to characterize the worst prompt. We also attempt to enhance the worst prompt performance using existing prompt engineering and prompt consistency methods, but find that their impact is limited. These findings underscore the need to create more resilient LLMs that can maintain high performance across diverse prompts. Data and code are available at https://github.com/cbwbuaa/On-the-Worst-Prompt- Performance-of-LLMs.
研究动机与目标
- 通过将关注点从任务级指令转向案例级提示,填补评估 LLM 对真实世界多样化用户查询鲁棒性的空白。
- 使用最差提示性能作为关键指标,量化 LLM 性能的下限。
- 探究在多个 LLM 上识别并改善最具破坏性提示的可行性。
- 评估现有提示工程与一致性方法在缓解最坏情况性能下降方面的有效性。
提出的方法
- 提出 RobustAlpacaEval,一个基准测试,包含跨多样化任务的真实世界案例级查询的语义等价改写版本。
- 采用一种策略收集改写后的提示,以保持语义等价性,同时改变措辞、格式与结构。
- 通过与 GPT-4 在相同查询上的胜率对比来衡量模型性能,以评估鲁棒性。
- 应用自我精炼机制,即模型根据自身偏好重写提示,以评估其对最坏情况性能的影响。
- 实施基于投票的生成方法:$ P(y_i|X,y_{<i}) = bE_{x i X} P(y_i|x,y_{<i}) $,聚合所有改写输入的输出结果。
- 采用群体蒸馏并结合一致性正则化:$ C(X,Y) = bE_{Y_j i Y} \big\backslashsqrt{ \frac{1}{N} \sum_{i=1}^N (S_{ij} - \bar{S}_{ij})^2 } $,其中 $ S_{ij} = \frac{1}{|Y_j|} \sum_k \log P(Y_{j,k}|X_i,Y_{j,<k}) $,通过无监督微调提升提示一致性。
实验结果
研究问题
- RQ1在真实世界场景中,模型在语义等价的案例级提示上的表现如何变化?
- RQ2能否使用模型无关特征(如困惑度或隐藏状态)预测最差提示?
- RQ3现有提示工程与一致性方法在多大程度上改善了最坏情况下的性能?
- RQ4是否存在一种稳健且可泛化的策略,以提升不同提示下的 LLM 性能下限?
主要发现
- Llama-2-70B-chat 模型在其最佳提示与最差提示之间的胜率差异高达 45.48%,最差情况下的性能最低降至 9.38%。
- 自我精炼后的提示使 Llama-2-7/13/70B-chat 的性能下降 10.04% 至 13.53%,表明在无测试数据支持下重写提示可能损害性能。
- 基于投票的生成方法使 Llama-2-70B-chat 的最坏情况性能提升 21.98 分,甚至超过其平均表现,但计算成本显著。
- 提示一致性方法(如群体蒸馏)提升了输出一致性,但降低了整体性能,可能因过度拟合模型生成的输出所致。
- 无模型依赖的特征(如困惑度、隐藏状态)无法可靠预测最差提示,且不同模型的性能排名存在显著差异。
- 不同模型在改写提示上表现出不同的偏好,表明最差提示具有模型特异性,无法普遍识别。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。