QAOA for Layered Architecture Recovery: Feasibility, Limits, and the Role of Decomposition
Julien Cardinal, Andrew Chedid, Imen Benzarti, Ghizlane El Boussaidi, Christophe Pere, Jean-Marc Robert
Abstract
Layered architecture recovery (LAR) reconstructs a system's architectural layers from its package dependencies, and is defined as a combinatorial optimisation problem solved with classical search. We investigate whether the Quantum Approximate Optimization Algorithm (QAOA) can be applied to LAR, and with what practical limitations. We formulate LAR as a Quadratic Semi-Assignment Problem, transform it into a Quadratic Unconstrained Binary Optimisation (QUBO) problem in which each package is penalised unless it is assigned to exactly one layer, and encode it as an Ising Hamiltonian solved by QAOA. To reach instances beyond the qubit budget of a single circuit, we also apply an impact-guided decomposition that solves the problem as a sequence of smaller sub-problems. We evaluate the approach on three real Java systems (, , and qubits), studying the effect of circuit depth and sampling budget (RQ1), a comparison with a classical Tabu Search baseline (RQ2), robustness to simulated quantum noise (RQ3), and the decomposition (RQ4). We find that monolithic QAOA is feasible and accurate on the two smaller systems but fails on the -qubit instance, that the sampling budget rather than circuit depth governs its accuracy, and that it is competitive with but does not outperform Tabu Search. Decomposition restores reliable recovery on the -qubit instance, raising the optimal rate from to ; its accuracy is governed by the size of each sub-problem and, unlike the monolithic pipeline, improves as the sampling budget is reduced. Our results indicate that, in the current noisy intermediate-scale regime, problem decomposition, rather than larger circuits or more sampling, is the key to applying QAOA to software architecture recovery.
Create a lesson
Related papers
Does the Agent's Map Match the Territory? Architectural Claims in AI Agent Context Files and Their Fit with the Code
Shared title terminologycs.SEBachan Ghimire, Daniela Damian
Context-Aware Proactive Self-Adaptation: A Two-Layer Model Predictive Control Approach
Shared title terminologycs.SEZhengyin Chen, Jialong Li, Nianyu Li et al.
Exercised, Rarely Recovered: What Public Reports Say About Recovery in 50 AI Agent Harnesses and Runtimes
Shared title terminologycs.SEKaviru Hapuarachchi
How developers split roles among them and a coding agent and what "collaboration" means
Shared title terminologycs.SELinus Ververs, Helya Dadkhah, Lutz Prechelt
Metadata-Driven AI: An Architectural Pattern for Sustainable Data Analysis with LLMs
Shared title terminologycs.SERenaud Pawlak, Armen Sulejmani, Jordi Cabot
Idempotency Is Not Recovery: A Fault-Injection Study of Language-Model Agent Tool Actions
Shared title terminologycs.SESong Xu