arXiv:2604.18389cs.CL2026-04ACL被引 1

揭示大模型对同义提示敏感的根源,解释为何相同意思的提问结果差异大。

Understanding the Prompt Sensitivity

论文配图:Understanding the Prompt Sensitivity
图 1 · 摘自论文原文
  • 将大模型视为多元函数,用泰勒展开分析提示词梯度与输出概率关系。
  • 发现同义提示在模型中分散分布,导致概率差异上界过高难以消除。
  • 指出模板设计比问题本身更影响输出,适合关注生成稳定性的研究者阅读。

提示敏感性指大语言模型(LLM)输出对输入提示措辞的强依赖性,引发用户对模型稳定性和可靠性的担忧。本文将LLM视为多元函数,进行一阶泰勒展开,分析语义保持提示、其梯度与模型下一个词的对数概率之间的关系。利用柯西-施瓦茨不等式推导出对数概率差异的上界。结果显示,与小型神经网络不同,LLM内部并不对相似输入进行聚类,而是将其分散处理,导致同义提示间的对数概率差异上界过高,难以有效降至0。我们还发现,某些语义保持的提示变体更易引入敏感性风险。此外,该上界与现有提示敏感性度量指标PromptSensiScore高度相关。通过分析逻辑值方差,发现提示模板通常比问题内容对输出影响更大。整体结果为当前LLM对同义提示高度敏感的现象提供了通用解释,为理解提示敏感性提供了关键证据。实验代码见https://github.com/ku-nlp/Understanding_the_Prompt_Sensitivity。

原文摘要 · Abstract (English)

Prompt sensitivity, which refers to how strongly the output of a large language model (LLM) depends on the exact wording of its input prompt, raises concerns among users about the LLM's stability and reliability. In this work, we consider LLMs as multivariate functions and perform a first-order Taylor expansion, thereby analyzing the relationship between meaning-preserving prompts, their gradients, and the log probabilities of the model's next token. We derive an upper bound on the difference between log probabilities using the Cauchy-Schwarz inequality. We show that LLMs do not internally cluster similar inputs like smaller neural networks do, but instead disperse them. This dispersing behavior leads to an excessively high upper bound on the difference of log probabilities between two meaning-preserving prompts, making it difficult to effectively reduce to 0. In our analysis, we also show which types of meaning-preserving prompt variants are more likely to introduce prompt sensitivity risks in LLMs. In addition, we demonstrate that the upper bound is strongly correlated with an existing prompt sensitivity metric, PromptSensiScore. Moreover, by analyzing the logit variance, we find that prompt templates typically exert a greater influence on logits than the questions themselves. Overall, our results provide a general interpretation for why current LLMs can be highly sensitive to prompts with the same meaning, offering crucial evidence for understanding the prompt sensitivity of LLMs. Code for experiments is available at https://github.com/ku-nlp/Understanding_the_Prompt_Sensitivity.

提示敏感性大模型机制生成稳定性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。