← Latest papers
🤖 AI

Towards LLM-Assisted Architecture Recovery for Real-World ROS~2 Systems: An Agent-Based Multi-Level Approach to Hierarchical Structural Architecture Reconstruction

This paper presents an enhanced agent-based, multi-level approach for recovering hierarchical software architectures in complex real-world ROS~2 systems by utilizing refined LLM prompting and a staged recovery strategy to overcome the limitations of existing node-level methods.

Original authors: Dominique Briechle, Raj Chanchad, Tobias Geger, Ruidi He, Dhruv Jajadiya, Dhruv Kapadiya, Andreas Rausch, Meng Zhang

Published 2026-05-20
📖 5 min read🧠 Deep dive

Original authors: Dominique Briechle, Raj Chanchad, Tobias Geger, Ruidi He, Dhruv Jajadiya, Dhruv Kapadiya, Andreas Rausch, Meng Zhang

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 have a massive, complex Lego set that was built by a team of people over several years. The original instruction manual was lost, or maybe it was never written down in the first place. All you have left are the scattered bricks, the boxes they came in, and some notes on how to snap them together.

Your goal? To rebuild the original instruction manual so you can understand how the whole machine works, how the parts connect, and how to fix it if it breaks.

This paper is about doing exactly that, but for robotic software (specifically systems built with a tool called ROS 2).

The Problem: The "Ghost" Instructions

In the world of robotics, software is often written in pieces. One person writes code for a camera, another for a robot arm, and another for a conveyor belt. They save their work in different files. The "glue" that holds them together—telling the computer which piece to start first and how they talk to each other—is hidden inside "launch files" and scattered code comments.

It's like having a recipe where the ingredients are listed in one notebook, but the steps on how to mix them are hidden in a different notebook, and the oven temperature is scribbled on a napkin. If you try to guess the whole recipe just by looking at the ingredients, you might get it wrong. You might think the cake is supposed to be baked at 500 degrees because you saw that number on a note, when it was actually for the oven light.

Previously, researchers tried to use AI (Large Language Models) to read these scattered notes and guess the full recipe. But the AI sometimes got confused, made up facts (hallucinated), or missed how the different parts fit together hierarchically (like a big machine made of smaller machines).

The Solution: A "Staged" Detective Approach

The authors of this paper improved their AI detective method. Instead of asking the AI to guess the whole picture at once, they broke the job down into three clear steps, using a "blueprint" (a strict set of rules) to keep the AI on track.

Think of it like a construction site with three specialized teams:

  1. Team 1: The Inventory Takers (NodeAnalyzer)
    First, the AI scans all the code files and creates a simple list: "Here are all the individual robot parts we found." It lists every robot arm, camera, and sensor, noting exactly where they live in the code.

    • Analogy: This is like sorting all the Lego bricks into piles by color and shape before building.
  2. Team 2: The Blueprint Readers (LaunchFileAnalyzer)
    Next, the AI looks at the "launch files" (the instructions on how to start the robot). It figures out which parts are turned on, how they are named, and how they are grouped together. It creates a map of dependencies: "The camera turns on before the arm moves, and they are both in the 'Vision' group."

    • Analogy: This is like reading the assembly instructions to see which bricks snap together to make a wheel, and which wheels attach to the car body.
  3. Team 3: The Master Architects (SystemArchitectureTeam)
    Finally, the AI takes the list of parts (from Team 1) and the map of connections (from Team 2) and builds the final, high-level diagram. Because it has the intermediate lists, it doesn't have to guess. It just follows the evidence.

    • Analogy: This is the architect drawing the final blueprint of the finished house, knowing exactly where every brick and wire goes because they have the inventory and the assembly notes.

The Test: The "BrickByBrick" Robot

To test this new method, the researchers used a real-world robot system called BrickByBrick. This is a robot designed to take apart complex structures made of building bricks. It has:

  • Two robot arms (Alice and Bob).
  • Cameras to see the bricks.
  • Conveyor belts to move them.
  • A "brain" that plans how to pull the bricks apart without breaking them.

This system was much more complex than the simple examples they used in their previous research. It had many different types of software working together.

The Results

The new "staged" method worked very well:

  • Accuracy: The AI correctly identified almost every single part and connection (98% accuracy on the complex system-level map).
  • Reliability: It didn't make up fake connections. Every connection it drew was backed by actual code evidence.
  • Improvement: It was significantly better at understanding how the different parts were grouped together compared to their old method.

The Bottom Line

The paper shows that if you want to understand a complex robot's software, you shouldn't just ask an AI to "guess the whole thing." Instead, you should give the AI a structured process:

  1. List the parts.
  2. Map the assembly instructions.
  3. Build the final diagram based on those facts.

This approach makes the AI much more reliable, turning a chaotic pile of code into a clear, understandable architectural map. However, the authors admit that if the robot's behavior changes while it's running (dynamic changes), the current method still has a little trouble catching those moving targets. But for understanding the static structure of the system, it's a huge step forward.

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 →