Tug-of-War within A Decade: Conflict Resolution in Vulnerability Analysis via Teacher-Guided Retrieval-Augmented Generations

arXiv cs.CL / 4/17/2026

📰 NewsDeveloper Stack & InfrastructureModels & Research

Key Points

  • The paper argues that rapidly changing cybersecurity vulnerability information (e.g., CVE updates) creates knowledge discrepancies and conflicts that can cause hallucinations and incorrect facts in LLM-based vulnerability analysis.
  • It introduces a two-stage framework, CRVA-TGRAG, combining improved CVE document retrieval with a generation-time LLM fine-tuning approach.
  • For retrieval, the method uses Parent Document Segmentation plus an ensemble strategy that blends semantic similarity search with inverted indexing to better locate the latest CVE knowledge.
  • For generation, it applies teacher-guided preference optimization to fine-tune the LLM using CVE retrieval results, aiming to produce more accurate answers.
  • Experiments on retrieving the latest CVEs show improved accuracy over using external knowledge bases alone, and the approach reduces knowledge conflicts from relying solely on LLM internal knowledge.

Abstract

Large Language Models (LLMs) are essential for analyzing and addressing vulnerabilities in cybersecurity. However, among over 200,000 vulnerabilities were discovered in the past decade, more than 30,000 have been changed or updated. This necessitates frequent updates to the training datasets and internal knowledge bases of LLMs to maintain knowledge consistency. In this paper, we focus on the problem of knowledge discrepancy and conflict within CVE (Common Vulnerabilities and Exposures) detection and analysis. This problem hinders LLMs' ability to retrieve the latest knowledge from original training datasets, leading to knowledge conflicts, fabrications of factually incorrect results, and generation hallucinations. To address this problem, we propose an innovative two-stage framework called CRVA-TGRAG (Conflict Resolution in Vulnerability Analysis via Teacher-Guided Retrieval-Augmented Generation). First, to improve document retrieval accuracy during the retrieval stage, we utilize Parent Document Segmentation and an ensemble retrieval scheme based on semantic similarity and inverted indexing. Second, to enhance LLMs' capabilities based on the retrieval of CVE dataset in generation stage, we employ a teacher-guided preference optimization technique to fine-tune LLMs. Our framework not only enhances the quality of content retrieval through RAG but also leverages the advantages of preference fine-tuning in LLMs to answer questions more effectively and precisely. Experiments demonstrate our method achieves higher accuracy in retrieving the latest CVEs compared to external knowledge bases. In conclusion, our framework significantly mitigates potential knowledge conflicts and inconsistencies that may arise from relying solely on LLMs for knowledge retrieval.