arXiv:2505.11754cs.CL2025-05ACL被引 6

研究语言模型在多跳问答中对文档顺序的敏感性,发现排序影响性能。

Masking in Multi-hop QA: An Analysis of How Language Models Perform with Context Permutation

  • 通过打乱检索文档顺序,测试模型在多跳问答中的表现差异。
  • 编码器-解码器模型在小规模下仍优于因果解码器模型。
  • 调整注意力机制可提升解码器模型性能,适合改进现有问答系统。

多跳问答(MHQA)增加了信息推理的复杂性,要求语言模型不仅从多个检索结果中提取信息,还需跨文档进行多步推理。尽管语言模型在传统问答任务中表现良好,但其因果掩码可能限制其在复杂上下文中的推理能力。本文通过在不同配置下对检索文档进行随机排列,分析语言模型在多跳问答中的响应。实验发现:1)如Flan-T5系列的编码器-解码器模型,虽体积更小,但在MHQA任务中普遍优于因果解码器模型;2)改变黄金文档顺序后,Flan-T5和微调后的解码器模型均表现出明显趋势,当文档顺序与推理链一致时性能最佳;3)通过修改因果掩码引入双向注意力,可有效提升解码器模型的最终表现。此外,我们深入分析了语言模型在MHQA中的注意力分布,发现正确答案对应的注意力权重更高。基于此,我们设计启发式方法进一步优化模型表现。代码已公开于 https://github.com/hwy9855/MultiHopQA-Reasoning。

原文摘要 · Abstract (English)

Multi-hop Question Answering (MHQA) adds layers of complexity to question answering, making it more challenging. When Language Models (LMs) are prompted with multiple search results, they are tasked not only with retrieving relevant information but also employing multi-hop reasoning across the information sources. Although LMs perform well on traditional question-answering tasks, the causal mask can hinder their capacity to reason across complex contexts. In this paper, we explore how LMs respond to multi-hop questions by permuting search results (retrieved documents) under various configurations. Our study reveals interesting findings as follows: 1) Encoder-decoder models, such as the ones in the Flan-T5 family, generally outperform causal decoder-only LMs in MHQA tasks, despite being significantly smaller in size; 2) altering the order of gold documents reveals distinct trends in both Flan T5 models and fine-tuned decoder-only models, with optimal performance observed when the document order aligns with the reasoning chain order; 3) enhancing causal decoder-only models with bi-directional attention by modifying the causal mask can effectively boost their end performance. In addition to the above, we conduct a thorough investigation of the distribution of LM attention weights in the context of MHQA. Our experiments reveal that attention weights tend to peak at higher values when the resulting answer is correct. We leverage this finding to heuristically improve LMs' performance on this task. Our code is publicly available at https://github.com/hwy9855/MultiHopQA-Reasoning.

多跳问答语言模型注意力机制

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