Table of Contents
Fetching ...

SPICED: Syntactical Bug and Trojan Pattern Identification in A/MS Circuits using LLM-Enhanced Detection

Jayeeta Chaudhuri, Dhruv Thapar, Arjun Chaudhuri, Farshad Firouzi, Krishnendu Chakrabarty

TL;DR

This work proposes SPICED, a Large Language Model (LLM)-based framework that operates within the software domain, eliminating the need for hardware modifications for Trojan detection and localization, and is the first work using LLM-aided techniques for detecting and localizing syntactical bugs and analog Trojans in circuit netlists.

Abstract

Analog and mixed-signal (A/MS) integrated circuits (ICs) are crucial in modern electronics, playing key roles in signal processing, amplification, sensing, and power management. Many IC companies outsource manufacturing to third-party foundries, creating security risks such as stealthy analog Trojans. Traditional detection methods, including embedding circuit watermarks or conducting hardware-based monitoring, often impose significant area and power overheads, and may not effectively identify all types of Trojans. To address these shortcomings, we propose SPICED, a Large Language Model (LLM)-based framework that operates within the software domain, eliminating the need for hardware modifications for Trojan detection and localization. This is the first work using LLM-aided techniques for detecting and localizing syntactical bugs and analog Trojans in circuit netlists, requiring no explicit training and incurring zero area overhead. Our framework employs chain-of-thought reasoning and few-shot examples to teach anomaly detection rules to LLMs. With the proposed method, we achieve an average Trojan coverage of 93.32% and an average true positive rate of 93.4% in identifying Trojan-impacted nodes for the evaluated analog benchmark circuits. These experimental results validate the effectiveness of LLMs in detecting and locating both syntactical bugs and Trojans within analog netlists.

SPICED: Syntactical Bug and Trojan Pattern Identification in A/MS Circuits using LLM-Enhanced Detection

TL;DR

This work proposes SPICED, a Large Language Model (LLM)-based framework that operates within the software domain, eliminating the need for hardware modifications for Trojan detection and localization, and is the first work using LLM-aided techniques for detecting and localizing syntactical bugs and analog Trojans in circuit netlists.

Abstract

Analog and mixed-signal (A/MS) integrated circuits (ICs) are crucial in modern electronics, playing key roles in signal processing, amplification, sensing, and power management. Many IC companies outsource manufacturing to third-party foundries, creating security risks such as stealthy analog Trojans. Traditional detection methods, including embedding circuit watermarks or conducting hardware-based monitoring, often impose significant area and power overheads, and may not effectively identify all types of Trojans. To address these shortcomings, we propose SPICED, a Large Language Model (LLM)-based framework that operates within the software domain, eliminating the need for hardware modifications for Trojan detection and localization. This is the first work using LLM-aided techniques for detecting and localizing syntactical bugs and analog Trojans in circuit netlists, requiring no explicit training and incurring zero area overhead. Our framework employs chain-of-thought reasoning and few-shot examples to teach anomaly detection rules to LLMs. With the proposed method, we achieve an average Trojan coverage of 93.32% and an average true positive rate of 93.4% in identifying Trojan-impacted nodes for the evaluated analog benchmark circuits. These experimental results validate the effectiveness of LLMs in detecting and locating both syntactical bugs and Trojans within analog netlists.
Paper Structure (14 sections, 4 figures, 5 tables)

This paper contains 14 sections, 4 figures, 5 tables.

Figures (4)

  • Figure 1: (a) Enhancing syntactical bug detection accuracy of LLM by instruction-following approach (b) Identifying and mitigating bugs in a SPICE netlist.
  • Figure 2: (a) An example prompt highlighting the SPICE syntax rules for bug detection and localization (b) LLM correctly detects the bugs injected in the netlist; however, it incorrectly flags Lines 6 and 7 as bugs (highlighted in red) (c) Explicitly updating the rules in the prompt to reduce false positives.
  • Figure 3: (a) Flow of supervised-learning approach using machine learning (ML) models (b) Using the supervised-learning analogy to locate Trojan-impacted nodes using LLM ($V_{out}$: primary output voltage, $Spec$: desired output voltage specifications, $V^{node}_i (I^{node}_i$): node voltage (current) corresponding to $i^{th}$ input voltage sample $V^{in}_i$).
  • Figure 4: Voltage deviation analysis for A2 Trojan-inserted netlist of circuit '642' from AMSNet amsnet. Voltage deviation of a node $x$ is given by $V_i^{x}-V_{i-1}^x$, where $i-1$ and $i$ are consecutive input voltage samples. (a) Analyze voltage deviation of each node across the 'Normal Input' and 'Trojan-Activation Input' ranges, (b) analyze voltage deviation across nodes in the 'Trojan-Activation Input' range. Combining (a) and (b), we observe that node 37 is a Trojan-impacted node.