[2603.30040] Automatic Identification of Parallelizable Loops Using Transformer-Based Source Code Representations
About this article
Abstract page for arXiv paper 2603.30040: Automatic Identification of Parallelizable Loops Using Transformer-Based Source Code Representations
Computer Science > Software Engineering arXiv:2603.30040 (cs) [Submitted on 31 Mar 2026] Title:Automatic Identification of Parallelizable Loops Using Transformer-Based Source Code Representations Authors:Izavan dos S. Correia, Henrique C. T. Santos, Tiago A. E. Ferreira View a PDF of the paper titled Automatic Identification of Parallelizable Loops Using Transformer-Based Source Code Representations, by Izavan dos S. Correia and 2 other authors View PDF HTML (experimental) Abstract:Automatic parallelization remains a challenging problem in software engineering, particularly in identifying code regions where loops can be safely executed in parallel on modern multi-core architectures. Traditional static analysis techniques, such as dependence analysis and polyhedral models, often struggle with irregular or dynamically structured code. In this work, we propose a Transformer-based approach to classify the parallelization potential of source code, focusing on distinguishing independent (parallelizable) loops from undefined ones. We adopt DistilBERT to process source code sequences using subword tokenization, enabling the model to capture contextual syntactic and semantic patterns without handcrafted features. The approach is evaluated on a balanced dataset combining synthetically generated loops and manually annotated real-world code, using 10-fold cross-validation and multiple performance metrics. Results show consistently high performance, with mean accuracy above 99\% and lo...