Classical and Quantum RNN for Java Code Comprehension Task

Authors

  • Mobeen Alhalabi, and Fathy Eassa

Keywords:

Program Comprehension, Recurrent Neural Network, Deep Learning, Java Source Code, Natural Language Processing, Quantum Neural Network, Quantum Physics.

Abstract

Program comprehension refers to the process of extracting relevant information from programs through analysis, abstraction, and reasoning. It is a crucial aspect of software development, maintenance, migration, and other related processes. Traditionally, program comprehension has relied heavily on developers' experience. However, as software systems become increasingly large and complex, it is time-consuming and challenging to depend solely on a developer's prior knowledge to identify program features. Furthermore, fully uncovering the hidden features within the program becomes difficult.

Deep learning offers a data-driven, end-to-end approach that utilizes deep neural networks to analyze existing data and discover these hidden features. We can automatically learn the underlying features implied in programs by applying deep learning techniques to program comprehension. This approach allows us to fully leverage the knowledge embedded in the program, ultimately improving the efficiency of program comprehension.

Among the various areas related to language processing, programming languages stand out as a notable application of modeling techniques. For years, the machine learning community has investigated this field of software engineering, focusing on goals such as auto-completing, generating, fixing, or evaluating code written by humans. With the increasing popularity of deep learning-enabled language models, we identified a lack of empirical studies comparing deep learning architectures for creating and utilizing language models based on programming code.

This paper implements several recurrent neural network architectures, including RNN, LSTM, GRU, and bi-directional variations, along with quantum algorithms applied to each in series: QRNN, QLSTM, QGRU, and QDI. We utilize transfer learning and tokenization to evaluate how well these architectures perform in building language models using a Java dataset for code generation and summarization.

This comparative study discusses the architecture of each model. It presents the results obtained, highlighting gaps discovered in evaluating language models and their application in real programming contexts.

Downloads

How to Cite

Mobeen Alhalabi, and Fathy Eassa. 2026. “Classical and Quantum RNN for Java Code Comprehension Task”. Metallurgical and Materials Engineering, April, 1-16. https://metall-mater-eng.com/index.php/home/article/view/1959.

Issue

Section

Research