International Association for Cryptologic Research

International Association
for Cryptologic Research

Transactions on Cryptographic Hardware and Embedded Systems 2026

SAMSEM – A Generic and Scalable Approach for IC Metal Line Segmentation


Christian Gehrmann
Max Planck Institute for Security and Privacy (MPI-SP), Bochum, Germany

Jonas Ricker
Ruhr University Bochum (RUB), Bochum, Germany

Simon Damm
Ruhr University Bochum (RUB), Bochum, Germany

Deruo Cheng
Nanyang Technological University (NTU), Singapore, Singapore

Julian Speith
Max Planck Institute for Security and Privacy (MPI-SP), Bochum, Germany

Yiqiong Shi
Nanyang Technological University (NTU), Singapore, Singapore

Asja Fischer
Ruhr University Bochum (RUB), Bochum, Germany

Christof Paar
Max Planck Institute for Security and Privacy (MPI-SP), Bochum, Germany


Keywords: Hardware Assurance, Metal Line Segmentation, SAM2


Abstract

In light of globalized hardware supply chains, the assurance of hardware components has gained significant interest, particularly in cryptographic applications and high-stakes scenarios. Identifying metal lines on scanning electron microscope (SEM) images of integrated circuits (ICs) is one essential step in verifying the absence of malicious circuitry in chips manufactured in untrusted environments. Due to varying manufacturing processes and technologies, such verification usually requires tuning parameters and algorithms for each target IC. Often, a machine learning model trained on images of one IC fails to accurately detect metal lines on other ICs. To address this challenge, we create SAMSEM by adapting Meta’s Segment Anything Model 2 (SAM2) to the domain of IC metal line segmentation. Specifically, we develop a multi-scale segmentation approach that can handle SEM images of varying sizes, resolutions, and magnifications. Furthermore, we deploy a topology-based loss alongside pixel-based losses to focus our segmentation on electrical connectivity rather than pixel-level accuracy. Based on a hyperparameter optimization, we then fine-tune the SAM2 model to obtain a model that generalizes across different technology nodes, manufacturing materials, sample preparation methods, and SEM imaging technologies. To this end, we leverage an unprecedented dataset of SEM images obtained from 48 metal layers across 14 different ICs. When fine-tuned on seven ICs, SAMSEM achieves an error rate as low as 0.72% when evaluated on other images from the same ICs. For the remaining seven unseen ICs, it still achieves error rates as low as 5.53%. Finally, when fine-tuned on all 14 ICs, we observe an error rate of 0.62%. Hence, SAMSEM proves to be a reliable tool that significantly advances the frontier in metal line segmentation, a key challenge in post-manufacturing IC verification.

Publication

IACR Transactions on Cryptographic Hardware and Embedded Systems, Volume 2026, Issue 3

Paper

Artifact

Artifact number
tches/2026/a36

Artifact published
September 21, 2026

Badge
✅ IACR CHES Artifacts Functional

README

View repository

Extra-large archive
A ZIP file (5 GB) for this artifact is available by request.

License
This work is licensed under the MIT License.

Note that license information is supplied by the authors and has not been confirmed by the IACR.


BibTeX How to cite

Christian Gehrmann, Jonas Ricker, Simon Damm, Deruo Cheng, Julian Speith, Yiqiong Shi, Asja Fischer, Christof Paar. (2026). SAMSEM – A Generic and Scalable Approach for IC Metal Line Segmentation. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2026(3), 122–146. https://doi.org/10.46586/tches.v2026.i3.122-146. Artifact at https://artifacts.iacr.org/tches/2026/a36.