Large language models (LLMs) for Verilog code generation are increasingly adopted in hardware design, yet remain vulnerable to backdoor attacks where adversaries inject malicious triggers during training to induce vulnerable hardware designs. Unlike patchable software vulnerabilities, hardware trojans become irreversible once fabricated, making remediation extremely costly or impossible. Existing active defenses require access to training data, impractical for third-party LLM users, while passive defenses struggle against semantically stealthy triggers that naturally blend into design specifications. In this paper, we hypothesize that under the requirements of both effectiveness and stealthiness, attackers are strongly biased toward embedding triggers in non-functional requirements (e.g., style modifiers, quality descriptors) rather than functional specifications that determine hardware behavior. Exploiting this insight, we propose Semantic Consensus Decoding (SCD), an inference-time passive defense with two key components: (1) functional requirement extraction that identifies essential requirements from user specifications, and (2) consensus decoding that adaptively fuses output distributions based on full user specifications and extracted functional requirements. When these distributions diverge significantly, SCD automatically suppresses suspicious components. Extensive experiments with three representative backdoor attacks demonstrate that SCD reduces average attack success rate from 89% to under 3% with negligible impact on generation quality.


翻译:用于Verilog代码生成的大语言模型(LLMs)在硬件设计中日益普及,但其仍易受后门攻击的威胁——攻击者可在训练阶段注入恶意触发器,从而诱导生成存在安全漏洞的硬件设计。与可修补的软件漏洞不同,硬件木马一旦制造完成即不可逆转,使得修复成本极高甚至无法实现。现有主动防御方案需访问训练数据,这对第三方LLM用户而言并不现实;而被动防御方案则难以应对语义隐蔽型触发器——这类触发器能自然地融入设计规范之中。本文提出假设:在兼顾攻击有效性与隐蔽性的双重约束下,攻击者会强烈倾向于将触发器嵌入非功能性需求(如样式修饰符、质量描述符),而非决定硬件行为的功能性规范。基于这一洞见,我们提出语义共识解码(SCD),一种推理阶段的被动防御方案,其包含两个核心组件:(1)功能性需求提取——从用户规范中识别核心需求;(2)共识解码——基于完整用户规范与提取的功能性需求自适应融合输出概率分布。当这些分布出现显著分歧时,SCD会自动抑制可疑成分。通过对三种典型后门攻击的广泛实验表明,SCD能将平均攻击成功率从89%降至3%以下,且对生成质量的影响可忽略不计。

0
下载
关闭预览

相关内容

计算机视觉领域的后门攻击与防御:综述
专知会员服务
19+阅读 · 2025年9月13日
什么是后训练?大语言模型训练后优化方法综述,87页pdf
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
大型语言模型网络安全综述
专知会员服务
67+阅读 · 2024年5月12日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
TheFatRat 一款简易后门工具
黑白之道
35+阅读 · 2019年10月23日
SemanticAdv:基于语义属性的对抗样本生成方法
机器之心
14+阅读 · 2019年7月12日
iOS如何区分App和SDK内部crash
CocoaChina
11+阅读 · 2019年4月17日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月13日
VIP会员
相关VIP内容
计算机视觉领域的后门攻击与防御:综述
专知会员服务
19+阅读 · 2025年9月13日
什么是后训练?大语言模型训练后优化方法综述,87页pdf
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
大型语言模型网络安全综述
专知会员服务
67+阅读 · 2024年5月12日
通信网络中大型语言模型的后门攻击的综述
专知会员服务
30+阅读 · 2023年9月5日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员