Program Recognition using Graph Neural Networks
Abstract
Program recognition is a fundamental problem in computer science that has been studied for decades. A well-known subproblem is code clone detection, which aims to identify duplicated code fragments, ranging from exact copies to segments that perform the same computation with different syntax or structure. Historically, this task has been approached using mathematical and structural methods. More recently, with the rise of large language models (LLMs), syntactic approaches based on natural language processing have gained popularity. However, these models tend to struggle with capturing semantic similarities, as they are highly sensitive to syntax and often tied to specific programming languages. To address these limitations, recent research has turned toward graph-based representations of code, often combining control-flow and data-flow relationships, to better reflect the program's semantics. This allows for the use of graph kernels or graph neural networks to learn from such structured representations and make predictions on unseen code.In this work, we represent programs using data dependency graphs to capture semantic behavior, and we train a Siamese Graph Convolutional Network (GCN) to learn embeddings that reflect program similarity. This Siamese architecture allows the model to compare pairs of graphs and learn to distinguish semantically similar from dissimilar programs. State-of-the-art methods often rely on datasets composed of independently written implementations of the same algorithm. However, such datasets are often small, potentially noisy, and lack precise semantic guarantees. To overcome these limitations, we propose a method to automatically generate training datasets by applying compilation, obfuscation, and mutation techniques to source code. This process allows us to produce large quantities of semantically equivalent code variants, which are then used to train our Siamese GCN for program recognition.
Keywords
Not available
Specialisations
Similar theses
- Hand gesture recognition using deep learning neural networks Norah M. Alnaim · Brunel University London · 2020
- The expressivity and explainability of graph neural networks Matthew Morris · University of Oxford · 2026
- On the Adversarial Robustness of Graph Neural Networks Sofiane Ennadir · Dalarna University Library · 2026
- Graph Neural Networks for Natural Language Processing Kunze Wang · The University of Sydney · 2023
- Graph Neural Networks: Techniques and Applications Zhiqian Chen · 2020
- Meta Learning for Graph Neural Networks Rohan Dhamdhere · Rochester Institute of Technology · 2018
