arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.11147cs.CL
收藏

面向上下文学习的推理图增强样例检索

Reasoning Graph Enhanced Exemplars Retrieval for In-Context Learning

Harbin Institute of Technology (Shenzhen)(哈尔滨工业大学(深圳));Peng Cheng Laboratory(鹏城实验室)

Yukang Lin, Bingchen Zhong, Shuoran Jiang, Joanna Siebert, Qingcai Chen

AI总结:

针对上下文学习中样例选择仅关注语义相似性的问题,提出推理图增强样例检索方法RGER,通过构建推理步骤图并结合图核匹配语义与结构相似性,在数学、逻辑推理任务上优于现有检索方法。

摘要:

大语言模型(LLM)已展现出卓越的少样本学习能力,并通过上下文学习(ICL)技术统一了自然语言处理任务的范式。尽管ICL取得了成功,但样例演示的质量会显著影响LLM的性能。现有的样例选择方法主要关注查询与候选样例之间的语义相似性。另一方面,推理步骤之间的逻辑关联也有助于刻画问题求解过程。本文提出了一种名为Reasoning Graph-enhanced Exemplar Retrieval(RGER,推理图增强样例检索)的新方法。RGER首先调用LLM生成初始响应,再将中间问题求解步骤表示为图结构,随后利用图核函数选择兼具语义与结构相似性的样例。大量实验表明,结构关系有助于查询与候选样例的对齐。RGER在数学和逻辑推理任务上的效果证明了其优于现有最先进的基于检索的方法。我们的代码发布于https://github.com/Yukang-Lin/RGER。

英文摘要:

Large language models (LLMs) have exhibited remarkable few-shot learning capabilities and unified the paradigm of NLP tasks through the in-context learning (ICL) technique. Despite the success of ICL, the quality of the exemplar demonstrations can significantly influence the LLM's performance. Existing exemplar selection methods mainly focus on the semantic similarity between queries and candidate exemplars. On the other hand, the logical connections between reasoning steps can be beneficial to depict the problem-solving process as well. In this paper, we proposes a novel method named Reasoning Graph-enhanced Exemplar Retrieval (RGER). RGER first quires LLM to generate an initial response, then expresses intermediate problem-solving steps to a graph structure. After that, it employs graph kernel to select exemplars with semantic and structural similarity. Extensive experiments demonstrate the structural relationship is helpful to the alignment of queries and candidate exemplars. The efficacy of RGER on math and logit reasoning tasks showcases its superiority over state-of-the-art retrieval-based approaches. Our code is released at https://github.com/Yukang-Lin/RGER.

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

↑