New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems

Deep learning has enabled significant progress in source code generation, aiming to reduce the manual, error-prone, and time-consuming aspects of software development. While many existing models rely on recurrent neural networks (RNNs) with sequence-to-sequence architectures, these approaches strugg...

Full description

Saved in:
Bibliographic Details
Main Authors: Wafa Alshehri, Salma Kammoun Jarraya, Arwa Allinjawi
Format: Article
Language:English
Published: MDPI AG 2025-07-01
Series:AI
Subjects:
Online Access:https://www.mdpi.com/2673-2688/6/7/162
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849714609109336064
author Wafa Alshehri
Salma Kammoun Jarraya
Arwa Allinjawi
author_facet Wafa Alshehri
Salma Kammoun Jarraya
Arwa Allinjawi
author_sort Wafa Alshehri
collection DOAJ
description Deep learning has enabled significant progress in source code generation, aiming to reduce the manual, error-prone, and time-consuming aspects of software development. While many existing models rely on recurrent neural networks (RNNs) with sequence-to-sequence architectures, these approaches struggle with the long and complex token sequences typical in source code. To address this, we propose a grammar-based convolutional neural network (CNN) combined with a tree-based representation to enhance accuracy and efficiency. Our model achieves state-of-the-art results on the benchmark HEARTHSTONE dataset, with a BLEU score of 81.4 and an Acc+ of 62.1%. We further evaluate the model on our proposed dataset, AST2CVCode, designed for computer vision applications, achieving 86.2 BLEU and 51.9% EM. Additionally, we introduce BLEU+, an enhanced evaluation metric tailored for functional correctness in code generation, which achieves a BLEU+ score of 92.0% on the AST2CVCode dataset. These results demonstrate the effectiveness of our approach in both model architecture and evaluation methodology.
format Article
id doaj-art-eef26880431048f58706e3ad9935eacd
institution DOAJ
issn 2673-2688
language English
publishDate 2025-07-01
publisher MDPI AG
record_format Article
series AI
spelling doaj-art-eef26880431048f58706e3ad9935eacd2025-08-20T03:13:39ZengMDPI AGAI2673-26882025-07-016716210.3390/ai6070162New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision SystemsWafa Alshehri0Salma Kammoun Jarraya1Arwa Allinjawi2Department of Computer Science, King Abdulaziz University, Jeddah 21589, Saudi ArabiaDepartment of Computer Science, King Abdulaziz University, Jeddah 21589, Saudi ArabiaDepartment of Computer Science, King Abdulaziz University, Jeddah 21589, Saudi ArabiaDeep learning has enabled significant progress in source code generation, aiming to reduce the manual, error-prone, and time-consuming aspects of software development. While many existing models rely on recurrent neural networks (RNNs) with sequence-to-sequence architectures, these approaches struggle with the long and complex token sequences typical in source code. To address this, we propose a grammar-based convolutional neural network (CNN) combined with a tree-based representation to enhance accuracy and efficiency. Our model achieves state-of-the-art results on the benchmark HEARTHSTONE dataset, with a BLEU score of 81.4 and an Acc+ of 62.1%. We further evaluate the model on our proposed dataset, AST2CVCode, designed for computer vision applications, achieving 86.2 BLEU and 51.9% EM. Additionally, we introduce BLEU+, an enhanced evaluation metric tailored for functional correctness in code generation, which achieves a BLEU+ score of 92.0% on the AST2CVCode dataset. These results demonstrate the effectiveness of our approach in both model architecture and evaluation methodology.https://www.mdpi.com/2673-2688/6/7/162software requirementssource code generationdeep learning
spellingShingle Wafa Alshehri
Salma Kammoun Jarraya
Arwa Allinjawi
New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems
AI
software requirements
source code generation
deep learning
title New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems
title_full New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems
title_fullStr New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems
title_full_unstemmed New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems
title_short New Deep Learning-Based Approach for Source Code Generation: Application to Computer Vision Systems
title_sort new deep learning based approach for source code generation application to computer vision systems
topic software requirements
source code generation
deep learning
url https://www.mdpi.com/2673-2688/6/7/162
work_keys_str_mv AT wafaalshehri newdeeplearningbasedapproachforsourcecodegenerationapplicationtocomputervisionsystems
AT salmakammounjarraya newdeeplearningbasedapproachforsourcecodegenerationapplicationtocomputervisionsystems
AT arwaallinjawi newdeeplearningbasedapproachforsourcecodegenerationapplicationtocomputervisionsystems