arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.13412cs.SEcs.AI
收藏

探索-构建-过滤:一种用于丰富且可靠的API知识图谱构建的自动化框架

Explore-Construct-Filter: An Automated Framework for Rich and Reliable API Knowledge Graph Construction

Zhejiang University(浙江大学);CSIRO’s Data61(澳大利亚联邦科学与工业研究组织Data61)

Yanbang Sun, Qing Huang, Xiaoxue Ren, Zhenchang Xing, Xiaohong Li, Junjie Wang

AI总结:

针对现有API知识图谱构建中人工开销大或噪声多的问题,提出基于LLMs的Explore-Construct-Filter自动化框架,通过探索、构建、过滤三模块提升KG丰富度与可靠性,实验F1分数提升25.2%且具通用性。

摘要:

API知识图谱(API KG)是一种结构化网络,用于建模API实体及其关系,为API推荐、代码生成和API误用检测等任务提供必要的语义洞察。然而,构建知识丰富且可靠的API KG面临若干挑战。现有基于模式的方法严重依赖人工标注来设计KG模式,导致过多的人工开销;另一方面,无模式方法由于缺乏模式指导,容易引入噪声,降低KG的可靠性。为解决这些问题,我们提出探索-构建-过滤(Explore-Construct-Filter)框架,一种基于大型语言模型(LLMs)的API KG自动化构建方法。该框架包含三个关键模块:1)KG探索:LLMs模拟标注者的工作流程,自动设计包含全面类型三元组的模式,最大限度减少人工干预;2)KG构建:在模式指导下,LLMs提取实例三元组,构建丰富但不可靠的API KG;3)KG过滤:移除无效类型三元组和可疑实例三元组,构建丰富且可靠的API KG。实验结果表明,我们的方法优于最先进的方法,F1分数提升25.2%。此外,探索-构建-过滤框架被证明是有效的,KG探索模块使KG丰富度提升133.6%,KG过滤模块使可靠性提升26.6%。最后,跨模型实验证实了我们框架的通用性。

英文摘要:

The API Knowledge Graph (API KG) is a structured network that models API entities and their relations, providing essential semantic insights for tasks such as API recommendation, code generation, and API misuse detection. However, constructing a knowledge-rich and reliable API KG presents several challenges. Existing schema-based methods rely heavily on manual annotations to design KG schemas, leading to excessive manual overhead. On the other hand, schema-free methods, due to the lack of schema guidance, are prone to introducing noise, reducing the KG's reliability. To address these issues, we propose the Explore-Construct-Filter framework, an automated approach for API KG construction based on large language models (LLMs). This framework consists of three key modules: 1) KG exploration: LLMs simulate the workflow of annotators to automatically design a schema with comprehensive type triples, minimizing human intervention; 2) KG construction: Guided by the schema, LLMs extract instance triples to construct a rich yet unreliable API KG; 3) KG filtering: Removing invalid type triples and suspicious instance triples to construct a rich and reliable API KG. Experimental results demonstrate that our method surpasses the state-of-the-art method, achieving a 25.2% improvement in F1 score. Moreover, the Explore-Construct-Filter framework proves effective, with the KG exploration module increasing KG richness by 133.6% and the KG filtering module improving reliability by 26.6%. Finally, cross-model experiments confirm the generalizability of our framework.

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

↑