Skip to main content
QUICK REVIEW

[Paper Review] SAMSEM -- A Generic and Scalable Approach for IC Metal Line Segmentation

Christian Gehrmann, Jonas Ricker|arXiv (Cornell University)|Mar 17, 2026
Physical Unclonable Functions (PUFs) and Hardware SecurityComputer Science0 citations
TL;DR

SAMSEM adapts SAM2 to IC metal-layer SEM images, using multi-scale segmentation and a topology-based loss to generalize across unseen ICs with low error rates. It delivers 0.72% in-distribution and 5.53% out-of-distribution errors, reaching 0.62% when trained on all data.

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.

Motivation & Objective

  • Address the challenge of generalizing metal-line segmentation across diverse ICs and SEM conditions without manual retuning.
  • Develop a robust, scalable pipeline that handles varying image sizes, magnifications, and layer structures.
  • Prioritize electrical connectivity over pixel-level accuracy to improve downstream netlist extraction.

Proposed method

  • Fine-tune Meta’s Segment Anything Model 2 (SAM2) on a large SEM metal-layer dataset.
  • Implement a multi-scale segmentation pipeline combining full-image and 512×512 patches to handle varying structure sizes.
  • Introduce a topology-based loss in addition to pixel-based losses to emphasize correct electrical connectivity.
  • Use hyperparameter optimization and data augmentation to improve generalization across technology nodes and SEM settings.
  • Provide a decision mechanism to select between model outputs for patch-level final segmentation.

Experimental results

Research questions

  • RQ1How well can a fine-tuned SAM2-based model generalize to unseen ICs and different metal layers in SEM images?
  • RQ2Does a multi-scale segmentation approach maintain high segmentation quality across varying resolutions and magnifications?
  • RQ3Can topology-aware losses reduce connectivity errors (shorts/opens) more effectively than pixel-based losses alone in IC metal-line segmentation?
  • RQ4What is the impact of fine-tuning different SAM2 components (image encoder, mask decoder, prompt encoder) on segmentation performance?
  • RQ5What datasets and training strategies enable robust cross-IC metal-line segmentation without manual retuning?

Key findings

  • Cross-IC generalization is strong: out-of-distribution error rate drops to 5.53% on seven unseen ICs when fine-tuned on seven ICs, and 0.62% in-distribution error when trained on all 14 ICs.
  • The proposed multi-scale segmentation (full-size plus 512×512 patches) improves handling of both large and fine-grained metal structures.
  • A topology-based loss focusing on electrical connectivity reduces short/open errors and improves netlist reliability beyond pixel-based losses alone.
  • Fine-tuning the image encoder, mask decoder, and prompt encoder together yields the best performance with an in-distribution ESD error of 0.7% in ablations.
  • The approach was validated on a diverse dataset spanning technology nodes from 200 nm down to 20 nm across 14 ICs and 48 metal layers.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.