A Library for Representing Python Programs as Graphs for Machine Learning
Not on the map. Why?
Abstract (arXiv)
Graph representations of programs are commonly a central element of machine learning for code research. We introduce an open source Python library python_graphs that applies static analysis to construct graph representations of Python programs suitable for training machine learning models. Our library admits the construction of control-flow graphs, data-flow graphs, and composite ``program graphs'' that combine control-flow, data-flow, syntactic, and lexical information about a program. We present the capabilities and limitations of the library, perform a case study applying the library to millions of competitive programming submissions, and showcase the library's utility for machine learning research.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 30 of its 44 references that are in the map. First posted on arXiv 15 Aug 2022.
Builds on
30 of 44 references.
References · 30
- 2015Gated Graph Sequence Neural Networkscited by 792
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2017Learning to Represent Programs with Graphscited by 219
- 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2018TRANX: A Transition-based Neural Abstract Syntax Parser for Semantic Parsing and Code Generationcited by 88
- 2020Code Prediction by Feeding Trees to Transformerscited by 70
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2021Self-Supervised Bug Detection and Repaircited by 59
18 more
- 2020Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networkscited by 35
- 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
- 2019Learning to Fix Build Errors with Graph2Diff Neural Networkscited by 26
- 2019ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Rankingcited by 25
- 2020InferCode: Self-Supervised Learning of Code Representations by Predicting Subtreescited by 23
- 2020Learning Semantic Program Embeddings with Graph Interval Neural Networkcited by 20
- 2021Fault Localization with Code Coverage Representation Learningcited by 16
- 2020Learning to Represent Programs with Heterogeneous Graphscited by 13
- 2022HEAT: Hyperedge Attention Networkscited by 13
- 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11
- 2020Learning Graph Structure With A Finite-State Automaton Layercited by 10
- 2022Scalpel: The Python Static Analysis Frameworkcited by 9
- 2018Convolutional Neural Networks over Control Flow Graphs for Software Defect Predictioncited by 8
- 2018Path-Based Function Embedding and its Application to Specification Miningcited by 8
- 2021Modular Tree Network for Source Code Representation Learningcited by 8
- 2021Learning to Extend Program Graphs to Work-in-Progress Codecited by 3
- 2014The Correlation among Software Complexity Metrics with Case Studycited by 2
- 2019Using GGNN to recommend log statement levelcited by 1
Built on by
Citing papers per year: 2023: 2; 2024: 2.
4 papers.
- 2023Transformers Meet Directed Graphscited by 39
- 2023COMEX: A Tool for Generating Customized Source Code Representationscited by 3
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representationcited by 0
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scalecited by 0
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scale11 Jul 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023COMEX: A Tool for Generating Customized Source Code Representations10 Jul 2023
- 2023Transformers Meet Directed Graphs31 Jan 2023