kth.sePublications KTH
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
FuncGNN: A graph neural network approach to program similarity
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS.ORCID iD: 0000-0002-0984-7051
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS.ORCID iD: 0000-0001-7026-9839
KTH, School of Electrical Engineering and Computer Science (EECS), Computer Science, Theoretical Computer Science, TCS.ORCID iD: 0000-0002-9706-5008
2020 (English)In: International Symposium on Empirical Software Engineering and Measurement, IEEE Computer Society , 2020Conference paper, Published paper (Refereed)
Abstract [en]

Background: Program similarity is a fundamental concept, central to the solution of software engineering tasks such as software plagiarism, clone identification, code refactoring and code search. Accurate similarity estimation between programs requires an in-depth understanding of their structure, semantics and flow. A control flow graph (CFG), is a graphical representation of a program which captures its logical control flow and hence its semantics. A common approach is to estimate program similarity by analysing CFGs using graph similarity measures, e.g. graph edit distance (GED). However, graph edit distance is an NP-hard problem and computationally expensive, making the application of graph similarity techniques to complex software programs impractical. Aim: This study intends to examine the effectiveness of graph neural networks to estimate program similarity, by analysing the associated control flow graphs. Method: We introduce funcGNN1, which is a graph neural network trained on labeled CFG pairs to predict the GED between unseen program pairs by utilizing an effective embedding vector. To our knowledge, this is the first time graph neural networks have been applied on labeled CFGs for estimating the similarity between highlevel language programs. Results: We demonstrate the effectiveness of funcGNN to estimate the GED between programs and our experimental analysis demonstrates how it achieves a lower error rate (1.94 ×10-3), with faster (23 times faster than the quickest traditional GED approximation method) and better scalability compared with state of the art methods. Conclusion: funcGNN posses the inductive learning ability to infer program structure and generalise to unseen programs. The graph embedding of a program proposed by our methodology could be applied to several related software engineering problems (such as code plagiarism and clone identification) thus opening multiple research directions.

Place, publisher, year, edition, pages
IEEE Computer Society , 2020.
Keywords [en]
Attention Mechanism, Control Flow Graph, Graph Edit Distance, Graph Embedding, Graph Neural Network, Graph Similarity, Machine Learning, Program Similarity, Software Engineering, Application programs, Cloning, Data flow analysis, Embeddings, Flow graphs, Graphic methods, Intellectual property, NP-hard, Semantics, Approximation methods, Experimental analysis, Graph neural networks, Graph similarity measures, Graphical representations, In-depth understanding, Similarity estimation, State-of-the-art methods, Neural networks
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-290329DOI: 10.1145/3382494.3410675Scopus ID: 2-s2.0-85095830506OAI: oai:DiVA.org:kth-290329DiVA, id: diva2:1530770
Conference
14th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2020, 5 October 2020 through 7 October 2020
Note

QC 20210224

Available from: 2021-02-24 Created: 2021-02-24 Last updated: 2023-03-30Bibliographically approved

Open Access in DiVA

No full text in DiVA

Other links

Publisher's full textScopusAccompanying software

Authority records

Nair, AravindRoy, AvijitMeinke, Karl

Search in DiVA

By author/editor
Nair, AravindRoy, AvijitMeinke, Karl
By organisation
Theoretical Computer Science, TCS
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar

doi
urn-nbn

Altmetric score

doi
urn-nbn
Total: 225 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf