Q-RBSA: High-Resolution 3D EBSD Map Generation Using An Efficient Quaternion Transformer Network

Gathering 3D material microstructural information is time-consuming, expensive, and energy-intensive. Acquisition of 3D data has been accelerated by developments in serial sectioning instrument capabilities; however, for crystallographic information, the electron backscatter diffraction (EBSD) imaging modality remains rate limiting. We propose a physics-based efficient deep learning framework to reduce the time and cost of collecting 3D EBSD maps. Our framework uses a quaternion residual block self-attention network (QRBSA) to generate high-resolution 3D EBSD maps from sparsely sectioned EBSD maps. In QRBSA, quaternion-valued convolution effectively learns local relations in orientation space, while self-attention in the quaternion domain captures long-range correlations. We apply our framework to 3D data collected from commercially relevant titanium alloys, showing both qualitatively and quantitatively that our method can predict missing samples (EBSD information between sparsely sectioned mapping points) as compared to high-resolution ground truth 3D EBSD maps.


Introduction
In the pursuit of the development of materials for extreme environments, 3D microstructural information is essential input for structure-property models [1].Many engineering materials are polycrystalline, meaning they are composed of many smaller crystals called grains, and the arrangement of these grains impacts their thermomechanical properties.To collect crystallographic microstructure information, 3D microscopy techniques have been developed that span lengthscales from nanoscale to mesoscale [2].These experiments require costly or challenging to access equipment, like synchrotron light sources for high X-ray fluxes [3,4,5], precise automated robotic mechanical polishing and imaging [6,7], or high-energy ion beams and/or short pulse lasers coupled to electron microscopes [8,9].Recent advancements in 3D experimentation have greatly reduced the time required for other aspects of data collection, but serial sectioning methods (where material is progressively removed from the sample between images) predominately rely on electron backscatter diffraction (EBSD) imaging for collecting crystallographic information, which is three orders of magnitude slower per pixel (ms per pixel) than standard secondary electron or backscatter electron imaging (µs per pixel).
EBSD is a scanning electron microscope (SEM) imaging modality that maps crystal lattice orientation by analyzing Kikuchi diffraction patterns that are formed when a focused electron beam is scattered by the atomic crystal structure of a material according to Bragg's law.A grid of Kikuchi patterns is collected by scanning the electron beam across the sample surface.These patterns are then indexed to form a grid of orientations, which are commonly represented as images in RGB color space using inverse pole figure (IPF) projections.EBSD maps are used to determine the microstructural properties of materials such as texture, orientation gradients, phase distributions, and point-to-point orientation correlations, all of which are critical for understanding material performance [10].However, scaling EBSD scans to 3D by serial sectioning is a time-consuming and energy-intensive process, often requiring hundreds of millions of EBSD patterns to be collected per sample -motivating methods to reduce the number of required points, such as smart or sparse sampling [11,12,13], or machine learning super-resolution [14].In these methods, missing information can be inferred using interpolation-based algorithms (bicubic, bilinear, or nearest neighbor) or data-based learning.Recent progress in computer vision [14,15,16] has shown that the generation of missing samples/data with data-based learning outperforms traditional interpolation algorithms for RGB images.However, unlike RGB images, EBSD maps have embedded crystallography, so existing learning-based methods are not well suited to generate missing EBSD data.
In our previous work [17], we developed a deep learning framework for 2D superresolution that utilized an orientationally-aware, physics-based loss function to generate high-resolution (HR) EBSD maps from experimentally gathered low-resolution (LR) maps.This approach allowed for significant gains in 2D resolution, but expansion to 3D remained difficult due to data availability limitations (3D EBSD is expensive and time consuming to gather).To address this, here we have designed a 3D deep learning framework based on quaternion convolution neural networks with self-attention alongside physics-based loss to super-resolve high resolution 3D maps using as little data as possible.Using real-valued convolution for quaternion-based data has been shown to be inefficient and has loss in the inter-channel relationship [18]; leading to longer training times and larger data burdens.We demonstrate that a quaternion-valued neural network is more efficient and produces better results than real-valued convolution neural networks such as those used in previous work [17].
The crystallographic material information contained in EBSD maps is generally expressed in the form of crystal orientation spatially resolved at each pixel or voxel.These orientations, like other rotational data, can be expressed unambiguously using quaternions.
They therefore can be incorporated into network architecture as prior information by using quaternion-valued convolution for local-level correlation, rather than real-valued or complexvalued convolution.The basic component in traditional CNN-based architectures is realvalued convolutional layers, which extract high-dimensional structural information using a set of convolution kernels.This approach is well-suited for unconstrained image data like RGB, but when convolution kernels fail to account for strict inter-channel dependen-cies where present, the result is greater learning complexity.Some successful efforts have been made to design lower-complexity architectures by extending real-valued convolution to complex-valued convolution [19,20] and quaternion-valued convolution [21,22,23] in the field of robotics [24], speech and text processing [18], computer graphics [25,26], and computer vision [23,27].Although these convolution layers are useful to learn local correlations, they struggle to learn long-range correlations, whereas transformer-based architectures have recently shown significant success in learning long-range correlations in natural language [28] and high-level vision tasks [16,29].However, the computational complexity of transformerbased architectures grows quadratically with the spatial resolution of input images due to self-attention layers, so transformers alone are not well-suited for restoration tasks.However, recent work by Zamir [16] proposed self-attention across channel dimensions to reduce complexity from quadratic to linear with progressive learning for image restorations and showed superior results to convolution-based architecture alone.
Inspired by this idea, we propose the use of quaternion self-attention with progressive learning to incorporate long-range material relationships into super-resolved EBSD maps, while having linear computational scaling with the spatial size of the map.Progressive learning refers to having variable patch sizes instead of fixed patch sizes during training, which is relevant for most engineered material microstructures, where important features can span across length scales (and patch sizes).Titanium alloys, for example, are wellknown to have many different microstructural variants accessible via processing, resulting in varying grain size and morphology.For the two alloys presented here, the Ti-6Al-4V variant has smaller equiaxed grains, while the Ti-7Al alloy has much larger grain size, so applying a fixed patch size would be sub-optimal across these two materials.To enforce long-range learning among these grain features, we used progressive patch sizes starting from 16 to 100 during the training of the network.Training behaves in a similar fashion to curriculum learning processes where the network starts with a simpler task and gradually moves to learning more complex ones.In the experimental pipeline shown in (a), material researchers collect EBSD orientation information for each (x,y) coordinate in a given sectioning plane, and then remove material using laser ablation or robotic polishing to reach the next plane in the z direction to build a 3D volume.In our framework, researchers collect EBSD information from a reduced set of points (blue planes), omitting some planes that would normally be gathered (gray planes).The missing information (green planes) are then generated in 2D as a series of (x,z) or (y,z) planes by our quaternion-based, physics-informed deep learning framework, shown in (b).Here, the network takes advantage of orthogonal independence to efficiently generate 3D volumes using less data, as large amounts of EBSD are costly and the choice of serial sectioning direction has minimal impact on the resultant final volume.

