Bake Two Cakes with One Oven: RL for Defusing Popularity Bias and Cold-start in Third-Party Library Recommendations
Minh Hoang Vuong, Anh M. T. Bui, Phuong T. Nguyen, Davide Di Ruscio
TL;DR
This paper tackles the dual challenges of popularity bias and cold-start in third-party library (TPL) recommendations by proposing RAILS, a graph-powered reinforcement learning framework. It combines LightGCN-based collaborative embeddings with a novel cold-start representation and a model-based offline RL agent that uses a reward function and a rarity-aware replay buffer to curb bias. Empirical results on three Java-centric datasets show that RAILS improves cold-start accuracy and reduces popularity bias while maintaining or enhancing diversity, with ablations highlighting the importance of Conservative Q-Learning and the replay partitioning scheme. The work demonstrates the potential of integrating graph embeddings with offline RL for more robust and fair TPL recommendations, and provides replication materials for further research.
Abstract
Third-party libraries (TPLs) have become an integral part of modern software development, enhancing developer productivity and accelerating time-to-market. However, identifying suitable candidates from a rapidly growing and continuously evolving collection of TPLs remains a challenging task. TPL recommender systems have been studied, offering a promising solution to address this issue. They typically rely on collaborative filtering (CF) that exploits a two-dimensional project-library matrix (user-item in general context of recommendation) when making recommendations. We have noticed that CF-based approaches often encounter two challenges: (i) a tendency to recommend popular items more frequently, making them even more dominant, a phenomenon known as popularity bias, and (ii) difficulty in generating recommendations for new users or items due to limited user-item interactions, commonly referred to as the cold-start problem. In this paper, we propose a reinforcement learning (RL)-based approach to address popularity bias and the cold-start problem in TPL recommendation. Our method comprises three key components. First, we utilize a graph convolution network (GCN)-based embedding model to learn user preferences and user-item interactions, allowing us to capture complex relationships within interaction subgraphs and effectively represent new user/item embeddings. Second, we introduce an aggregation operator to generate a representative embedding from user and item embeddings, which is then used to model cold-start users. Finally, we adopt a model-based RL framework for TPL recommendation, where popularity bias is mitigated through a carefully designed reward function and a rarity-based replay buffer partitioning strategy. The results demonstrated that our proposed approach outperforms state-of-the-art models in cold-start scenarios while effectively mitigating the impact of popularity bias.
