Accurate identification of structural defects in materials using atomically resolved scanning transmission electron microscopy (STEM) is crucial for understanding materials structure property correlations. However, deep neural networks (DNNs) trained on simulated data for this classification task often struggle due to the issue of out-of-distribution when applied to experimental data. Moreover, nearly all previously supervised models fail to include additional information such as chemical composition and experimental conditions. To address this issue, we introduce a novel approach that employs a single multilayer perceptron (MLP) classifier trained on multislice simulated data, along with extra information, which we coin as context information. The context information, including chemical composition and experimental imaging conditions, is transformed into vectors and combined with Zernike moment representations of the image data [ 1, 2]. This ensures a single context-aware model can be trained on simulated data from various materials, as illustrated in Figure 1.
To evaluate the effectiveness of this context-aware model, we train our MLP on multislice simulated images of all available 1H MX2 monolayer transition metal dichalcogenides with various dopants, where M is the transition metal and X denotes the chalcogen element. We show that the MLP model achieves 96% accuracy on both training and testing datasets. We also evaluate the model performance on experimental high-angle annular dark field (HAADF) images of monolayer WSe₂ doped Cr. The classification results are consistent with those obtained by human experts, as shown in Figure 2. Additionally, we applied an attention model to the same datasets, which produced comparable outcomes.
Fig. 1.
Integrating context into a unified model. a. Context information (chemical composition, beam energy, detector range in STEM) is often neglected in prior deep learning models. b. Experimental and simulated datasets are used for training. c and e. Previous models trained without context require manual interpretation of outputs. d and f. Our approach encodes context as vectors combined with Zernike moments, enabling a unified model to produce interpretable defect labels across different materials and conditions.
Fig. 2.
Unified MLP identifying point defects in monolayer TMDCs. a. Accuracy curves for 70 epochs reach 96% on training and test datasets, covering 13 materials, 10 dopants, 3 energies, and 2 detectors. b. Classification of an experimental HAADF image of Cr-doped WSe₂, identifying single vacancies (green), double vacancies (cyan), and dopants (red). c. Mean patches for the five defect classes.