InferCode: Self-Supervised Learning of Code Representations by Predicting Subtrees
Not on the map. Why?
Abstract (arXiv)
Building deep learning models on source code has found many successful software engineering applications, such as code search, code comment generation, bug detection, code migration, and so on. Current learning techniques, however, have a major drawback that these models are mostly trained on datasets labeled for particular downstream tasks, and code representations may not be suitable for other tasks. While some techniques produce representations from unlabeled code, they are far from satisfactory when applied to downstream tasks. Although certain techniques generate representations from unlabeled code when applied to downstream tasks they are far from satisfactory. This paper proposes InferCode to overcome the limitation by adapting the self-supervised learning mechanism to build source code model. The key novelty lies in training code representations by predicting automatically identified subtrees from the context of the ASTs. Subtrees in ASTs are treated with InferCode as the labels for training code representations without any human labeling effort or the overhead of expensive graph construction, and the trained representations are no longer tied to any specific downstream tasks or code units. We trained an InferCode model instance using the Tree-based CNN as the encoder of a large set of Java code and applied it to downstream unsupervised tasks such as code clustering, code clone detection, cross-language code search or reused under a transfer learning scheme to continue training the model weights for supervised tasks such as code classification and method name prediction. Compared to previous code learning techniques applied to the same downstream tasks, such as Code2Vec, Code2Seq, ASTNN, higher performance results are achieved using our pre-trained InferCode model with a significant margin for most tasks including those involving different programming languages.
Key facts. Cited by 23 papers in the map (data through 14 Oct 2026). First posted on arXiv 13 Dec 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 7; 2023: 10; 2024: 4.
23 papers.
Sort:
By area:
- 2021How could Neural Networks understand Programs?cited by 26
- 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agentcited by 24
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2021Graph Neural Networks: Methods, Applications, and Opportunitiescited by 16
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challengescited by 14
- 2022AutoPruner: Transformer-Based Call Graph Pruningcited by 11
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lackingcited by 7
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviorscited by 5
- 2023Large Language Models Should Ask Clarifying Questions to Increase Confidence in Generated Codecited by 5
11 more
- 2022A Library for Representing Python Programs as Graphs for Machine Learningcited by 4
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentationcited by 4
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformationcited by 4
- 2022Evaluation of Contrastive Learning with Various Code Representations for Code Clone Detectioncited by 3
- 2022NeuDep: Neural Binary Memory Dependence Analysiscited by 3
- 2023Reliability Assurance for Deep Neural Network Architectures Against Numerical Defectscited by 3
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistenciescited by 3
- 2023xASTNN: Improved Code Representations for Industrial Practicecited by 2
- 2023A Study of Variable-Role-based Feature Enrichment in Neural Models of Codecited by 0
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Taskscited by 0
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embeddingcited by 0
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Tasks17 Jun 2024
- 2024HumanEvalComm: Benchmarking the Communication Competence of Code Generation for LLMs and LLM Agent31 May 2024
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lacking19 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation10 Nov 2023
- 2023Large Language Models Should Ask Clarifying Questions to Increase Confidence in Generated Code25 Aug 2023
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challenges28 Jun 2023
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistencies10 Jun 2023
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMs31 May 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2023xASTNN: Improved Code Representations for Industrial Practice13 Mar 2023
11 more
- 2023A Study of Variable-Role-based Feature Enrichment in Neural Models of Code8 Mar 2023
- 2023Reliability Assurance for Deep Neural Network Architectures Against Numerical Defects13 Feb 2023
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentation6 Oct 2022
- 2022NeuDep: Neural Binary Memory Dependence Analysis4 Oct 2022
- 2022AutoPruner: Transformer-Based Call Graph Pruning7 Sep 2022
- 2022A Library for Representing Python Programs as Graphs for Machine Learning15 Aug 2022
- 2022Evaluation of Contrastive Learning with Various Code Representations for Code Clone Detection17 Jun 2022
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviors10 May 2022
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Training4 May 2022
- 2021Graph Neural Networks: Methods, Applications, and Opportunities24 Aug 2021
- 2021How could Neural Networks understand Programs?10 May 2021
- 2021How could Neural Networks understand Programs?cited by 26
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMscited by 21
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2021Graph Neural Networks: Methods, Applications, and Opportunitiescited by 16
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challengescited by 14
- 2022AutoPruner: Transformer-Based Call Graph Pruningcited by 11
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lackingcited by 7
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviorscited by 5
- 2023Large Language Models Should Ask Clarifying Questions to Increase Confidence in Generated Codecited by 5
- 2022A Library for Representing Python Programs as Graphs for Machine Learningcited by 4
12 most cited of 21 All 21 (JSON)
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Tasks17 Jun 2024
- 2024CodeArt: Better Code Models by Attention Regularization When Symbols Are Lacking19 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation10 Nov 2023
- 2023Large Language Models Should Ask Clarifying Questions to Increase Confidence in Generated Code25 Aug 2023
- 2023A systematic literature review on source code similarity measurement and clone detection: techniques, applications, and challenges28 Jun 2023
- 2023CodeTF: One-stop Transformer Library for State-of-the-art Code LLMs31 May 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2023xASTNN: Improved Code Representations for Industrial Practice13 Mar 2023
- 2023A Study of Variable-Role-based Feature Enrichment in Neural Models of Code8 Mar 2023
- 2023Reliability Assurance for Deep Neural Network Architectures Against Numerical Defects13 Feb 2023
12 newest of 21 All 21 (JSON)