解决漏洞分析中知识冲突问题,提升LLM对最新漏洞信息的准确检索能力。
Tug-of-War within A Decade: Conflict Resolution in Vulnerability Analysis via Teacher-Guided Retrieval-Augmented Generations

- 采用分段文档与混合检索策略,提高漏洞数据召回精度。
- 通过教师指导的偏好优化,使模型生成更准确、无幻觉的答案。
- 适合关注网络安全与大模型知识一致性的研究人员和工程师。
大型语言模型在网络安全漏洞分析中至关重要。过去十年中发现的20多万个漏洞中,超过3万已更新或变更,要求频繁更新训练数据和内部知识库以保持知识一致性。本文聚焦于CVE检测与分析中的知识差异与冲突问题,该问题导致模型无法从原始训练数据中获取最新知识,引发知识冲突、事实错误及生成幻觉。为此,我们提出创新的两阶段框架CRVA-TGRAG(基于教师引导的检索增强生成的漏洞分析冲突解决)。第一阶段通过父文档分段与基于语义相似性及倒排索引的集成检索方案,提升文档检索准确性;第二阶段利用教师引导的偏好优化技术微调大模型,增强其在漏洞数据检索基础上的生成能力。实验表明,本方法在检索最新CVE方面优于外部知识库。结论:该框架显著缓解了仅依赖大模型进行知识检索时可能产生的知识冲突与不一致问题。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。