单个字符即可成就或毁掉你的LLM评估
A Single Character can Make or Break Your LLM Evals
AI总结:
研究发现LLM评估中分隔示例的单个字符选择可显著影响性能(如MMLU波动±23%),甚至操纵排名;通过注意力分析揭示机制,并提出指定分隔符以增强鲁棒性的实用建议。
摘要:
常见的 Large Language model (LLM) 评估依赖演示示例来引导模型响应达到期望的风格。虽然示例数量已被研究和标准化,但如何格式化示例的选择却较少被研究。在评估协议和实际使用中,用户面临如何分隔上下文示例的选择:使用逗号?换行?分号?井号?等等?令人惊讶的是,我们发现这个看似微小的选择可以显著改变模型响应质量。在领先的模型系列(Llama、Qwen、Gemma)中,例如在 MMLU 上的性能可能因分隔符的选择而波动 ±23%。事实上,仅通过修改分隔示例的单个字符,就可以操纵模型排名,使任何模型领先。我们发现 LLM 的脆弱性遍及主题、模型系列,并且不随规模扩大而改善。通过探测注意力头分数,我们发现表现良好的分隔符将注意力引导至输入中的关键标记。最后,我们探索了提高 LLM 对分隔符选择鲁棒性的方法。我们发现,在提示中指定所选分隔符可增强鲁棒性,并为选择表现最佳的分隔符提供实用建议。
英文摘要:
Common Large Language model (LLM) evaluations rely on demonstration examples to steer models' responses to the desired style. While the number of examples used has been studied and standardized, the choice of how to format examples is less investigated. In evaluation protocols and real world usage, users face the choice how to separate in-context examples: use a comma? new line? semi-colon? hashtag? etc.? Surprisingly, we find this seemingly minor choice can dramatically alter model response quality. Across leading model families (Llama, Qwen, Gemma), performance on MMLU for example can vary by $\pm 23\%$ depending on the choice of delimiter. In fact, one can manipulate model rankings to put any model in the lead by only modifying the single character separating examples. We find LLMs' brittleness pervades topics, model families, and doesn't improve with scale. By probing attention head scores, we find that good-performing delimiters steer attention towards key tokens in the input. Finally, we explore methods to improve LLMs' robustness to the choice of delimiter. We find specifying the selected delimiter in the prompt boosts robustness and offer practical recommendations for the best-performing delimiters to select.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。