선정목록으로
Determining the grain orientations of battery materials from electron diffraction patterns using convolutional neural networks
필름·전자재료 · (14) 드라이 필름(포토레지스트)
기본 정보
- 저자
- DOI
- 10.1038/s41524-026-02002-3
- 저널
- npj Computational Materials
- 발행년도
- 2026
- 발행기관
- Nature Portfolio
- 피인용수
- 0
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1038/s41524-026-02002-3
- 토픽
- Electron and X-Ray Spectroscopy Techniques
- OpenAlex ID
- W7130599040
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (14) 드라이 필름(포토레지스트)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 드라이 필름(포토레지스트)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
Abstract Polycrystalline materials have numerous applications due to their unique properties, which are often determined by the grain orientation relationships. Hence, quantitative characterization of grain as well as interface orientation is essential to optimize these materials, particularly energy materials. Using scanning transmission electron microscopy (TEM), materials can be analysed in an extremely fine grid of scan points via electron diffraction patterns at each scan point. By matching the diffraction patterns to a simulated database, the crystal orientation of a grain at each scan point can be determined. In this work, we train convolutional neural networks on dynamically simulated diffraction patterns of LiNiO 2 , an important cathode-active material for lithium-ion batteries, to predict the orientation of grains in terms of three Euler angles for the complete fundamental orientation region. Results demonstrate that these networks outperform the conventional pattern-matching algorithm with increased accuracy and efficiency. The former can be attributed to the fact that these models are trained by data incorporating dynamical effects. This work is an attempt to apply deep learning for the analysis of TEM data to determine the grain orientation and enlighten the great potential of machine learning to accelerate the analysis of electron microscopy data, toward a high-throughput characterization technique.
본문 49,774자
본문 펼치기
### npj Computational Materials
#### Article in Press
https://doi.org/10.1038/s41524-026-02002-3
## Determining the grain orientations of battery materials from electron diffraction patterns using convolutional neural networks
<u>Received: 30 July 2025</u>
<u>Accepted: 6 February 2026</u>
Cite this article as: Scheunert, J.,
Ahmed, S., Demuth, T. et al.
Determining the grain orientations of
battery materials from electron
diffraction patterns using
convolutional neural networks. npj
Comput Mater (2026). https://
doi.org/10.1038/s41524-026-02002-3
Jonas Scheunert, Shamail Ahmed, Thomas Demuth, Andreas Beyer, Sebastian Wissel,
Bai-Xiang Xu & Kerstin Volz
We are providing an unedited version of this manuscript to give early access to its
findings. Before final publication, the manuscript will undergo further editing. Please
note there may be errors present which affect the content, and all legal disclaimers
apply.
If this paper is publishing under a Transparent Peer Review model then Peer
Review reports will publish with the final article.
© The Author(s) 2026. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing,
adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source,
provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included
in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative
Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission
directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
##### Determining the grain orientations of battery materials from electron diffraction patterns using convolutional neural networks
Jonas Scheunert <sup>1,2</sup>, Shamail Ahmed <sup>1,2</sup>, Thomas Demuth <sup>1,2</sup>, Andreas Beyer <sup>1,2</sup>, Sebastian Wissel <sup>3</sup>,
Bai-Xiang Xu <sup>3</sup> and Kerstin Volz <sup>1,2*</sup>
1mar.quest | Marburg Center for Quantum Materials and Sustainable Technologies, Philipps
Universität Marburg, Hans-Meerwein Straße 6, 35032 Marburg, Germany
2Department of Physics, Philipps-Universität Marburg, Hans-Meerwein Straße 6, 35032 Marburg,
Germany
3Mechanics of Functional Materials, Institute of Materials Science, TU Darmstadt, Otto-Berndt
Straße 3, 64287 Darmstadt, Germany
∗ Corresponding author: kerstin.volz@physik.uni-marburg.de
FOR PUBLISHER ONLY Received on Date Month Year; revised on Date Month Year; accepted on
Date Month Year
###### Abstract
Polycrystalline materials have numerous applications due to their unique properties, which are
often determined by the grain orientation relationships. Hence, quantitative characterization of
grain as well as interface orientation is essential to optimize these materials, particularly energy
materials. Using scanning transmission electron microscopy (TEM), materials can be analysed in
an extremely fine grid of scan points via electron diffraction patterns at each scan point. By
matching the diffraction patterns to a simulated database, the crystal orientation of a grain at
each scan point can be determined. In this work, we train convolutional neural networks on
dynamically simulated diffraction patterns of LiNiO2, an important cathode-active material for
lithium-ion batteries, to predict the orientation of grains in terms of three Euler angles for the
complete fundamental orientation region. Results demonstrate that these networks outperform
the conventional pattern-matching algorithm with increased accuracy and efficiency. The former
can be attributed to the fact that these models are trained by data incorporating dynamical
effects. This work is an attempt to apply deep learning for the analysis of TEM data to determine
the grain orientation and enlighten the great potential of machine learning to accelerate the
analysis of electron microscopy data, toward a high-throughput characterization technique.
Key words: Image analysis, TEM, 4DSTEM, Orientation mapping, AI, CNN
###### Introduction
Many modern functional devices like batteries, solar cells or fuel cells consist of an agglomeration
of individual crystallites. The efficiency of the respective device depends largely on the
orientation of the grains and especially on the boundaries or interfaces between them.
Accordingly, characterization methods to derive the grain orientations on a µm to nm level are
needed. To this end, the commonly applied technique is analysing electron backscatter
diffraction (EBSD) patterns based on the Laue method (1) in a scanning electron microscope
(SEM). Even higher spatial resolution can be achieved by transmission electron microscopy
(TEM). Here, the orientation of a crystal can be determined by indexing the recorded spot-like
diffraction patterns. The diffraction patterns are acquired at each scan point, resulting in a four
dimensional data set (4D-STEM). The experimental diffraction patterns are then compared to a
large reference library of simulated diffraction patterns via a cross-correlation algorithm (2) and
a two-dimensional map of the crystallographic orientation of the material is created (3). Typically,
the simulated diffraction patterns for this method are calculated by applying the kinematic
approximation to speed up the simulation process. However, this neglects dynamical effects like
the intensity modulation of diffraction spots with respect to sample thickness and excitation
error. Accordingly, the accuracy of such an orientation mapping can be significantly enhanced by
applying precession electron diffraction (PED) (4) to minimize the impact of dynamic effects in
the experimental data. Although somewhat reliable, the orientation mapping is less robust on
inhomogeneous samples, when, e.g., the thickness of the sample or the background in the
diffraction pattern changes across the specimen. All in all, these methods are computationally
expensive and therefore still are a time- and resource-intensive part of crystallographic analysis
and can be subject to biases as they rely on pattern enhancing filters, accurate centre correction
and perfect camera length calibrations.
The emergence of artificial neural networks (ANNs) (5) provides a new method to analyse large
amounts of data in a short amount of time. It also cuts down on the needed memory storage by
effectively encoding the reference image library into the weights of the connections of the
network architecture. Convolutional neural networks (CNNs) (6) have proven to be an effective
method for analysing images.
Determining the crystal orientation by training CNNs on different types of experimental data has
been achieved by several groups before. Early achievements were reached by Jha et al. (7) by
applying a convolutional neural network on EBSD patterns of polycrystalline nickel. Ding et al. (8)
have recently developed a hybrid network consisting of a convolutional neural network
combined with dictionary indexing and achieved high accuracy with a significant reduction in
processing time for the EBSD patterns. For spatially resolved acoustic spectroscopy (SRAS) (9), a
non-electron-based method, Patel et al. (10) have developed a fully connected network for
indexing the orientation of nickel with data from this method. Experiments on using neural
networks to index the orientation via spot-like transmission electron diffraction patterns have
been carried out by Yuan et al. (11). They encoded the intensity of individual GaSb diffraction
spots directly as values for nodes in a network. This method achieves very high accuracies, but
only allows for small variations in the orientation to be analysed. To the best of our knowledge,
there exists no study on the orientation mapping by utilizing TEM spot diffraction patterns
covering the complete orientation range possible using CNNs.
In this work, we present our results on utilizing CNNs on TEM spot-like diffraction patterns to
predict grain orientations covering the entire orientation range of a functional battery material.
We examine both regression- and classification-type network architectures. As example material,
we chose LiNiO2 because of its increasing relevance in battery material research. Our approach
for the classification networks is to combine the three Euler angles, ? 1, ϕ, ? 2, of the Bunge
notation (12) into a single label to be predicted, while the regression networks are built with
three separate output nodes, one for each Euler angle. In the case of the classification network,
a SoftMax function at the very end of the network transforms the output of the final nodes into
a pseudo probability. The activations are shifted to be between 0 and 1 and their values add up
to 1. It should be noted that these values do not represent real probabilities and an additional
calibration, for example using temperature scaling (13), would be needed to achieve this.
However, since we are only interested in the specific class, that the network deems most likely,
such a step is unnecessary. By gradually breaking down the diffraction patterns into a low
dimensional information space through the architecture of a CNN, the networks also have the
potential to identify decisive features more reliably than a simple pattern-matching algorithm.
For the training of the networks, we use dynamically simulated diffraction patterns using the
Bloch wave algorithm, which further demarcates our approach from the template matching
approach, where usually kinematic algorithms are employed to generate the reference database
(3). Moreover, we investigate different strategies to distribute the training data in the orientation
space.
###### Results
Network training performance
We create three different training data sets that differ in the way they cover the orientation space
of the fundamental zone of LiNiO2. The orientations of the training datasets are visualised using
an inverse pole figure (IPF) in Figure 1. For each dataset both a classification and a regression
network are trained. A more detailed explanation of the setup of these datasets as well as of the
architecture of the networks is given in the methods section. During training the classification
network trained on the first dataset achieves a validation accuracy of 61%. The network trained
on the second achieves a validation accuracy of 22%, while the third network reaches 65.2%. The
much higher number of orientations together with an extreme density of orientations near the
[1000] orientation of the second dataset, are the most probable causes for the lower accuracy
values of the second network compared with the other two. Given the highly similar-looking
diffraction patterns of orientations that differ only by a few degrees, it is also not surprising that
the networks do not achieve higher accuracies. Figure S1 in the supplementary material shows
exemplarily the development of accuracy and loss of the second network during training. For the
regression networks, the choice of the training data is even more severe. For the first two
datasets, the networks are completely unable to learn to differentiate the orientations. Here, the
training losses for the separate Euler angles do not reduce over the whole training process. Only
for the third dataset do we see meaningful results. The network achieves a mean average error
of 58.7° for ? 1, 5.6° for ϕ and 12.8° for ? 2 for the training data.
Evaluation on simulated and experimental data
For a first analysis, we let the ASTAR software and the networks predict the orientations of the
simulated test dataset of orientations not present in the training data. For this, the predictions
were manually corrected to counteract the symmetry problems inherent in the material. The
predictions of the ASTAR software are very close to the ground truth value. They deviate from
those by an average of 1°. We further find clear differences between the predictions of the
classification networks. The network trained on the first dataset achieves an average error of 35°.
This is significantly improved upon by the network trained on the second dataset, which achieves
an average error of 5.4°. The network trained on the third dataset achieves better results yet,
with an average error of 2.3°. When analysing the regression network in the same manner, we
find that it achieves an average error of 23.4°. This is a clearly worse result than those of the
classification network trained on the same dataset and indicates the difficulties of extrapolating
between different diffraction patterns. These results together with the fact that the third dataset
is the only one that allowed the meaningful training of regression networks, indicate that this
dataset seems to work best as training data. Furthermore, it should be argued that this dataset
represents the ideal case for the pattern-matching software, as there is absolutely no potential
for shifting patterns or any type of noise. Even so, our classification networks achieve
comparative accuracy.
In order to further evaluate the networks, we compare their predictions of an experimental
dataset with the orientations determined by template matching using the ASTAR software.
Details concerning the preparation of the experimental sample are given in the methods section
of this study. The predicted classes are visualized using an IPF colouring. Figure 2 shows the
ground-truth labels as well as the labels predicted by the three classification networks each
trained on one of the datasets shown in Figure 1. To better discuss the predictions, the grains in
the material have been numbered in Figure 2a). In order to label images outside of the sample
as vacuum or non-sample regions, a simple confidence threshold was used. Given the different
number of classes the networks employ and the resulting differences in confidences, different
thresholds had to be used in each case in order to include as many scan points of the sample as
possible, while excluding most of the vacuum and non-sample regions. A further study is required
to develop a generalised framework to transform the confidences for different crystal systems
along with the number of rotations used for training. Figure 3a) shows a similar IPF visualisation
for the predictions of the regression network trained on the third dataset. Since, unlike the
classification networks, it does not provide a confidence value with its prediction, the non-sample
regions are also coloured. Comparing the predictions of the networks to the reference
orientations in the IPFs, it becomes evident that all networks are generally in good
agreement. Due to their superior results over the regression networks, we will discuss the
classification networks in more detail.
Our improved results can be further demonstrated by comparing the individual diffraction
patterns directly to diffraction patterns of the training datasets that correspond to the predicted
Euler angles. In Figure 4, experimentally acquired diffraction patterns of four grains are compared
to simulated non-augmented diffraction patterns which correspond to the orientations predicted
by the second classification network when given the experimental images as inputs (comparisons
for further scan points can be found in Figure S2 in the supplementary material). It should be
noted that not all grains are equally well predicted by each network. The first classification
network struggles the most. Here, quite a few grains are allocated significantly different
orientations than in the reference. Most notable are the grains numbered 11, 16 and 22 in Figure
2a). This is an expected consequence of the low number of classes used for training, as it becomes
likely that no class exists in the immediate vicinity of the actual orientation. Nevertheless, the
accuracy of the network is high and the predictions within a single grain are very consistent.
Comparing the predicted in-plane, symmetry corrected orientation directly to the reference
orientation predicted by the ASTAR software results in an average deviation of 13.5° for the
whole dataset.
The predictions of the second classification network show a closer resemblance to the reference
orientations. The average difference to the reference orientations amounts to 8.4°. However,
there are more significant variations of the predictions within a single grain. This is particularly
noticeable in the indecisiveness of the network when deciding between the green and blue
classes for the grains numbered 4, 6, 14, 19 and 23 in Figure 2a). This behaviour is also visible in
the predictions of the first network, though much less pronounced. In the supplementary Figure
S3, the non-augmented training images corresponding to the two classes predicted by the second
network for one of the green/blue grains are overlaid. There we can see that these two predicted
classes are very similar to each other, which challenges the network. When analysing the third
classification network with the IPF images, we observe that the green/blue ambiguity as well as
other intragranular uncertainties of the second network have almost entirely disappeared. It
achieves an average difference from the reference orientations of 8.6°. The predictions of the
regression network are also very positive. Here too are the predictions inside of the grains very
stable. The symmetry corrected in-plane deviation from the reference orientations is calculated
to be 13.3°.
Figure 5 shows the confidences of the classification networks trained with the second and third
datasets when predicting on the experimental data. The second network’s confidences are a lot
lower than those of the third as is expected from the significantly larger number of classes that
the second network has to consider. On the very right edge of the experimental dataset exists a
strong amorphous phase clearly separate from the area of interest for our analysis. This phase
proved challenging for the third network and was subsequently removed for better visualisation.
Figure S4 in the supplementary material shows the confidence of the model without the removal
of this area as well as images of the problematic region. Since our networks have not been trained
on diffraction patterns of amorphous materials having no diffraction spots, hallucinatory
behaviour is not surprising. In future approaches amorphous and vacuum-images should be
included as separate classes for the network to predict to avoid these issues.
Symmetry effects and Interpretation of network decisions
Due to the nature of classification networks to assign pseudo probabilities to all classes of the
training data, the networks can be further analysed by visualising these probabilities directly in
IPFs. Since multiple classes are projected onto the same point in this representation, their
confidences are added together. Figure 6 shows the predictions for scan points in grains 4, 10
and 19 in Figure 2a) for all three classification networks. Here, the underlying source for the
second network’s indecisiveness is easily identified. In all three images, there are two distinct
areas of high confidence. The areas are symmetric around an axis that runs horizontally through
the centre of the projection. This gives credence to the idea that the issue stems from the
inherent symmetry of the material system itself. This problem persists also in the predictions of
the third network. However, those show a much clearer favour to one of these areas. The
network has either been able to differentiate between these two symmetric solutions or
internalised a bias towards one orientation. Note that the very first network does hardly exhibit
any of such problems, as here only a single orientation is assigned with any amount of relevant
confidence for all three scan points. This becomes even more glaring in the supplementary Figure
S5 in which the confidences of grain c) are plotted without the IPF projection.
Diffraction pattern symmetry is a common problem when determining crystal orientations. The
difference between diffraction patterns on opposite sides of the symmetry axis shown in Figure
6 can only be simulated by incorporating dynamical diffraction. However, as such simulations are
computationally expensive and the differences in the resulting intensities subtle, conventional
pattern matching algorithms, like the one we used here as a reference, rely mostly on kinematic
simulations for their data banks. Since our networks were trained on Bloch wave simulations that
do incorporate dynamical effects, our networks might be able to learn to differentiate between
otherwise similar diffraction patterns. Figure 7 a) and b) show the proportional difference
between two of those symmetrically similar orientations, i.e. [1010] and [1100], for both, Bloch
wave simulation as well as a purely kinematical algorithm. For both methods, i.e. kinematic and
dynamic, the diffraction spots in the first order Laue zone clearly differ for both orientations.
However, in the zeroth order Laue Zone, the region of the diffraction pattern which is usually
available for indexing in the experiment, there is no difference visible for the kinematic diffraction
patterns (Figure 7a). In contrast, in the dynamical simulation, cross-like features can be observed
stemming from dynamic interferences due to double diffraction. In order to investigate the
network’s ability to discern the orientations through those interferences, we let the third
classification network predict the orientations of non-augmented dynamically simulated images
of the [1010] and [1100] orientations cropped to exclude the first order Laue zone. Figure 7c)
shows the difference between the confidences of the network for the two images. The
confidences for the vast majority classes are almost identical for both diffraction patterns and
only a few orientations show a very noticeable shift. For those classes the labels have been added
next to their peaks. We can see that for the majority those classes that experience a positive shift
and are therefore given a higher confidence when predicting on the [1010] image follow the
pattern of ϕ=90°, ? 2=60°, while those classes that are given a higher probability when predicting
on the [1100] image are close to the pattern of ϕ=90°, ? 2=120°. As those angle pairs do
correspond to the appropriate orientations, we can conclude that our third network has indeed
learned to differentiate between those two directions. As to the natural question why the second
network is seemingly not as competent in this regard, it may be that the high number of classes
and especially the extreme density of classes close to the [0001] direction preoccupy the
network and therefore hinder it from focussing on learning the subtle differences between those
symmetries.
Our analysis indicates that creating the training data in an equi-spaced manner is the most
promising method for the application of neural networks, as it fills the orientation space
completely without overwhelming the network with too many similar classes in certain areas. In
future analysis we will, therefore, train solely with datasets created this way.
Additionally, we also tested our network on a non-precessed dataset of the same sample. The
supplementary Figure S6 shows a diffraction pattern taken at a scan point of this dataset as well
as the predictions of the second and third networks. This data poses an even tougher challenge,
but our networks manage to give a good approximation of the sample’s orientation.
When analysing the predictions in Figure 2, we further notice that in some instances, the
interfaces between grains are almost universally declared as non-sample regions through our
threshold. Though this is in itself expected, due to the lower confidence at transitional orientation
changes from one grain to another, some of these areas seem to reach significantly deep into the
other grain. For further investigation a coefficient correlation map is presented in the
supplementary Figure S7a). This was created by masking the surrounding area of the individual
diffraction spots in the diffraction patterns and then comparing the resulting image to its
neighbours. By doing this one can highlight the internal structure of the grains and the
overlapping regions (14). Darker areas highlight diffraction patterns that are less similar to their
surroundings. As expected, the grain boundaries fall into this category, however, we also see
large, darker areas inside some of the grains. Some of these are exemplary marked with red
circles in Figure S7 b) showing a heat map of the number of detected diffraction spots per
diffraction pattern. Here it becomes apparent that the areas in question exhibit more diffraction
spots than usual. Therefore, one can conclude that these areas are the result of multiple grains
overlapping or coherent grain boundaries in projection, such as twin- and antiphase boundaries.
Since the networks were not trained on this type of data, it is obvious that the confidence in
these areas is low.
Computational efficiency and practical implications
Finally, we compare the time needed to predict the orientations of all 40,000 diffraction patterns
of the complete dataset. The conventional pattern-matching algorithm took 108 minutes for its
predictions. Our networks needed less than 2 minutes to achieve their predictions for the same
dataset. This constitutes an improvement of more than 95%. It should be noted that the
conventional pattern-matching algorithm, unlike the networks, does not support the use of a
GPU and the training of the network also requires significant computing power and time. On the
other hand, this comparison also does not include the time to optimise the filtering parameters
to preprocess the patterns and to calibrate the pattern matching software. Even if the GPU usage
is implemented for the pattern-matching algorithm, the manual optimization of the imaging filter
required to enhance the spots from the background is in itself one of the most time-intensive
tasks and subject to biases, especially for the maps at large field-of-views, where the thickness
of the sample changes considerably. Furthermore, these imaging filters have to be tailored on a
case-by-case basis, and neural networks possess the ability to eliminate this step by taking
different effects into account already during augmentation. The outsourcing of the computing
time to the training of the neural networks before the actual analysis opens up new application
options. In particular the high speed of the analysis of more than 300 diffraction patterns per
second together with very accurate prediction results will allow in-situ applications of our
method in the future, streamlining the workflow of TEM analysis considerably.
###### Discussion
In this work, we have applied convolutional neural networks to predict the crystal orientation of
a LiNiO2 sample by analysing the diffraction pattern obtained from a transmission electron
microscope. For this, we employed classification networks with each class representing a set of
three Euler angles. as well as regression networks. We created and trained with three training
datasets of synthetic images with different spacing between points in angular space and found
that regression networks only exhibited meaningful learning for training datasets of equi-spaced
orientations. Testing our networks against synthetic images of orientations outside the training
data, we found the classification networks trained on that equi-spaced dataset to achieve
accuracies comparable to that of our reference template matching software. By comparing the
predictions with experimental reference data, which were acquired through pattern matching,
we demonstrated that our networks achieved a high level of accuracy. This was further
demonstrated by overlaying the simulated image corresponding to the predicted class directly
on the experimental image. We further showed that our networks struggle with the ambiguity
that arises from the symmetry of the material. This can lead to seemingly wildly varying
predictions within a single grain of the sample. However, conventional template matching
algorithms also struggle with these ambiguities and the resulting orientation maps could be
subject to various orientation cleaning techniques employed in MTEX to improve the results in
this regard. Figure S8 in the supplementary material shows the result of two such techniques
applied to the predictions of our second network.
Our results demonstrate that convolutional networks provide a viable way to achieve a fast and
accurate orientation mapping. We also found that equi-spaced Euler angles throughout the
complete fundamental orientation zone provide the best training data, as they not only provided
the basis for the most accurate classification network but were also the only training dataset that
allowed for successful training of regression networks. Our concept also has great promise for
other material systems.
It remains to be investigated whether more complex network architectures, such as
transformers, could increase the accuracy and certainty of the predictions especially with respect
to the symmetry challenges. Furthermore, we plan to explore whether the networks could
predict other parameters of the sample, such as the thickness or the amount of amorphous
material, as well as the sample material itself, as additional output. The current neural networks
serve as an essential step towards subsequent sophisticated models to predict different phases
of LiNiO2 that can be formed during the recurrent electric cycling of batteries (15). These phases
often maintain very similar diffraction patterns with individual spots appearing/disappearing (16)
and are therefore challenging to discern for pattern-matching algorithms.
In such future research, we would also test whether the in-plane rotation of ? 1 should be
excluded from the network predictions, as this angle could easily be determined after the other
angles are found. This would decrease the number of classes and computational time significantly
and free resources for finer steps in the other two angles.
###### Methods
Generation of the synthetic data
In order to be able to predict crystal orientation accurately, a sufficient amount of training data
for the neural network is needed. Therefore, we decide to use simulated diffraction patterns for
the training, as they, unlike experimental data, can be created comparatively cheaply and with
very fine angular orientation steps. Most importantly, they provide perfect training labels as
ground truth.
We simulate our data accounting for dynamical diffraction for various sample thicknesses at a
fixed convergence semi-angle of 1.5mrad using the Bloch-wave formalism integrated in
py4DSTEM (17). The acceleration voltage is set to 300kV and the maximum simulated scattering
angle is set to 8mrad.
To investigate the influence of the distribution of the training data in the orientation space, we
create three individual training datasets that differ in the way they cover the orientation space
(Figure 1). For all three datasets, the maximum values for the Euler angles are kept the same,
reflecting the rhombohedral symmetry of LiNiO2. Accordingly, ? 1 varies from 0 to 360°, ϕ from
0 to 90° and ? 2 from 0 to 120°, respectively. As depicted in Figure 1 (a), for the first dataset,
the first angle ( ? 1) is varied in steps of 5°, whereas the second and third Euler angles (ϕ, ? 2) are
distributed randomly, which results in an inhomogeneous density of orientations in the
orientation space. For the second dataset, all three Euler angles are varied individually in steps
of 2.5°. This results in a larger orientation density at low ? 1 angles. To achieve a homogeneous
density in the orientation space, ϕ and ? 2 angles of the third dataset are set in an equi-spaced
manner with an angular resolution of 2° using the MTEX algorithm (18). The resulting
homogeneous distribution of orientations is visible in Figure 1(c). In total, this results in about
70,000 classes for the first, 500,000 classes for the second and 152,000 classes for the third
dataset, respectively. For the first dataset, we simulate diffraction patterns up to 100nm sample
thickness in steps of 5 nm. For the other two datasets, the step size is increased to 20 nm to
reduce the amount of data.
To increase the amount of training data further, augmentations are applied to the data. More
importantly, by applying augmentations, the training results can be made more robust with
respect to the different experimental conditions, e.g. the camera length or the camera type used
for the acquisition. Therefore, to account for different camera sensitivities, the diffraction
patterns are first rescaled to a range of 1 to a random value between 1e+3 and 1e+7 and then
logarithmically scaled. Furthermore, a Gaussian blurring filter is used to smooth the diffraction
patterns to account for the point spread function (PSF) of a camera. To account for different
extents of thermal diffuse scattering (TDS) and inelastic scattering, a Gaussian bell of intensity
with random height and sigma is added. For 10% of the images, diffuse rings of higher intensity
around the central diffraction spot are added to mimic a varying amount of amorphous material
that may be present on the sample surfaces from preparation. Last but not least, the diffraction
patterns are randomly cropped and resized to 256x256 pixels. This accounts for the different
centring of the diffraction pattern on the camera, and most importantly, for the different camera
lengths used. For the template matching algorithms, the simulated database has to be calibrated
beforehand by the user to match the experimental dataset as closely as possible. Neural
networks provide the opportunity to eliminate the necessity of these calibrations by intentionally
training them with diffraction patterns with varying camera lengths. From each simulated
diffraction pattern, 30 different augmented images are created. As an example, Figure 8 shows
one simulated diffraction pattern (a) and two augmented training patterns (b) and (c) with
different degrees of diffuse scattering and increasing camera lengths. For better visualisation, all
images are scaled logarithmically. A randomly selected fraction of 20% of the augmented
diffraction patterns generated are kept as a validation dataset to check for overfitting during the
training.
To test the networks after the training and compare it against the reference template matching
algorithm, a dataset of orientations different from the training datasets is simulated. This set’s
orientations are spread out equi-spaced using the same method as the third training dataset but
with a higher resolution in the orientation space and consists of 580,000 different orientations
compared to the 152,000 of the training set. In addition, no augmentations were applied to the
images. This guarantees images that vary enough from the third training dataset to make a
validation of networks trained with it possible.
Preparation of and data recording for the experimental LNO sample
In order to prove the functionality of the networks, they are applied to evaluate an experimental
dataset of LiNiO2. For this, a lamella containing multiple single-crystal-like LiNiO2 particles is
prepared a JEOL JIB 4601F focused ion beam microscope. To protect the lamella during the
thinning process, first a thin and then a thicker layer of tungsten are deposited on its surface with
an electron-beam and a Ga-ion beam respectively. Using a micromanipulator needle, the sample
is then attached to a TEM grid and subsequently thinned using a Ga-ion beam. Finally, the lamella
is polished with a 5 kV Ga-ion beam. The diffraction patterns are acquired in a JEOL JEM-3010
operating at 300kV, using a convergence semi-angle of 1.6 mrad. The sample consists of multiple
grains of different orientations. A NanoMegas P2010 system is used to precess and scan the
electron beam across the sample. The precession angle is set to 0.6°. A total of 40,000 diffraction
patterns is recorded in a grid of 200x200 scan points with a step size of 12.5 nm using a TVIPS
XF416(ES) camera. Figure 9 shows a virtual dark-field overview image of the sample used (a) as
well as an exemplary diffraction pattern (b). The diffraction pattern is logarithmically scaled for
better visualisation. To create the labels for the experimental dataset, the ASTAR software is used
to index the diffraction patterns (3) which is based on template matching of the experimental
patterns to a set of kinematically simulated reference patterns. The software is run on an Intel(R)
Core(TM) i9-9820X CPU with the use of multithreading and 98 GB of RAM. For the software to
accurately predict the orientations, a number of calibration steps have to be executed
beforehand. First, the software needs to be provided with an accurate approximation of the
convergence angle of the electron beam. Then, a number of filters are applied to the diffraction
patterns to remove potentially problematic features like noise. Lastly, another algorithm is
executed to find the center beam for all images. The diffraction pattern can shift significantly in
the image due to a descan effect over large fields-of-views. One of the leading advantages of
neural networks to the challenge of orientation mapping is to remove the necessity for these
manual, user-specific, and time-consuming steps by including a lot of variety in the images with
the help of image augmentation.
Network architecture and training strategy
In this work, we employ classical convolutional neural networks because of their proven strength
in image classification (19). We do not apply more complex architectures, e.g. transformer
models, since, due to our large number of classes, our networks already have a very high number
of trainable parameters. Larger networks would slow down the training and evaluation process
considerably. The general architecture of the networks used is shown in Figure 10. The networks
consist of multiple convolution blocks that gradually decrease the dimension of the diffraction
patterns. Each block is made up of a convolution layer with a 3x3 filter kernel. This is followed by
a layer for batch normalization (20) and one for ReLU activation (21). In the end, a 2x2 Max
Pooling layer (22) is added. Using these blocks, we start with 8 feature maps and double the
number with each convolution until we end up with 256 feature maps. This architecture is chosen
in order to abstract images of the size of 256x256 pixels as much as possible into the latent space.
After the convolution layers, two fully connected layers with an equal number of nodes are
employed. For the first dataset, these layers have 6,400 nodes each. This number is reduced to
3,200 nodes for the other datasets to reduce the number of trainable parameters. We arrive at
these numbers by testing multiple architectures and optimizing between training time, accuracy,
memory usage and overfitting. Dropout layers are included after each fully connected layer, in
order to prevent overfitting. With these, 20% of the connections of those layers are deactivated
during training.
The three Euler angles that we aim to predict form a continuous spectrum, the regression
networks, with their continuous output, provide a suitable method for such a challenge.
However, classification networks also come with a number of advantages. Their nature to assign
pseudo-probabilities or confidences to each class of the training data provides additional
methods for analysing the trained network and also mimics more closely the traditional pattern
matching software, which also assigns probabilities to a set of reference diffraction patterns. In
addition, the confidences provide a way of differentiating the material from non-sample regions.
In this study both types of network architecture are used. The architectures of these networks
only differ in their last layer. Where the regression networks have a dense layer of three nodes,
one for each Euler angle, the classification networks have a dense layer with as many nodes as
there are classes in the training dataset as well as a SoftMax layer to transform their output into
a pseudo probability.
All classification networks are trained over 900 epochs while the regression networks are trained
for 400 epochs. This took between 10 and 20 hours, depending on the training dataset and the
resulting number of nodes in the final layer. After that, the networks show no more significant
reduction in the validation loss. Each epoch consists of 16,384 images with a batch size of 128,
resulting in the network seeing 14,745,600 images in total. An adaptable learning rate is
employed to maximize the achieved accuracy. The learning rate starts at a value of 0.001 and is
reduced by 50 % if the validation loss is not decreasing after 20 epochs. RMSprop is used as the
optimization algorithm and no weight decay is implemented.
###### Data Availability
The trained networks and the test datasets are available at
<u>https://doi.org/10.5281/zenodo.17360572</u>
Acknowledgements
Funding from the European Regional Development Fund (ERDF) and the Recovery Assistance for
Cohesion and the Territories of Europe (REACT-EU) is gratefully acknowledged. We also
acknowledge the support of the German Research Foundation (DFG) via INST 160/724-1FUGG
and in the framework of the research unit SynDiPET FOR5699 (project number 556363981).
###### Author Contributions
Jonas Scheunert designed the model and the computational framework and analysed the data.
Shamail Ahmed helped with the analysis and provided critical feedback. Thomas Demuth
contributed to sample preparation. Sebastian Wissel assisted with the network development.
Kerstin Volz, Andreas Beyer, and Bai-Xiang Xu supervised the project. All authors contributed to
the final manuscript.
###### Competing interests
No competing interest is declared.
###### References
1. Greilinger, A. B. A back-reflection laue method for determining crystal orientation. Zeitschrift
für Kristallographie - Crystalline Materials 91, 424–432 (1935).
2. Friedrich, T., Bochmann, A., Dinger, J. & Teichert, S. Application of the pattern matching
approach for ebsd calibration and orientation mapping, utilising dynamical ebsp simulations.
Ultramicroscopy 184, 44–51 (2018).
3. Rauch, E. & Véron, M. Automated crystal orientation and phase mapping in tem. Materials
Characterization 98, 1–9 (2014).
4. Diebold, A. C. et al. Template matching approach for automated determination of crystal phase
and orientation of grains in 4d-stem precession electron diffraction data for hafnium zirconium
oxide ferroelectric thin films. Microscopy and Microanalysis 31, ozaf019 (2025).
5. Drew, P. J. & Monson, J. R. Artificial neural networks. Surgery 127, 3–11 (2000).
6. Wu, J. Introduction to convolutional neural networks. National Key Lab for Novel Software
Technology. Nanjing University. China 5, 495 (2017).
7. Jha, D. et al. Extracting grain orientations from ebsd patterns of polycrystalline materials using
convolutional neural networks. Microscopy and Microanalysis 24, 497–502 (2018).
8. Ding, Z., Zhu, C. & De Graef, M. Determining crystallographic orientation via hybrid
convolutional neural network. Materials Characterization 178, 111213 (2021).
9. Smith, R. J. et al. Spatially resolved acoustic spectroscopy for rapid imaging of material
microstructure and grain orientation. Measurement Science and Technology 25, 055902 (2014).
10. Patel, R., Li, W., Smith, R. J. & Clark, M. Developing neural networks to rapidly map
crystallographic orientation using laser ultrasound measurements. Scripta Materialia 256,
116415 (2025).
11. Yuan, R., Zhang, J., He, L. & Zuo, J.-M. Training artificial neural networks for precision
orientation and strain mapping using 4d electron diffraction datasets. Ultramicroscopy 231,
113256 (2021).
12. Bunge, H.-J. Texture analysis in materials science: mathematical methods (Elsevier, 2013).
13. Guo, C., Pleiss, G., Sun, Y. & Weinberger, K. Q. On calibration of modern neural networks
(2017).
14. Ákos K. Kiss, Rauch, E. F. & Lábár, J. L. Highlighting material structure with transmission
electron diffraction correlation coefficient maps. Ultramicroscopy 163, 31–37 (2016).
15. Xiao, P., Shi, T., Huang, W. & Ceder, G. Understanding surface densified phases in ni-rich
layered compounds. ACSEnergy Letters 4, 811–818 (2019).
16. Mukherjee, P. et al. Atomic structure of surface-densified phases in Ni-rich layered
compounds. ACS Applied Materials & Interfaces 13, 17478–17486 (2021).
17. Savitzky, B. H. et al. py4dstem: A software package for fourdimensional
scanning transmission electron microscopy data analysis. Microscopy and Microanalysis 27, 712–
743 (2021).
18. Hielscher, R. & Schaeben, H. A novel pole Figure inversion method: specification of the mtex
algorithm. Journal of applied Crystallography 41, 1024–1037 (2008).
19. Rawat, W. & Wang, Z. Deep convolutional neural networks for image classification: A
comprehensive review. Neural Computation 29, 2352-2449 (2017).
20. Bjorck, N., Gomes, C. P., Selman, B. & Weinberger, K. Q. Understanding batch normalization.
Advances in neural information processing systems 31 (2018).
21. Agarap, A. F. Deep learning using rectified linear units (relu) (2019).
22. Matoba, K., Dimitriadis, N. & Fleuret, F. Benefits of max pooling in neural networks:
Theoretical and experimental evidence. Transactions on Machine Learning Research (2023).
FIGURE LABELS
Figure 1: Training data orientations: Overview of the orientations used in the three training
datasets, represented in Inverse Pole Figure convention for better visualisation. This
representation does not depict variation in the first Euler angle. a) Dataset with random
orientations; b) dataset with individual steps of 2.5° for each Euler angle; c) dataset with equi
spaced orientations.
Figure 2: Predictions of classification networks as inverse pole figures: IPFs of the experimental
sample in the z-direction. Black areas are classified as belonging to non-sample regions. a)
Prediction of the pattern matching reference program; b), c), d) predictions of the first, second
and third classification networks trained on the datasets shown in Figure 1 respectively.
Fig 3: Regression network results: a) Prediction of the regression network trained on the third
dataset of the experimental test dataset. b) Losses tracked during the training process of the
regression network for all three separate Euler angles and the total validation loss.
Figure 4: Comparison of STEM-images to predictions: Exemplary comparisons of the predictions
of the classification network trained on the second dataset. The left pattern in each subfigure is
the logarithmically scaled experimental image that is given to the network as input, while the
right one is the un-augmented synthetic image that corresponds to the orientation predicted by
the network. a), b), c) and d) correspond to scan points in grains 2, 4, 5 and 22 in Figure 2(a).
Figure 5: Classification network confidences: Confidence of networks in percent, when
predicting on the experimental sample. For better visualisation of the grains, the confidence was
cut off at a value of 0.005. a) Confidence of the network trained on the second training dataset,
b) confidence of the network trained on the second training dataset.
Figure 6: IPF symmetry analysis: Predicted probabilities of orientations for the scan points in
Figure 2. top) Predictions of the first classification network, middle) predictions of the
second classification network, bottom) predictions of the third classification network. a), b), c)
Scan points in grains 19, 10 and 4.
Figure 7: Effects of Bloch wave training data: Proportional change of intensity between
simulated images of orientations [1010] and [1100] for a purely kinematic simulation a) and our
dynamical Bloch wave simulation b). c) Difference of confidence for all classes of the third
classification network between the prediction of non-augmented images of those two
orientations that are cropped to exclude the first order Laue zone. The values in brackets are the
Euler angle labels for the classes of the highest shifts.
Figure 8: Simulated diffraction patterns: a) Non-augmented simulated diffraction pattern; b) and
c): examples of augmented training-images created from a) with different amounts of crop,
scaling and diffuse scattering.
Figure 9: Experimental test dataset: a) Virtual dark-field overview image of the experimental
dataset; b) diffraction pattern of the scan point marked in the black cross in the overview.
Figure 10: Network architecture: a) General architecture of our classification convolutional
neural networks; b) setup of one convolutional block.
섹션 본문
섹션 본문이 없습니다.
참고문헌 18건
- Artificial neural networks Surgery · Elsevier BV · 2000 10.1067/msy.2000.102173
- Automated crystal orientation and phase mapping in TEM Materials Characterization · Elsevier BV · 2014 10.1016/j.matchar.2014.08.010
- A novel pole figure inversion method: specification of the<i>MTEX</i>algorithm Journal of Applied Crystallography · Wiley · 2008 10.1107/s0021889808030112
- Spatially resolved acoustic spectroscopy for rapid imaging of material microstructure and grain orientation Measurement Science and Technology · IOP Publishing · 2014 10.1088/0957-0233/25/5/055902
- Highlighting material structure with transmission electron diffraction correlation coefficient maps Ultramicroscopy · Elsevier BV · 2016 10.1016/j.ultramic.2016.01.006
- A Back-Reflection Laue Method for determining Crystal Orientation Zeitschrift für Kristallographie - Crystalline Materials · De Gruyter · 1935 10.1524/zkri.1935.91.1.424
- Deep Convolutional Neural Networks for Image Classification: A Comprehensive Review Neural Computation · The MIT Press · 2017 10.1162/neco_a_00990
- Application of the pattern matching approach for EBSD calibration and orientation mapping, utilising dynamical EBSP simulations Ultramicroscopy · Elsevier BV · 2017 10.1016/j.ultramic.2017.10.006
- Deep Learning using Rectified Linear Units (ReLU) arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1803.08375
- Extracting Grain Orientations from EBSD Patterns of Polycrystalline Materials Using Convolutional Neural Networks Microscopy and Microanalysis · Oxford University Press · 2018 10.1017/s1431927618015131
- Understanding Surface Densified Phases in Ni-Rich Layered Compounds ACS Energy Letters · American Chemical Society · 2019 10.1021/acsenergylett.9b00122
- py4DSTEM: A Software Package for Four-Dimensional Scanning Transmission Electron Microscopy Data Analysis Microscopy and Microanalysis · Oxford University Press · 2021 101017s1431927621000477
- Training artificial neural networks for precision orientation and strain mapping using 4D electron diffraction datasets Ultramicroscopy · Elsevier BV · 2021 10.1016/j.ultramic.2021.113256
- Atomic Structure of Surface-Densified Phases in Ni-Rich Layered Compounds ACS Applied Materials & Interfaces · American Chemical Society · 2021 10.1021/acsami.1c00143
- Determining crystallographic orientation via hybrid convolutional neural network Materials Characterization · Elsevier BV · 2021 10.1016/j.matchar.2021.111213
- Understanding Batch Normalization arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1806.02375
- Developing neural networks to rapidly map crystallographic orientation using laser ultrasound measurements Scripta Materialia · Elsevier BV · 2024 10.1016/j.scriptamat.2024.116415
- Template Matching Approach for Automated Determination of Crystal Phase and Orientation of Grains in 4D-STEM Precession Electron Diffraction Data for Hafnium Zirconium Oxide Ferroelectric Thin Films Microscopy and Microanalysis · Oxford University Press · 2025 10.1093/mam/ozaf019