The rapid advancement of Large Language Models (LLMs) presents new opportunities for automated software vulnerability detection, a crucial task in securing modern codebases. This paper presents a comparative study on the effectiveness of LLM-based techniques for detecting software vulnerabilities. The study evaluates three approaches, Retrieval-Augmented Generation (RAG), Supervised Fine-Tuning (SFT), and a Dual-Agent LLM framework, against a baseline LLM model. A curated dataset was compiled from Big-Vul and real-world code repositories from GitHub, focusing on five critical Common Weakness Enumeration (CWE) categories: CWE-119, CWE-399, CWE-264, CWE-20, and CWE-200. Our RAG approach, which integrated external domain knowledge from the internet and the MITRE CWE database, achieved the highest overall accuracy (0.86) and F1 score (0.85), highlighting the value of contextual augmentation. Our SFT approach, implemented using parameter-efficient QLoRA adapters, also demonstrated strong performance. Our Dual-Agent system, an architecture in which a secondary agent audits and refines the output of the first, showed promise in improving reasoning transparency and error mitigation, with reduced resource overhead. These results emphasize that incorporating a domain expertise mechanism significantly strengthens the practical applicability of LLMs in real-world vulnerability detection tasks.
PA-RAG: RAG Alignment via Multi-Perspective Preference Optimization
School of Data Science and Engineering, East China Normal University(华东师范大学数据科学与工程学院);Chinese Academy of Sciences(中国科学院);Baidu Inc(百度公司);Peking University(北京大学)
Knowledge and Reasoning Augmented Learning for Language Model Assisted Antimicrobial Decision Support
Information Center, State Key Laboratory of Complex Severe and Rare Diseases, Peking Union Medical College Hospital(信息中心、复杂严重罕见疾病国家重点实验室、北京友谊医院);Department of Critical Care Medicine, State Key Laboratory of Complex Severe and Rare Diseases, Peking Union Medical College Hospital, Peking Union Medical College and Chinese Academy of Medical Sciences(重症医学科、复杂严重罕见疾病国家重点实验室、北京友谊医院、北京友谊医院和中国医学科学院);Medical Intensive Care Unit, State Key Laboratory of Complex Severe and Rare Diseases, Peking Union Medical College Hospital, Peking Union Medical College and Chinese Academy of Medical Sciences(医疗重症病房、复杂严重罕见疾病国家重点实验室、北京友谊医院、北京友谊医院和中国医学科学院)
SafeRAG: Benchmarking Security in Retrieval-Augmented Generation of Large Language Model
School of Information, Renmin University of China(中国人民大学信息学院);Institute for Advanced Algorithms Research(高级算法研究院);School of Artificial Intelligence, Beihang University(北京航空航天大学人工智能学院)
On the Vulnerability of Applying Retrieval-Augmented Generation within Knowledge-Intensive Application Domains
Department of ECE University of Minnesota(电子工程系明尼苏达大学);Data Science Institute University of Chicago(数据科学研究所芝加哥大学);Carlson School of Management University of Minnesota(卡尔森管理学院明尼苏达大学);Department of Surgery University of Minnesota(外科系明尼苏达大学);Cisco Research(思科研究);School of Statistics University of Minnesota(统计学学院明尼苏达大学)
SecureRAG-RTL: A Retrieval-Augmented, Multi-Agent, Zero-Shot LLM-Driven Framework for Hardware Vulnerability Detection
School of Computing, Wichita State University(计算机科学学院,威斯康星州立大学);Department of Electrical and Computer Engineering, Auburn University(电气与计算机工程系,阿伯茨兰大学);IBM
ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection
School of Automation, Guangdong University of Technology(广东科技大學自動化學院);College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics(南京航空航天大學計算機科學與技術學院);School of Cyberspace Science and Technology, Beijing Jiaotong University(北京交通大學網絡空間科學與技術學院);School of Computer Science and Technology, Guangdong University of Technology(廣東科技大學計算機科學與技術學院);College of Computing and Data Science, Nanyang Technological University(南洋理工大學計算與數據科學學院)
LProtector: An LLM-driven Vulnerability Detection System
University of Pennsylvania(宾夕法尼亚大学);University of Electronic Science & Technology of China(电子科技大学);Texas A&M University(德克萨斯农工大学);Georgetown University(乔治城大学);Northern Arizona University(北亚利桑那大学);LG Energy Solution (Nanjing) Co., Ltd(LG新能源(南京)有限公司)
Understand What LLM Needs: Dual Preference Alignment for Retrieval-Augmented Generation
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);School of Artificial Intelligence, Beijing University of Posts and Telecommunications(北京邮电大学人工智能学院)
RAG-CT: Mitigating Privacy Risks on Retrieval-Augmented Generation Systems via Scanning Prompt Distribution
University of Massachusetts Lowell(马萨诸塞大学洛厄尔分校);City University of Hong Kong(香港城市大学);Virginia Tech(弗吉尼亚理工大学);University of South Florida(南佛罗里达大学);Rochester Institute of Technology(罗切斯特理工学院)
From RAG to Agentic RAG for Faithful Islamic Question Answering
Qatar Computing Research Institute, HBKU, Qatar(卡塔尔计算研究中心,HBKU,卡塔尔);College of Humanities and Social Sciences, HBKU, Qatar(人文与社会科学学院,HBKU,卡塔尔);Arab Center for Research and Policy Studies, Qatar(阿拉伯研究中心与政策研究所,卡塔尔);College of Islamic Studies, HBKU, Qatar(伊斯兰研究学院,HBKU,卡塔尔);College of Public Policy, HBKU, Qatar(公共政策学院,HBKU,卡塔尔)
Improving LLM Reasoning for Vulnerability Detection via Group Relative Policy Optimization
Institute of Informatics and Telematics, National Research Council of Italy(意大利国家研究理事会信息与电信研究所);Department of Excellence in Robotics and AI, TeCIP, Scuola Superiore Sant'Anna(卓越机器人与人工智能系,TeCIP,圣安娜高等学院)
Detecting RAG Extraction Attack via Dual-Path Runtime Integrity Game
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院);Beijing University of Post and Telecommunications(北京邮电大学);Stanford University(斯坦福大学);North China Electric Power University(华北电力大学);AI Sec Lab, Beijing Chaitin Technology Co.,Ltd(北京长亭科技有限公司AI安全实验室)
Mastermind: Strategy-grounded Learning for Repository-Scale Vulnerability Reproduction
National University of Singapore(新加坡国立大学);Nanyang Technological University(南洋理工大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))
Bridging the Semantic-Utility Gap in Multimodal RAG via Generator-in-the-Loop Alignment
Elmore Family School of Electrical and Computer Engineering, Purdue University(普渡大学埃尔莫尔电气与计算机工程学院);Yonsei University(延世大学);University at Buffalo–SUNY(纽约州立大学布法罗分校)
Detecting Vulnerability-Inducing Commits via Multi-Stage Reasoning with LLM-Based Agents
State Key Laboratory of Complex & Critical Software Environment (CCSE), Beihang University(复杂与关键软件环境国家重点实验室,北京航空航天大学);Hangzhou Innovation Institute of Beihang University(北京航空航天大学杭州创新研究院);North China Municipal Engineering Design & Research Institute Co., Ltd.(华北市政工程设计研究有限公司)
Hidden in the Metadata: Stealth Poisoning Attacks on Multimodal Retrieval-Augmented Generation
The City University of New York, CSI, Staten Island, NY 10314, USA(纽约城市大学,CSI,史泰登岛分校);The City University of New York, Graduate Center, New York, NY 10016, USA(纽约城市大学研究生中心)
CARO: Chain-of-Analogy Reasoning Optimization for Robust Content Moderation
National Engineering Laboratory for Big Data System Computing Technology(大数据系统计算技术国家工程实验室);Shenzhen University(深圳大学);Tsinghua University(清华大学);National University of Singapore(新加坡国立大学)