{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,19]],"date-time":"2026-11-19T03:20:47Z","timestamp":1795058447374,"version":"4.10.2"},"reference-count":44,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2020,11,13]],"date-time":"2020-11-13T00:00:00Z","timestamp":1605225600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2020,11,13]]},"abstract":"<jats:p>Learning distributed representations of source code has been a challenging task for machine learning models. Earlier works treated programs as text so that natural language methods can be readily applied. Unfortunately, such approaches do not capitalize on the rich structural information possessed by source code. Of late, Graph Neural Network (GNN) was proposed to learn embeddings of programs from their graph representations. Due to the homogeneous (i.e. do not take advantage of the program-specific graph characteristics) and expensive (i.e. require heavy information exchange among nodes in the graph) message-passing procedure, GNN can suffer from precision issues, especially when dealing with programs rendered into large graphs. In this paper, we present a new graph neural architecture, called Graph Interval Neural Network (GINN), to tackle the weaknesses of the existing GNN. Unlike the standard GNN, GINN generalizes from a curated graph representation obtained through an abstraction method designed to aid models to learn. In particular, GINN focuses exclusively on intervals (generally manifested in looping construct) for mining the feature representation of a program, furthermore, GINN operates on a hierarchy of intervals for scaling the learning to large graphs.<\/jats:p>\n          <jats:p>We evaluate GINN for two popular downstream applications: variable misuse prediction and method name prediction. Results show in both cases GINN outperforms the state-of-the-art models by a comfortable margin. We have also created a neural bug detector based on GINN to catch null pointer deference bugs in Java code. While learning from the same 9,000 methods extracted from 64 projects, GINN-based bug detector significantly outperforms GNN-based bug detector on 13 unseen test projects. Next, we deploy our trained GINN-based bug detector and Facebook Infer, arguably the state-of-the-art static analysis tool, to scan the codebase of 20 highly starred projects on GitHub. Through our manual inspection, we confirm 38 bugs out of 102 warnings raised by GINN-based bug detector compared to 34 bugs out of 129 warnings for Facebook Infer. We have reported 38 bugs GINN caught to developers, among which 11 have been fixed and 12 have been confirmed (fix pending). GINN has shown to be a general, powerful deep neural network for learning precise, semantic program embeddings.<\/jats:p>","DOI":"10.1145\/3428205","type":"journal-article","created":{"date-parts":[[2020,11,24]],"date-time":"2020-11-24T23:36:06Z","timestamp":1606260966000},"page":"1-27","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":51,"title":["Learning semantic program embeddings with graph interval neural network"],"prefix":"10.1145","volume":"4","author":[{"given":"Yu","family":"Wang","sequence":"first","affiliation":[{"name":"Nanjing University, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ke","family":"Wang","sequence":"additional","affiliation":[{"name":"Visa Research, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Fengjuan","family":"Gao","sequence":"additional","affiliation":[{"name":"Nanjing University, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Linzhang","family":"Wang","sequence":"additional","affiliation":[{"name":"Nanjing University, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2020,11,13]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/3359591.3359735"},{"key":"e_1_2_2_2_1","volume-title":"International Conference on Learning Representations ( 2018 ).","author":"Allamanis Miltiadis","year":"2018","unstructured":"Miltiadis Allamanis , Marc Brockschmidt , and Mahmoud Khademi . 2018 . Learning to represent programs with graphs . International Conference on Learning Representations ( 2018 ). Miltiadis Allamanis, Marc Brockschmidt, and Mahmoud Khademi. 2018. Learning to represent programs with graphs. International Conference on Learning Representations ( 2018 )."},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/800028.808479"},{"key":"e_1_2_2_4_1","volume-title":"International Conference on Learning Representations ( 2019 ).","author":"Alon Uri","year":"2019","unstructured":"Uri Alon , Omer Levy , and Eran Yahav . 2019 a. code2seq: Generating sequences from structured representations of code . International Conference on Learning Representations ( 2019 ). Uri Alon, Omer Levy, and Eran Yahav. 2019a. code2seq: Generating sequences from structured representations of code. International Conference on Learning Representations ( 2019 )."},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290353"},{"key":"e_1_2_2_6_1","volume-title":"International Conference on Learning Representations ( 2015 ).","author":"Bahdanau Dzmitry","year":"2015","unstructured":"Dzmitry Bahdanau , Kyunghyun Cho , and Yoshua Bengio . 2015 . Neural machine translation by jointly learning to align and translate . International Conference on Learning Representations ( 2015 ). Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. International Conference on Learning Representations ( 2015 )."},{"key":"e_1_2_2_7_1","volume-title":"Proceedings of the 4th International Conference on Formal Methods for Components and Objects (FMCO'05)","author":"Berdine Josh","unstructured":"Josh Berdine , Cristiano Calcagno , and Peter W . O'Hearn. 2006. Smallfoot: Modular Automatic Assertion Checking with Separation Logic . In Proceedings of the 4th International Conference on Formal Methods for Components and Objects (FMCO'05) . Josh Berdine, Cristiano Calcagno, and Peter W. O'Hearn. 2006. Smallfoot: Modular Automatic Assertion Checking with Separation Logic. In Proceedings of the 4th International Conference on Formal Methods for Components and Objects (FMCO'05)."},{"key":"e_1_2_2_8_1","doi-asserted-by":"crossref","unstructured":"Cristiano Calcagno Dino Distefano Jeremy Dubreil Dominik Gabi Pieter Hooimeijer Martino Luca Peter O'Hearn Irene Papakonstantinou Jim Purbrick and Dulma Rodriguez. 2015. Moving Fast with Software Verification. In NASA Formal Methods Klaus Havelund Gerard Holzmann and Rajeev Joshi (Eds.).  Cristiano Calcagno Dino Distefano Jeremy Dubreil Dominik Gabi Pieter Hooimeijer Martino Luca Peter O'Hearn Irene Papakonstantinou Jim Purbrick and Dulma Rodriguez. 2015. Moving Fast with Software Verification. In NASA Formal Methods Klaus Havelund Gerard Holzmann and Rajeev Joshi (Eds.).","DOI":"10.1007\/978-3-319-17524-9_1"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.3115\/v1\/D14-1179"},{"key":"e_1_2_2_10_1","volume-title":"Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages.","author":"Cousot P.","unstructured":"P. Cousot and R. Cousot . 1977. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints . In Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. P. Cousot and R. Cousot. 1977. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages."},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.3115\/v1\/P14-1129"},{"key":"e_1_2_2_12_1","volume-title":"International Conference on Learning Representations ( 2020 ).","author":"Dinella Elizabeth","year":"2020","unstructured":"Elizabeth Dinella , Hanjun Dai , Ziyang Li , Mayur Naik , Le Song , and Ke Wang . 2020 . Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs . International Conference on Learning Representations ( 2020 ). Elizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik, Le Song, and Ke Wang. 2020. Hoppity: Learning Graph Transformations to Detect and Fix Bugs in Programs. International Conference on Learning Representations ( 2020 )."},{"key":"e_1_2_2_13_1","volume-title":"Structured Neural Summarization. International Conference on Learning Representations ( 2019 ).","author":"Fernandes Patrick","year":"2019","unstructured":"Patrick Fernandes , Miltiadis Allamanis , and Marc Brockschmidt . 2019 . Structured Neural Summarization. International Conference on Learning Representations ( 2019 ). Patrick Fernandes, Miltiadis Allamanis, and Marc Brockschmidt. 2019. Structured Neural Summarization. International Conference on Learning Representations ( 2019 )."},{"key":"e_1_2_2_14_1","volume-title":"Proceedings of the 34th International Conference on Machine Learning-Volume 70 (ICML'17)","author":"Gilmer Justin","unstructured":"Justin Gilmer , Samuel S. Schoenholz , Patrick F. Riley , Oriol Vinyals , and George E. Dahl . 2017. Neural Message Passing for Quantum Chemistry . In Proceedings of the 34th International Conference on Machine Learning-Volume 70 (ICML'17) . Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. 2017. Neural Message Passing for Quantum Chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70 (ICML'17)."},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1109\/IJCNN.2005.1555942"},{"key":"e_1_2_2_16_1","doi-asserted-by":"publisher","DOI":"10.1609\/aaai.v31i1.10742"},{"key":"e_1_2_2_17_1","volume-title":"Global Relational Models of Source Code. International Conference on Learning Representations ( 2020 ).","author":"Hellendoorn Vincent J.","year":"2020","unstructured":"Vincent J. Hellendoorn , Charles Sutton , Rishabh Singh , Petros Maniatis , and David Bieber . 2020 . Global Relational Models of Source Code. International Conference on Learning Representations ( 2020 ). Vincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis, and David Bieber. 2020. Global Relational Models of Source Code. International Conference on Learning Representations ( 2020 )."},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.5555\/2337223.2337322"},{"key":"e_1_2_2_19_1","doi-asserted-by":"crossref","unstructured":"Sepp Hochreiter and J\u00fcrgen Schmidhuber. 1997. Long Short-term Memory. Neural computation ( 1997 ).  Sepp Hochreiter and J\u00fcrgen Schmidhuber. 1997. Long Short-term Memory. Neural computation ( 1997 ).","DOI":"10.1162\/neco.1997.9.8.1735"},{"key":"e_1_2_2_20_1","volume-title":"DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones. In 29th International Conference on Software Engineering (ICSE'07)","author":"Jiang L.","unstructured":"L. Jiang , G. Misherghi , Z. Su , and S. Glondu . 2007 . DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones. In 29th International Conference on Software Engineering (ICSE'07) . L. Jiang, G. Misherghi, Z. Su, and S. Glondu. 2007. DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones. In 29th International Conference on Software Engineering (ICSE'07)."},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/2610384.2628055"},{"key":"e_1_2_2_22_1","volume-title":"International Conference on Learning Representations ( 2016 ).","author":"Li Yujia","year":"2016","unstructured":"Yujia Li , Daniel Tarlow , Marc Brockschmidt , and Richard Zemel . 2016 . Gated graph sequence neural networks . International Conference on Learning Representations ( 2016 ). Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. 2016. Gated graph sequence neural networks. International Conference on Learning Representations ( 2016 )."},{"key":"e_1_2_2_23_1","volume-title":"International Conference on Machine Learning.","author":"Maddison Chris","year":"2014","unstructured":"Chris Maddison and Daniel Tarlow . 2014 . Structured generative models of natural source code . In International Conference on Machine Learning. Chris Maddison and Daniel Tarlow. 2014. Structured generative models of natural source code. In International Conference on Machine Learning."},{"key":"e_1_2_2_24_1","unstructured":"Tomas Mikolov Ilya Sutskever Kai Chen Greg Corrado and Jefrey Dean. 2013. Distributed Representations of Words and Phrases and Their Compositionality. In Neural Information Processing Systems (NIPS).  Tomas Mikolov Ilya Sutskever Kai Chen Greg Corrado and Jefrey Dean. 2013. Distributed Representations of Words and Phrases and Their Compositionality. In Neural Information Processing Systems (NIPS)."},{"key":"e_1_2_2_25_1","volume-title":"Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering (ESEC\/FSE 2013 ).","author":"Nguyen Tung Thanh","unstructured":"Tung Thanh Nguyen , Anh Tuan Nguyen , Hoan Anh Nguyen , and Tien N. Nguyen . 2013. A Statistical Semantic Language Model for Source Code . In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering (ESEC\/FSE 2013 ). Tung Thanh Nguyen, Anh Tuan Nguyen, Hoan Anh Nguyen, and Tien N. Nguyen. 2013. A Statistical Semantic Language Model for Source Code. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering (ESEC\/FSE 2013 )."},{"key":"e_1_2_2_26_1","volume-title":"Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience ( 2015 ).","author":"Pawlak Renaud","year":"2015","unstructured":"Renaud Pawlak , Martin Monperrus , Nicolas Petitprez , Carlos Noguera , and Lionel Seinturier . 2015 . Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience ( 2015 ). Renaud Pawlak, Martin Monperrus, Nicolas Petitprez, Carlos Noguera, and Lionel Seinturier. 2015. Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience ( 2015 )."},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276517"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/2984043.2989222"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/2983990.2984041"},{"key":"e_1_2_2_30_1","volume-title":"2018 IEEE\/ACM 15th International Conference on Mining Software Repositories (MSR). IEEE, 10-13","author":"Saha Ripon","year":"2018","unstructured":"Ripon Saha , Yingjun Lyu , Wing Lam , Hiroaki Yoshida , and Mukul Prasad . 2018 . Bugs. jar: a large-scale, diverse dataset of real-world java bugs . In 2018 IEEE\/ACM 15th International Conference on Mining Software Repositories (MSR). IEEE, 10-13 . Ripon Saha, Yingjun Lyu, Wing Lam, Hiroaki Yoshida, and Mukul Prasad. 2018. Bugs. jar: a large-scale, diverse dataset of real-world java bugs. In 2018 IEEE\/ACM 15th International Conference on Mining Software Repositories (MSR). IEEE, 10-13."},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.5555\/3327757.3327873"},{"key":"e_1_2_2_32_1","doi-asserted-by":"crossref","unstructured":"Daniel Svozil Vladimir Kvasnicka and Jiri Pospichal. 1997. Introduction to multi-layer feed-forward neural networks. Chemometrics and intelligent laboratory systems ( 1997 ).  Daniel Svozil Vladimir Kvasnicka and Jiri Pospichal. 1997. Introduction to multi-layer feed-forward neural networks. Chemometrics and intelligent laboratory systems ( 1997 ).","DOI":"10.1016\/S0169-7439(97)00061-0"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00048"},{"key":"e_1_2_2_34_1","volume-title":"International Conference on Learning Representations ( 2019 ).","author":"Vasic Marko","year":"2019","unstructured":"Marko Vasic , Aditya Kanade , Petros Maniatis , David Bieber , and Rishabh singh. 2019 . Neural Program Repair by Jointly Learning to Localize and Repair . International Conference on Learning Representations ( 2019 ). Marko Vasic, Aditya Kanade, Petros Maniatis, David Bieber, and Rishabh singh. 2019. Neural Program Repair by Jointly Learning to Localize and Repair. International Conference on Learning Representations ( 2019 )."},{"key":"e_1_2_2_35_1","unstructured":"Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion Jones Aidan N Gomez \u0141ukasz Kaiser and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems.  Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion Jones Aidan N Gomez \u0141ukasz Kaiser and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information processing systems."},{"key":"e_1_2_2_36_1","unstructured":"Oriol Vinyals Meire Fortunato and Navdeep Jaitly. 2015. Pointer Networks. In Advances in Neural Information Processing Systems 28.  Oriol Vinyals Meire Fortunato and Navdeep Jaitly. 2015. Pointer Networks. In Advances in Neural Information Processing Systems 28."},{"key":"e_1_2_2_37_1","volume-title":"Learning Scalable and Precise Representation of Program Semantics. arXiv preprint arXiv","author":"Wang Ke","year":"1905","unstructured":"Ke Wang . 2019. Learning Scalable and Precise Representation of Program Semantics. arXiv preprint arXiv : 1905 . 05251 ( 2019 ). Ke Wang. 2019. Learning Scalable and Precise Representation of Program Semantics. arXiv preprint arXiv: 1905. 05251 ( 2019 )."},{"key":"e_1_2_2_38_1","volume-title":"COSET: A Benchmark for Evaluating Neural Program Embeddings. arXiv preprint arXiv","author":"Wang Ke","year":"2019","unstructured":"Ke Wang and Mihai Christodorescu . 2019 . COSET: A Benchmark for Evaluating Neural Program Embeddings. arXiv preprint arXiv : 1905. 11445 ( 2019 ). Ke Wang and Mihai Christodorescu. 2019. COSET: A Benchmark for Evaluating Neural Program Embeddings. arXiv preprint arXiv: 1905. 11445 ( 2019 )."},{"key":"e_1_2_2_39_1","volume-title":"Dynamic Neural Program Embedding for Program Repair. International Conference on Learning Representations ( 2018 ).","author":"Wang Ke","year":"2018","unstructured":"Ke Wang , Rishabh Singh , and Zhendong Su . 2018 . Dynamic Neural Program Embedding for Program Repair. International Conference on Learning Representations ( 2018 ). Ke Wang, Rishabh Singh, and Zhendong Su. 2018. Dynamic Neural Program Embedding for Program Repair. International Conference on Learning Representations ( 2018 )."},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3385999"},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/2884781.2884804"},{"key":"e_1_2_2_42_1","volume-title":"International Conference on Learning Representations.","author":"Wei Jiayi","year":"2020","unstructured":"Jiayi Wei , Maruth Goyal , Greg Durrett , and Isil Dillig . 2020 . LambdaNet: Probabilistic Type Inference using Graph Neural Networks . In International Conference on Learning Representations. Jiayi Wei, Maruth Goyal, Greg Durrett, and Isil Dillig. 2020. LambdaNet: Probabilistic Type Inference using Graph Neural Networks. In International Conference on Learning Representations."},{"key":"e_1_2_2_43_1","volume-title":"Program Slicing. In Proceedings of the 5th International Conference on Software Engineering (ICSE '81)","author":"Weiser Mark","year":"1981","unstructured":"Mark Weiser . 1981 . Program Slicing. In Proceedings of the 5th International Conference on Software Engineering (ICSE '81) . Mark Weiser. 1981. Program Slicing. In Proceedings of the 5th International Conference on Software Engineering (ICSE '81)."},{"key":"e_1_2_2_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/2635868.2635874"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428205","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3428205","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T22:02:56Z","timestamp":1750197776000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428205"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,11,13]]},"references-count":44,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2020,11,13]]}},"alternative-id":["10.1145\/3428205"],"URL":"https:\/\/doi.org\/10.1145\/3428205","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,11,13]]},"assertion":[{"value":"2020-11-13","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}