Better Context Makes Better Code Language Models: A Case Study on Function Call Argument Completion

AI-generated keywords: Code completion models

AI-generated Key Points

The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.

  • Existing code completion models have limitations in considering non-local context when predicting function call arguments
  • Introduction of a new dataset comprising permissively licensed Python packages with complete projects and dependencies to address this gap
  • Leveraging program analyzers to extract non-local information essential for accurate function call argument completion
  • Querying a program analyzer for relevant information related to a specific function call significantly enhances argument completion performance
  • Incorporating details such as function implementation and usage patterns during both training and inference stages outperforms existing models
  • Importance of considering various sources of data from program analyzers to improve accuracy in completing function call arguments
  • Significance of incorporating broader contextual information beyond local file contexts in enhancing code language models for efficient program synthesis
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Hengzhi Pei, Jinman Zhao, Leonard Lausen, Sheng Zha, George Karypis

12 pages. Accepted to AAAI 2023

Abstract: Pretrained code language models have enabled great progress towards program synthesis. However, common approaches only consider in-file local context and thus miss information and constraints imposed by other parts of the codebase and its external dependencies. Existing code completion benchmarks also lack such context. To resolve these restrictions we curate a new dataset of permissively licensed Python packages that includes full projects and their dependencies and provide tools to extract non-local information with the help of program analyzers. We then focus on the task of function call argument completion which requires predicting the arguments to function calls. We show that existing code completion models do not yield good results on our completion task. To better solve this task, we query a program analyzer for information relevant to a given function call, and consider ways to provide the analyzer results to different code completion models during inference and training. Our experiments show that providing access to the function implementation and function usages greatly improves the argument completion performance. Our ablation study provides further insights on how different types of information available from the program analyzer and different ways of incorporating the information affect the model performance.

Submitted to arXiv on 01 Jun. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2306.00381v1

This paper's license doesn't allow us to build upon its content and the summarizing process is here made with the paper's metadata rather than the article.

, , , , The paper "Better Context Makes Better Code Language Models: A Case Study on Function Call Argument Completion" by Hengzhi Pei, Jinman Zhao, Leonard Lausen, Sheng Zha, and George Karypis explores the limitations of existing code completion models in considering non-local context when predicting function call arguments. The authors introduce a new dataset comprising permissively licensed Python packages with complete projects and dependencies to address this gap. By leveraging program analyzers, they extract non-local information essential for accurate function call argument completion. The focus of the study is on predicting arguments for function calls, a task where traditional code completion models fall short. The authors demonstrate that querying a program analyzer for relevant information related to a specific function call significantly enhances argument completion performance. By incorporating details such as function implementation and usage patterns during both training and inference stages, the proposed approach outperforms existing models. Through experiments and an ablation study, the authors provide insights into how different types of information obtained from program analyzers impact model performance. They highlight the importance of considering various sources of data to improve accuracy in completing function call arguments. The findings underscore the significance of incorporating broader contextual information beyond local file contexts in enhancing code language models for efficient program synthesis. This research contributes valuable knowledge towards refining code completion systems by emphasizing the critical role of comprehensive context in achieving better model performance.
Created on 09 Mar. 2024

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.