Commit2Vec: Learning Distributed Representations of Code Changes
Not on the map. Why?
Abstract (arXiv)
Deep learning methods, which have found successful applications in fields like image classification and natural language processing, have recently been applied to source code analysis too, due to the enormous amount of freely available source code (e.g., from open-source software repositories). In this work, we elaborate upon a state-of-the-art approach to the representation of source code that uses information about its syntactic structure, and we adapt it to represent source changes (i.e., commits). We use this representation to classify security-relevant commits. Because our method uses transfer learning (that is, we train a network on a "pretext task" for which abundant labeled data is available, and then we use such network for the target task of commit classification, for which fewer labeled instances are available), we studied the impact of pre-training the network using two different pretext tasks versus a randomly initialized model. Our results indicate that representations that leverage the structural information obtained through code syntax outperform token-based representations. Furthermore, the performance metrics obtained when pre-training on a loosely related pretext task with a very large dataset (>106 samples) were surpassed when pretraining on a smaller dataset (>104 samples) but for a pretext task that is more closely related to the target task.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). First posted on arXiv 18 Nov 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 4; 2022: 2; 2023: 0; 2024: 2; 2025: 3; 2026: 1.
12 papers.
- 2025LLM-JEPA: Large Language Models Meet Joint Embedding Predictive Architecturescited by 35
- 2021Unsupervised Learning of General-Purpose Embeddings for Code Changescited by 3
- 2022Dev2vec: Representing Domain Expertise of Developers in an Embedding Spacecited by 2
- 2024PatchFinder: A Two-Phase Approach to Security Patch Tracing for Disclosed Vulnerabilities in Open-Source Softwarecited by 2
- 2025Deep Learning-Based Identification of Inconsistent Method Names: How Far Are We?cited by 2
- 2021Automated Mapping of Vulnerability Advisories onto their Fix Commits in Open Source Repositoriescited by 1
- 2021Assessing the Effectiveness of Syntactic Structure to Learn Code Edit Representationscited by 1
- 2024Just-In-Time Software Defect Prediction via Bi-modal Change Representation Learningcited by 1
- 2025Securing the AI Supply Chain: What Can We Learn From Developer-Reported Security Issues and Solutions of AI Projects?cited by 1
- 2026Favia: Forensic Agent for Vulnerability-fix Identification and Analysiscited by 1
- 2021Detecting Security Fixes in Open-Source Repositories using Static Code Analyzerscited by 0
- 2022MQDD: Pre-training of Multimodal Question Duplicity Detection for Software Engineering Domaincited by 0
- 2026Favia: Forensic Agent for Vulnerability-fix Identification and Analysis13 Feb 2026
- 2025Securing the AI Supply Chain: What Can We Learn From Developer-Reported Security Issues and Solutions of AI Projects?29 Dec 2025
- 2025LLM-JEPA: Large Language Models Meet Joint Embedding Predictive Architectures11 Sep 2025
- 2025Deep Learning-Based Identification of Inconsistent Method Names: How Far Are We?22 Jan 2025
- 2024Just-In-Time Software Defect Prediction via Bi-modal Change Representation Learning15 Oct 2024
- 2024PatchFinder: A Two-Phase Approach to Security Patch Tracing for Disclosed Vulnerabilities in Open-Source Software24 Jul 2024
- 2022Dev2vec: Representing Domain Expertise of Developers in an Embedding Space11 Jul 2022
- 2022MQDD: Pre-training of Multimodal Question Duplicity Detection for Software Engineering Domain26 Mar 2022
- 2021Assessing the Effectiveness of Syntactic Structure to Learn Code Edit Representations11 Jun 2021
- 2021Unsupervised Learning of General-Purpose Embeddings for Code Changes3 Jun 2021
- 2021Detecting Security Fixes in Open-Source Repositories using Static Code Analyzers7 May 2021
- 2021Automated Mapping of Vulnerability Advisories onto their Fix Commits in Open Source Repositories24 Mar 2021