← Latest papers
💻 computer science

Towards Automated Identification of Violation Symptoms of Architecture Erosion

This paper presents an automated approach for identifying architecture erosion violation symptoms in code reviews by comparing traditional machine learning, deep learning, and large language models, demonstrating that LLM-based classifiers outperform others and significantly improve developers' detection rates in a controlled experiment.

Original authors: Ruiyin Li, Peng Liang, Paris Avgeriou, Yifei Wang

Published 2026-07-07
📖 4 min read☕ Coffee break read

Original authors: Ruiyin Li, Peng Liang, Paris Avgeriou, Yifei Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are building a massive, intricate castle. You have a master blueprint (the Architecture) that says, "The kitchen must be on the ground floor, and the library must be on the top floor." This plan ensures the castle is stable, easy to navigate, and won't collapse under its own weight.

However, over time, as different builders add rooms and fix leaks, they might accidentally build a staircase connecting the kitchen directly to the library, or put a heavy vault in the attic. The castle still stands, but it's no longer following the blueprint. This slow, creeping deviation is called Architecture Erosion. It's like a termite infestation in the design: you can't always see it until the whole structure starts to wobble.

The Problem: Finding the Termites

Usually, to find these design mistakes, you'd have to hire a team of expert architects to stare at the blueprints and the actual building side-by-side. This is slow, expensive, and easy to miss.

In the software world, developers talk about these mistakes in Code Reviews. When a programmer submits a change, others read it and leave comments like, "Hey, you can't put that database call here; it breaks our rules!" These comments are the "symptoms" of the erosion. But there are thousands of comments, and humans get tired. They might miss the subtle warnings.

The Solution: The Automated "Termite Detector"

The researchers in this paper asked: Can we build a smart computer program that reads these comments and automatically flags the ones that sound like architectural violations?

They treated this like a game of "Spot the Difference" using three different types of "brains":

  1. The Traditional Brains (Machine Learning/Deep Learning): These are like trained dogs. You show them thousands of examples of "bad comments" and "good comments," and they learn to sniff out the bad ones.

    • They tested many different "sniffing" techniques.
    • The Winner: A specific type of dog called an SVM (Support Vector Machine) trained with a specific vocabulary list (word2vec) was the best at this job. It was accurate about 80% of the time.
    • The Teamwork Trick: They found that if you let five different dogs vote on whether a comment is bad, the group decision is even better than any single dog.
  2. The Super Brains (Large Language Models - LLMs): These are like genius polymaths (think of a super-smart librarian who has read every book in the universe). They don't need to be "trained" on your specific data; you just ask them, "Is this comment a design violation?"

    • They tested three of the smartest models available: GPT-4o, Qwen-3, and DeepSeek-R1.
    • The Winner: GPT-4o was the superstar. It got it right about 85% of the time, beating the traditional "dogs." It understood the context and nuance of the comments better than the others.

The Real-World Test: Does it actually help?

Building a detector is one thing; making sure humans actually find it useful is another. The researchers did two things to check this:

  1. The Survey (Asking the Builders): They asked real software developers, "If a tool pointed out these design mistakes to you, would it help?"

    • The Result: Most said Yes. They felt it would help them find problems faster and prioritize which ones to fix first. It's like having a flashlight that highlights the loose bricks in a dark room.
  2. The Experiment (The "With vs. Without" Test): They set up a controlled test with two groups of developers.

    • Group A (The Control): Had to find design mistakes in code reviews on their own.
    • Group B (The Experimental): Had the same task, but the computer tool highlighted the comments that sounded like violations.
    • The Result: Group B was much better. Their success rate in finding the mistakes jumped from 26% to 65%. The tool didn't just find the mistakes; it helped the humans find them too.

The Bottom Line

This paper proves that we can use AI to act as a "second pair of eyes" during code reviews.

  • Traditional AI works well and is fast.
  • Super AI (LLMs) works even better but might be more expensive to run.
  • The best part: When developers use these tools, they actually catch more architectural mistakes, keeping the "castle" (the software system) strong and true to its original blueprint.

The researchers didn't just build a tool; they proved that giving developers a "hint" about potential design errors makes them significantly better at their jobs.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →