Hybrid vision transformer framework for efficient and explainable SEM image-based nanomaterial classification
간접 관련 엔지니어링 플라스틱 · (23) 컴파운드 (10) 아라미드(16) CPI(투명 폴리이미드)(21) 에폭시수지
기본 정보
- 저자
- DOI
- 10.1088/2632-2153/adc072
- 저널
- Machine Learning Science and Technology
- 발행년도
- 2025
- 발행기관
- IOP Publishing
- 피인용수
- 2
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1088/2632-2153/adc072
- 토픽
- Electron and X-Ray Spectroscopy Techniques
- OpenAlex ID
- W4408391914
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 엔지니어링 플라스틱 · (23) 컴파운드
- 부 분야
- (10) 아라미드, (16) CPI(투명 폴리이미드), (21) 에폭시수지
- R&D 측면
- 분석·모델링
- 확신도
- 0.80
- 근거 용어
- Scanning electron microscopy (SEM), microstructural classification, Vision Transformer, semi-supervised learning, material science
- 판단 근거
- 본 논문은 SEM(주사전자현미경) 이미지를 활용하여 나노 구조 및 미세 조직을 자동 분류하는 딥러닝 모델 연구입니다. 이는 코오롱인더스트리의 고분자, 섬유, 필름 등 다양한 소재의 미세 구조 분석 및 품질 관리 공정에 응용 가능한 기술입니다.
- R&D 활용 포인트
- 아라미드 나노섬유, CPI 필름, 에폭시 수지 등의 미세 구조(Microstructure) 및 결함(Defect)을 SEM 이미지로 자동 분석하여 품질 관리(QC) 및 연구 개발 속도를 높이는 데 활용 가능합니다.
- 평가 입력
- 섹션 본문 50,417자 중 30,032자 발췌
초록
본문 50,868자
본문 펼치기
섹션 본문 65문단 · 49,806자
(제목 없음)
1Scanning electron microscopy images, with their high potential to reveal detailed microstructural and compositional information across various fields, are challenging to label and process due to the large volumes being generated, the presence of noise and artifacts, and the reliance on domain expertise.Moreover, the lack of scalable, automated, and interpretable methods for analyzing scanning electron microscopy images has prompted this research, which focuses on three primary objectives.First, the use of semi-supervised learning techniques, including pseudo-labeling and consistency regularization, aims to utilize both labeled and unlabeled scanning electron microscopy data by generating pseudo-labels for the unlabeled data and enforcing consistency in predictions for perturbed inputs.Second, this study introduces a hybrid Vision Transformer (ViT-ResNet50) model, which combines the representational power of ViT with the feature extraction capabilities of ResNet50.Lastly, the use of SHapley Additive exPlanations enhances the model's interpretability, revealing critical image regions that contribute to predictions.To evaluate performance, the model is assessed using confusion matrices, test accuracy, precision, recall, F1 scores, receiver operating characteristic-area under the curve scores, model fit duration, and trainable parameters, along with a comparative analysis to demonstrate its competitiveness against state-of-the-art models in both semi-supervised and supervised (completely labeled data) settings.As a result, the semi-supervised based ViT-ResNet50 model achieved accuracies of 93.65% and 84.76% on the scanning electron microscopy Aversa and UltraHigh Carbon Steel Database, respectively, with notable interpretability, surpassing baseline models like ResNet101, InceptionV3, InceptionResNetV2, and InceptionV4.The findings highlight the potential of semi-supervised to improve model performance in scenarios with limited labeled data, though challenges such as class imbalance and increased computational cost suggest areas for further optimization.
Introduction
2Scanning electron microscopy (SEM) is a powerful imaging technique widely used in materials science (MS), biology, forensic analysis, and nanotechnology [1].Unlike traditional optical microscopes, which use light to magnify objects, SEM employs a focused beam of high-energy electrons [2].These electrons interact with the sample, producing various signals such as secondary electrons, backscattered electrons, and x-rays, which are then detected to generate highly detailed images with magnifications of up to 300 000 times.SEM provides unparalleled depth of field and resolution, allowing researchers to observe surface topography and material composition in three dimensions [3].In the field of MS, SEM helps characterize the microstructure and composition of metals, polymers, and ceramics [4].
3Advancements in SEM imaging techniques have steadily increased the number of SEM images generated each year.This rapid increase has led to a significant challenge in the form of data underutilization [5].A key reason for this is the lack of automated and accurate methods for analyzing these images effectively.Developing such models typically requires a substantial amount of manual annotations, which are difficult to obtain due to the complexity of SEM images [6].For example, SEM provides detailed microstructural images, but interpreting them requires significant domain expertise [7].
4Although current machine learning (ML) and deep learning (DL) models employed for SEM image classification have shown notable advancements, they predominantly rely on supervised learning (SL), which necessitates large, annotated datasets [8].This reliance on labeled data becomes a challenge, limiting the scalability of these models, especially as the volume of SEM images continues to grow rapidly.In addition, noise and artifacts in SEM images-such as electron backscatter, drift, poor contrast, and overlapping features between different classes-further complicate the model learning process [9].Another significant limitation is the lack of explainability, as DL models are often considered 'black boxes,' making it difficult to interpret how the model arrives at specific predictions.This opacity reduces trust and limits the adoption of these models in vital applications, such as industrial quality control or material analysis, where understanding the reasoning behind predictions is crucial [10].
5In this study, we proposed a novel model that combined the Vision Transformer (ViT) [11] and ResNet50 [12] to capture both local features (e.g.fine-grained textures and small structures) and global features (e.g.overall shapes, compositions, and large-scale patterns).This dual focus aimed to mitigate the influence of noise and artifacts in SEM images.To address the challenge of limited labeled data, the model incorporated semi-SL (SSL) [13], utilizing both labeled and unlabeled data to enhance performance.Additionally, SHapley Additive exPlanations (SHAP) [10] were employed to quantify the contribution of individual features to the model's predictions.SHAP also provided visual insights into critical areas of SEM images that influenced the model's decision-making process, thereby enhancing both interpretability and reliability.
Literature review
6Researchers have proposed a variety of methodologies for analyzing SEM images.Aversa et al [14] presented the first publicly available human-annotated dataset of SEM images in 2018 from ten different types of materials, which included approximately 18 577 images (around 10 GB) classified into 10 categories.It covers a range of nanostructures such as 0D particles, 1D nanowires and fibers, 2D films and coated surfaces, and 3D microelectromechanical systems (MEMS), along with additional categories like tips and biological samples.Modarres et al [15] utilized a pre-trained Inception-v3 model (trained on the ImageNet dataset) to classify SEM images into 10 categories.The model achieved an average test accuracy of approximately 90%, with a precision of around 80% and a recall of 90%, after 4000 iterations (mini-batch updates) on a test set of 1853 previously unseen images.They found that categories such as Films_Coated_Surface, Porous_Sponge, and Fibres were accurately recognized by the model, even with fewer samples in the dataset.In contrast, categories like Patterned_Surface and MEMS_Devices_and_Electrodes showed more dispersed predictions, indicating greater ambiguity.They also explored the use of a confidence scoring system to enhance classification reliability.For low-confidence predictions (scores < 0.8), the model suggested the top two predicted labels, while high-confidence predictions (scores ⩾ 0.8) allowed for confident assignment to a single category.
7Demirkan et al [16] utilized an SEM dataset containing 22 000 images across 10 categories and proposed the use of a supervised convolutional neural network (CNN) model.They determined that the model trained with the RMSprop optimizer for 100 epochs achieved the best performance, attaining a validation accuracy of 0.98.Dey et al [17] proposed an ensemble model combining RetinaNet and Residual Network (ResNet) architectures to classify and localize defects in SEM images.They trained the model on SEM images of Post-Litho and Post-Etch P32 resist wafers, focusing on challenging defect categories like bridges, line collapses, and micro-gaps.The ensemble model achieved a mean average precision (mAP) of 81.6%, significantly outperforming the baseline models in their experiments.Mu ñoz-Ródenas et al [18] evaluated ML techniques for classifying steel microstructures using the UltraHigh Carbon Steel Database (UHCSDB), containing 961 SEM samples with 2% nominal carbon content.They applied the Bag-of-Features method, starting with 400 features and refining to 327 by removing less significant features.Various ML algorithms, including decision tree, support vector machine (SVM), discriminant analysis, nearest neighbor, Naive Bayes, Ensemble k-NN, and NN, were tested, with SVM achieving the highest accuracy of 91.6%.
8Aydin et al [19] developed the MobileSEMNet model and utilized a publicly accessible dataset containing approximately 22 000 SEM images across 10 classes.They implemented a patch-based deep feature extraction method using MobileNetV2, where the images were segmented into fixed-size patches to capture local features while also considering the overall image for global features.The feature selection process involved applying neighborhood component analysis (NCA) to distill the most informative 512 features from a pool of 21 760 generated features, which were then used as inputs for the SVM classifier.As a result, the proposed model achieved a test accuracy of 96.87%, demonstrating a notable improvement of 2.02% compared to the baseline MobileNetV2.De Nobili et al [20] evaluated several CNN architectures, including AlexNet [21],
9Inception [22,23], and custom DenseNet [24], using transfer learning (TL) techniques for the Nanoscience Foundries and Fine Analysis-Europe project (NFFA-EUROPE).Their goal was to classify images of nanoscience structures in the SEM Aversa dataset [14].The novel DenseNet architecture (developed using TF-Slim, retaining four Dense Blocks from DenseNet-121 and modifying the fully connected layer to 64 neurons) achieved a test accuracy of approximately 96%, outperforming the other models in the study.
10Knaup et al [25] explored the application of TL with pre-trained AlexNet to expedite SEM image analysis of unconventional reservoir rocks.The study utilized a dataset comprising 27 000 images from 18 formations to classify microstructural differences with 92% accuracy.Rajagopal et al [26] developed a DL-based visualization system to explore the morphologies of nanomaterials using SEM images.They utilized Convolutional AutoEncoder (CAE) techniques to visualize intermediate activations of CNNs, transforming nanoscale specimen images into feature representations.Their AI platform generated conceptual feature representations and architectural patterns of various nanomaterials, contributing to the field of explainable AI (XAI) in electron microscopy.
11While CNNs have been widely used, transformer-based models are increasingly being adopted both independently and in combination with CNNs.This approach allows models to utilize CNNs' ability to extract local features while utilizing transformers' strength in modeling global context, enhancing their capacity to capture granular structural patterns.For instance, Zheng et al [27] developed a classification system that utilized two models-EfficientNet and ViT-to analyze metal pipe defects in SEM images.Their study introduced a multi-label classification dataset comprising 2075 images across four defect categories.To identify the optimal architecture, six EfficientNet variants and two ViT models were trained, validated, and tested at three resolutions, with inference speeds assessed on x86 and ARM architectures for real-time feasibility.The results showed that EfficientNetB4 achieved high accuracy in detecting cracking (0.969), fatigue (0.933), and inclusion (0.938) at 600×450 resolution, while ViT excelled in identifying hole defects with 0.974 accuracy.In a more recent study, Qiao et al [28] have developed TransNet, which combines CNN and Transformer networks in a dual-branch architecture.The goal was to tackle the challenges posed by the increasing complexity and miniaturization of semiconductor manufacturing, which results in a variety of nanoscale defects that are difficult to detect and classify.Their extensive testing on a diverse dataset from a real 12-inch wafer fabrication facility demonstrated that TransNet achieved an impressive classification accuracy of 97.25% on a 5-class dataset.
12The methodologies discussed so far have largely relied on fully labeled datasets, but the focus is shifting towards SSL approaches.A notable example is Kim et al's [29] work on Automatic Defect Classification (ADC) systems, designed to automate defect classification in semiconductor manufacturing.These systems use SEM images of wafer surfaces, which can have varying backgrounds depending on the defect's location and manufacturing process.Manual classification of these is labor-intensive and requires specialized engineers.To address these challenges, the dual approach was used, which combined object detection to localize defects, reducing the impact of background variations, and SSL to make the most of a small labeled dataset and a larger pool of unlabeled data.Experimental results represented a 12.56% improvement in classification performance across 15 defect classes, outperforming fully SL models by 9.82 percentage points.
Data
13We utilized two distinct, publicly accessible, labeled datasets in our experiment: the UHCSDB [30], available at materialsdata.nist.gov,and the SEM Aversa Dataset [14] from the NFFA-EUROPE project, accessible at b2share.eudat.eu,as these have been widely used within the field of MS.
UltraHigh carbon steel micrograph dataBase (UHCSDB)
14The UHCSDB catalogs SEM images capturing the microstructural features of an ultrahigh carbon steel alloy.This alloy, characterized by a nominal 2% carbon content, underwent various heat treatments ranging in temperature from 700 • C to 1100 • C and durations from 5 min to 85 h before quenching.The dataset includes 961 images (645 × 484 pixel micrographs in TIFF and PNG formats) depicting various microstructural constituents such as martensite, network, pearlite, spheroidite, pearlite with spheroidite, pearlite with Widmanstätten, and spheroidite with Widmanstätten-all derived from this single alloy type.The UHCSDB, initially lacking categorization by microstructural types, was organized into subdirectories named after primary microconstituents by cross-referencing SQLite metadata, which detailed anneal temperature, cooling method, magnification, and the primary microconstituent depicted in each image.Table 1 details the number of images assigned to each category.
SEM aversa dataset
15The SEM dataset, a core of the NFFA-EUROPE project's Information and Data Repository Platform (IDRP), consists of 18 577 SEM images precisely gathered over five years.These high-resolution images, formatted as 1024 × 728-pixel JPG files, were classified into eight distinct categories by a team of nanoscientists primarily based on the dimensional attributes (0D to 3D) of the nanostructures visible in the images, reflecting their shape and structural characteristics.Additional categories, like biological samples and tips, were introduced to broaden the dataset's applicability across different scientific domains.Table 2 summarizes the number of SEM images classified into each category within the SEM dataset.
16The data preparation process for SL involved splitting each dataset into 80% for training, 10% for validation, and 10% for testing, with each dataset used independently for training the models.The training set comprises paired data samples, where each sample consists of an input image and its corresponding label, organized as (image, label) pairs.This setup allows for efficient handling of the labeled data.However, for the SSL approach, the training dataset was further divided into two subsets: 50% labeled data and 50% unlabeled data.This was achieved by shuffling the indices of the training data and selecting half of the samples to form the unlabeled set, where the labels were removed from the corresponding tuples, effectively transforming them from (image, label) to (image, −1).The value −1 was used to indicate the absence of a label, signifying that these samples should be treated as unlabeled data during training.
SSL
17In order to address the scarcity and expense of labeled SEM datasets, the primary focus of this study was on SSL.It serves as an intermediary between SL and unsupervised learning (UL) by using both labeled and unlabeled data.Unlike traditional methods, SSL assumes that the underlying structure of data distribution can be learned predominantly from the unlabeled dataset.The core hypothesis behind it is the smoothness assumption, which specifies that data points that are close in feature space are more likely to share the same label.In this study, pseudo-labeling and consistency regularization were employed to effectively exploit the structure of unlabeled data to enhance model generalization [13].Pseudo-labeling [31] is a heuristic approach in SSL that assigns pseudo-labels (artificial labels) to unlabeled data using model predictions as surrogate ground truth.On the other hand, consistency regularization [32] enforces invariance in model predictions under various data augmentations, suggesting that similar inputs should result in similar outputs.
18In the proposed study, the training procedure commenced with training the ViT+ResNet50 model on the labeled dataset, with the primary objective of minimizing the classification loss.This loss is typically calculated using a cross-entropy loss function, which measures the difference between the true labels and the predicted labels.The classification loss, denoted as L class , is computed using the formula:
19where y ij represents the true label, ŷij is the predicted label, C is the total number of classes, and N is the batch size.
20After training on the labeled dataset, the model was used to generate pseudo-labels for the unlabeled samples.The reliability of these pseudo-labels was contingent on whether the model's predictions exceeded a predefined threshold probability of 0.7.This threshold was implemented to prevent low-confidence predictions from introducing noise into the training process by discarding such predictions.The pseudo-labeling process for an unlabeled sample x ij was defined as:
21where f(x ij ) is the model's predicted label for sample x ij , and τ is the threshold probability.
22After generating pseudo-labels, the model was trained on the pseudo-labeled data using consistency regularization.To achieve this, augmentations were applied to the images before they were fed into the model.These augmentations included resizing the images to a consistent size of 224 × 224 pixels, applying random horizontal flips with a 50% chance to simulate different orientations, and introducing random rotations of up to 15 degrees to allow for some angular variations.Additionally, the images were normalized to standardize their pixel values to a mean of 0 and a standard deviation of 1 after being scaled to the range [0, 1].By applying these augmentations, the model was encouraged to make consistent predictions across the original and augmented versions of the same image, with the consistency loss being computed as:
23where ŷij is the model's prediction for the original input x ij , and ŷx ij ij is the model's prediction for the augmented version xij .
24Thus, the total loss function [33] to be minimized during training with pseudo-labeling and consistency regularization was:
25where λ is a hyperparameter that controls the strength of the consistency regularization, which was empirically set to 0.1.Finally, the model was retrained on the combined dataset, consisting of both labeled and pseudo-labeled data, with the classification loss function as specified in equation (1).Additionally, the validation loss was calculated at the end of each epoch to ensure the model learns generalizable patterns rather than memorizing the training data.The validation loss, L val , was computed as the average classification loss over the validation set:
26where K is the number of validation samples.The overall cycle was repeated for 25 epochs, with the stopping criterion being the completion of the specified number of epochs.
ViT + ResNet50 architecture
27The next phase involved the implementation of the proposed model, utilizing the unique architectural strengths of both the ViT and ResNet50 networks, as outlined below:
ViT
28The ViT [34] architecture represents a significant departure from CNNs in computer vision tasks, inspired by transformer models originally designed for natural language processing (NLP).Unlike CNNs, which process images through hierarchical feature extraction via convolutional layers, ViT relies on self-attention mechanisms to capture global dependencies between image patches.At its core, ViT breaks down an input image into fixed-size patches, linearly embedding each patch into a sequence of tokens.Positional embeddings are added to these token embeddings to encode spatial information, ensuring that the transformer can understand the relative positions of the patches within the image.Subsequently, both of these embeddings are processed through a stack of transformer encoder layers.Each encoder layer consists of two main components: multi-head self-attention (MHSA) and a multi-layer perceptron (MLP).These components are interleaved with layer normalization and residual connections, ensuring stability and efficient gradient flow during training [35].The MHSA allows ViT to attend to different parts of the input sequence (image patches) simultaneously, capturing long-range dependencies crucial for understanding context across the entire image.Following the MHSA block, a position-wise MLP processes each token independently.This network is typically a two-layer, fully connected neural network with a non-linear activation function, which enables the model to learn complex transformations for each token [36].After the transformer encoder layers, the output tokens are passed through a final classification head, consisting of a global average pooling layer followed by a fully connected layer, to produce the final class predictions.
ResNet50
29ResNet50 [37] is a deep CNN architecture that is part of the ResNet (Residual Networks) family, designed to address the issue of vanishing gradients in very deep networks.It consists of 50 layers and utilizes residual connections, or 'skip connections,' which allow the network to bypass certain layers by adding the input of one layer directly to the output of a deeper layer.This helps preserve the gradient flow and enables the training of much deeper networks.The ResNet50 architecture begins with a series of convolutional layers, each followed by batch normalization and ReLU activation functions, along with a max pooling layer for initial feature extraction.The model employs a carefully designed structure called 'bottleneck blocks,' which consist of 1 × 1, 3 × 3, and 1 × 1 convolutional layers.These blocks are optimized to reduce computational complexity while preserving high performance.The 1 × 1 convolutions serve as dimensionality reduction and expansion layers, reducing the number of input channels before the 3 × 3 convolution and restoring the channel depth afterward.The 'ID' in these blocks refers to the repetition pattern of these bottleneck blocks within different stages of the architecture.After processing through the residual stages, the architecture concludes with a global average pooling layer, which reduces the spatial dimensions of the feature maps.This is followed by a fully connected (dense) layer that maps the features to the desired number of output classes for the classification task [38].
30In the proposed approach of combining both the networks, the ViT model (specifically the vit_b_16 variant), pre-trained on the ImageNet dataset, was used as a feature extractor.Its classification head was removed, leaving only the transformer layers that output feature embeddings.Similarly, in the pre-trained ResNet50 model, the final fully connected layer was replaced with nn.Identity(), effectively removing the classification head.This allowed the model to output the raw convolutional features, which were then used in combination with features from the ViT model.Both the ViT and ResNet50 models had their parameters frozen, meaning that during training, the weights of these models were not updated.
31The proposed model processes an input image (I) in parallel through both the ViT and ResNet50 models, as shown in figure 1.The ResNet50 model outputs a feature vector of size 2048 (after flattening), while the ViT model outputs a feature vector of size 768.These feature vectors are then concatenated along the feature dimension (dim = 1), resulting in a combined feature vector of size 2816.This combined vector captures both global features from the transformer-based ViT model and local features from the convolutional ResNet50 model.Afterwards, the combined feature vector is passed through a fully connected classification head (fc).In the classification head, the first linear layer reduces the combined feature size from 2816 to 512 units.A ReLU activation function is applied to introduce non-linearity, followed by a dropout layer with a probability of 0.3 to prevent overfitting.The final linear layer maps the 512-dimensional feature vector to the number of classes (10 for the SEM Aversa dataset and 7 for UHCSDB), generating the final output logits.During the forward pass, the model returns three values.First, the final prediction scores for each class, produced by the last fully connected layer, which are raw logits that represent the unnormalized class scores.Second, the concatenated feature vector (combined_features), which combines the features from both the ResNet50 and ViT models, providing insights into the feature representations.Third, the raw feature vector (vit_features) extracted from the ViT model, containing high-dimensional data that captures complex relationships from multiple attention heads and layers.
Benchmark models
32To conduct a comprehensive analysis of the proposed model's performance, it was benchmarked against four high-performance CNN architectures: InceptionV3, InceptionV4, InceptionResNetV2, and ResNet101.InceptionV3 is known for its use of multiple filter sizes within the same module, factorized convolutions, and auxiliary classifiers, which help reduce computational cost and mitigate the vanishing gradient problem [23,39].InceptionV4 builds upon this by introducing Inception-A, Inception-B, and Inception-C modules, along with reduction modules to reduce spatial dimensions and capture complex patterns [40,41].InceptionResNetV2 merges concepts from both Inception and ResNet architectures, employing residual connections alongside parallel convolutions and pooling operations to enhance feature representation and training stability [42,43].Lastly, the ResNet101 [44] facilitates training deep networks by utilizing residual blocks with shortcut connections that address the vanishing gradient problem, allowing the network to learn increasingly complex features through its multi-stage architecture [45,46].These pre-trained models were utilized through TL, each having been trained on the ImageNet 2012 dataset.The choice of these models was based on their proven efficacy in SEM image classification [15].The performance of the proposed ViT+ResNet50 model was evaluated alongside these benchmarks using multiple metrics, including test accuracy, precision, recall, F1 score, receiver operating characteristic-area under the curve (ROC-AUC) score, model fit duration, total parameters, and trainable parameters, ensuring a rigorous assessment of its efficacy in both SL and SSL settings.
SHAP analysis for explainability
33Interpretability, the ability to understand the reasoning behind a model's predictions, is essential for validating the model's fairness, detecting biases, and ensuring it generalizes well to unseen data.The interpretability of the proposed model was enhanced by using SHAP [10], an efficient method for explaining model predictions through feature attribution.SHAP is a technique that computes feature importance by calculating the Shapley values for each feature.These values are derived from cooperative game theory, where each feature is treated as a 'player' in a game, and its contribution to the model's prediction is evaluated by considering all possible feature combinations through the process of masking and unmasking.In this process, parts of the image are masked (set to a baseline value), and the model's prediction is observed.The feature's contribution is determined by evaluating how the inclusion of that feature affects the prediction when progressively unmasked.SHAP also has the advantage of providing consistent, additive explanations that sum to the total prediction, ensuring fairness in model interpretation.When plotted, SHAP values visually highlight the importance of different regions of the image by using color-coded maps, where red indicates a positive contribution to the model's prediction and blue indicates a negative contribution, providing clear insights into how each feature influences the final output.
Results
34After the training and validation, the performance of the proposed SSL-based ViT-ResNet50 model was evaluated by testing it on both datasets.The confusion matrices for SEM Aversa and UHCSDB were obtained, as illustrated below (figures 2 and 3, respectively), showing the model's performance, with the diagonal elements representing the percentage of correct predictions (TP) for each class.
35Afterwards, the performance of the proposed ViT-ResNet50 model was compared against SOTA CNN models using both SL and SSL approaches.To ensure a fair and controlled comparison, all models were trained under the same configuration settings.Specifically, the learning rate (lr) was set to 0.001, using the Adam optimizer with a batch size (bs) of 32.Data augmentation included random horizontal flips, random rotations of 15 degrees, resizing, and normalization based on ImageNet statistics (mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225]).The freezing and unfreezing strategies were as follows: for the benchmark models, all layers except the final fc layer were frozen, while for proposed ViT+ResNet50, both ViT and ResNet50 base models were frozen, leaving only the final classifier, fc, unfrozen.The standardization of these parameters ensured that the comparison was unbiased, with any performance differences attributed to the models' capabilities rather than differences in the training setup.
36The SL models, which rely solely on labeled data, represented the best achievable accuracy given the available annotations.By comparing the SSL-based models' to these supervised benchmarks, the effectiveness of using unlabeled data to improve the performance was evaluated.The performance metrics, including test accuracy, precision, recall, F1 score, and model fit duration, were obtained for each model on both datasets and are presented in tables 3 and 4 for SSL and SL, respectively.The bold values indicate the highest performance metrics in each column, emphasizing the best-performing model for a given dataset.
37In the SHAP analysis of the proposed SSL-based ViT-ResNet50 model, a subset of images was selectively sampled from the test directories of both datasets, prioritizing high-confidence predictions to ensure a robust evaluation of feature attributions in well-learned representations.SHAP explanations were visualized alongside the original images to emphasize the most influential regions for the top two predicted categories, with heatmaps overlapped on the raw images.The resulting insights, which highlight the contribution of different image regions to the model's decision-making, are illustrated in figures 4 and 5 for SEM Aversa and UHCSDB, respectively.
38From the SHAP results, it was evident that the proposed SSL-based model paid significant attention to relevant regions of the images (red regions), such as textures, patterns (local features), and unique microstructural features (global features), while down-weighting less informative areas (blue regions).For instance, in figure 4, for the image from the MEMS_Devices_and_Electrodes (MEMS) class of SEM Aversa, the red areas are prominent along the electrodes' presence.Similarly, for the image from the Tips category of SEM Aversa, red areas dominate along the length of the tip, indicating that these regions were critical for identifying the Tips class.However, the negative contributions (blue) are minimal and sparse.This selective attention to important features enhances the model's interpretability and reliability, ensuring it is not overly reliant on noisy or overlapping features.However, the negative contributions (blue) are minimal and sparse.This selective attention to important features enhanced the model's interpretability and reliability, ensuring that it was not overly reliant on noisy or overlapping features.Likewise, for the Network category of UHCSDB, shown in figure 5, the red blocks span the entire spread of the structure, as depicted in the original image, while the blue blocks are very minimal.
Main findings
39Our approach effectively achieved the two main objectives of utilizing unlabeled data: effectively managing large volumes of non-annotated SEM data and enhancing the interpretability of the model's predictions.Through SSL and enhanced feature extraction via hybrid model, the approach has not only reduced the dependency on manual labeling but also attained the effective generalization across both datasets.Moreover, the use of SHAP ensure that the predictions are not only accurate but also explainable, a critical requirement for adopting DL in MS applications.
40In the performance evaluation of the proposed SSL-based ViT+ResNet50 model on SEM Aversa, the confusion matrix indicated high classification accuracy, as the diagonal elements had the highest percentages for most classes, such as Nanowires (93.75%) and MEMS_devices_and_electrodes (94.90%).However, minor misclassifications were evident in certain classes, e.g.Films_Coated_Surface being partially predicted as Patterned_surface (6.25%), and 5.56% of Particles images being classified as Powder.
41The misclassification of Films_Coated_Surface as Patterned_surface stemmed from the similar surface pattern characteristics between the two classes.Similarly, the confusion between Particles and Powder was attributed to the fact that particles are often small and granular, and when aggregated, they can resemble powder.The confusion matrix obtained for UHCSDB showed varying accuracy, as some classes like Network (95.65%) and Spheroidite (100%) performed very well, but least populated categories such as Pearlite+Widmanstatten suffered from the lowest accuracy (25%).
42In benchmarking through SSL evaluation, the proposed ViT+ResNet50 hybrid model consistently outperformed benchmark CNN models across both datasets.On the UHCSDB dataset, the ViT+ResNet50 model achieved an accuracy of 84.76%, surpassing InceptionV3 by 10.47%, InceptionResNetV2 by 8.57%, and ResNet101 by 11.43%.Its ROC-AUC score of 0.9483 reflected superior classification capabilities compared to the highest benchmark model, InceptionResNetV2, which recorded 0.9331.However, the hybrid model incurred a higher computational cost, with a model fit duration of 403.48 sec, nearly double that of InceptionV4 at 222.67 sec.Similarly, on the SEM Aversa dataset, the ViT+ResNet50 model exhibited a dominant performance, achieving an accuracy of 93.65%, a 6.44% improvement over InceptionV3 and 3.45% over ResNet101.However, the hybrid model incurred a higher computational cost, with a model fit duration of approximately 6.72 min, nearly double that of InceptionV4, which completed in 3.71 min.
43Furthermore, the hybrid model reached an ROC-AUC score of 0.9974, indicating near-perfect classification, but at a cost of 262.73 min (4 h and 22 min)-significantly higher than InceptionV4, which completed in 197.15 min (3 h and 17 min).In terms of trainable parameters, the ViT+ResNet50 hybrid model had 1445 895 trainable parameters, significantly fewer than other models such as ResNet101 (42,514,503), yet exhibited increased computational time.This was primarily due to the hybridization of the ViT and ResNet50 backbones, which added more processing time for both forward and backward passes during feature extraction.Furthermore, the use of ViT contributed to increased computational demands due to its multi-head attention layers.These layers grow quadratically with input size, which results in a higher computational cost, even though the model has fewer parameters compared to traditional convolutional models.
44In SL, with an accuracy of 91.43%, the proposed model outpaced ResNet101 by 2.86% and InceptionV3 by 7.62%.The model also delivered the highest ROC-AUC score of 0.9834, underscoring its reliability in classification tasks.Despite these gains, the ViT+R50 model required approximately 22.93 min to fit, substantially more than ResNet101, which had the shortest fit duration of about 1.53 min.On the SEM Aversa dataset, the ViT+ResNet50 model achieved a remarkable accuracy of 94.65%, exceeding ResNet101 by 2.89% and InceptionV4 by 10.07%.It also recorded an exceptional ROC-AUC score of 0.9985, although this came at a computational cost of approximately 104.51 min.In contrast, InceptionV3 required about 83.85 min, achieving an accuracy of 84.69%.These results also highlighted the trade-off between accuracy and computational efficiency across the evaluated models.
45A comparison between SSL and SL highlights the strengths and trade-offs of each approach.SL models consistently delivered higher accuracies and ROC-AUC scores, with the ViT+ResNet50 achieving a 6.67% improvement in accuracy on UHCSDB and a 1.00% increase on SEM Aversa compared to its SSL counterpart.However, this performance gap is reflective of the inherently higher benchmark established by SL, which benefits from fully labeled datasets, facilitating more granular learning.SSL, despite its marginally lower results, demonstrated remarkable efficiency in utilizing unlabeled data to achieve near-supervised performance levels.This is particularly evident in the SSL-based proposed model's ability to achieve 93.65% accuracy on SEM Aversa and 84.76% on UHCSDB with significantly reduced labeled data.The results suggest that while SL sets a higher performance bar, SSL offers a feasible solution for scenarios where labeled data is scarce, achieving competitive results.
46Furthermore, in the context of interpretability, the SHAP not only highlighted the most influential features but also showcased the model's ability to distinguish between positive and negative contributions effectively, reinforcing confidence in its predictions.The SHAP analysis effectively 'opened the black box' of the model, providing transparency and interpretability by highlighting the key regions influencing the decision-making process.Additionally, the SHAP analysis validated that the model's predictions aligned with human intuition, as it focused on regions of interest that were meaningful from a human perspective in the context of SEM classification.This interpretability offers domain experts an advanced tool for understanding critical microstructural distinctions at a deeper level.The ability to visualize positive and negative contributions at pixel-level granularity provides insights into microstructural morphology, phase distribution, and localized material properties.Unlike conventional feature importance measures that offer only aggregated global insights, SHAP enables localized feature attribution, making it particularly valuable in MS.For instance, in the MEMS category, SHAP identified electrodes as the dominant predictive feature.However, domain experts can go further by analyzing the spatial distribution of SHAP values to infer variations in electrode fabrication quality or potential defects.If certain electrode regions consistently contribute negatively across multiple samples, it may indicate systematic anomalies in the manufacturing process.This level of interpretability can support defect classification, process optimization, and early-stage failure prediction in devices.
Additional ablation studies
47ViTs have superior global feature extraction capabilities due to their self-attention mechanisms, while CNNs, particularly ResNet50, excel in capturing local spatial hierarchies.The hybridization of these architectures was hypothesized to bridge the gap between fine-grained local texture analysis and global structural representations in SEM images.The motivation for this integration was further reinforced by the intrinsic challenges in SEM image classification, where both microstructural patterns and large-scale contextual variations must be effectively learned.Therefore, to validate our hypothesis, we conducted an ablation study where ViT and ResNet50 were evaluated separately across SL and SSL settings before integrating them into a hybrid ViT-ResNet50 model.The results have been provided in table 5.
48From the results presented in table 5, we observed that in the SL setting, ViT alone achieved strong performance on both datasets, with an accuracy of 90.48% on UHCSDB and 94.11% on SEM Aversa.However, ViT tended to have a slightly lower F1 score (90.48% on UHCSDB), which suggested that while it was proficient in predicting the majority class, it struggled with balancing false positives and false negatives across different microstructural categories.Conversely, ResNet50 in SL reached a comparable accuracy of 90.43% on UHCSDB and 94.00% on SEM Aversa but exhibited a higher F1 score (92.37% on UHCSDB), indicating better overall performance across both precision and recall.This discrepancy in F1 score suggested that ViT excelled at capturing global structural information but lacked sufficient local detail extraction, whereas ResNet50 was better at hierarchical feature learning from low-level to high-level details.
49In SSL, both models experienced a notable performance drop due to the reduced availability of labeled samples.ViT in SSL recorded an accuracy of 83.63% on UHCSDB and 93.36% on SEM Aversa, while ResNet50 in SSL degraded significantly, with an accuracy of 67.62% on UHCSDB and 82.66% on SEM Aversa.This indicated that ResNet50, which relied on convolutional priors, struggled to generalize effectively when only a limited number of labeled instances were provided.Meanwhile, ViT, which benefited from self-attention mechanisms, retained relatively better performance due to its ability to capture long-range dependencies even with scarce supervision.
50Hence, by analyzing the individual performances of ViT and ResNet50, it became evident that each model had strengths that could compensate for the other's weaknesses.ViT, with its self-attention mechanisms, was effective at learning global contextual relationships, but it lacked the inductive biases that convolutional architectures possessed, making it prone to overfitting on the majority class for imbalanced datasets.In contrast, ResNet50 was highly efficient at extracting local features, but its reliance on convolutional kernels restricted its ability to model long-range dependencies efficiently.The integration of both architectures thus aimed to create a balanced feature representation by using ViT's superior global feature encoding and ResNet50's strong local feature extraction.
51The hybrid ViT+ResNet50 model significantly outperformed the individual models, particularly in SSL, where its ability to generalize with limited labeled data was crucial.In the SSL setting, our hybrid model demonstrated an improvement of +1.13% on UHCSDB and +0.29% on SEM Aversa over ViT, and +17.14% and +10.99% over ResNet50, respectively.The increase in the ROC-AUC score also highlighted the hybrid model's superior class separation ability under weak supervision.Likewise, in the SL setting, it further outperformed ViT and ResNet50, achieving higher accuracy on both datasets.This suggested that even in fully SL learning, the joint feature extraction mechanisms contributed positively to robustness and generalization.
52Since our primary focus was optimizing SSL performance by limiting the availability of labeled microstructure datasets, it was made clear that the hybrid ViT+ResNet50 model provided a significant advantage.From our experiments, ViT alone showed resilience in SSL but lacked local feature precision, while ResNet50 exhibited poor generalization under SSL.The hybrid model bridged this gap, ensuring that high-level global patterns and localized microstructural details were both captured effectively.The substantial boost in SSL performance with the hybrid ViT+ResNet50 further validated our results.
Strengths, limitations, and future work
53Overall, the SSL techniques and ViT+ResNet50 model demonstrated exceptional generalization and performance, particularly on the SEM Aversa dataset.The suitability of the SSL approach contributes to MS by providing a methodology that allows for the use of large volumes of SEM images generated yearly.In detail, our study supports the analysis of different materials without requiring annotations, which are often challenging to acquire due to the need for specialized expertise and the time-consuming nature of the task.However, the slightly lower accuracy on the small-scale UHCSDB dataset (as compared to SEM Aversa) and higher computational cost highlighted areas for potential optimization.Therefore, to address the challenge of imbalanced classes, synthetic data generation techniques such as generative adversarial networks (GANs) [47] or diffusion models [48] could be employed to create realistic, high-quality images for underrepresented classes while preserving critical microstructural features within these images.Furthermore, the current static confidence threshold of 0.7 for pseudo-labeling might be stringent and not adequately account for variations in model uncertainty across different classes.Thus, Monte Carlo (MC) Dropout [49] could be employed which can address this by estimating model uncertainty through multiple predictions with dropout applied, capturing the variation in these predictions.This uncertainty can then be used to dynamically adjust the pseudo-labeling threshold: lowering it for high-confidence predictions and raising it for uncertain ones.This adaptive approach could help reduce noise in the pseudo-labels, enhancing their quality, especially in imbalanced datasets.
54While the additional computational effort is justified by the model's superior results on SEM Aversa, it underscores a trade-off between performance and efficiency.For real-world applications where time and computational resources are constrained, this trade-off could pose limitations unless optimized training pipelines or hardware accelerations are implemented.This could be addressed by incorporating more efficient attention mechanisms, such as Linformer [50] or Performer [51], to reduce the computational overhead associated with the ViT while maintaining its effectiveness.Additionally, mixed-precision training [52] which uses lower-precision arithmetic (e.g.16-bit floating point) could be used to speed up computations by reducing memory usage and increasing processing throughput.
55Additionally, SHAP interpretations can play a crucial role in advancing SSL methodology by actively identifying the most informative samples within the unlabeled dataset.Through active learning strategies like uncertainty sampling [53], which selects samples with the highest prediction uncertainty, and query-by-committee (QBC) [54], which identifies instances with the most disagreement among multiple runs, images with ambiguous or contradictory SHAP attributions can be automatically flagged, guiding expert annotation efforts toward the most uncertain cases.This targeted approach can systematically reduce annotation overhead while enhancing model learning by ensuring that the most challenging and informative samples are prioritized.By integrating SHAP insights into the iterative pseudo-labeling process, SSL models can continuously refine their understanding of microstructural patterns, improving both classification accuracy and generalization.For experts in the domain, by highlighting ambiguous microstructural patterns, SHAP-driven sample selection will uncover new material insights, reduce annotation overhead, and accelerate research workflows.This will further enhance both interpretability and the reliability of DL predictions in SEM-based material characterization.
56However, this study lacks the integration of gradient-based interpretability techniques (e.g.Integrated Gradients, Grad-CAM) and attention maps from ViTs, which could further aid in understanding the spatial importance of microstructural features.Exploring these methods in future work could provide complementary insights to SHAP attributions, particularly in identifying class-discriminative regions in SEM images.
Figure 1 .
57Figure 1.Architecture of the hybrid Vision Transformer (ViT) model.
Figure 2 .
58Figure 2. Confusion Matrix of the semi-supervised learning (SSL)-based hybrid (ViT+ResNet50) model on the scanning electron microscopy (SEM) Aversa Dataset.
Figure 3 .
59Figure 3. Confusion Matrix of the semi-supervised learning (SSL)-based hybrid (ViT+ResNet50) model on the UltraHigh Carbon Steel Micrograph DataBase (UHCSDB).
Figure 4 .
60Figure 4. SHapley Additive exPlanations (SHAP) value heatmaps overlaid on the original images to interpret the top two categories predicted by the model for scanning electron microscopy (SEM) Aversa Dataset.
Figure 5 .
61Figure 5. SHapley Additive exPlanations (SHAP) value heatmaps overlaid on the original images to interpret the top two categories predicted by the model for UltraHigh Carbon Steel Micrograph DataBase (UHCSDB).
Table 1 .
62Distribution of UltraHigh Carbon Steel Micrograph DataBase (UHCSDB) images by category.
Table 2 .
63Distribution of scanning electron microscopy (SEM) Aversa images by category.
Table 3 .
64Semi-supervised evaluation of the proposed hybrid model and benchmark convolutional neural network (CNN) models on scanning electron microscopy (SEM) Aversa and UltraHigh Carbon Steel Micrograph DataBase (UHCSDB).
Table 4 .
65Supervised evaluation of the proposed hybrid model and benchmark convolutional neural network (CNN) models on scanning electron microscopy (SEM) Aversa and UltraHigh Carbon Steel Micrograph DataBase (UHCSDB).
참고문헌 31건
- Fundamentals of Scanning Electron Microscopy (SEM) Springer eBooks · Springer Nature · 2006 10.1007/978-0-387-39620-0_1
- ImageNet classification with deep convolutional neural networks Communications of the ACM · Association for Computing Machinery · 2017 10.1145/3065386
- UHCSDB: UltraHigh Carbon Steel Micrograph DataBase Integrating materials and manufacturing innovation · Springer Nature · 2017 10.1007/s40192-017-0097-0
- Neural Network for Nanoscience Scanning Electron Microscope Image Recognition Scientific Reports · Nature Portfolio · 2017 10.1038/s41598-017-13565-z
- The first annotated set of scanning electron microscopy images for nanoscience Scientific Data · Nature Portfolio · 2018 10.1038/sdata.2018.172
- Identity Mappings in Deep Residual Networks arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1603.05027
- Semi-Supervised Learning for Electron Microscopy Image Segmentation Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2019 10.1609/aaai.v33i01.330110047
- Deep learning-based automated detection of glaucomatous optic neuropathy on color fundus photographs Graefe s Archive for Clinical and Experimental Ophthalmology · Springer Science+Business Media · 2020 10.1007/s00417-020-04609-8
- Deep learning analysis on microscopic imaging in materials science Materials Today Nano · Elsevier BV · 2020 10.1016/j.mtnano.2020.100087
- Hyperparameter Tuning Deep Learning for Diabetic Retinopathy Fundus Image Classification IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.3005152
- Deep learning in electron microscopy Machine Learning Science and Technology · IOP Publishing · 2020 10.1088/2632-2153/abd614
- Generative adversarial networks Communications of the ACM · Association for Computing Machinery · 2020 10.1145/3422622
- How to measure uncertainty in uncertainty sampling for active learning Machine Learning · Springer Science+Business Media · 2021 10.1007/s10994-021-06003-9
- Adoption of Image-Driven Machine Learning for Microstructure Characterization and Materials Design: A Perspective JOM · Springer Science+Business Media · 2021 10.1007/s11837-021-04805-9
- A Survey on Vision Transformer IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2022 10.1109/tpami.2022.3152247
- Convolutional Neural Networks with Swift for Tensorflow Apress eBooks · Apress · 2021 10.1007/978-1-4842-6168-2
- Research of image recognition method based on enhanced inception-ResNet-V2 Multimedia Tools and Applications · Springer Science+Business Media · 2022 10.1007/s11042-022-12387-0
- Deep learning object detection in materials science: Current state and future directions Computational Materials Science · Elsevier BV · 2022 10.1016/j.commatsci.2022.111527
- Uncertainty-aware pseudo-label and consistency for semi-supervised medical image segmentation Biomedical Signal Processing and Control · Elsevier BV · 2022 10.1016/j.bspc.2022.104203
- Active learning by query by committee with robust divergences Information Geometry · Springer Science+Business Media · 2022 10.1007/s41884-022-00081-x
- Analysis of SEM Images with Artificial Intelligence Methods European Journal of Science and Technology · European Journal of Science and Technology · 2022 10.31590/ejosat.1219252
- Convolutional Neural Networks with Transfer Learning for Pneumonia Detection International Journal of Advanced Computer Science and Applications · Science and Information Organization · 2022 10.14569/ijacsa.2022.0130963
- Deep Learning based Defect classification and detection in SEM images: A Mask R-CNN approach arXiv (Cornell University) · Cornell University · 2022 10.48550/arxiv.2211.02185
- Diffusion Models in Vision: A Survey IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2023 10.1109/tpami.2023.3261988
- Automatic Defect Classification Using Semi-Supervised Learning With Defect Localization IEEE Transactions on Semiconductor Manufacturing · IEEE Computer Society · 2023 10.1109/tsm.2023.3278036
- An Overview of Vision Transformers for Image Processing: A Survey International Journal of Advanced Computer Science and Applications · Science and Information Organization · 2023 10.14569/ijacsa.2023.0140830
- IRv2-Net: A Deep Learning Framework for Enhanced Polyp Segmentation Performance Integrating InceptionResNetV2 and UNet Architecture with Test Time Augmentation Techniques Sensors · Multidisciplinary Digital Publishing Institute · 2023 10.3390/s23187724
- Machine Learning Approaches for Classification of Ultra High Carbon Steel Micrographs Key engineering materials · Trans Tech Publications · 2023 10.4028/p-2sqo8w
- Mineral Characterization Using Scanning Electron Microscopy (SEM): A Review of the Fundamentals, Advancements, and Research Directions Applied Sciences · Multidisciplinary Digital Publishing Institute · 2023 10.3390/app132312600
- Enhanced Material Classification via MobileSEMNet: Leveraging MobileNetV2 for SEM Image Analysis Traitement du signal · International Information and Engineering Technology Association · 2023 10.18280/ts.400638
- Combined CNN and ViT features off-the-shelf: Another astounding baseline for recognition. 2024 10.1109/wifs61860.2024.10810712