Web APIs recommendation based on multi-task learning and fairness-aware compensation
摘要
As the number of Web APIs rapidly increases, recommending accurate and efficient APIs for Mashup developers has become a key issue in the service computing field. The descriptions of Mashups and APIs are typically brief, existing methods often use a single-scale feature extracting method to extract textual information by a single-task, which limits the ability to learn high-quality semantic representations and reduces recommendation performance. Meanwhile, Mashup developers tend to invoke popular APIs, which further exacerbates data sparsity and leads to recommendation unfairness. To address these problems, this paper proposes a Web APIs recommendation method based on multi-task learning and fairness-aware compensation, which fully extracts multi-scale semantic features of services and leverages information shared across multiple tasks to augment service interaction data, so as to alleviate data sparsity and improve recommendation accuracy. First, hierarchical semantic information fusion and spatial pyramid pooling are integrated into the BERT to capture multi-scale semantic features, thereby enhancing the representation of short-text descriptions of Web services. Next, a capsule network-based multi-task learning layer is designed to jointly extract semantic representations of Mashups and APIs from multiple perspectives, effectively alleviating the data sparsity problem. Finally, a fairness compensation mechanism is introduced to adjust the final prediction scores, aiming to improve the recommendation fairness. Extensive experiments on real-world dataset demonstrate the effectiveness of the proposed method.