Deep Learning Framework:
The objective of our framework is to generate missing sample planes from experimental 3D EBSD data that is sparse along the z-axis.In this approach, material researchers collect sparsely sectioned 3D EBSD data (blue planes) as shown in figure 1

Network Architecture:
Although EBSD maps are visualized similarly to RGB images, they are multidimensional maps with inter-channel relationships, where crystal orientation is described using Euler angles, quaternions, matrices, or axis-angle pairs.Our previous work [17] demonstrated that quaternion representation is well-suited to orientation expression for loss function design, due to its efficient rotation simplification and avoidance of ambiguous representation.However, we previously used real-valued convolution layers to learn features, which is sub-optimal for EBSD orientation maps, as inter-channel quaternion relations are lost.Generally speaking, convolution networks provide local connectivity and translation equivariance, which are desirable properties for images, but if additional feature correlations are going to be learned efficiently, it is critical to encode relevant structural modalities into the network architec-ture and loss function.Real-valued convolution can still learn quaternion inter-channel information, but it requires extra network complexity, and by consequence, additional data to inform that complexity.Here, the use of quaternion convolution efficiently encodes prior orientation information into kernels, and also has the advantage of reducing the number of trainable parameters by 4, as detailed in the supplement.
Quaternion convolution neural networks (QCNN) [30] use kernels which take the Hamilton product between the feature vectors rather than just computing correlations between features, as is done in real-valued convolution.In quaternion convolution, the feature output of each 2D convolution layer is split into four parts: the first part is the real component, and the remaining three parts are the complex vector component.Quaternion algebra is ensured by manipulating matrices of real numbers.In a QCNN, the convolution of a quaternion filter matrix with a quaternion vector is the Hamilton product.The Hamilton product between two quaternion vectors p = (p 0 , p) and q = (q 0 , q) is defined as: Where, p = p 1 i + p 2 j + p 3 k and q = q 1 i + q 2 j + q 3 k Motivated by [16], we have designed a quaternion-based self-attention layer with a gated feed forward network in our network architecture, called QRBSA: Quaternion Residual Block Self-Attention as shown in figure 2. This efficient neural network architecture generates high-resolution EBSD maps from 2D input maps that are sparsely sectioned along the z-direction.
Introducing non-linearity through an activation function is not straightforward for quaternions, as the only functions that satisfy the Cauchy-Riemann-Fueter (CRF) equations in the quaternion domain are linear or constant [31].However, locally analytic quaternion activation functions have been adapted for use in QNNs with standard backpropagation algorithms [32,33].There are two classes of these quaternion-valued activation functions: fully quaternion-valued functions and split functions.Fully quaternion-valued activation functions are an extension to the hypercomplex domain of real-valued functions, such as sigmoid or hyperbolic tangent functions.Despite their better performance [34], careful training is needed due to the occurrence of singularities that can affect performance.To avoid this, split activation functions [35,34] have been presented as a simpler solution for QNNs.In split activation functions, a conventional real-valued function is applied component-wise to a quaternion, alleviating singularities while holding true the universal approximation theorem as demonstrated in [35].Through their simplicity, split activation functions map quaternion space back to real-valued space by ignoring the nature of the relationship that exists between the components.This is captured in the following relationship, where α corresponds to a split function and p = p Shallow Feature Extractor: This module uses a single quaternion convolution layer to reduce the spatial size of sparsely sectioned EBSD maps, while extracting shallow features.
where, H DF (.) is a deep feature extractor module, and F DF is a 128 channels feature map which goes to the upscale and reconstruction module.QConv is a quaternion convolution, QRSA i is a i th quaternion residual block, and I is a long skip connection.
Quaternion Transformer Block: The standard transformer architecture [28] consists of a self-attention layer, a feedforward network, and layer normalization.The original transformer architectures [28,36] are not suitable for restoration tasks due to the requirement of quadratic complexity of spatial size O(W 2 H 2 ), where W, H is the spatial size of images or EBSD maps.Similar to the approach of [16], we compute attention maps across the features dimension, which reduces the problem to linear complexity.However instead of depthwise convolution, we use quaternion convolution, which can be considered as a combination of depthwise convolution and group convolution, but with four-dimensional quaternion constraints.We have also incorporated an equivalent quaternion-based gating mechanism into the feedforward network within the transformer, and the traditional convolution used in [16] has been replaced with quaternion convolution layers to account for EBSD data modalities.
Layer normalization plays a crucial role in the stability of training in transformer architectures.The quaternion layer-normalization is equivalent to the real-valued one, but adapted to quaternion algebra, and allows the building of deeper architectures by normalizing the output at each layer.From the normalized features, the quaternion self-attention layer first generates query (Q), key (K) and value (V) projections enriched with local context.
After reshaping query and key projection to reshaped query (Q r ) and reshaped key (K r ), a transposed attention map (A) is generated.The refined feature map, which has global statistical information, is calculated from the dot product of the value projection (V r ) and the attention map (A).
Where represents elementwise multiplication, and W i is a combination of quaternion convolution layers with kernel size 1 and 3, respectively.
Upsampling and Reconstruction: The upsampling and reconstruction module has a 1D pixelshuffle layer and a quaternion convolution layer of kernel size 3.The original pixelshuffle layer [37] is designed for 2D upsampling, but we have modified it for 1D upsampling in our framework that generates information in z dimension.Each block of the upsampling and reconstruction module upsamples deep features by a factor of 2, with the number of blocks depending on the scaling factors.
Where, each block H ↑ of the module has a 1D pixel-shuffle layer, and a quaternion convolution layer H R of kernel size 3 × 3.

