arXiv:2505.15433cs.LGcs.AI2025-05NeurIPS被引 10

让大模型无视输入顺序,避免选择偏见

Set-LLM: A Permutation-Invariant LLM

  • 用新注意力掩码和位置编码实现输入顺序无关
  • 实验显示性能相当甚至更好,且无推理延迟
  • 适合需要公平比较的AI评估场景

尽管大语言模型在众多应用中表现卓越,其鲁棒性仍是关键挑战。本文关注一个特定漏洞:模型对输入顺序敏感。这种敏感性表现为模型在多个选项间决策时存在偏好(如倾向首个选项),或在选项顺序改变时给出不同答案。该问题不仅限于多选题问答,还涉及将大模型用于自动化评估不同模型输出的AI流水线。我们提出Set-LLM,一种针对预训练大模型的新型架构改进,可处理混合集合文本输入,并保证排列不变性。该改进包括专为集合设计的新注意力掩码和位置编码。我们提供了不变性的理论证明,并通过实验验证,Set-LLM可有效训练,在保持原模型运行效率的同时,性能相当或更优,且完全消除顺序敏感性。

原文摘要 · Abstract (English)

While large language models (LLMs) demonstrate impressive capabilities across numerous applications, their robustness remains a critical concern. This paper is motivated by a specific vulnerability: the order sensitivity of LLMs. This vulnerability manifests itself as the order bias observed when LLMs decide between possible options (for example, a preference for the first option) and the tendency of LLMs to provide different answers when options are reordered. The use cases for this scenario extend beyond the classical case of multiple-choice question answering to the use of LLMs as automated evaluators in AI pipelines, comparing output generated by different models. We introduce Set-LLM, a novel architectural adaptation for pretrained LLMs that enables the processing of mixed set-text inputs with permutation invariance guarantees. The adaptations involve a new attention mask and new positional encodings specifically designed for sets. We provide a theoretical proof of invariance and demonstrate through experiments that Set-LLM can be trained effectively, achieving comparable or improved performance and maintaining the runtime of the original model, while eliminating order sensitivity.

大模型顺序无关注意力机制评估

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