{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,11]],"date-time":"2026-03-11T21:40:57Z","timestamp":1773265257431,"version":"3.50.1"},"reference-count":60,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2026,3,11]],"date-time":"2026-03-11T00:00:00Z","timestamp":1773187200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Robot. AI"],"abstract":"<jats:p>Selecting a good set of optimization flags requires extensive effort and expert input. While most of the prior research considers using static, spatial, or dynamic features, some of the latest research directly applied deep neural networks to source code. We combined the static features, spatial features, and deep neural networks by representing source code as graphs and trained Graph Neural Network for automatically finding suitable optimization flags. We created a dataset of 12000 graphs using 256 optimization flag combinations on 47 benchmarks. We trained and tested our model using these benchmarks, and our results show that we can achieve a maximum of 48.6% speed-up compared to the case where all optimization flags are enabled.<\/jats:p>","DOI":"10.3389\/frobt.2026.1731740","type":"journal-article","created":{"date-parts":[[2026,3,11]],"date-time":"2026-03-11T05:36:16Z","timestamp":1773207376000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Control flow graph based code optimization using graph neural networks"],"prefix":"10.3389","volume":"13","author":[{"given":"Melih","family":"Peker","sequence":"first","affiliation":[{"name":"Computer Engineering Department, Bilkent University","place":["Ankara, T\u00fcrkiye"]}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Ozcan","family":"Ozturk","sequence":"additional","affiliation":[{"name":"Faculty of Engineering and Natural Sciences, Sabanci University","place":["Istanbul, T\u00fcrkiye"]}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1965","published-online":{"date-parts":[[2026,3,11]]},"reference":[{"key":"B1","doi-asserted-by":"crossref","first-page":"59","DOI":"10.1145\/3446804.3446842","article-title":"Polybench\/python: benchmarking python environments with polyhedral optimizations","volume-title":"Proceedings of the 30th ACM SIGPLAN international conference on compiler construction","author":"Abella-Gonz\u00e1lez","year":"2021"},{"key":"B2","first-page":"11","article-title":"Using machine learning to focus iterative optimization","author":"Agakov","year":"2006"},{"key":"B3","unstructured":"Learning to represent programs with graphs\n          \n          \n            \n              Allamanis\n              M.\n            \n            \n              Brockschmidt\n              M.\n            \n            \n              Khademi\n              M.\n            \n          \n          \n          2018"},{"key":"B4","doi-asserted-by":"publisher","first-page":"404","DOI":"10.1145\/3296979.3192412","article-title":"A general path-based representation for predicting program properties","volume":"53","author":"Alon","year":"2018","journal-title":"SIGPLAN Not."},{"key":"B5","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/2928270","article-title":"Cobayn: compiler autotuning framework using bayesian networks","volume":"13","author":"Ashouri","year":"2016","journal-title":"ACM Trans. Archit. Code Optim. (TACO)"},{"key":"B6","first-page":"181","article-title":"A deep learning based cost model for automatic code optimization","volume":"3","author":"Baghdadi","year":"2021","journal-title":"Proc. Mach. Learn. Syst."},{"key":"B7","first-page":"3589","article-title":"Neural code comprehension: a learnable representation of code semantics","author":"Ben-Nun","year":"2018"},{"key":"B8","doi-asserted-by":"publisher","first-page":"481","DOI":"10.1017\/s1471068415000174","article-title":"A logic programming approach to predict effective compiler settings for embedded software","volume":"15","author":"Blackmore","year":"2015","journal-title":"Theory Pract. Log. Program."},{"key":"B9","article-title":"Automatically tuning the gcc compiler to optimize the performance of applications running on embedded systems","author":"Blackmore","year":"2017"},{"key":"B10","first-page":"1","article-title":"A proof of local convergence for the adam optimizer","author":"Bock","year":"2019"},{"key":"B11","first-page":"52","article-title":"Impact of gcc optimization levels in energy consumption during c\/c++ program execution","author":"Branco","year":"2015"},{"key":"B12","first-page":"201","article-title":"Compiler-based graph representations for deep learning models of code","volume-title":"Proceedings of the 29th international conference on compiler construction, ser. CC 2020","author":"Brauckmann","year":"2020"},{"key":"B13","first-page":"185","article-title":"Rapidly selecting good compiler optimizations using performance counters","author":"Cavazos","year":"2007"},{"key":"B14","volume-title":"Control flow graph (cfg)","year":"2024"},{"key":"B15","doi-asserted-by":"publisher","first-page":"155","DOI":"10.1017\/s1351324916000334","article-title":"Word2vec","volume":"23","author":"Church","year":"2017","journal-title":"Nat. Lang. Eng."},{"key":"B16","doi-asserted-by":"crossref","first-page":"221","DOI":"10.1016\/B978-0-12-088478-0.00005-0","article-title":"Chapter 5 - intermediate representations","volume-title":"Engineering a compiler","author":"Cooper","year":"2012"},{"key":"B17","first-page":"219","article-title":"End-to-end deep learning of optimization heuristics","author":"Cummins","year":"2017"},{"key":"B18","first-page":"2244","article-title":"Proceedings of the 38th International Conference on Machine Learning, Proceedings of Machine Learning Research","author":"Cummins","year":"2021"},{"key":"B19","article-title":"Graph neural tangent kernel: fusing graph neural networks with graph kernels","volume":"32","author":"Du","year":"2019","journal-title":"Adv. Neural Information Processing Systems"},{"key":"B20","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/1880043.1880047","article-title":"Collective optimization: a practical collaborative approach","volume":"7","author":"Fursin","year":"2010","journal-title":"ACM Trans. Archit. Code Optim. (TACO)"},{"key":"B21","doi-asserted-by":"publisher","first-page":"271","DOI":"10.1002\/cpe.774","article-title":"A fast and accurate method for determining a lower bound on execution time","volume":"16","author":"Fursin","year":"2004","journal-title":"Concurrency Comput. Pract. Exp."},{"key":"B22","doi-asserted-by":"publisher","first-page":"296","DOI":"10.1007\/s10766-010-0161-2","article-title":"Milepost gcc: machine learning enabled self-tuning compiler","volume":"39","author":"Fursin","year":"2011","journal-title":"Int. Journal Parallel Programming"},{"key":"B23","unstructured":"Basic blocks\n          \n          \n          2024"},{"key":"B24","unstructured":"Auto-vectorization in gcc\n          \n          \n          2011"},{"key":"B25","volume-title":"Rtl - intermediate representation called register transfer language","year":"2020"},{"key":"B26","unstructured":"Gcc 11 release series\n          \n          \n          2022"},{"key":"B27","volume-title":"Options that control optimization","year":"2025"},{"key":"B28","doi-asserted-by":"crossref","first-page":"35","DOI":"10.1145\/3207719.3207727","article-title":"Less is more: exploiting the standard compiler optimization levels for better performance and energy consumption","volume-title":"Proceedings of the 21st international workshop on software and compilers for embedded systems","author":"Georgiou","year":"2018"},{"key":"B29","unstructured":"Gimple\n          \n          \n          2024"},{"key":"B30","article-title":"Minir: a minimalistic intermediate representation","volume-title":"Workshop on intermediate representations (WIR\u201911)","author":"Guen","year":"2011"},{"key":"B31","first-page":"3","article-title":"Mibench: a free, commercially representative embedded benchmark suite","author":"Guthaus","year":"2001"},{"key":"B32","doi-asserted-by":"publisher","first-page":"107","DOI":"10.1142\/s0218488598000094","article-title":"The vanishing gradient problem during learning recurrent neural nets and problem solutions","volume":"6","author":"Hochreiter","year":"1998","journal-title":"Int. J. Uncertain."},{"key":"B33","first-page":"376","article-title":"A method for estimating optimal unrolling times for nested loops","author":"Koseki","year":"1997"},{"key":"B34","doi-asserted-by":"crossref","first-page":"147","DOI":"10.1145\/2384616.2384628","article-title":"Mitigating the compiler optimization phase-ordering problem using machine learning","volume-title":"Proceedings of the ACM international conference on object oriented programming systems languages and applications","author":"Kulkarni","year":"2012"},{"key":"B35","article-title":"On weight initialization in deep neural networks","author":"Kumar","year":"2017"},{"key":"B36","unstructured":"Initializing neural networks\n          \n          \n            \n              Kunin\n              K.\n            \n          \n          \n          2019"},{"key":"B37","unstructured":"Llvm\u2019s analysis and transform passes\n          \n          \n          2024"},{"key":"B38","unstructured":"What is cross entropy loss?\n          \n          \n            \n              Maheskar\n              S.\n            \n          \n          \n          2019"},{"key":"B39","first-page":"925","article-title":"Spatial based feature generation for machine learning based optimization compilation","author":"Malik","year":"2010"},{"key":"B40","first-page":"4505","volume-title":"Ithemal: accurate, portable and fast basic block throughput estimation using deep neural networks","author":"Mendis","year":"2019"},{"key":"B41","first-page":"197","article-title":"Practical aggregation of semantical program properties for machine learning based optimization","volume-title":"Proceedings of the 2010 CASES","author":"Namolaru","year":"2010"},{"key":"B42","first-page":"245","article-title":"Minimizing the cost of iterative compilation with active learning","author":"Ogilvie","year":"2017"},{"key":"B43","first-page":"196","article-title":"Using graph-based program characterization for predictive modeling","volume-title":"Proceedings of the tenth CGO","author":"Park","year":"2012"},{"key":"B44","doi-asserted-by":"crossref","first-page":"335","DOI":"10.1007\/978-1-4419-6935-4_19","article-title":"Efficient program compilation through machine learning techniques","volume-title":"Software automatic tuning","author":"Pekhimenko","year":"2011"},{"key":"B45","first-page":"547","article-title":"Building program vector representations for deep learning","volume-title":"International conference on knowledge science, engineering and management","author":"Peng","year":"2015"},{"key":"B46","first-page":"202","article-title":"Automatic configuration of gcc using irace","volume-title":"International conference on artificial evolution evolution artificielle","author":"P\u00e9rez C\u00e1ceres","year":"2017"},{"key":"B47","doi-asserted-by":"publisher","first-page":"1312","DOI":"10.1016\/j.procs.2013.05.298","article-title":"Automatic tuning of compiler optimizations and analysis of their impact","volume":"18","author":"Plotnikov","year":"2013","journal-title":"Procedia Comput. Sci."},{"key":"B48","unstructured":"Polybench\/c the polyhedral benchmark suite\n          \n          \n            \n              Pouchet\n              L.-N.\n            \n          \n          \n          2012"},{"key":"B49","doi-asserted-by":"crossref","first-page":"33","DOI":"10.1145\/2568326.2568328","article-title":"Preliminary results for neuroevolutionary optimization phase order generation for static compilation","volume-title":"Proceedings of the 11th workshop on optimizations for DSP and embedded systems","author":"Sher","year":"2014"},{"key":"B50","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3418463","article-title":"Ir2vec: llvm ir based scalable program embeddings","volume":"17","author":"VenkataKeerthy","year":"2020","journal-title":"ACM Trans. Archit. Code Optim."},{"key":"B51","article-title":"Second-order pooling for graph neural networks","author":"Wang","year":"2020","journal-title":"IEEE Trans. Pattern Analysis Mach. Intell."},{"key":"B52","doi-asserted-by":"publisher","first-page":"1879","DOI":"10.1109\/jproc.2018.2817118","article-title":"Machine learning in compiler optimization","volume":"106","author":"Wang","year":"2018","journal-title":"Proc. IEEE"},{"key":"B53","first-page":"8","article-title":"Angr-the next generation of binary analysis","author":"Wang","year":"2017"},{"key":"B54","article-title":"Deep graph library: a graph-centric, highly-performant package for graph neural networks","author":"Wang","year":"2019"},{"key":"B55","first-page":"140","article-title":"Pre-training graph neural network for cross domain recommendation","author":"Wang","year":"2021"},{"key":"B56","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1186\/s40537-016-0043-6","article-title":"A survey of transfer learning","volume":"3","author":"Weiss","year":"2016","journal-title":"J. Big Data"},{"key":"B57","first-page":"157","article-title":"Automatic compiler optimization on embedded software through k-means clustering","author":"Werner","year":"2020"},{"key":"B58","doi-asserted-by":"publisher","first-page":"55","DOI":"10.1109\/mci.2018.2840738","article-title":"Recent trends in deep learning based natural language processing","volume":"13","author":"Young","year":"2018","journal-title":"Ieee Comput. Intell. Magazine"},{"key":"B59","first-page":"2010","article-title":"Semantic understanding of source and binary code based on natural language processing","author":"Zhang","year":"2021"},{"key":"B60","doi-asserted-by":"crossref","first-page":"2728","DOI":"10.1145\/3459637.3482488","article-title":"Understanding and resolving performance degradation in deep graph convolutional networks","volume-title":"Proceedings of the 30th ACM international conference on information & knowledge management","author":"Zhou","year":"2021"}],"container-title":["Frontiers in Robotics and AI"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frobt.2026.1731740\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,3,11]],"date-time":"2026-03-11T05:36:22Z","timestamp":1773207382000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frobt.2026.1731740\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,3,11]]},"references-count":60,"alternative-id":["10.3389\/frobt.2026.1731740"],"URL":"https:\/\/doi.org\/10.3389\/frobt.2026.1731740","relation":{},"ISSN":["2296-9144"],"issn-type":[{"value":"2296-9144","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,3,11]]},"article-number":"1731740"}}