Vr
Figure 3: Quaternion Self Attention: Self-Attention in (a) is computed using quaternion convolution across feature dimension instead of spatial dimension to reduce computational complexity to linear.An attention map (A) is calculated from reshaped query (Q r ) and reshaped key (K r ).A refined feature map is computed from the attention map (A) and reshaped value (V r ).Quaternion Feed Forward Network: Shown in (b), performs controlled feature transformation to allow useful information to propagate further using gated quaternion convolution.

2D to 3D:
The output of the QRBSA network is a 2D high-resolution EBSD map from a sparsely sectioned 2D EBSD map in the z direction.The 2D high-resolution EBSD maps are then combined to make a 3D volume.The missing z rows, as in figure 1 (b), can be generated either from xz plane (y normal ) or yz plane (x normal ).Therefore, there are two ways to form the 3D volume.In this work, we generated both 3D volumes separately, but we plan to design an algorithm in the future to combine the xz plane and yz plane information to make a single 3D volume.

Qualitative Output Comparison:
The sparsely sectioned 3D EBSD data is downsampled by scale factors of 2, 4 in the z dimension by removing the xy planes (z normal ) to reflect how EBSD resolution would be reduced in a serial sectioning experiment.Our network QRBSA is trained on 2D orthogonal planes (x normal and y normal ) of paired sparsely sectioned EBSD maps and high-resolution EBSD maps, generating the high-resolution 2D maps in z dimension shown in figure 4. The most noticeable visual defects in 2D appear as pixel noise or short vertical lines, particularly around small grain features and high-aspect-ratio grains whose shortest axis is aligned with the z-direction.In addition to planar output analysis, we can also create 3D volumes from the sparsely sectioned xz planar (y normal ) or yz planar (x normal ) EBSD maps, and then sample the xy planes (z normal ) from these volumes to evaluate how well the QRBSA is inferring missing z-sample planes, as shown in figure 5. We can observe that our deep learning framework is able to completely predict omitted xy planes, comparably to the ground truth xy plane, with the exception of some shape variations around grain boundaries, particularly in Ti-6Al-4V.If the xy plane in figure 5 would have been omitted during experimental data collection, our framework would have estimated it with good accuracy.

