次回の更新記事:AIエージェントのトークンコストを4割削る設計(公開予定日:2026年07月27日)
AIDB Daily Papers

プログラム表現がLLMの脆弱性推論に与える影響:実証的研究

原題: Representation Matters: An Empirical Study of Program Representations for LLM Vulnerability Reasoning
著者: Andrew Stoltman, Johnathan Tang, Haipeng Cai
公開日: 2026-06-24 | 分野: LLM セキュリティ AI ソフトウェア cs.SE cs.CR

※ 日本語タイトル・ポイントはAIによる自動生成です。正確な内容は原論文をご確認ください。

ポイント

  • 本研究では、LLMによる脆弱性検出において、ソースコード表現と静的解析に基づくプログラム表現の効果を比較した。
  • ソースコードのみの場合と比較して、抽象構文木(AST)とプログラム依存グラフ(PDG)の組み合わせが最も高い精度を示した。
  • 構造化されたグラフ表現は、ソースコードの追加情報よりも、LLMの脆弱性推論においてより効果的であることが示された。

Abstract

Large Language Models (LLMs) are increasingly used for automated vulnerability detection, but it remains unclear how program structure and semantics should be represented for LLM-based reasoning. Most prompting-based approaches provide raw source code, implicitly assuming that more source-level context gives the model better evidence. This paper challenges that assumption through RepBench, an empirical benchmark comparing raw source code with static-analysis-based program representations. RepBench converts real-world C/C++ vulnerability testcases into multiple representations: raw source, Abstract Syntax Trees (ASTs), Control-Flow Graphs (CFGs), Program Dependence Graphs (PDGs), their combinations, and an auxiliary track of enriched PDGs (ePDGs). Using a curated PrimeVul-derived corpus of 107 Joern-based testcases across five CWE categories, we evaluate ten representation variants under a fixed Chain-of-Thought and structured-output protocol, plus 19 additional ePDG cases generated through VulChecker/Hector. Representation choice substantially affects LLM vulnerability reasoning. The strongest variant, AST+PDG, achieves 83.2% accuracy, compared with 53.5% for raw source. At the family level, graph-only prompts outperform both source-only and source-plus-graph prompts while requiring far less prompt overhead. These results reveal a context dilution effect: adding raw source code to compact structural graph evidence can degrade reasoning by making vulnerability-relevant evidence less salient. Overall, our findings show that carefully selected structural representations offer a better accuracy-overhead tradeoff than simply giving LLMs more raw input, and suggest that static analysis can serve as an effective prompt-construction layer for security-focused LLM reasoning.

Paper AI Chat

この論文のPDF全文を対象にAIに質問できます。

質問の例:

AIチャット機能を利用するには、ログインまたは会員登録(無料)が必要です。

会員登録 / ログイン

関連するAIDB記事