Автоматизоване відновлення трасувальних зв’язків між вимогами та програмним кодом з використанням великих мовних моделей
Вантажиться...
Дата
2026
Назва журналу
Номер ISSN
Назва тому
Видавець
Хмельницький національний університет
Анотація
Проблема забезпечення узгодженості між вимогами та програмним кодом набуває критичного значення зі
зростанням масштабу та складності сучасних програмних систем, адже відсутність надійних трасувальних зв’язків часто призводить до неповної реалізації вимог, ускладнює супровід коду та перевірку коректності роботи системи. Ручне формування трасувальних матриць є трудомістким і схильним до помилок процесом, особливо у великих проєктах. Використання великих мовних моделей відкриває нові можливості для автоматизації цього процесу, оскільки такі моделі здатні відображати глибокі семантичні зв’язки між текстовими вимогами та фрагментами програмного коду.
У статті запропоновано метод виявлення трасувальних зв’язків між вимогами та програмним кодом із
використанням трансформерних моделей великих мовних систем. Запропонований підхід ґрунтується на перетворенні текстових артефактів у векторні представлення за допомогою моделей CodeBERT, SBERT та TF-IDF з подальшим обчисленням семантичної подібності для автоматичного визначення потенційних зв’язків. Метод охоплює такі етапи як підготовки даних, генерації ембедингів, пошуку релевантних фрагментів і оцінювання отриманих результатів.
Експерименти проведено на датасеті MSR-2021, що містить реальні трасувальні зв’язки для кількох проєктів.
Отримані результати засвідчили перевагу CodeBERT над традиційними підходами (TF-IDF, SBERT): метод забезпечує точність до 0.85 та F1-score до 0.50 (залежно від глибини пошуку), що є високими показниками для задач автоматизованого інформаційного пошуку та ранжування. Додатково підтверджено важливість урахування структурного контексту коду та продемонстровано вплив параметра Top-K на баланс між повнотою та точністю. Результати доводять, що інтеграція моделей на основі LLM істотно підвищує рівень автоматизації, узгодженості та якості трасування вимог у сучасних середовищах розробки програмного забезпечення.
The problem of consistency between software requirements and their implementation in source code becomes critically important as the scale and complexity of modern software systems increase, since the absence of reliable traceability links often leads to incomplete requirement implementation, complicates code maintenance, and hinders the verification of system correctness. Manual generation of traceability matrices is a labour-intensive and error-prone process, especially in large projects. The use of large language models opens up new opportunities for automating this process, as such models are capable of reflecting deep semantic relationships between text requirements and software code fragments. The article proposes a method for identifying traceability links between requirements and software code using transformer models of large language systems. The proposed approach is based on converting text artefacts into vector representations using CodeBERT, SBERT, and TF-IDF models, followed by calculating semantic similarity to automatically identify potential connections. The method covers such stages as data preparation, embedding generation, search for relevant fragments, and evaluation of the results obtained. The experiments were conducted on the MSR-2021 dataset, which contains real traceability links for several projects. The obtained results demonstrated the advantage of CodeBERT over traditional approaches (TF-IDF, SBERT): the method achieves accuracy of up to 0.85 and an F1- score of up to 0.50, depending on the search depth, which represents strong performance for automated information retrieval and ranking tasks. The study additionally confirmed the importance of considering the structural context of the code and showed the influence of the Top-K parameter on the balance between recall and precision. The results indicate that integrating LLM-based models significantly improves the level of automation, consistency, and quality of requirements traceability in modern software development environments.
The problem of consistency between software requirements and their implementation in source code becomes critically important as the scale and complexity of modern software systems increase, since the absence of reliable traceability links often leads to incomplete requirement implementation, complicates code maintenance, and hinders the verification of system correctness. Manual generation of traceability matrices is a labour-intensive and error-prone process, especially in large projects. The use of large language models opens up new opportunities for automating this process, as such models are capable of reflecting deep semantic relationships between text requirements and software code fragments. The article proposes a method for identifying traceability links between requirements and software code using transformer models of large language systems. The proposed approach is based on converting text artefacts into vector representations using CodeBERT, SBERT, and TF-IDF models, followed by calculating semantic similarity to automatically identify potential connections. The method covers such stages as data preparation, embedding generation, search for relevant fragments, and evaluation of the results obtained. The experiments were conducted on the MSR-2021 dataset, which contains real traceability links for several projects. The obtained results demonstrated the advantage of CodeBERT over traditional approaches (TF-IDF, SBERT): the method achieves accuracy of up to 0.85 and an F1- score of up to 0.50, depending on the search depth, which represents strong performance for automated information retrieval and ranking tasks. The study additionally confirmed the importance of considering the structural context of the code and showed the influence of the Top-K parameter on the balance between recall and precision. The results indicate that integrating LLM-based models significantly improves the level of automation, consistency, and quality of requirements traceability in modern software development environments.
Опис
Ключові слова
трасування вимог, великі мовні моделі, CodeBERT, семантична подібність, програмний код, ембединги, автоматизація, requirement tracing, large language models, semantic similarity, program code, embeddings, automation
Бібліографічний опис
Скрипнюк О., Багрій Р., Манзюк Е., Скрипник Т. Автоматизоване відновлення трасувальних зв’язків між вимогами та програмним кодом з використанням великих мовних моделей // Herald of Khmelnytskyi National University. Technical Sciences. 2026. Vol. 363, No. 2. P. 268-275.