SecureRAG-RTL: A Retrieval-Augmented, Multi-Agent, Zero-Shot LLM-Driven Framework for Hardware Vulnerability Detection

Touseef Hasan ∗ , Blessing Airehenbuwa † , Nitin Pundir ‡ , Souvika Sarkar ∗ , Ujjwal Guin † · 2026

Read SecureRAG-RTL: A Retrieval-Augmented, Multi-Agent, Zero-Shot LLM-Driven Framework for Hardware Vulnerability Detection by Touseef Hasan ∗ , Blessing Airehenbuwa † , Nitin Pundir ‡ , Souvika Sarkar ∗ , Ujjwal Guin † (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-05689.txt.

Introduction

Hasan and team propose SecureRAG-RTL, a retrieval-boosted, multi-agent, zero-shot framework for hardware weakness finding. Large language models excel at language tasks, yet hardware security checking lags from scarce public hardware design language data sets. Field fetching joined with making thinking lets models overcome hardware security know-how limits. Prompt-only base models come first, before tests that it improves detection across diverse LLM designs no matter the size, raising rightness about 30% on average. A picked benchmark of 14 HDL designs with real-world flaws will be public.

Catalog record

CREATORTouseef Hasan ∗ , Blessing Airehenbuwa † , Nitin Pundir ‡ , Souvika Sarkar ∗ , Ujjwal Guin †
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE32156
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.05689

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

SecureRAG-RTL: A Retrieval-Augmented, Multi-Agent, Zero-Shot LLM-Driven Framework for Hardware Vulnerability Detection Touseef Hasan ∗ , Blessing Airehenbuwa † , Nitin Pundir ‡ , Souvika Sarkar ∗ , Ujjwal Guin † Abstract Large language models (LLMs) have shown remarkable capabilities in natural language processing tasks, yet their application in hardware security verification remains limited due to scarcity of publicly available hardware description language (HDL) datasets. This knowledge gap constrains LLM performance in detecting vulnerabilities within HDL designs. To address this challenge, we propose SecureRAG-RTL, a novel Retrieval-Augmented Generation (RAG)-based approach that significantly enhances LLM-based security verification of hardware designs. Our approach integrates domain-specific retrieval with generative reasoning, enabling models to overcome inherent limitations in hardware security expertise. We establish baseline vulnerability detection rates using prompt-only methods and then demonstrate that SecureRAG-RTL achieves substantial improvements across diverse LLM architectures, regardless of size. On average, our method increases detection accuracy by about 30% , highlighting its effectiveness in bridging domain knowledge gaps. For evaluation, we curated and annotated a benchmark dataset of 14 HDL designs containing real-world security vulnerabilities, which we will release publicly to support future research. These findings underscore the potential of RAG-driven augmentation to enable scalable, efficient, and accurate hardware security verification workflows. I Introduction The increased complexity of the modern semiconductor design cycle makes it difficult to ensure the security of third-party intellectual properties (IPs). Verifying IPs for security vulnerabilities requires time and subject matter expertise, which, if neglected, may result in severe security consequences [ 7 ] . With increased design complexity, traditional simulation-based testing and formal verification [ 9 , 10 ] have become time-consuming. This underscores the need for more efficient and automated security verification methods. Large language models (LLMs) have already demonstrated remarkable performance in the software domain for code generation [ 8 ] , understanding [ 28 ] , and vulnerability detection [ 46 ] . Recently, researchers have also started exploring LLMs in the electronic design automation (EDA) flows, such as generating hardware description language (HDL) code [ 38 , 27 , 37 ] , creating formal properties [ 18 ] , fixing syntax bugs [ 40 , 34 ] , and identifying and patching functional bugs [ 29 , 30 ] . TABLE I: Zero-shot prompting to detect vulnerabilities. Model Vulnerability Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Code Llama 7B It [ 32 ] ✗ ✓ ✗ ✗ ✓ ✗ ✓ ✗ ✗ ✗ ✓ ✗ ✗ ✗ StarCoder 2 7B [ 26 ] ✓ ✗ ✗ ✗ ✗ ✗ ✓ ✓ ✗ ✗ ✗ ✗ ✓ ✗ DeepSeek-Coder 6.7B It [ 16 ] ✗ ✗ ✗ ✓ ✗ ✓ ✓ ✗ ✓ ✗ ✗ ✗ ✗ ✗ GPT-4o [ 22 ] ✓ ✓ ✗ ✓ ✗ ✓ ✗ ✗ ✗ ✓ ✓ ✓ ✗ ✗ Gemini 2.5 Pro [ 6 ] ✓ ✓ ✗ ✓ ✗ ✓ ✗ ✓ ✗ ✗ ✓ ✓ ✗ ✗ Commercial LLMs are trained on huge corpora of web data, and their training data heavily suffers from an under-representation of HDLs. Even LLMs trained for code-specific tasks contain GitHub repositories mostly written in C, Python, Java, etc., because of their widespread availability online [ 41 ] . This could potentially hamper the hardware understanding capabilities of the LLMs. Our initial experiments reflected the same in Table I , where code-based LLMs like Code Llama [ 32 ] , StarCoder [ 26 ] , DeepSeek-Coder [ 16 ] could only detect 4 out of the 14 vulnerabilities in the HDL testset, and frontier LLMs like GPT-4o [ 22 ] , Gemini 2.5 Pro [ 6 ] could only detect 7. This represents how far LLMs currently are from robust vulnerability detection in HDLs. Although researchers have recently demonstrated success in hardware vulnerability detection by fine-tuning pre-trained LLMs [ 12 , 44 , 35 , 45 ] , the associated computational costs raise questions regarding their wide adoption. In this paper, we introduce SecureRAG-RTL , a novel retrieval-augmented, multi-agent, zero-shot hardware vulnerability detection flow to achieve significantly improved detection performance across diverse LLM families. The proposed framework detects all 14 benchmarked RTL vulnerabilities in the test set, while demonstrating increased accuracy for small and medium-sized LLMs. Our key contributions are summarized as follows: • We propose SecureRAG-RTL , a multi-agentic zero-shot prompting flow designed to enhance vulnerability detection in HDL without requiring LLM fine-tuning. • Our proposed novel RAG pipeline integrates structured CWE knowledge for efficient and semantically rich vulnerability search. Our approach leverages RTL signature extraction, multi-field semantic search, HDL annotation, and LLM-assisted RTL summarization. Together, these significantly improve the precision and contextual relevance of CWE-based vulnerability detection in hardware designs. • We evaluate 18 open-source and proprietary LLMs for vulnerability detection in HDL code using SecureRAG-RTL , showing consistent improvements (up to 42% ). The proposed security verification pipeline is specifically designed to operate efficiently with lightweight models, focusing on resource constraints and emphasizing on localized security verification, accommodating the proprietary nature of HDL in industrial settings. The rest of the paper is organized as follows. Section II includes the background study on hardware vulnerabilities, LLMs for vulnerability detection, and RAG. We present the SecureRAG-RTL framework in Section III . Section IV covers the details of our experimental design. Section V contains the results and summarizes our findings. Section VI concludes the paper. II Prior Work This section explores the application of LLMs in hardware vulnerability detection and highlights the potential of RAG. II-A LLMs for HDL Vulnerability Detection Researchers have demonstrated the automatic generation of hardware code using LLMs by fine-tuning pre-existing models on HDL datasets [ 37 , 11 ] and shown comparable results to frontier LLMs. However, using LLMs to detect vulnerabilities in HDLs hasn’t been a straightforward or successful venture. There is no one-size-fits-all solution, and so prior works have explored various approaches. For instance, RTLFixer [ 40 ] utilizes LLMs to autonomously plan intermediate steps for iterative debugging, thereby fixing syntax errors in HDL. VeriAssist [ 19 ] enables LLMs to self-correct their generated code by adopting an automatic prompting system, which involves multi-turn interactions and chain-of-thought reasoning. Self-HWDebug [ 3 ] leverages LLMs to automatically create required debugging instructions, while another study proposes an ensemble of LLMs to generate and evaluate repairs [ 2 ] . MARVEL [ 5 ] and MEIC [ 42 ] make use of multiple LLM agents for debugging RTL security bugs. Another approach proven to be effective but expensive is fine-tuning LLMs specifically for vulnerability detection tasks in HDL code, as seen in LLM4SecHW [ 12 ] , LiK [ 44 ] , BugWhisperer [ 35 ] , and HDLdebugger [ 45 ] . Despite these attempts, many of these approaches rely on fine-tuning, which is too costly and impractical for low-resource environments. II-B Hardware Vulnerability Database Hardware vulnerabilities are weaknesses or flaws within the physical, logical, or architectural design of computing systems that can be exploited to undermine a system’s integrity, confidentiality, or availability. Unlike software bugs, hardware vulnerabilities are often more difficult to detect and mitigate, as they become embedded during the design and fabrication process [ 7 ] . Recently, a list of

Read the complete text