Call Me Maybe: Enhancing JavaScript Call Graph Construction using Graph Neural Networks
Not on the map. Why?
Abstract (arXiv)
Static analysis plays a key role in finding bugs, including security issues. A critical step in static analysis is building accurate call graphs that model function calls in a program. However, due to hard-to-analyze language features, existing call graph construction algorithms for JavaScript are neither sound nor complete. Prior work shows that even advanced solutions produce false edges and miss valid ones. In this work, we assist these tools by identifying missed call edges. Our main idea is to frame the problem as link prediction on full program graphs, using a rich representation with multiple edge types. Our approach, GRAPHIA, leverages recent advances in graph neural networks to model non-local relationships between code elements. Concretely, we propose representing JavaScript programs using a combination of syntactic- and semantic-based edges. GRAPHIA can learn from imperfect labels, including static call edges from existing tools and dynamic edges from tests, either from the same or different projects. Because call graphs are sparse, standard machine learning metrics like ROC are not suitable. Instead, we evaluate GRAPHIA by ranking function definitions for each unresolved call site. We conduct a large-scale evaluation on 50 popular JavaScript libraries with 163K call edges (150K static and 13K dynamic). GRAPHIA builds program graphs with 6.6M structural and 386K semantic edges. It ranks the correct target as the top candidate in over 42% of unresolved cases and within the top 5 in 72% of cases, reducing the manual effort needed for analysis. Our results show that learning-based methods can improve the recall of JavaScript call graph construction. To our knowledge, this is the first work to apply GNN-based link prediction to full multi-file program graphs for interprocedural analysis.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 31 of its 55 references that are in the map. First posted on arXiv 22 Jun 2025.
Builds on
31 of 55 references.
References · 31
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2018Link Prediction Based on Graph Neural Networkscited by 832
- 2020Benchmarking Graph Neural Networkscited by 680
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2018code2vec: Learning Distributed Representations of Codecited by 250
- 2017Learning to Represent Programs with Graphscited by 220
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 145
- 2018Tree-to-tree Neural Networks for Program Translationcited by 93
19 more
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
- 2018Generative Code Modeling with Graphscited by 60
- 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
- 2019Pythia: AI-assisted Code Completion Systemcited by 55
- 2018Structured Neural Summarizationcited by 54
- 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
- 2018Learning to Represent Editscited by 34
- 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
- 2020Typilus: Neural Type Hintscited by 29
- 2020ProGraML: Graph-based Deep Learning for Program Optimization and Analysiscited by 23
- 2014Structured Generative Models of Natural Source Codecited by 19
- 2018Oreo: Detection of Clones in the Twilight Zonecited by 19
- 2020SCELMo: Source Code Embeddings from Language Modelscited by 16
- 2021Static Inference Meets Deep Learning: A Hybrid Type Inference Approach for Pythoncited by 12
- 2022AutoPruner: Transformer-Based Call Graph Pruningcited by 11
- 2022VulCurator: A Vulnerability-Fixing Commit Detectorcited by 11
- 2022Automatic Root Cause Quantification for Missing Edges in JavaScript Call Graphs (Extended Version)cited by 1
- 2024On the Effectiveness of Machine Learning-based Call Graph Pruning: An Empirical Studycited by 1
- 2024Static JavaScript Call Graphs: A Comparative Studycited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.