Quantitative Output Comparison:
The image metrics of peak signal to noise ratio (PSNR) and structural similarity index measure (SSIM) were used to quantitatively evaluate the performance of the generated EBSD maps from the QRBSA network.We calculated the PSNR and SSIM of the Inverse Pole  and finer structure with stronger texture (Ti-6Al-4V).In 2D inferred EBSD planes show noise around small features, mostly in the form of point and line defects in the z-direction associated with grains whose overall shape information was lost due to omission of sample planes in low resolution.It is possible that a downsampling approach incorporating antialiasing could prevent this shape information loss [38], but this approach would not be reflective of actual experimental downsampling in 3D EBSD.This general shape loss effect, along with a larger number of small grains, varying local crystallographic texture, and a wide range of represented crystal orientations, made the Ti-6Al-4V the most difficult dataset for inference.This is further evidenced by a larger number of grain boundary differences for Ti-6Al-4V in figure 5, as well as a lower PSNR/SSIM score in table 1.Additional noise analysis for generated xy planes is shown in the supplement, and there is ongoing work to improve performance using 3D architectures and grain shape information [39] with adaptive multi-scale imaging in z dimension as more of this type of data becomes available.
When considering data beyond the use-case sets tested, the approach shown here is directly applicable to any serial sectioning technique for gathering 3D EBSD information, including FIB sectioning, laser ablation, and robotic serial sectioning [7,6].Further, data from other 3D grain mapping techniques that rely on synchrotron X-ray sources such as diffraction contrast tomography (DCT) [5] or high energy diffraction microscopy (HEDM) [4,3] may also be applicable for the infrastructure presented here.Similar approaches to this may be particularly useful in lab source DCT experiments [40,41], where the X-ray source constraints limit grain mapping resolution in comparison to synchrotron sources.For example, one could use difficult to acquire synchrotron X-ray mapping experiments as HR data to train a network to inform LR X-ray mapping experiments collected more routinely at the laboratory.
In summary, we have designed a quaternion-convolution-based deep learning framework with crystallography physics-based loss to generate costly high-resolution 3D EBSD data from sparsely sectioned 3D EBSD data while accounting for the physical constraints of crystal orientation and symmetry.Alongside this, an efficient quaternion-based transformer block was developed to learn long-range trends and global statistics from EBSD maps.Using quaternion convolution instead of regular convolution is critical for crystallographic data, both in terms of output quality and neural network complexity, as reducing the number of trainable parameters enables transformer addition without major complexity burden (see table 1).This framework can be directly applied to any experimental 3D EBSD approaches that rely on serial sectioning techniques to collect orientation information.

