DPEfficR: a data and parameter efficient approach for training neural API recommendation model - Yu, Haibo; Han, Xiaohong; Chen, Simin; Feng, Xiaoning; Sun, Guangzhao; Yang, Wei (Automated software engineering, 2025)
Recommending application programming interfaces (APIs) is practical and essential in today’s programming landscape. An accurate API recommendation system could significantly improve developers’ coding efficiency. State-of-the-art (SOTA) API recommendation systems typically employ deep learning models as the backend model. However, training the backend deep learning model for API recommendation systems poses a challenging task due to the significant effort required for data labeling and the need for extensive computations. These challenges deeply affect the process of updating an existing API recommendation system when the API evolves. To address these issues, this paper proposes DPEfficR , a data and parameter efficient method for building API recommendation systems. Specifically, DPEfficR includes (1) the data selection module; (2) the task-specific parameter tuning module; and (3) the runtime API selection module. The data selection module selects representative data, while the task-specific parameter tuning module tunes pre-trained LLMs with a small number of parameters. Once the LLM is well-tuned, the runtime API selection module searches for a more accurate API sequence through consistency checking. We compare our approach against seven baseline methods, which belong to three different types. Our comprehensive evaluation demonstrates the effectiveness of our approach in recommending a more accurate API sequence, achieving improvements of 40% in BLEU-4 and 25% in ROUGE-2 over the baseline methods, with only tunable parameters, representing just 0.049% of the parameters used in the baseline methods. Moreover, our ablation study demonstrates the effectiveness of the proposed modules in our systems.