SecV: LLM-based Secure Verilog Generation with Clue-Guided Exploration on Hardware-CWE Knowledge Graph
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 8049-8057.
https://doi.org/10.24963/ijcai.2025/895
Keywords
- Machine Learning: ML: Knowledge-aided learning
- Multidisciplinary Topics and Applications: MTA: Software engineering
- Natural Language Processing: NLP: Language generation
- Multidisciplinary Topics and Applications: MTA: Security and privacy
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.
@inproceedings{ijcai2025p895,
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 = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {8049--8057},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/895},
url = {https://doi.org/10.24963/ijcai.2025/895},
}
TY - CPAPER TI - SecV: LLM-based Secure Verilog Generation with Clue-Guided Exploration on Hardware-CWE Knowledge Graph AU - Fan, Fanghao AU - Xia, YingJie AU - Kuang, Li T2 - Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2025 SP - 8049 EP - 8057 DO - 10.24963/ijcai.2025/895 UR - https://doi.org/10.24963/ijcai.2025/895 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: