← 研踪 PaperTrailarXiv:2511.20933 · v3
Efficient Interns or Senior Engineers: On LLMs' Grasp of Cohesion and Coupling
首次提交 2025-11-26 07:50
版本更新 2026-12-02 00:33
雷达观测 2026-12-02 23:10
摘要
Large language models (LLMs) are being increasingly adopted in the software engineering domain, yet the robustness of their grasp on core software design concepts remains unclear. We conduct an empirical study to systematically evaluate their understanding of cohesion (intra-module) and coupling (inter-module). We programmatically generate poorly designed code fragments and test three DeepSeek-R1 models (14B, 32B, 70B) along with two proprietary reasoning models, GPT-5 Nano and Gemini-2.5 Flash Lite, under varying levels of guidance, from simple Verification to Guided and Open-ended Generation, while varying contextual noise by injecting distractor elements. While models exhibit a solid baseline understanding of both concepts in ideal conditions, their practical knowledge is fragile and highly asymmetrical. Reasoning about coupling proves brittle; performance collapses in noisy, open-ended scenarios, with F1 scores dropping by over 50%. In contrast, the models' analysis of cohesion is remarkably robust to internal noise in guided tasks, showing little performance degradation. However, this resilience also fails when all guidance is removed. We also conduct a human study involving experienced developers and researchers to contextualize the performance of said LLMs. Results show that the human-LLM gap is small on Verification but widens as guidance is reduced and noise is increased. Reasoning-trace analysis confirms these failure modes, revealing cognitive shortcutting for coupling versus a more exhaustive (yet still failing) analysis for cohesion for open-weight models. To summarize, while LLMs can provide reliable assistance for recognizing design flaws, their ability to reason autonomously in noisy, realistic contexts is limited, highlighting the critical need for more scalable and robust program understanding capabilities.
作者备注:40 pages, 20 figures, Accepted for publication in ACM Transactions on Software Engineering and Methodology (TOSEM)
观测到的版本
相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。
v3 · 2026-12-02 00:33 · 最新观测版本
Efficient Interns or Senior Engineers: On LLMs' Grasp of Cohesion and Coupling
Large language models (LLMs) are being increasingly adopted in the software engineering domain, yet the robustness of their grasp on core software design concepts remains unclear. We conduct an empirical study to systematically evaluate their understanding of cohesion (intra-module) and coupling (inter-module). We programmatically generate poorly designed code fragments and test three DeepSeek-R1 models (14B, 32B, 70B) along with two proprietary reasoning models, GPT-5 Nano and Gemini-2.5 Flash Lite, under varying levels of guidance, from simple Verification to Guided and Open-ended Generation, while varying contextual noise by injecting distractor elements. While models exhibit a solid baseline understanding of both concepts in ideal conditions, their practical knowledge is fragile and highly asymmetrical. Reasoning about coupling proves brittle; performance collapses in noisy, open-ended scenarios, with F1 scores dropping by over 50%. In contrast, the models' analysis of cohesion is remarkably robust to internal noise in guided tasks, showing little performance degradation. However, this resilience also fails when all guidance is removed. We also conduct a human study involving experienced developers and researchers to contextualize the performance of said LLMs. Results show that the human-LLM gap is small on Verification but widens as guidance is reduced and noise is increased. Reasoning-trace analysis confirms these failure modes, revealing cognitive shortcutting for coupling versus a more exhaustive (yet still failing) analysis for cohesion for open-weight models. To summarize, while LLMs can provide reliable assistance for recognizing design flaws, their ability to reason autonomously in noisy, realistic contexts is limited, highlighting the critical need for more scalable and robust program understanding capabilities.
查看此版本解读 →查看此版本原文 ↗