SecV: LLM-Based Secure Verilog Generation with Clue-Guided Exploration on Hardware-CWE Knowledge Graph
Abstract
Verilog is specified as the primary Register Transfer Level (RTL) hardware description language, which designs the logical functions between registers for digital circuit systems. Recently, there emerges much cutting-edge research in leveraging Large Language Models (LLMs) to generate Verilog, aiming at effectively reducing errors and costs in the logic design of chips. However, these works mainly focus on logical correctness or PPA (Power, Performance, Area) measurement of the generated results, while neglecting the security problems in Verilog. In this study, we propose SecV, a novel and unified framework to generate secure Verilog by clue-guided exploration on Common Weakness Enumeration (CWE) knowledge graph (KG) for chips. First, the builder of the KG utilizes the instance-adapted chain of thought (COT) to extract entities and their relationships from raw Hardware-CWE corpora. Then, a fine-tuned BERT model is employed to verify the Hardware-CWE KG and collaborate with builder iteratively to achieve the precise KG. Based on Hardware-CWE KG, a clue-guided graph exploration paradigm is designed to facilitate collaborative inference of knowledge to generate secure Verilog by LLMs. Experiments demonstrate that SecV achieves 82.6% secure Verilog code without specified CWE in the generated functionally correct Verilog, with superior performance of a 21.7% performance improvement compared to SOTA.
Cite
Text
Fan et al. "SecV: LLM-Based Secure Verilog Generation with Clue-Guided Exploration on Hardware-CWE Knowledge Graph." International Joint Conference on Artificial Intelligence, 2025. doi:10.24963/IJCAI.2025/895Markdown
[Fan et al. "SecV: LLM-Based Secure Verilog Generation with Clue-Guided Exploration on Hardware-CWE Knowledge Graph." International Joint Conference on Artificial Intelligence, 2025.](https://mlanthology.org/ijcai/2025/fan2025ijcai-secv/) doi:10.24963/IJCAI.2025/895BibTeX
@inproceedings{fan2025ijcai-secv,
title = {{SecV: LLM-Based Secure Verilog Generation with Clue-Guided Exploration on Hardware-CWE Knowledge Graph}},
author = {Fan, Fanghao and Xia, Yingjie and Kuang, Li},
booktitle = {International Joint Conference on Artificial Intelligence},
year = {2025},
pages = {8049-8057},
doi = {10.24963/IJCAI.2025/895},
url = {https://mlanthology.org/ijcai/2025/fan2025ijcai-secv/}
}