Generative Models for Source Code: Fine-Tuning Techniques for Structured Pattern Learning

This study addresses the problem of how to automatically generate source code that is not only functional, but also well-structured, readable, and maintainable. Existing generative models for source code often produce functional code, but they lack consistency in structure and adherence to coding standards, essential for integration into existing application development projects and long-term software maintenance. By training the model on specific code structures, including a dataset with Italian annotations, the proposed methodology ensures that the generated code is compliant with both the functional requirements and the pre-defined coding standards. The methodology proposed in this study applies transfer learning techniques on the DeepSeek Coder model, to refine pre-trained models to generate code that integrates additional structuring constraints. By training the model on specific code structures, including a dataset with Italian comments, the proposed methodology ensures that the generated code meets both functional requirements and coding structure. Experimental results, evaluated using the perplexity metric, demonstrate the effectiveness of the proposed approach, which impacts the goals of reducing errors, and ultimately improves software development quality.

Authors

Institutions

Publication Details

Journal
Technologies
Published
2024-11-04
DOI
https://doi.org/10.3390/technologies12110219
Citations
3
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
1.04

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Generative Models for Source Code: Fine-Tuning Techniques for Structured Pattern Learning

Valentina Franzoni, Alfredo Milani, Silvia Tagliente
3 citations
Technologies
Natural Language Processing Techniques
1.04
article

Generative Models for Source Code: Fine-Tuning Techniques for Structured Pattern Learning

Valentina Franzoni, Alfredo Milani, Silvia Tagliente
article en
3 citations

Abstract

This study addresses the problem of how to automatically generate source code that is not only functional, but also well-structured, readable, and maintainable. Existing generative models for source code often produce functional code, but they lack consistency in structure and adherence to coding standards, essential for integration into existing application development projects and long-term software maintenance. By training the model on specific code structures, including a dataset with Italian annotations, the proposed methodology ensures that the generated code is compliant with both the functional requirements and the pre-defined coding standards. The methodology proposed in this study applies transfer learning techniques on the DeepSeek Coder model, to refine pre-trained models to generate code that integrates additional structuring constraints. By training the model on specific code structures, including a dataset with Italian comments, the proposed methodology ensures that the generated code meets both functional requirements and coding structure. Experimental results, evaluated using the perplexity metric, demonstrate the effectiveness of the proposed approach, which impacts the goals of reducing errors, and ultimately improves software development quality.

TechnologiesVol. 12(11)
Hong Kong Baptist University (HK), Politecnico di Torino (IT), University of Perugia (IT)
Università degli Studi di Perugia, Information Technology Laboratory
Industry, innovation and infrastructure
Openalex Percentile: Top 18%
Natural Language Processing Techniques
1.04
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.