NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Boosting API Recommendation With Implicit Feedback

Yu Zhou, Xinying Yang, Taolue Chen, Zhiqiu Huang, Xiaoxing Ma, Harald C. GallIEEE Trans. Software Eng 2020 · DOI

Abstract

Finding the appropriate Application Programming Interface (API) within massive libraries is a persistent challenge for software developers. Existing query-based recommendation tools often struggle with the semantic gap between natural language and code, and they typically lack the ability to learn from user interactions. We present BRAID (Boosting RecommendAtion with Implicit FeeDback), a "plug-and-play" framework designed to augment existing API recommenders. By integrating Learning-to-Rank (LTR) and Active Learning (AL), BRAID leverages implicit user feedback to refine recommendations. Empirical evaluations show that BRAID improves Top-1 accuracy by up to 18.39% with minimal computational overhead.

Introduction

Modern software development is increasingly dependent on APIs. However, the "needle in a haystack" problem persists: developers often struggle to find the specific API needed for a task among thousands of options. Current tools suffer from two primary limitations. First, the semantic gap: natural language queries (e.g., "make a negative number positive") often share no keywords with the corresponding API (e.g., java.lang.Math.abs). Second, static recommendations: most tools do not adapt based on user behavior, missing opportunities for personalization and continuous improvement.

BRAID addresses these issues by treating user selections as implicit feedback—a goldmine of relevance data. By remembering that a user searching for "X" eventually selected "Y," the system bridges the semantic gap without requiring explicit keyword matches.

The BRAID Framework

BRAID is designed as a re-ranking layer that can be integrated with various base API recommenders. Its architecture comprises four distinct engines:

  1. Initial Recommendation: BRAID receives a list of candidate APIs from an existing tool (e.g., BIKER or RACK).
  2. Feedback Repository: This database stores historical query-API pairs based on actual user selections, serving as a proxy for ground-truth relevance.
  3. Feature Extraction Engine: It generates feature vectors for candidates based on documentation similarity and feedback features (similarity to successful historical queries).
  4. Ranking Engine: Utilizing the LambdaMART Learning-to-Rank algorithm, this component optimizes the final list order.
The four-component architecture of the BRAID framework.

To overcome the "cold start" problem—where a lack of initial feedback data hinders performance—BRAID incorporates an Active Learning (AL) module. This module uses uncertainty sampling to identify informative samples and employs Stack Overflow as an "oracle" to automatically label them. This allows the system to become effective much faster than traditional feedback-based systems.

The Active Learning iteration process used to address the cold-start problem.

Evaluation and Results

The framework was evaluated using three benchmark datasets: BIKER (413 Stack Overflow questions), RACK (150 Java tutorial queries), and NLP2API (310 query-API pairs). A massive Stack Overflow dump was used to train Word2Vec embeddings and serve as the AL oracle.

The results demonstrate significant improvements across all metrics:

  • Accuracy Boost: Top-1 accuracy (Hit@1) increased by 9.44% for BIKER, 18% for RACK, and 18.39% for NLP2API.
  • Learning Efficiency: Performance improved steadily as feedback data accumulated, validating the framework's learning capability.
  • Performance: The computational overhead is negligible, adding only 0.1 to 0.26 seconds to the recommendation process.

Discussion and Future Work

While BRAID shows great promise, its current evaluation is limited to Java. Future work will explore its effectiveness in languages with smaller communities or less documentation. Additionally, the reliance on Stack Overflow "accepted answers" as an oracle introduces potential noise if community answers are suboptimal. Future directions include developing IDE plugins for real-world testing and extending the framework to context-aware code completion scenarios.

Summary updated

BibTeX
@article{zhou2020boosting,
  author = {Yu Zhou and Xinying Yang and Taolue Chen and Zhiqiu Huang and Xiaoxing Ma and Harald C. Gall},
  title = {{Boosting API Recommendation With Implicit Feedback}},
  journal = {IEEE Trans. Software Eng.},
  year = {2020},
  doi = {10.1109/tse.2021.3053111},
}
Figure