选择性样本学习用于代码解释
Selective Shot Learning for Code Explanation
AI总结:
本文针对代码解释任务,提出利用实体信息的选择性样本学习新方法SSL_ner,在开源代码LLM上系统评估多种少样本选择策略,并验证其优于现有方法。
摘要:
代码解释在软件工程领域扮演着至关重要的角色,帮助开发者高效地理解代码功能。近期研究表明,大型语言模型(LLM)在少样本设置下的代码解释性能会有所提升,尤其是当少样本示例被智能地选择时。这种选择性样本学习(SSL)的最新方法包括基于令牌和基于嵌入的方法。然而,这些SSL方法已在专有LLM上进行了评估,对开源代码LLM的探索不多。此外,这些方法缺乏对编程语言语法的考虑。为了弥补这些差距,我们提出了一项比较研究,并提出了一种新颖的SSL方法(SSL_ner),该方法利用实体信息进行少样本示例选择。我们提出了若干见解,并展示了SSL_ner方法在两个数据集上相对于最新方法的有效性。据我们所知,这是首次对开源代码LLM进行系统性基准测试,同时评估了各种少样本示例选择方法在代码解释任务上的性能。
英文摘要:
Code explanation plays a crucial role in the software engineering domain, aiding developers in grasping code functionality efficiently. Recent work shows that the performance of LLMs for code explanation improves in a few-shot setting, especially when the few-shot examples are selected intelligently. State-of-the-art approaches for such Selective Shot Learning (SSL) include token-based and embedding-based methods. However, these SSL approaches have been evaluated on proprietary LLMs, without much exploration on open-source Code-LLMs. Additionally, these methods lack consideration for programming language syntax. To bridge these gaps, we present a comparative study and propose a novel SSL method (SSL_ner) that utilizes entity information for few-shot example selection. We present several insights and show the effectiveness of SSL_ner approach over state-of-the-art methods across two datasets. To the best of our knowledge, this is the first systematic benchmarking of open-source Code-LLMs while assessing the performances of the various few-shot examples selection approaches for the code explanation task.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。