arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.18723cs.LGcs.LO
收藏

LLASP:用于回答集编程的大型语言模型微调

LLASP: Fine-tuning Large Language Models for Answer Set Programming

University of Calabria(卡拉布里亚大学);ICAR-CNR(ICAR-CNR(意大利国家研究委员会智能系统与人工智能研究所));DLVSystem Srl(DLVSystem有限责任公司)

Erica Coppolillo, Francesco Calimeri, Giuseppe Manco, Simona Perri, Francesco Ricca

AI总结:

本文针对大型语言模型在回答集编程(ASP)代码生成中表现不佳的问题,提出了一种微调的轻量级模型LLASP,并构建了专用数据集,实验证明其生成的ASP程序质量显著优于多数大型模型。

摘要:

近期,大型语言模型(LLMs)在包括代码生成在内的多种自然语言处理任务中展现了其潜力。然而,尽管在使LLMs为多种命令式编程语言和任务生成代码方面取得了显著进展,但它们在应用于声明式形式化(如回答集编程,ASP)方面仍存在明显差距。在本文中,我们朝着探索LLMs在ASP代码生成中的能力迈出了一步。首先,我们对几种最先进的LLMs进行了系统评估。尽管这些模型在参数数量、训练数据和计算资源方面具有强大优势,但实证结果表明它们在生成正确的ASP程序方面表现不佳。因此,我们提出了LLASP,这是一种经过微调的轻量级模型,专门训练用于编码基本的ASP程序模式。为此,我们创建了一个专用数据集,涵盖了广泛的可使用ASP编码的基本问题规范。我们的实验表明,LLASP生成的ASP程序质量显著。这不仅在与未微调的对应模型相比时成立,而且在与大多数急切LLM候选模型相比时也成立,特别是从语义角度来看。用于执行实验的所有代码和数据均可在 https://anonymous.4open.science/r/LLASP-D86C/ 公开获取。

英文摘要:

Recently, Large Language Models (LLMs) have showcased their potential in various natural language processing tasks, including code generation. However, while significant progress has been made in adapting LLMs to generate code for several imperative programming languages and tasks, there remains a notable gap in their application to declarative formalisms, such as Answer Set Programming (ASP). In this paper, we move a step towards exploring the capabilities of LLMs for ASP code generation. First, we perform a systematic evaluation of several state-of-the-art LLMs. Despite their power in terms of number of parameters, training data and computational resources, empirical results demonstrate inadequate performances in generating correct ASP programs. Therefore, we propose LLASP, a fine-tuned lightweight model specifically trained to encode fundamental ASP program patterns. To this aim, we create an ad-hoc dataset covering a wide variety of fundamental problem specifications that can be encoded in ASP. Our experiments demonstrate that the quality of ASP programs generated by LLASP is remarkable. This holds true not only when compared to the non-fine-tuned counterpart but also when compared to the majority of eager LLM candidates, particularly from a semantic perspective. All the code and data used to perform the experiments are publicly available at https://anonymous.4open.science/r/LLASP-D86C/.

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

↑