用自有知识产权微调大模型写Verilog,既要防泄露又要保效果
VeriLeaky: Navigating IP Protection vs Utility in Fine-Tuning for LLM-Driven Verilog Coding
- 用内部IP数据微调LLM,提升Verilog代码生成能力
- 实测发现微调数据可被模型反向泄露,威胁知识产权安全
- 逻辑加密能防泄露但降低模型性能,需新策略平衡保护与实用
大型语言模型在编码领域潜力巨大,但针对如Verilog这类专用语言,使用精心筛选的数据进行微调至关重要。然而,利用专有知识产权(IP)进行微调存在严重风险:微调数据可能通过模型推理泄露。这对设计公司构成关键困境——如何在构建外部可用的、具备竞争力的Verilog代码生成大模型时,既利用内部IP提升微调效果,又确保知识产权安全?本文首次系统研究此矛盾。基于LLaMA 3.1-8B,在基准Verilog数据集RTLCoder基础上,融合自研内部IP进行微调,并通过多次流片验证其有效性。为严格评估知识产权泄露风险,我们量化生成代码与内部IP之间的结构相似性(AST/Dolos)和功能等价性(Synopsys Formality)。结果表明,内部IP确实存在泄露风险。作为防御措施,我们评估了面向Verilog代码的逻辑加密技术(ASSURE),虽有一定保护作用,但显著降低IP用于微调的实用性,并削弱模型性能。本研究揭示了亟需开发既能有效防护、又对微调影响最小的新策略,以帮助设计公司充分释放其专有知识产权在大模型驱动的Verilog编程中的价值。
原文摘要 · Abstract (English)
Large language models (LLMs) offer significant potential for coding, yet fine-tuning (FT) with curated data is essential for niche languages like Verilog. Using proprietary intellectual property (IP) for FT presents a serious risk, as FT data can be leaked through LLM inference. This leads to a critical dilemma for design houses: seeking to build externally accessible LLMs offering competitive Verilog coding, how can they leverage in-house IP to enhance FT utility while ensuring IP protection? For the first time in the literature, we study this dilemma. Using LLaMA 3.1-8B, we conduct in-house FT on a baseline Verilog dataset (RTLCoder) supplemented with our own in-house IP, which is validated through multiple tape-outs. To rigorously assess IP leakage, we quantify structural similarity (AST/Dolos) and functional equivalence (Synopsys Formality) between generated codes and our in-house IP. We show that our IP can indeed be leaked, confirming the threat. As defense, we evaluate logic locking of Verilog codes (ASSURE). This offers some level of protection, yet reduces the IP's utility for FT and degrades the LLM's performance. Our study shows the need for novel strategies that are both effective and minimally disruptive to FT, an essential effort for enabling design houses to fully utilize their proprietary IP toward LLM-driven Verilog coding.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。