AST-guided transformers for sustainable and reliable UML modeling

The manual conversion of natural language software requirements into Unified Modeling Language (UML) class diagrams is often labor-intensive, dependent on expert knowledge, and susceptible to human error within the requirements engineering process. Inefficiencies and inconsistencies introduced during this early design phase can lead to expensive revisions later in development, ultimately affecting the sustainability and long-term maintainability of software systems. To address this challenge, this study presents a neural-based framework that formulates UML diagram generation as a structured machine translation task, aiming to support more reliable and sustainable model-driven engineering practices. In this work, two transformer-based approaches are proposed: a Sequence-to-Sequence (Seq2Seq) model designed for direct diagram code generation, and a Sequence-to- Abstract-Syntax-Tree (Seq2AST) model that incorporates syntactic constraints to ensure structural correctness while maintaining the intended semantics. To mitigate the limited availability of annotated training data, a multi-task learning strategy is introduced, which simultaneously performs UML element extraction and context-aware recommendation of reusable design patterns derived from a large repository of existing diagrams. Integrating structural constraints with reusable design knowledge enhances modeling consistency, promotes reusability, and supports improved long-term design quality. Experimental results indicate that the proposed framework achieves accuracy comparable to general-purpose large language models while offering greater determinism and stronger domain alignment. Furthermore, it operates with significantly lower computational requirements, contributing to a more energy-efficient and sustainable integration of artificial intelligence within software engineering workflows. To support transparency, reproducibility, and continued research in AI-driven systems engineering, all datasets and experimental artifacts used in this study have been made publicly available.

Authors

Institutions

Publication Details

Journal
Machine Learning with Applications
Published
2026-06-25
DOI
https://doi.org/10.1016/j.mlwa.2026.100940
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

AST-guided transformers for sustainable and reliable UML modeling

Arfat Ahmad Khan, Kadiyala Ramana, Natalia Kryvinska, Poovammal E. et al.
Machine Learning with Applications
Model-Driven Software Engineering Techniques
article

AST-guided transformers for sustainable and reliable UML modeling

Arfat Ahmad Khan, Kadiyala Ramana, Natalia Kryvinska, Poovammal E., Feisal Alaswad, Batoul Aljaddouh
article en

Abstract

The manual conversion of natural language software requirements into Unified Modeling Language (UML) class diagrams is often labor-intensive, dependent on expert knowledge, and susceptible to human error within the requirements engineering process. Inefficiencies and inconsistencies introduced during this early design phase can lead to expensive revisions later in development, ultimately affecting the sustainability and long-term maintainability of software systems. To address this challenge, this study presents a neural-based framework that formulates UML diagram generation as a structured machine translation task, aiming to support more reliable and sustainable model-driven engineering practices. In this work, two transformer-based approaches are proposed: a Sequence-to-Sequence (Seq2Seq) model designed for direct diagram code generation, and a Sequence-to- Abstract-Syntax-Tree (Seq2AST) model that incorporates syntactic constraints to ensure structural correctness while maintaining the intended semantics. To mitigate the limited availability of annotated training data, a multi-task learning strategy is introduced, which simultaneously performs UML element extraction and context-aware recommendation of reusable design patterns derived from a large repository of existing diagrams. Integrating structural constraints with reusable design knowledge enhances modeling consistency, promotes reusability, and supports improved long-term design quality. Experimental results indicate that the proposed framework achieves accuracy comparable to general-purpose large language models while offering greater determinism and stronger domain alignment. Furthermore, it operates with significantly lower computational requirements, contributing to a more energy-efficient and sustainable integration of artificial intelligence within software engineering workflows. To support transparency, reproducibility, and continued research in AI-driven systems engineering, all datasets and experimental artifacts used in this study have been made publicly available.

Machine Learning with ApplicationsVol. 25
Chaitanya Bharathi Institute of Technology (IN), SRM Institute of Science and Technology (IN), Khon Kaen University (TH), Comenius University Bratislava (SK)
Openalex Percentile: Top 4%
Model-Driven Software Engineering Techniques
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.