AIDB Daily Papers
LLM生成コードにおける「パッチワーク問題」:構造的不整合の解明と検証
※ 日本語タイトル・ポイントはAIによる自動生成です。正確な内容は原論文をご確認ください。
ポイント
- LLMが生成したコードが局所的には正しく見えても、プロジェクト全体では整合性が取れなくなる「パッチワーク問題」を定義した。
- リポジトリ内の依存関係や設定などの構造的整合性をグラフ表現で形式化し、LLM特有の欠陥を分類する新たな枠組みを提案した。
- 既存の静的解析ツールと専用検出器を組み合わせた検証手法により、従来のテストでは見逃される構造的欠陥を効率的に特定できることを示した。
Abstract
LLM-generated code often compiles, passes tests, and appears correct, yet breaks once deployed. The root cause is frequently structural rather than logical. A generated endpoint references configuration keys never declared in the project, an import targets a package that does not exist in any registry, or a new route omits the authentication guard applied to every sibling endpoint. Each patch is locally valid but globally incoherent, and standard CI toolchains rarely surface these failures. As LLM-powered coding tools see widespread adoption, this blind spot poses a growing risk to software quality. We call this the textbf{patchwork problem}. This paper formalizes structural coherence as consistency invariants over graph representations of repository artifacts, including import, call, dependency, configuration, schema, resource, control-flow, and routing graphs, and introduces an eight-category failure taxonomy distinguishing defects specific to LLM generation from those merely amplified by it. We present a hybrid verification framework that delegates to mature static analysis tools where they already excel and deploys purpose-built detectors for cross-cutting invariants underserved by existing toolchains, targeting provable constraint violations rather than heuristic pattern matching. Empirical evaluation across two frontier models under four prompting strategies reveals that the vast majority of structural failures evade type checking, testing, and SAST entirely, and that failure patterns diverge qualitatively between models in ways that challenge model-agnostic mitigation strategies. External validation on real-world AI-generated repositories confirms that these failures are not artifacts of controlled experimentation but are prevalent wherever LLMs write code with minimal human oversight.
Paper AI Chat
この論文のPDF全文を対象にAIに質問できます。
質問の例: