Skip to main content
QUICK REVIEW

[Paper Review] An architectural technical debt index based on machine learning and architectural smells

Darius Sas, Paris Avgeriou|arXiv (Cornell University)|Jan 16, 2023
Software Engineering ResearchComputer Science3 citations
TL;DR

This paper proposes an automated, transparent, and validated Architectural Technical Debt Index (ATDI) that estimates architectural debt principal using machine learning to rank architectural smell severity and static code analysis to measure code size. The approach achieves 71% practitioner agreement on estimation accuracy, offering a fully automated, freely available alternative to threshold-based methods.

ABSTRACT

A key aspect of technical debt (TD) management is the ability to measure the amount of principal accumulated in a system. The current literature contains an array of approaches to estimate TD principal, however, only a few of them focus specifically on architectural TD, and none of these are fully automated, freely available, and thoroughly validated. Moreover, a recent study has shown that many of the current approaches suffer from certain shortcomings, such as relying on hand-picked thresholds. In this paper, we propose a novel approach to estimate architectural technical debt principal based on machine learning and architectural smells to address such shortcomings. Our approach can estimate the amount of technical debt principal generated by a single architectural smell instance. To do so, we adopt novel techniques from Information Retrieval to train a learning-to-rank machine learning model that estimates the severity of an architectural smell and ensure the transparency of the predictions. Then, for each instance, we statically analyse the source code to calculate the exact number of lines of code creating the smell. Finally, we combine these two values to calculate the technical debt principal. To validate the approach, we conducted a case study and interviewed 16 practitioners, from both open source and industry, and asked them about their opinions on the TD principal estimations for several smells detected in their projects. The results show that for 71\% of instances, practitioners agreed that the estimations provided were \emph{representative} of the effort necessary to refactor the smell.

Motivation & Objective

  • To address the lack of fully automated, freely available, and thoroughly validated approaches for estimating architectural technical debt (ATD) principal.
  • To overcome limitations of existing methods that rely on hand-picked thresholds or arbitrary benchmarks.
  • To develop a transparent, machine learning-based system that estimates the effort required to refactor individual architectural smell instances.
  • To validate the approach with practitioners from open source and industry to ensure real-world relevance.
  • To provide a scalable, actionable, and reproducible method for tracking and managing architectural debt in software systems.

Proposed method

  • Uses a learning-to-rank gradient boosting machine learning model trained via Information Retrieval techniques (e.g., TrueSkill) to estimate the severity of architectural smell instances.
  • Applies static code analysis to precisely count the number of lines of code responsible for each architectural smell instance.
  • Combines the ML-predicted severity score with the line-of-code count to compute a normalized architectural technical debt principal index (ATDI).
  • Employs normalized discounted cumulative gain (NDCG) of 0.97 to evaluate the model’s ranking performance on severity estimation.
  • Validates the full pipeline through a case study involving 16 practitioners from open source and industrial projects.
  • Ensures prediction transparency by analyzing feature importance and avoiding reliance on opaque or biased inputs.

Experimental results

Research questions

  • RQ1Can a machine learning model accurately rank architectural smell instances by their severity in terms of maintainability and evolvability impact?
  • RQ2To what extent do practitioner assessments align with the estimated technical debt principal generated by the proposed ATDI model?
  • RQ3How does the combination of ML-based severity estimation and static code analysis improve the accuracy and transparency of architectural debt measurement?
  • RQ4What are the limitations of the current approach, particularly for low-severity or small-scale smell instances?
  • RQ5How can the model be extended to support additional languages and include interest cost estimation (maintenance burden)?

Key findings

  • The machine learning model achieved a normalized discounted cumulative gain (NDCG) of 0.97, indicating high accuracy in ranking architectural smell severity.
  • In a practitioner validation study, 71% of responses confirmed that the estimated technical debt principal closely matched the actual refactoring effort.
  • The approach demonstrated high precision for large debt estimations, though smaller estimations showed less consistency, suggesting room for improvement.
  • Practitioners found the method actionable and transparent, especially due to the explainability of ML predictions and clear mapping to code size.
  • The study identified key improvement areas, including modeling class hierarchy effects and extending support to C/C++ systems.
  • Interviewees emphasized the need to also estimate interest (maintenance cost), prompting future work on integrating change metrics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.