arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.15433cs.LGcs.AIcs.CL
收藏

Set-LLM:一种排列不变的大语言模型

Set-LLM: A Permutation-Invariant LLM

Heidelberg Institute for Theoretical Studies(海德堡理论研究所);Karlsruhe Institute of Technology(卡尔斯鲁厄理工学院)

Beni Egressy, Jan Stühmer

AI总结:

针对大语言模型存在顺序敏感性的问题,研究提出Set-LLM架构适配方案,通过新型注意力掩码与位置编码实现集合-文本混合输入的排列不变性,经理论与实验验证其在消除顺序偏差的同时保持性能与运行效率。

摘要:

尽管大语言模型(LLM)在众多应用中展现出令人瞩目的能力,但其鲁棒性仍是一个关键问题。本文的研究动机源于一类特定的缺陷:LLM的顺序敏感性。这种缺陷表现为LLM在多个可能选项中做决策时存在的顺序偏差(例如对第一个选项的偏好),以及当选项重新排序时LLM倾向于给出不同答案的特性。该场景的应用场景不仅限于经典的多项选择题问答,还包括将LLM用作AI流水线中的自动评估器,对不同模型生成的输出进行比较。我们提出了Set-LLM,这是一种针对预训练LLM的新型架构适配方案,能够处理混合的集合-文本输入,并保证排列不变性。该适配方案包含专门为集合设计的新型注意力掩码和新型位置编码。我们提供了不变性的理论证明,并通过实验表明Set-LLM可以被有效训练,在消除顺序敏感性的同时,取得了与原模型相当甚至更优的性能,且保持了原模型的运行速度。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