On the Effectiveness of Pretrained Models for API Learning
Not on the map. Why?
Abstract (arXiv)
Developers frequently use APIs to implement certain functionalities, such as parsing Excel Files, reading and writing text files line by line, etc. Developers can greatly benefit from automatic API usage sequence generation based on natural language queries for building applications in a faster and cleaner manner. Existing approaches utilize information retrieval models to search for matching API sequences given a query or use RNN-based encoder-decoder to generate API sequences. As it stands, the first approach treats queries and API names as bags of words. It lacks deep comprehension of the semantics of the queries. The latter approach adapts a neural language model to encode a user query into a fixed-length context vector and generate API sequences from the context vector. We want to understand the effectiveness of recent Pre-trained Transformer based Models (PTMs) for the API learning task. These PTMs are trained on large natural language corpora in an unsupervised manner to retain contextual knowledge about the language and have found success in solving similar Natural Language Processing (NLP) problems. However, the applicability of PTMs has not yet been explored for the API sequence generation task. We use a dataset that contains 7 million annotations collected from GitHub to evaluate the PTMs empirically. This dataset was also used to assess previous approaches. Based on our results, PTMs generate more accurate API sequences and outperform other related methods by around 11%. We have also identified two different tokenization approaches that can contribute to a significant boost in PTMs' performance for the API sequence generation task.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 35 of its 53 references that are in the map. First posted on arXiv 5 Apr 2022.
Builds on
35 of 53 references.
References · 35
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020Pre-trained Models for Natural Language Processing: A Surveycited by 504
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2019MASS: Masked Sequence to Sequence Pre-training for Language Generationcited by 345
- 2019Benchmarking Zero-shot Text Classification: Datasets, Evaluation and Entailment Approachcited by 299
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2018Scaling Neural Machine Translationcited by 204
23 more
- 2022Synchromesh: Reliable code generation from pre-trained language modelscited by 156
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2021CPT: A Pre-Trained Unbalanced Transformer for Both Chinese Language Understanding and Generationcited by 81
- 2016Latent Predictor Networks for Code Generationcited by 73
- 2019Cross-Lingual Natural Language Generation via Pre-Trainingcited by 63
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2021DeltaLM: Encoder-Decoder Pre-training for Language Generation and Translation by Augmenting Pretrained Multilingual Encoderscited by 50
- 2019When Deep Learning Met Code Searchcited by 45
- 2016Deep API Learningcited by 41
- 2020ERNIE-GEN: An Enhanced Multi-Flow Pre-training and Fine-tuning Framework for Natural Language Generationcited by 39
- 2020Incorporating External Knowledge through Pre-training for Natural Language to Code Generationcited by 36
- 2019Pre-trained Language Model Representations for Language Generationcited by 34
- 2019Program Synthesis and Semantic Parsing with Learned Code Idiomscited by 34
- 2021ProphetNet-X: Large-Scale Pre-training Models for English, Chinese, Multi-lingual, Dialog, and Code Generationcited by 31
- 2017Language Generation with Recurrent Generative Adversarial Networks without Pre-trainingcited by 14
- 2021Multimodal Representation for Neural Code Searchcited by 11
- 2015SWIM: Synthesizing What I Meancited by 10
- 2021Evaluating Pre-Trained Models for User Feedback Analysis in Software Engineering: A Study on Classification of App-Reviewscited by 7
- 2020Pre-training technique to localize medical BERT and enhance biomedical BERTcited by 6
- 2015Parameter-Free Probabilistic API Mining across GitHubcited by 2
- 2022Pre-Trained Neural Language Models for Automatic Mobile App User Feedback Answer Generationcited by 2
- 2021FACOS: Finding API Relevant Contents on Stack Overflow with Semantic and Syntactic Analysiscited by 1
Built on by
Citing papers per year: 2023: 6; 2024: 2; 2025: 1.
9 papers.
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023InstructExcel: A Benchmark for Natural Language Instruction in Excelcited by 14
- 2023Enhancing Automated Program Repair through Fine-tuning and Prompt Engineeringcited by 10
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2023Pop Quiz! Do Pre-trained Code Models Possess Knowledge of Correct API Names?cited by 3
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentationcited by 2
- 2024Genetic Auto-prompt Learning for Pre-trained Code Intelligence Language Modelscited by 2
- 2024A Lean Transformer Model for Dynamic Malware Analysis and Detectioncited by 0
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2024A Lean Transformer Model for Dynamic Malware Analysis and Detection5 Aug 2024
- 2024Genetic Auto-prompt Learning for Pre-trained Code Intelligence Language Models20 Mar 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023InstructExcel: A Benchmark for Natural Language Instruction in Excel23 Oct 2023
- 2023Pop Quiz! Do Pre-trained Code Models Possess Knowledge of Correct API Names?14 Sep 2023
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Study30 Apr 2023
- 2023Enhancing Automated Program Repair through Fine-tuning and Prompt Engineering16 Apr 2023
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentation3 Mar 2023