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

PTM4Tag+:使用预训练模型进行 Stack Overflow 帖子的标签推荐

PTM4Tag+: Tag Recommendation of Stack Overflow Posts with Pre-trained Models

Junda He, Bowen Xu, Zhou Yang, DongGyun Han, Chengran Yang, Jiakun Liu, Zhipeng Zhao, David Lo

AI总结:

提出 PTM4Tag+ 三元组框架,利用多个预训练模型分别建模 Stack Overflow 帖子的标题、描述和代码;CodeT5 取得最佳标签推荐效果,小模型则显著降低延迟。

摘要:

Stack Overflow 是最具影响力的软件问答(SQA)网站之一,托管着数百万个与编程相关的问题和答案。标签在高效组织 Stack Overflow 内容方面发挥着关键作用,并且对于支持一系列站点操作(例如查询相关内容)至关重要。选择不当的标签通常会引发标签歧义和标签爆炸等问题。因此,需要一种精确且准确的自动化标签推荐技术。受预训练模型(PTM)近期在自然语言处理(NLP)领域成功的启发,我们提出了 PTM4Tag+,这是一个面向 Stack Overflow 帖子的标签推荐框架,在语言建模中利用 PTM。PTM4Tag+ 采用三元组架构实现,该架构通过独立的 PTM 考虑帖子的三个关键组成部分,即标题、描述和代码。我们使用了多种流行的预训练模型,包括基于 BERT 的模型(例如 BERT、RoBERTa、CodeBERT、BERTOverflow 和 ALBERT)以及编码器-解码器模型(例如 PLBART、CoTexT 和 CodeT5)。我们的结果表明,在 PTM4Tag+ 框架下利用 CodeT5 在所考虑的八个 PTM 中取得了最佳性能,并且在平均 Precision@k、Recall@k 和 F1-score@k(k 范围为 1 到 5)方面大幅优于最先进的基于卷积神经网络的方法。具体而言,CodeT5 将 F1-score@1-5 的性能分别提升了 8.8%、12.4%、15.3%、16.4% 和 16.6%。此外,为了解决对推理延迟的担忧,我们使用较小的 PTM 模型(即 DistilBERT、DistilRoBERTa、CodeBERT-small 和 CodeT5-small)对 PTM4Tag+ 进行了实验。我们发现,尽管较小的 PTM 无法超越较大的 PTM,但它们平均仍保持超过 93.96% 的性能,同时将平均推理时间缩短了 47.2% 以上。

英文摘要:

Stack Overflow is one of the most influential Software Question & Answer (SQA) websites, hosting millions of programming-related questions and answers. Tags play a critical role in efficiently organizing the contents in Stack Overflow and are vital to support a range of site operations, e.g., querying relevant content. Poorly selected tags often raise problems like tag ambiguity and tag explosion. Thus, a precise and accurate automated tag recommendation technique is demanded. Inspired by the recent success of pre-trained models (PTMs) in natural language processing (NLP), we present PTM4Tag+, a tag recommendation framework for Stack Overflow posts that utilizes PTMs in language modeling. PTM4Tag+ is implemented with a triplet architecture, which considers three key components of a post, i.e., Title, Description, and Code, with independent PTMs. We utilize a number of popular pre-trained models, including the BERT-based models (e.g., BERT, RoBERTa, CodeBERT, BERTOverflow, and ALBERT), and encoder-decoder models (e.g., PLBART, CoTexT, and CodeT5). Our results show that leveraging CodeT5 under the PTM4Tag+ framework achieves the best performance among the eight considered PTMs and outperforms the state-of-the-art Convolutional Neural Network-based approach by a substantial margin in terms of average P recision@k, Recall@k, and F1-score@k (k ranges from 1 to 5). Specifically, CodeT5 improves the performance of F1-score@1-5 by 8.8%, 12.4%, 15.3%, 16.4%, and 16.6%. Moreover, to address the concern with inference latency, we experiment PTM4Tag+ with smaller PTM models (i.e., DistilBERT, DistilRoBERTa, CodeBERT-small, and CodeT5-small). We find that although smaller PTMs cannot outperform larger PTMs, they still maintain over 93.96% of the performance on average, meanwhile shortening the mean inference time by more than 47.2%

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

↑