Pinpointing Hardware Trojans Through Semantic Feature Extraction and Natural Language Processing

Published: 01 Jan 2024, Last Modified: 15 May 2025ITC-Asia 2024EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Hardware Trojans are malicious design modifications, which pose severe threats to hardware security and trust. Since integrated circuit (IC) designs are difficult to modify after chip fabrication, it is of great importance to detect Trojans in the early design stage. In this work, we propose a novel hardware Trojan detection method at register transfer level (RTL) through semantic feature extraction and natural language processing (NLP). We convert the hardware design to control and data flow graph (CDFG) and develop a depth-first search and sliding window based algorithm for extracting and segmenting paths. This process preserves the structural and semantic features of RTL code. We then employ the NLP technique to perform Trojan detection at the granularity of RTL code statement. Specifically, we train the FastText model, which is proficient in word representation and text classification, to precisely pinpoint the Trojan-infected statements. We further integrate the word bigram features during the training process to improve the Trojan detection performance. Experimental evaluations using Trust-Hub benchmarks show that the proposed method can successfully pinpoint hardware Trojans with true positive rate (TPR), true negative rate (TNR), accuracy and F1-score of 97.77%, 99.95%, 98.86% and 97.46% respectively on average.
Loading