超越功能正确性:LLM生成代码的静态质量剖析
原标题:Beyond Functional Correctness: Static Code Quality Profiling of LLM-Generated Code
AI 摘要
该论文对LLM生成的Python代码进行大规模静态质量分析,使用Pylint、Radon和SonarQube工具评估LiveCodeBench中73个模型生成的65,663个程序。研究发现,仅靠功能正确性无法捕捉模型间的系统性差异,可维护性是最明显的区分维度,且正确性往往伴随结构性权衡而非更简单的解决方案。作者呼吁评估框架应超越通过率,关注代码的非功能质量。
正文节选
Beyond Functional Correctness: Static Code Quality Profiling of LLM-Generated Code Abstract Large language models (LLMs) are increasingly used for code generation, yet most evaluations still focus on whether generated code passes benchmark test suites. Functional correctness alone, however, provides only a limited view of quality: benchmark tests are often incomplete, and passing them does not guarantee that code is maintainable, reliable, or well-structured. This paper presents a large-scale st