十年内的拔河战:通过教师引导的检索增强生成解决漏洞分析中的冲突
Tug-of-War within A Decade: Conflict Resolution in Vulnerability Analysis via Teacher-Guided Retrieval-Augmented Generations
AI总结:
本文提出CRVA-TGRAG框架,通过改进检索准确性和教师引导的偏好优化,解决CVE检测中的知识冲突问题,提升漏洞检索的准确性和一致性。
摘要:
大型语言模型(LLMs)在网络安全漏洞分析中至关重要。然而,在过去十年中发现的超过20万种漏洞中,有超过3万种已被更新或修改,这要求频繁更新LLMs的训练数据集和内部知识库以保持知识一致性。本文聚焦于CVE检测和分析中的知识差异和冲突问题,该问题阻碍了LLMs从原始训练数据集中检索最新知识,导致知识冲突、事实错误的生成和生成幻觉。为此,我们提出了一种创新的两阶段框架CRVA-TGRAG。首先,通过父文档分割和基于语义相似性和倒排索引的集成检索方案,提高检索阶段的文档检索准确性。其次,通过教师引导的偏好优化技术对LLMs进行微调,以增强基于CVE数据集检索的生成能力。我们的框架不仅通过RAG提高了内容检索的质量,还利用LLMs的偏好微调优势,更有效地和精确地回答问题。实验表明,我们的方法在检索最新CVEs的准确性上优于外部知识库。结论是,我们的框架显著缓解了仅依赖LLMs进行知识检索时可能产生的潜在知识冲突和不一致问题。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。