MulVul: 검색 증강 다중 에이전트 기반 코드 취약점 탐지 기술 - 모델 간 프롬프트 진화
MulVul: Retrieval-augmented Multi-Agent Code Vulnerability Detection via Cross-Model Prompt Evolution
대규모 언어 모델(LLM)은 실제 환경에서의 취약점 탐지를 자동화하는 데 어려움을 겪습니다. 이는 주로 다음과 같은 두 가지 주요 한계 때문입니다. 첫째, 다양한 취약점 패턴은 단일 통합 모델의 효율성을 저해하며, 둘째, 방대한 취약점 범주에 대한 수동 프롬프트 엔지니어링은 확장성이 떨어집니다. 이러한 문제점을 해결하기 위해, 우리는 정확하고 광범위한 취약점 탐지를 위한 검색 증강 다중 에이전트 프레임워크인 **MulVul**을 제안합니다. MulVul은 거칠기-세밀하기(coarse-to-fine) 전략을 채택하여, extit{Router} 에이전트가 먼저 상위-$k$개의 거친 범주를 예측하고, 그 결과를 특화된 extit{Detector} 에이전트로 전달하여 정확한 취약점 유형을 식별합니다. 두 에이전트 모두 취약점 지식 기반에서 증거를 적극적으로 검색하여 환각(hallucination) 현상을 완화하는 도구를 갖추고 있습니다. 더 나아가, 특화된 프롬프트를 자동으로 생성하기 위해, 우리는 extit{Cross-Model Prompt Evolution}이라는 프롬프트 최적화 메커니즘을 설계했습니다. 이 메커니즘은 생성자 LLM이 후보 프롬프트를 반복적으로 개선하는 동시에, 별도의 실행자 LLM이 그 효과를 검증합니다. 이러한 분리는 단일 모델 최적화에서 발생하는 자기 교정 편향을 완화합니다. 130개의 CWE 유형에 대한 평가 결과, MulVul은 34.79%의 Macro-F1 점수를 달성하여, 가장 우수한 기존 모델보다 41.5% 향상된 성능을 보였습니다. 추가 분석을 통해, 모델 간 프롬프트 진화가 다양한 취약점 패턴을 효과적으로 처리하여 수동 프롬프트보다 성능을 51.6% 향상시키는 것을 확인했습니다.
Large Language Models (LLMs) struggle to automate real-world vulnerability detection due to two key limitations: the heterogeneity of vulnerability patterns undermines the effectiveness of a single unified model, and manual prompt engineering for massive weakness categories is unscalable. To address these challenges, we propose \textbf{MulVul}, a retrieval-augmented multi-agent framework designed for precise and broad-coverage vulnerability detection. MulVul adopts a coarse-to-fine strategy: a \emph{Router} agent first predicts the top-$k$ coarse categories and then forwards the input to specialized \emph{Detector} agents, which identify the exact vulnerability types. Both agents are equipped with retrieval tools to actively source evidence from vulnerability knowledge bases to mitigate hallucinations. Crucially, to automate the generation of specialized prompts, we design \emph{Cross-Model Prompt Evolution}, a prompt optimization mechanism where a generator LLM iteratively refines candidate prompts while a distinct executor LLM validates their effectiveness. This decoupling mitigates the self-correction bias inherent in single-model optimization. Evaluated on 130 CWE types, MulVul achieves 34.79\% Macro-F1, outperforming the best baseline by 41.5\%. Ablation studies validate cross-model prompt evolution, which boosts performance by 51.6\% over manual prompts by effectively handling diverse vulnerability patterns.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.