arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.05873cs.SEcs.IRcs.LG
收藏

LEGION:利用预训练语言模型结合分布平衡损失实现GitHub主题推荐

LEGION: Harnessing Pre-trained Language Models for GitHub Topic Recommendations with Distribution-Balance Loss

Hanoi University of Science and Technology(河内理工大学);The University of Melbourne(墨尔本大学);Università degli studi dell’Aquila(拉奎拉大学)

Yen-Trang Dang, Thanh-Le Cong, Phuc-Thanh Nguyen, Anh M. T. Bui, Phuong T. Nguyen, Bach Le, Quyet-Thang Huynh

AI总结:

针对GitHub代码仓库主题推荐现有方法语义理解不足的问题,提出结合预训练语言模型、分布平衡损失与过滤机制的Legion方法,在基准数据集上显著优于现有方法。

摘要:

开源开发通过促进协作、透明度和社区驱动创新,彻底变革了软件行业。如今,大量各类开源软件构成了代码仓库网络,通常托管在GitHub这一主流软件开发平台上。为提升相似代码仓库组成的仓库网络的可发现性,GitHub于2017年推出了代码仓库主题功能,使用户能够更便捷地按类型、技术等维度探索相关项目。因此,为每个GitHub代码仓库准确分配主题至关重要。现有的自动主题推荐方法高度依赖TF-IDF对文本数据进行编码,在理解语义细微差别方面存在挑战。本文针对现有技术的局限性,提出了Legion——一种利用预训练语言模型(PTMs)为GitHub代码仓库推荐主题的新方法。Legion的核心创新点有三:第一,Legion借助预训练语言模型强大的语言理解能力,捕捉GitHub代码仓库中的上下文信息与语义含义;第二,针对长尾分布导致预训练语言模型偏向热门主题的问题,Legion提出分布平衡损失(DB Loss)以更好地训练预训练语言模型;第三,Legion采用过滤器剔除模糊的推荐结果,从而提升预训练语言模型的推荐精度。我们在真实GitHub代码仓库构成的基准数据集上进行的实证评估表明,在GitHub主题推荐任务中,Legion可将普通预训练语言模型的性能提升最高26%。与当前最优基线方法相比,Legion能更精准、高效地推荐GitHub主题,在精确率(Precision)和F1分数上分别平均提升20%和5%。

英文摘要:

Open-source development has revolutionized the software industry by promoting collaboration, transparency, and community-driven innovation. Today, a vast amount of various kinds of open-source software, which form networks of repositories, is often hosted on GitHub - a popular software development platform. To enhance the discoverability of the repository networks, i.e., groups of similar repositories, GitHub introduced repository topics in 2017 that enable users to more easily explore relevant projects by type, technology, and more. It is thus crucial to accurately assign topics for each GitHub repository. Current methods for automatic topic recommendation rely heavily on TF-IDF for encoding textual data, presenting challenges in understanding semantic nuances. This paper addresses the limitations of existing techniques by proposing Legion, a novel approach that leverages Pre-trained Language Models (PTMs) for recommending topics for GitHub repositories. The key novelty of Legion is three-fold. First, Legion leverages the extensive capabilities of PTMs in language understanding to capture contextual information and semantic meaning in GitHub repositories. Second, Legion overcomes the challenge of long-tailed distribution, which results in a bias toward popular topics in PTMs, by proposing a Distribution-Balanced Loss (DB Loss) to better train the PTMs. Third, Legion employs a filter to eliminate vague recommendations, thereby improving the precision of PTMs. Our empirical evaluation on a benchmark dataset of real-world GitHub repositories shows that Legion can improve vanilla PTMs by up to 26% on recommending GitHubs topics. Legion also can suggest GitHub topics more precisely and effectively than the state-of-the-art baseline with an average improvement of 20% and 5% in terms of Precision and F1-score, respectively.

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

↑