DQ-LoRe: Dual Queries with Low Rank Approximation Re-ranking for In-Context Learning

📄 arXiv: 2310.02954v6 📥 PDF

作者: Jing Xiong, Zixuan Li, Chuanyang Zheng, Zhijiang Guo, Yichun Yin, Enze Xie, Zhicheng Yang, Qingxing Cao, Haiming Wang, Xiongwei Han, Jing Tang, Chengming Li, Xiaodan Liang

分类: cs.CL

发布日期: 2023-10-04 (更新: 2026-01-09)

备注: Accepted in ICLR 2024

🔗 代码/项目: GITHUB


💡 一句话要点

提出DQ-LoRe框架以自动选择示例以提升LLM推理能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 上下文学习 双重查询 低秩近似 示例选择 推理任务 大型语言模型 自然语言处理

📋 核心要点

  1. 现有方法在复杂推理任务中示例选择的有效性不足,限制了LLMs的性能。
  2. DQ-LoRe框架通过双重查询机制和低秩近似重排序技术,优化示例选择过程。
  3. 实验表明,DQ-LoRe在自动示例选择中性能显著提升,尤其在分布变化场景下表现优越。

📝 摘要(中文)

近年来,自然语言处理领域的进展主要得益于大型语言模型(LLMs),其在上下文学习中的卓越能力引人注目。为指导LLMs进行复杂推理任务,利用Chain-of-Thought(CoT)范式中的中间推理步骤是一条有前景的途径。然而,如何有效选择示例以促进上下文学习仍然是一个挑战。本研究提出了DQ-LoRe框架,通过双重查询和低秩近似重排序,自动选择示例以支持上下文学习。实验结果表明,DQ-LoRe在GPT-4的自动示例选择中显著优于现有最先进的方法,性能从92.5%提升至94.2%。

🔬 方法详解

问题定义:本论文旨在解决在复杂推理任务中,如何有效选择示例以促进LLMs的上下文学习的问题。现有方法在示例选择上存在有效性不足的痛点,限制了模型的推理能力。

核心思路:DQ-LoRe框架的核心思路是通过双重查询机制,首先从LLM获取知识(如CoT),然后通过检索器基于问题和知识获取最终示例。此设计旨在提高示例选择的相关性和有效性。

技术框架:DQ-LoRe的整体架构包括两个主要模块:第一模块是双重查询,获取LLM生成的知识;第二模块是低秩近似重排序,通过降维技术优化示例选择,确保与输入问题知识的紧密对齐。

关键创新:DQ-LoRe的关键创新在于结合双重查询和低秩近似重排序,显著提升了示例选择的准确性和效率。这一方法与现有检索基础方法的本质区别在于其更好地利用了LLM生成的知识。

关键设计:在设计中,DQ-LoRe采用了特定的参数设置和损失函数,以确保示例选择的高效性和准确性。具体的网络结构和降维技术的选择也对最终性能起到了重要作用。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

DQ-LoRe在自动示例选择方面的实验结果显示,性能从92.5%提升至94.2%,显著优于现有最先进的方法。此外,DQ-LoRe在面对分布变化时表现出更强的适应性,进一步验证了其在复杂推理任务中的有效性。

🎯 应用场景

DQ-LoRe框架具有广泛的应用潜力,尤其在需要复杂推理和决策支持的领域,如法律分析、医疗诊断和教育辅导等。其自动选择示例的能力可以显著提升LLMs在实际应用中的表现,推动智能系统的进一步发展。

📄 摘要(原文)

Recent advances in natural language processing, primarily propelled by Large Language Models (LLMs), have showcased their remarkable capabilities grounded in in-context learning. A promising avenue for guiding LLMs in intricate reasoning tasks involves the utilization of intermediate reasoning steps within the Chain-of-Thought (CoT) paradigm. Nevertheless, the central challenge lies in the effective selection of exemplars for facilitating in-context learning. In this study, we introduce a framework that leverages Dual Queries and Low-rank approximation Re-ranking (DQ-LoRe) to automatically select exemplars for in-context learning. Dual Queries first query LLM to obtain LLM-generated knowledge such as CoT, then query the retriever to obtain the final exemplars via both question and the knowledge. Moreover, for the second query, LoRe employs dimensionality reduction techniques to refine exemplar selection, ensuring close alignment with the input question's knowledge. Through extensive experiments, we demonstrate that DQ-LoRe significantly outperforms prior state-of-the-art methods in the automatic selection of exemplars for GPT-4, enhancing performance from 92.5% to 94.2%. Our comprehensive analysis further reveals that DQ-LoRe consistently outperforms retrieval-based approaches in terms of both performance and adaptability, especially in scenarios characterized by distribution shifts. DQ-LoRe pushes the boundary of in-context learning and opens up new avenues for addressing complex reasoning challenges. Our code is released at https://github.com/menik1126/DQ-LoRe