[论文解读] A Multi-Task Embedder For Retrieval Augmented LLMs
本论文提出 LLM-Embedder,一种统一的嵌入模型,采用多任务、奖励引导、蒸馏驱动的框架进行训练,以提升 LLM 的检索增强,在知识增强、长上下文建模、工具学习和对话检索等方面的表现。
LLMs confront inherent limitations in terms of its knowledge, memory, and action. The retrieval augmentation stands as a vital mechanism to address these limitations, which brings in useful information from external sources to augment the LLM. However, existing retrieval methods encounter two pressing issues. On one hand, the general retrievers are not properly optimized for retrieval augmentation hence exhibit limited effectiveness; on the other hand, the task-specific retrievers excel in the targeted retrieval augmentation scenario, while lack the versatility to handle diverse scenarios. In this work, we propose extbf{LLM-Embedder} for the unified support of diverse retrieval augmentation scenarios. Our method presents three technical contributions. Firstly, we introduce a new extit{reward formulation}, namely {rank-aware reward}. It exploits the ranking position of the desired output among $N$ sampled outputs from the LLM, which leads to fine-grained and robust computation of reward from the LLM's feedback. Secondly, we design a novel extit{distillation objective}, called graded distillation. It incorporates both the absolute value and the relative order of the reward for more sufficient utilization of the LLM's feedback. Thirdly, we systematically optimize the extit{multi-task learning}, which effectively unifies the multiple retrieval functionalities into one model. In our experiment, LLM-Embedder notably improves the LLM's performances in various downstream tasks, and outperforms both general and task-specific retrievers with a substantial advantage.
研究动机与目标
- 通过利用检索增强来激发并解决 LLM 的三个内在边界(知识、记忆、能力)。
- 提出一个统一的嵌入模型(LLM-Embedder),用一个主干支持多样化的检索增强任务。
- 发展一个结合基于 LLM 的奖励、稳定的蒸馏、基于指令的微调,以及同质性批内负样本的稳健训练方法。
- 证明 LLM-Embedder 在多种检索场景中超越通用和特定任务的检索器。
提出的方法
- 使用多样的数据源训练统一的嵌入模型(LLM-Embedder):QA(MSMARCO,Natural Questions)、对话检索(QReCC)、工具学习(ToolLLM)、指令微调(FLAN、UPRISE)以及生成/历史数据(Books3、ArXiv、CodeParrot、Multi-Session Chat)。
- 使用包含硬标签和 LLM 派生奖励的复合监督信号来指导训练(reward 的 Equation 1)。
- 应用对比学习,结合基于指令的微调(任务特定提示 I_t)和同质批内负样本采样,以提高判别能力。
- 通过将软奖励权重与硬排序标签相结合来进行稳定蒸馏,以缓解奖励波动(Equation 3)。
- 使用基于 KL 散度的蒸馏,将基于嵌入的候选分布与 LLM 生成的奖励对齐,并通过自上而下的重新排序来稳定信号。
- 展示知识增强、长上下文建模、上下文内学习、工具学习和对话检索的检索增强工作流。
实验结果
研究问题
- RQ1RQ1:LLM-Embedder 是否能够全面支持 LLMs 的多样化检索增强场景?
- RQ2RQ2:LLM-Embedder 对每个单独检索场景的影响是什么?
- RQ3RQ3:哪些因素影响 LLM-Embedder 的实证性能?
- RQ4RQ4:统一嵌入模型与通用型和特定任务的检索器在基准测试中的表现相比如何?
主要发现
- LLM-Embedder 在知识、记忆和遵循指令任务上相较于 None 及多数基线,持续提升 LLM 性能。
- 在多种场景中,它优于通用嵌入模型(如 Contriever、RetroMAE-BEIR、BGE)以及若干任务特定检索器(如 AAR、LLM-R、API-Retriever)。
- 任务特定的检索器在应用于其优化场景之外时可能表现不佳,而 LLM-Embedder 在多样化任务中保持竞争力。
- 知识增强受益于更高的检索准确性,在知识密集型数据集如 PopQA 上收益更为显著。
- 上下文内学习和长上下文建模在分别使用检索得到的演示与记忆块时显示出持续的提升。
- 长上下文场景(对话和语言模型)在困惑度和检索辅助指标上有所提升,工具学习与对话检索通过排名指标(NDCG)进行评估。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。