EBSD Datasets
EBSD maps represent crystal orientations collected at each physical pixel location in crystalline materials, which are fundamentally anisotropic and atomically periodic.Orientations for each pixel within the network learning environment are expressed in terms of quaternions of the form q = q 0 + iq 1 + jq 2 + kq 3 .The quaternions are suitable to design a physics-based loss function for deep learning framework [17].To avoid redundancy in quaternion space (between q and −q), all orientations are expressed with their scalar q 0 as positive.For visualization according to established conventions, quaternions are reduced to the Rodrigues space fundamental zone based on space group symmetry, converted into Euler angles, and projected using inverse pole figure (IPF) projection using the open-source Dream3D software [42], as shown in our previous work [17].Ground truth 3D EBSD datasets were experimentally collected from titanium alloy samples: Ti-6Al-4V and Ti-7Al (one Ti-7Al sample deformed in tension to 1%, and one to 3%), using a commercially-available rapid-serialsectioning electron microscope referred to as the TriBeam [43,8].sparsely sectioned EBSD datasets are created by removing xy (z normal ) planes from the high-resolution ground truth with a downscale factor of 2 and 4 (LR = 1 4 HR or LR= 1 2 HR).This is done to imitate the beam raster steps that would occur in a Tribeam experiment with more sparsely sectioned EBSD data, which would not influence the electron beam-material interaction volume at each location, but rather lead to greater raster spacing step sizes.More information about dataset pre-processing are given in the supplementary material.

Network Implementation and Output Evaluation
We use a learning rate of 0.0002, an Adam optimizer with β 1 = 0.9, β 2 =0.99,ReLU activation, batch size of 4 and downscaling factor of 2 and 4. The patch size of HR EBSD maps is selected from [16,32,64,100] during training of the network.The framework is implemented in PyTorch and trained on NVIDIA Tesla V100 GPU for 2000 epochs, which took approximately 100 hours.Once training is completed, inference time for a given 2D LR EBSD map is on the order of less than one second for an imaging area that would normally take about 10 minutes to gather manually.

Loss:
The QRBSA network is trained using a physics based loss function [17], which uses rotational distance approximation loss with enforced hexagonal crystal symmetry (HCP).Rotational distance loss computes the misorientation angles between the predicted and ground truth EBSD map in the same manner that they would be measured during crystallographic analysis, with approximations to avoid discontinuities at the edge of the fundamental zone.The rotational distance between two quaternions can be computed as the following: where, d euclid = q 1 − q 2 2 .While d euclid is Lipschitz, the gradient of θ goes to ∞ as d euclid → 2. To address this issue during neural network training, a linear approximation was computed at d euclid = 1.9, and utilized for points > 1.9.

Progressive Learning:
In our previous work [17], we used a fixed patch size of dimension 64 × 64 for training the CNN based architectures which help in learning local correlations.However, self-attention is required to have larger patch sizes, which aids in learning global correlations.Inspired from the work of Zamir [16], we use progressive patch samples from sizes of [16,32,64,100] in the training process to learn global statistics.We start from a smaller patch size in early epochs and increase to a larger patch sizes in the later epochs.The progressive learning acts like the curriculum learning process where a network starts with a simple tasks and gradually moves to learning a more complex one.

