arrow
Return

DDASR: Deep Diverse API Sequence Recommendation

delete2025-07-03
delete0
PRE
AI
S
Siyu Nan
J
Jian Wang
张能 cover
张能 (Neng Zhang)
D
Duantengchuan Li
李
李冰 (Bing Li)
DOI:10.1145/3712188delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Recommending API sequences is crucial in software development, saving developers time and effort. While previous studies primarily focus on accuracy, often recommending popular APIs, they tend to overlook less frequent, or ”tail,” APIs. This oversight, often a result of limited historical data, consequently diminishes the diversity of recommender systems. In this article, we propose DDASR, a framework for recommending API sequences containing both popular and tail APIs. To accurately capture developer intent, we utilize recent Large Language Models for learning query representations. To gain a better understanding of tail APIs, DDASR clusters tail APIs with similar functionality and replaces them with cluster centers to produce a pseudo ground truth. Moreover, a loss function is defined based on learning-to-rank to achieve an equilibrium in accuracy and diversity due to the inherent tradeoff between them. To evaluate DDASR, we conduct extensive experiments on Java and Python open source datasets. Results demonstrate that DDASR significantly achieves the best diversity without sacrificing accuracy. Compared to seven state-of-the-art approaches, DDASR improves accuracy metrics BLEU, ROUGE, MAP, and NDCG and diversity metric coverage by 108.28%, 67.30%, 88.59%, and 45.83%, respectively, on the Java dataset, as well as 9.83%, 2.45%, 8.06%, and 8.03%, respectively, on the Python dataset.
Keywords:
API recommendation
diversity
tail APIs
large language models
learning-to-rank

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

No organization information available
Cited Papers

Cited Papers

DDASR: Deep Diverse API Sequence Recommendation
err2025-07-03
err0
PREAI
errSiyu Nan; Jian Wang; Neng Zhang; Duantengchuan Li; Bing Li
errShare
errSave