要約
バッファーオーバーフローやSQL注入などのソフトウェアの脆弱性は、セキュリティ侵害の主要な原因です。
脆弱性検出のための従来の方法は依然として不可欠ですが、高い誤った陽性率、スケーラビリティの問題、および手動の努力への依存によって制限されます。
これらの制約は、自動化された脆弱性検出と安全なコード生成に対するAIベースのアプローチへの関心を促進しています。
大規模な言語モデル(LLM)は分類タスクの新しい手段を開きましたが、その複雑さと不透明度は解釈可能性と展開の課題をもたらします。
スパースオートエンコーダーは、この問題に対する有望なソリューションを提供します。
SAEがJava関数でのバグ検出のための軽量で解釈可能な代替として機能できるかどうかを調査します。
GPT-2 SmallおよびGemma 2Bの表現に適用された場合、SAEの有効性を評価し、基礎となるLLMを微調整せずにバギー行動を強調する能力を調べます。
SAE由来の機能により、最大89%のF1スコアでバグ検出が可能になり、一貫してファインチューニングされたトランスエンコーダーベースラインよりも優れていることがわかりました。
私たちの研究は、SAEを使用して、微調整やタスク固有の監督なしで、前処理されたLLMの内部表現からソフトウェアバグを直接検出できるという最初の経験的証拠を提供します。
要約(オリジナル)
Software vulnerabilities such as buffer overflows and SQL injections are a major source of security breaches. Traditional methods for vulnerability detection remain essential but are limited by high false positive rates, scalability issues, and reliance on manual effort. These constraints have driven interest in AI-based approaches to automated vulnerability detection and secure code generation. While Large Language Models (LLMs) have opened new avenues for classification tasks, their complexity and opacity pose challenges for interpretability and deployment. Sparse Autoencoder offer a promising solution to this problem. We explore whether SAEs can serve as a lightweight, interpretable alternative for bug detection in Java functions. We evaluate the effectiveness of SAEs when applied to representations from GPT-2 Small and Gemma 2B, examining their capacity to highlight buggy behaviour without fine-tuning the underlying LLMs. We found that SAE-derived features enable bug detection with an F1 score of up to 89%, consistently outperforming fine-tuned transformer encoder baselines. Our work provides the first empirical evidence that SAEs can be used to detect software bugs directly from the internal representations of pretrained LLMs, without any fine-tuning or task-specific supervision.
arxiv情報
著者 | Rui Melo,Claudia Mamede,Andre Catarino,Rui Abreu,Henrique Lopes Cardoso |
発行日 | 2025-05-15 14:59:17+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google