Data Availability
Pre-trained versions of the network modules produced in this paper will be made publicly available through the BisQue cyberinfrastructure at https://bisque2.ece.ucsb.edu.Material datasets will be available by request at the discretion of the authors.

Code Availability
Architecture code will be made publicly accessible through GitHub.

Competing Interests
The Authors declare that there are no competing interests.
10 Supplementary Material 10.1 Quaternion Convolution Neural Network: A quaternion q is a four component number of the form q = q 0 + iq 1 + jq 2 + kq 3 , where basis vectors (i, j, k) satisfy the following relationship: The quaternion can be represented as matrix of real numbers.In a real convolution neural network, correlation, a scalar quantity, is computed between independent kernels and channel dimension of quaternion feature maps.In a quaternion convolution neural network, the Hamilton product, a vector quantity, is computed between quaternion kernels and quaternion feature input maps.The parameters in quaternion kernel is restricted according to quaternion algebra [31].
In a Quaternion Convolution Neural Network (QCNN), the convolution of a quaternion filter matrix with a quaternion vector is Hamilton product.The Hamilton product can also be represented as a matrix of real numbers.
The difference between real convolution neural network (RCNN) and quaternion convolution neural network (QCNN) lies on how a basic convolution operation is performed as shown in figure 6.In RCNN, scalar feature maps are computed by computing correlations between channels of feature maps and kernel filters independently without considering inter-channel relationship.But, vector feature maps are generated using the Hamilton product between feature maps and quaternion kernels in QCNN.Both quaternion kernels and Hamilton products take inter-channel relationships into consideration.

Data Preprocessing
High-Resolution (HR) Ground Truth: The ground truth data is experimental 3D EBSD data gathered from the titanium alloys, Ti-6Al-4V and Ti-7Al (one Ti-7Al sample deformed in tension to 1% and one to 3%), using a commercially-available rapid-serialsectioning electron microscope known as the Tribeam [43,44].The Ti-6Al-4V dataset, shown in figure 7 These titanium alloys are composed primarily of the hexagonal close packed grains.In total, the Ti-6Al-4V dataset contains about 57,000 grains, visible in the IPF maps as regions of different color.The Ti-7Al material has larger grain size, with 500-1000 grains in each dataset.The datasets were proportionally divided into training, validation, and test subsets in ratios of 65%, 15%, and 20% respectively.
Sparsely Sectioned Input EBSD Data: Sparsely sectioned EBSD data are downscaled versions of the high-resolution EBSD data.However, because of how EBSD information is gathered, these EBSD data are not downscaled using pixel averaging.Instead sparsely sectioned EBSD data are produced by removal of xy planes in the z direction from the highresolution ground truth with a downscale factor of 4x and 2x (LR = 1 4 HR or LR= 1 2 HR).This is done to imitate the beam raster steps that would occur in an EBSD experiment with sparsely sectioned EBSD data, which would not influence the electron beam-material interaction volume at each location, but rather lead to greater raster distance between

Ablation Study
To show the effectiveness of quaternion convolution, we have done experiments with an enhanced deep scale residual (EDSR) network [47] and a quaternion enhanced deep residual (QEDSR) network as shown in figure 8.The QEDSR is similar to EDSR except that the real-convolution layer is replaced by quaternion convolution layer that helps in reducing computational complexity.With decreased complexity due to the quaternion convolution layer, we can add a quaternion transformer block into our network architecture to learn global features of EBSD maps.The PSNR/SSIM values for the generated EBSD maps and number of trainable parameters of different neural network architectures are shown in table 2. Our network QRBSA is giving better PSNR and SSIM than EDSR [47], while having fewer trainable parameters.To understand the effect of the quaternion transformer block in QRBSA, we have trained our network with and without the quaternion transformer block as shown in table 3. We see an improvement in PSNR and SSIM with the quaternion transformer block for the Ti6-Al-4V dataset, which has more crystallographic texturing and is difficult to learn because of the mismatched lengthscales over which it persists, compared to the grain structure.The quaternion transformer block will become even more useful for learning global features as we increase our library of 3D datasets available to our deep learning framework in future.
During analysis of our results, we found that some of generated xy planes (z normal ) in all three of the investigated datasets (Ti-6Al-4V, Ti-7Al 1 %, and Ti-7Al 3 %) have minor noise, as shown in 9.In our future work, we will be focusing on reducing this noise in the estimated xy planes by using 3D neural network architecture.

