EN | RU    
Scientific & Technical Literature Publishing House
Search:

Home»

Contact Us»

Journals»

News»

Preparation of Papers»

Advertising»

Feedback»

Books»

About Us»



advertisement



Industrial Automatic Control Systems and Controllers

Annotation
<< Back
Method of Detecting Design Patterns Using a Language Model on a Transformer Architecture and Contrastive Learning
Jameleh Asaad Asaad, Аvksentieva E.Yu.

This study proposes a method for detecting software design patterns using transformer-based language models, contrastive learning,
and threshold-based classification. The dataset is derived from DPDAtt corpus, containing 1,645 labeled Java fi les covering 13 GoF design
patterns. CodeT5 generates contextualized embeddings that capture syntactic and semantic properties of code. Contrastive learning trains
these embeddings, bringing similar patterns closer while separating different ones, with early stopping to prevent overfitting. Four methodological variations were explored. Code 1 used a simple projection network with on-the-fl y pair generation. Code 2 introduced precomputed
pairs and threshold-based classification. Code 3 grouped patterns into Behavioral, Creational, Structural, and Unknown categories. Code
4 combined balanced pair generation, early stopping, thresholding, and categorical grouping, achieving the best results: 87.1 % accuracy
and a macro F1-score of 81.7 %. The approach reliably classifies major design patterns while handling unknown or ambiguous patterns
effectively. Transformer embeddings provide rich contextual representations, contrastive learning ensures meaningful separation, and
thresholding identifies rare patterns. Overall, this methodology enhances both accuracy and robustness in software design pattern detection. Future work may improve handling of rare patterns using semi-supervised learning or adaptive thresholds.
Keywords: design pattern detection, language models, transformer architecture, contrastive learning, automated code analysis,
machine learning.


DOI: 10.25791/asu.10.2025.1616

Pp. 20-23.

 Sections

«About journal

«Archive

«Thematic focus of the journal

«Formatting rules

«Stages of the review and publication

«Review process

«Editorial and Professional Ethics

«Detecting plagiarism

«Editors and Editorial Board

«News journal


 Journals
...................................
Instruments and Systems: Monitoring, Control, and Diagnostics
...................................
Instrument-Making and Automation Means. Encyclopedic Textbook
...................................
Industrial Automatic Control Systems and Controllers
...................................
Ecological Systems and Devices
...................................
Aerospace Instrument-Making
...................................
Engineering Physics
...................................
History of Science and Engineering
...................................
Music and Time
...................................
Note Album
...................................
Musicology
...................................
Universal History
...................................
Directory of engineer
...................................
Applied Physics and Mathematics
...................................
News Academy of Engineering Sciences A.M. Prokhorov
...................................

Last news:

Выставки по автоматизации и электронике «ПТА-Урал 2018» и «Электроника-Урал 2018» состоятся в Екатеринбурге

Открыта электронная регистрация на выставку Дефектоскопия / NDT St. Petersburg

Открыта регистрация на 9-ю Международную научно-практическую конференцию «Строительство и ремонт скважин — 2018»

ExpoElectronica и ElectronTechExpo 2018: рост площади экспозиции на 19% и новые формы контент-программы

Тематика и состав экспозиции РЭП на выставке "ChipEXPO - 2018"

   Rambler's Top100 Rambler's Top100         


    Management system developed by: ananskikh.ru
© Publishing House "NAUCHTEKHLITIZDAT", 2005-2026