Semantic normalization on graph models searching structure matchings in code

Authors

DOI:

https://doi.org/10.55630/mem.2026.55.107-116

Keywords:

semantic normalization, graph neural networks, large language models, structural matching, program code analysis, plagiarism detection, machine learning for code

Abstract

This study proposes an innovative approach to detecting structural matches in programming codes, which addresses the fundamental limitation of existing methods – their sensitivity to syntactic changes while maintaining logical equivalence. A hybrid architecture integrating semantic normalization through large language models (LLMs) with multispecies graph representation (AST, CFG, DFG) and embedding techniques from Graph Neural has been developed Networks (GNN) and Transformer models.

Author Biographies

Daniel Damyanov, Department of Information Technologies, St. Cyril and St. Metodius University of Veliko Tarnovo, Bulgaria

Faculty of Mathematics and Informatics
Sts. Cyril and Methodius University of Veliko Tarnovo
1, Arch. Georgi Kozarov Blvd.
5000 Veliko Tarnovo, Bulgaria

Zlatko Varbanov, Department of Information Technologies, St. Cyril and St. Metodius University of Veliko Tarnovo, Bulgaria

Faculty of Mathematics and Informatics
Sts. Cyril and Methodius University of Veliko Tarnovo
1, Arch. Georgi Kozarov Blvd.
5000 Veliko Tarnovo, Bulgaria

References

Allen F., Control flow analysis. ACM SIGPLAN Notices, Volume 5, Issue 7, (1970), pp. 1-19, https://doi.org/10.1145/390013.808479

Bahdanau D., Cho. K., Benigo Y., Neural Machine Translation by Jointly Learning to Align and Translate, (2014), https://doi.org/10.48550/arXiv.1409.0473.

Bishop, C. M., Pattern Recognition and Machine Learning (Information Science and Statistics), Springer, (2006), ISBN 978-1-4939-3843-8

Donchev, I., An alternative to virtual functions in modern C++. Application in training, Mathematics, Computer Science and Education, Vol. 8, Issue 2, (2025), pp. 144-159

Dulucq S., Touzet H., Analysis of Tree Edit Distance Algorithms, Combinatorial Pattern Matching, 14th Annual Symposium, CPM 2003, Morelia, Michocán, Mexico, June 25-27, (2003), pp. 83-95, DOI: 10.1007/3-540-44888-87

Halder R., Cortesi A., Abstract program slicing on dependence condition graphs, Science of Computer Programming, 78(9), (2013), pp. 1240-1263, DOI: 10.1016/j.scico.2012.05.007

John K., Potika K. (2025). Diverse GNN Encoder-Decoder for Graph Anomaly Detection, IEEE Conference on Artificial Intelligence (CAI), Santa Clara, CA, USA: IEEE, (2025), DOI: 10.1109/CAI64502.2025.00021, pp. 89-94

Prechelt L, Malpohl G, Philippsen M., Finding Plagiarisms among a Set of Programs with JPlag, JUCS – Journal of Universal Computer Science, 8(11), (2002), pp. 1016-1038, https://doi.org/10.3217/jucs-008-11-1016

Li Y., Tarlow D., Brockschmidt M., Zemel R., Gated Graph Sequence Neural Networks, (2017), https://doi.org/10.48550/arXiv.1511.05493

Lubin J., Ferguson J., Ye K., Yim J., Chasins E. S., Equivalence by Canonicalization for Synthesis-Backed Refactoring. Proceedings of the ACM on Programming Languages, Volume 8, Issue PLDI, (2004), 1879-2004.

Petrov M., A model of a two-stage classification system for glial tumors in magnetic resonance imaging, International Conference AUTOMATICS AND INFORMATICS‘2023, Varna, October 05 – 07, (2023), DOI: 10.1109/ICAI58806.2023.10339009

Putra I. S., Rukmono S., Perdana S. R., Abstract Syntax Tree (AST) and Control Flow Graph (CFG) Construction of Notasi Algoritmik, International Conference on Data and Software Engineering (ICoDSE), Bandung, Indonesia: IEEE, (2021), DOI: 10.1109/ICoDSE53690.2021.9648437

Sendjaja K., Rukmono. A. S., Perdana S. R., Evaluating Control-Flow Graph Similarity for Grading Programming Exercises, International Conference on Data and Software Engineering (ICoDSE), Bandung Indonesia: IEEE, (2021), pp.1-6, DOI: 10.1109/ICoDSE53690.2021.9648464

Wang W., Li G., Ma B., Xia X., Jin Z., Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree, IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER), (2020), pp. 261-271, DOI: 10.1109/SANER48275.2020.9054857

Downloads

Published

2026-05-19

How to Cite

[1]
Damyanov, D. and Varbanov, Z. 2026. Semantic normalization on graph models searching structure matchings in code. Mathematics and Education in Mathematics. 55, (May 2026), 107–116. DOI:https://doi.org/10.55630/mem.2026.55.107-116.

Issue

Section

Section B: Mathematical Modelling and Informatics