With the rise of Web 2.0 and microservices, the increasing availability of Web APIs has intensified the need for effective recommendation systems. Existing approaches are generally categorized into two methods: recommendation-type methods, which classify APIs using labels, and match-type methods, which retrieve APIs through matching with mashups. However, three significant challenges remain: 1) semantic ambiguities in comparing API and mashup descriptions, 2) a lack of progressive semantic refinement between mashup requirements and individual API descriptions, and 3) computational inefficiency of exhaustive mashup-API comparisons in large-scale repositories. To tackle these challenges, we propose WARBERT, a hierarchical model based on BERT for Web API recommendation. WARBERT utilizes dual-component feature fusion and attention mechanisms to create accurate semantic representations. It consists of WARBERT(R) for initial candidate filtering using recommendation methods, and WARBERT(M), which focuses on refined similarity matching. The final likelihood of an API-mashup pairing combines predictions from both components, with WARBERT(R) further enhanced by an auxiliary task of predicting mashup categories. Experiments conducted on the ProgrammableWeb dataset demonstrate WARBERT outperforms existing baselines, achieving notable improvements in both accuracy and efficiency.
翻译:随着Web 2.0和微服务的兴起,Web API的日益丰富使得有效的推荐系统需求愈发迫切。现有方法通常分为两类:推荐型方法(通过标签对API进行分类)和匹配型方法(通过与组合应用匹配进行API检索)。然而,仍存在三大挑战:1)API与组合应用描述间的语义歧义;2)组合应用需求与单个API描述之间缺乏渐进式语义细化;3)大规模存储库中穷举式API-组合应用对比的计算效率低下。针对这些问题,本文提出WARBERT——一种基于BERT的分层Web API推荐模型。WARBERT利用双组件特征融合与注意力机制构建精准语义表征,包含采用推荐方法进行初始候选过滤的WARBERT(R)组件,以及专注于精细化相似度匹配的WARBERT(M)组件。最终API-组合应用配对概率由两组件预测结果联合生成,其中WARBERT(R)通过预测组合应用类别的辅助任务进一步强化。在ProgrammableWeb数据集上的实验表明,WARBERT在准确性和效率方面均显著优于现有基准方法。