A Toolkit for Generating Code Knowledge Graphs
Not on the map. Why?
Abstract (arXiv)
Knowledge graphs have been proven extremely useful in powering diverse applications in semantic search and natural language understanding. In this paper, we present GraphGen4Code, a toolkit to build code knowledge graphs that can similarly power various applications such as program search, code understanding, bug detection, and code automation. GraphGen4Code uses generic techniques to capture code semantics with the key nodes in the graph representing classes, functions, and methods. Edges indicate function usage (e.g., how data flows through function calls, as derived from program analysis of real code), and documentation about functions (e.g., code documentation, usage documentation, or forum discussions such as StackOverflow). Our toolkit uses named graphs in RDF to model graphs per program, or can output graphs as JSON. We show the scalability of the toolkit by applying it to 1.3 million Python files drawn from GitHub, 2,300 Python modules, and 47 million forum posts. This results in an integrated code graph with over 2 billion triples. We make the toolkit to build such graphs as well as the sample extraction of the 2 billion triples graph publicly available to the community for use.
Key facts. Cited by 17 papers in the map (data through 14 Oct 2026). First posted on arXiv 21 Feb 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 3; 2022: 2; 2023: 3; 2024: 2; 2025: 3; 2026: 4.
17 papers.
Sort:
By area:
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 65
- 2022Python Code Generation by Asking Clarification Questionscited by 17
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completioncited by 15
- 2023SARF: Aliasing Relation Assisted Self-Supervised Learning for Few-shot Relation Reasoningcited by 9
- 2021A Scalable AutoML Approach Based on Graph Neural Networkscited by 7
- 2021Can Machines Read Coding Manuals Yet? -- A Benchmark for Building Better Language Models for Code Understandingcited by 5
- 2023Towards Trustworthy AI Software Development Assistancecited by 4
- 2023KGLiDS: A Platform for Semantic Abstraction, Linking, and Automation of Data Sciencecited by 2
- 2024Knowledge Graphs: The Future of Data Integration and Insightful Discoverycited by 2
- 2026LogicLens: Leveraging Semantic Code Graph to explore Multi Repository large systemscited by 2
- 2021Federated Data Science to Break Down Silos [Vision]cited by 1
- 2025HDLxGraph: Bridging Large Language Models and HDL Repositories via HDL Graph Databasescited by 1
5 more
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generationcited by 1
- 2025Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph Executioncited by 0
- 2025ExeKGLib: A Platform for Machine Learning Analytics based on Knowledge Graphscited by 0
- 2026Ontology-Grounded Project Memory for Coding Agentscited by 0
- 2026CodeGraph: Open-Taxonomy Knowledge Graph for Source Code with Wikidata Groundingcited by 0
- 2026CodeGraph: Open-Taxonomy Knowledge Graph for Source Code with Wikidata Grounding24 Sep 2026
- 2026Ontology-Grounded Project Memory for Coding Agents13 Aug 2026
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generation8 Mar 2026
- 2026LogicLens: Leveraging Semantic Code Graph to explore Multi Repository large systems15 Jan 2026
- 2025ExeKGLib: A Platform for Machine Learning Analytics based on Knowledge Graphs1 Aug 2025
- 2025HDLxGraph: Bridging Large Language Models and HDL Repositories via HDL Graph Databases21 May 2025
- 2025Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph Execution7 Apr 2025
- 2024Knowledge Graphs: The Future of Data Integration and Insightful Discovery17 Dec 2024
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion10 Mar 2024
- 2023Towards Trustworthy AI Software Development Assistance14 Dec 2023
- 2023SARF: Aliasing Relation Assisted Self-Supervised Learning for Few-shot Relation Reasoning20 Apr 2023
- 2023KGLiDS: A Platform for Semantic Abstraction, Linking, and Automation of Data Science3 Mar 2023
5 more
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Context20 Dec 2022
- 2022Python Code Generation by Asking Clarification Questions19 Dec 2022
- 2021Federated Data Science to Break Down Silos [Vision]25 Nov 2021
- 2021A Scalable AutoML Approach Based on Graph Neural Networks29 Oct 2021
- 2021Can Machines Read Coding Manuals Yet? -- A Benchmark for Building Better Language Models for Code Understanding15 Sep 2021
- 2026Ontology-Grounded Project Memory for Coding Agentscited by 0
- 2026Ontology-Grounded Project Memory for Coding Agents13 Aug 2026
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 65
- 2022Python Code Generation by Asking Clarification Questionscited by 17
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completioncited by 15
- 2023SARF: Aliasing Relation Assisted Self-Supervised Learning for Few-shot Relation Reasoningcited by 9
- 2021A Scalable AutoML Approach Based on Graph Neural Networkscited by 7
- 2021Can Machines Read Coding Manuals Yet? -- A Benchmark for Building Better Language Models for Code Understandingcited by 5
- 2023Towards Trustworthy AI Software Development Assistancecited by 4
- 2023KGLiDS: A Platform for Semantic Abstraction, Linking, and Automation of Data Sciencecited by 2
- 2024Knowledge Graphs: The Future of Data Integration and Insightful Discoverycited by 2
- 2026LogicLens: Leveraging Semantic Code Graph to explore Multi Repository large systemscited by 2
- 2021Federated Data Science to Break Down Silos [Vision]cited by 1
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generationcited by 1
12 most cited of 15 All 15 (JSON)
- 2026CodeGraph: Open-Taxonomy Knowledge Graph for Source Code with Wikidata Grounding24 Sep 2026
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generation8 Mar 2026
- 2026LogicLens: Leveraging Semantic Code Graph to explore Multi Repository large systems15 Jan 2026
- 2025ExeKGLib: A Platform for Machine Learning Analytics based on Knowledge Graphs1 Aug 2025
- 2025Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph Execution7 Apr 2025
- 2024Knowledge Graphs: The Future of Data Integration and Insightful Discovery17 Dec 2024
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion10 Mar 2024
- 2023Towards Trustworthy AI Software Development Assistance14 Dec 2023
- 2023SARF: Aliasing Relation Assisted Self-Supervised Learning for Few-shot Relation Reasoning20 Apr 2023
- 2023KGLiDS: A Platform for Semantic Abstraction, Linking, and Automation of Data Science3 Mar 2023
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Context20 Dec 2022
- 2022Python Code Generation by Asking Clarification Questions19 Dec 2022
12 newest of 15 All 15 (JSON)