arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.19006cs.IR
收藏

XGen-Q:一种面向软件安全的、结合检索增强生成的可解释领域自适应大语言模型框架

XGen-Q: An Explainable Domain-Adaptive LLM Framework with Retrieval-Augmented Generation for Software Security

Hamed Jelodar, Mohammad Meymani, Roozbeh Razavi-Far, Ali A. Ghorbani

AI总结:

针对现有恶意软件检测系统泛化性与可解释性不足的问题,提出基于Qwen-Coder的领域自适应框架XGen-Q,结合多阶段提示、RAG与混淆模式训练,在低困惑度与新型样本检测上表现优异,为可解释鲁棒的恶意软件分析提供新方案。

摘要:

生成式AI与大语言模型(LLM)已在代码理解方面展现出强大能力,但它们在网络安全领域,尤其是恶意软件检测与分析中的应用仍较为有限。现有检测系统通常难以泛化到经过混淆处理或此前未见过的威胁,凸显了对更具适应性与可解释性的模型的需求。为应对这一挑战,我们提出XGen-Q——一种基于Qwen-Coder架构构建的领域自适应大语言模型,它在包含超100万个恶意软件样本的大规模语料上完成预训练,语料覆盖源代码与汇编代码。XGen-Q采用多阶段提示策略结合检索增强生成(RAG),即便面对复杂的代码混淆,也能实现可靠的恶意软件识别与详细的取证报告。为进一步提升泛化能力,我们设计了一套训练流程,可系统性地让模型接触多样化的混淆模式。实验结果表明,XGen-Q的困惑度显著低于同类基线模型,且在新型恶意软件样本上表现优异,证明了基于大语言模型的方法在可解释、鲁棒的恶意软件分析方面的应用前景。

英文摘要:

Generative AI and large language models (LLMs) have shown strong capabilities in code understanding, but their use in cybersecurity, particularly for malware detection and analysis, remains limited. Existing detection systems often fail to generalize to obfuscated or previously unseen threats, underscoring the need for more adaptable and explainable models. To address this challenge, we introduce XGen-Q, a domain-adapted LLM built on the Qwen-Coder architecture and pretrained on a large-scale corpus of over one million malware samples, spanning both source and assembly code. XGen-Q uses a multi-stage prompt strategy combined with retrieval-augmented generation (RAG) to deliver reliable malware identification and detailed forensic reporting, even in the presence of complex code obfuscation. To further enhance generalization, we design a training pipeline that systematically exposes the model to diverse obfuscation patterns. Experimental results show that XGen-Q achieves significantly lower perplexity than competitive baselines and exhibits strong performance on novel malware samples, demonstrating the promise of LLM-based approaches for interpretable and robust malware analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