# Extraction of Flaw Signals from the Mixed 1-D Signals by Denoising Autoencoder
## 2 Methods and Materials
### Denoising Autoencoder  
Autoencoder is a type of ANN that reconstructs the network inputs referring to its features. Most of the time, the autoencoder is used for dimension reduction and feature extraction. The overall goal of an autoencoder is to enable the network to learn how to reconstruct input data so that the reconstructed output is equal to the input. After the encoding process by the encoder, the latent space of the autoencoder learns the input features. After decoding in the decoder, the network reconstructs the input based on the features learned in the latent space. The autoencoder explained above is prone to the risk of overfitting since it aims to reproduce or reconstruct the outputs from the inputs [10]. DAE is a derivative of many autoencoder techniques and is more robust than the ordinary autoencoder technique and can be used for correction of errors. It introduces random noise to the original input, and the noisy input becomes the new input and goes through the encoder so that the features of the input are learned or encoded. In the decoder, the non-noisy version of input is reconstructed by the features of the noisy input. Then, the loss is calculated by comparing the output to the original input without noise, and it is expected to reconstruct the clean input that does not contain the random noise. Suppose that there were two types of inputs, \(x\), the non-noisy signal, and \(\widetilde{x}\), the noisy signal. In DAE, the encoder, as the \(\widetilde{x}\) is compressed, tries to map the features of \(\widetilde{x}\) to the latent space and the decoder reconstructs the non-noisy version of \(\widetilde{x}\) which in this study is referred to as \(x\prime\). Then, the mean square error (MSE) \begin{table}
\begin{tabular}{c c c c c} \hline  & **Krautkramer** & & **GE** & **Olympus** \\ \hline MWB 45-2 & WB 45-2 & WB 45-4 & MWB 45-2 & WB 45-2 & A4305 (45\({}^{\circ}\)) \\ MWB 60-2 & WB 60-2 & WB 60-4 & MWB 60-2 & WB 60-2 & A4305 (60\({}^{\circ}\)) \\ MWB 70-2 & WB 70-2 & MWB 70-4 & MWB 70-2 & WB 70-2 & A4305 (70\({}^{\circ}\)) \\ \hline \end{tabular}
\end{table} 
Table 1: Probes used in acquisition of the data. Figure 3: Digitalized UT system and inspection of pipe weldment specimen. between \(x\prime\) and \(x\) is calculated. As the MSE decreases, the \(x\prime\) becomes similar to \(x\). Figure 4 schematically illustrates the architecture of the DAE. Equation (1) shows the mathematical expression of denoising process [11,12]. \[\textit{Denoising}(x\prime,\ x)=\textit{minimize}[MSE(x\prime,\ x)], \tag{1}\]  
Further details of DAE can be found in Refs. [11, 12, 13, 14]. The ordinary DAE extracts the features from the noisy input \(\widetilde{x}\). The features of the noisy input are saved in the bottleneck hidden layer, and the decoder reconstructs the signal with the saved features. Then, the output, which is the reconstructed input by the DAE, is compared to the validation (the original signal without noise) and the loss is calculated. The DAE learns to decrease the loss, and after sufficient training, the output should look like the original input. [PERSON] et al. [11] used this ordinary denoising autoencoder to denoise and classify various types of flaws with different noise levels. In this study, however, we utilized the characteristic of decoder, which compares the output to the validation. We used the original mixed A-scan signal as the corrupted input \(\widetilde{x}\), and the algorithm tried to reconstruct the non-noisy flaw signal from \(\widetilde{x}\). We used the zero-padded flaw signal (\(x\)) as the validation for calculation of MSE. Figure 5 shows the difference of ordinary DAE and proposed DAE. Also, Figure 6 presents the mechanism used in this study to extract the flaw signal from the mixed signal. Before passing the input through the proposed DAE, a validation signal should be created from the input so that it can be used to minimize the loss.