Figure 1 :
Figure1: Q-RBSA EBSD Resolution Enhancement Framework: In the experimental pipeline shown in (a), material researchers collect EBSD orientation information for each (x,y) coordinate in a given sectioning plane, and then remove material using laser ablation or robotic polishing to reach the next plane in the z direction to build a 3D volume.In our framework, researchers collect EBSD information from a reduced set of points (blue planes), omitting some planes that would normally be gathered (gray planes).The missing information (green planes) are then generated in 2D as a series of (x,z) or (y,z) planes by our quaternion-based, physics-informed deep learning framework, shown in (b).Here, the network takes advantage of orthogonal independence to efficiently generate 3D volumes using less data, as large amounts of EBSD are costly and the choice of serial sectioning direction has minimal impact on the resultant final volume.
1 i + p 2 j + p 3 k, and f represents any standard and real-valued activation function such as Sigmoid, Tanh, and ReLU.In our experiments, we used ReLU activation.Our network architecture shown in figure 2 consists of three parts: a shallow feature extraction module, a deep feature extraction module, and an upsampling and reconstruction module.

Figure 2 :
Figure 2: Quaternion Residual Block Self-attention (QRBSA) Network: A sparsely sectioned 2D EBSD map is given to the QRBSA network (a) to generate a highresolution 2D EBSD map.QRBSA consists of three parts: a Shallow feature extractor, a Deep feature extractor, and Upsampling and Reconstruction.The deep feature extractor uses a residual architecture (b) where residual self-attention blocks (c) are modified with quaternion convolution layers and transformer blocks (d) to efficiently handle orientation data.Quaternion convolution is used to learn local-level relationships, while quaternion transformer blocks learn the global statistics of feature maps.Pixelshuffle layer, modified for 1-dimensional upsampling, is used in the upsampling and reconstruction block to upsample feature maps.

Figure 4 :Figure 5 :
Figure 4: Visual comparison of network output for example 2D EBSD maps with a scale factor of 4: The predicted EBSD maps (Network Output) from the QRBSA network are similar to the ground truth EBSD maps in for both the Ti-6Al-4V dataset (a) and both Ti-7Al datasets (b) and (c).

Figure (
Figure (IPF) maps from the EBSD data for scale factors of 2 and 4 as shown in table

Figure 6 :
Figure6: Quaternion Convolution: In a real convolution neural network, correlation, a scalar quantity, is computed between independent kernels and channel dimension of quaternion feature maps.In a quaternion convolution neural network, the Hamilton product, a vector quantity, is computed between quaternion kernels and quaternion feature input maps.The parameters in quaternion kernel is restricted according to quaternion algebra[31].

Figure 8 :
Figure 8: Quaternion CNN and Real CNN: Both QCNN and RCNN have same number of layers except basic convolution operation layer.In QCNN, total number of trainable parameters are reduced significantly which give us room to add more complexity such selfattention layer to learn global features.

Table 3 :Figure 9 :
Figure 9: Noise in Estimated XY Plane: The deep learning framework is able to estimate the missing xy planes in z dimension but there are some minor noises in some of the xy planes.

Table 1 :
PSNR/SSIM: Comparison of PSNR/SSIM and complexity for different networks for scale factors 2 and 4: Columns represent number of trainable parameters and PSNR/SSIM for different titanium datasets.A larger number is desired for both PSNR/SSIM.

Table 2 :
PSNR/SSIM: Comparison of PSNR/SSIM and Complexity for different networks for scale factor 2: Columns represent number of trainable parameters and PSNR/SSIM for different titanium datasets.A larger number is desired for both PSNR/SSIM.