scieee AI-readable full text Open interactive document viewer

Exploring Supervised and Unsupervised Learning with 1D Autoencoders: Three Case Studies

Liso, Adriano; Renò, Vito

Abstract

In this study, the application of one-dimensional convolutional autoencoders is investigated under supervised, one-class unsupervised, and full unsupervised learning paradigms and across three case studies, respectively. The results demonstrate the adaptability of convolutional autoencoders to diverse sensing modalities and problem settings, with each paradigm offering complementary strengths depending on data availability. Promising outcomes across all three scenarios suggest that the proposed frameworks can address heterogeneous challenges in non-destructive testing and beyond.

Full text

Exploring Supervised and Unsupervised Learning with 1D Autoencoders: Three Case Studies line 1: Adriano Liso line 2: STIIMA line 3: CNR line 4: Bari, Italy line 5: [email protected] line 1: Vito Renò line 2: STIIMA line 3: CNR line 4: Bari, Italy line 5: [email protected] Abstract— In this study, the application of onedimensional convolutional autoencoders is investigated under supervised, one-class unsupervised, and full unsupervised learning paradigms and across three case studies, respectively. The results demonstrate the adaptability of convolutional autoencoders to diverse sensing modalities and problem settings, with each paradigm offering complementary strengths depending on data availability. Promising outcomes across all three scenarios suggest that the proposed frameworks can address heterogeneous challenges in non-destructive testing and beyond. Keywords—autoencoder, anomalies, non-destructive testing I. INTRODUCTION Anomaly detection is a key challenge in non-destructive testing, where conventional approaches often rely on manual inspection or handcrafted features. Deep learning has recently emerged as a powerful alternative, enabling automatic feature extraction and robust performance across heterogeneous scenarios. In particular, one-dimensional convolutional autoencoders (1D-CAEs) have proven effective in learning compact representations of time-series signals and identifying deviations from normal patterns, as shown in [1], [2], [3], [4], [5], [6]. This work explores the versatility of 1D-CAEs under one-class unsupervised, unsupervised, and supervised paradigms applied to three distinct case studies, respectively: detection of anomalous welds, inspection of composite materials, and estimation of soil moisture content in agricultural soils. II. MATERIALS AND METHODS A. Welds – one-class unsupervised approach The experimental setup consists of an aluminium plate crossed by a linear welding and a 3D laser profiler moving on a linear slide parallel to the welding. Different series have been acquired from different plates by moving the laser along the slide. Each series corresponds to a fixed position of the laser and represents the thickness of the aluminium plate along the direction orthogonal to the linear welding. After a preprocessing step, the dataset consists of 1.300 anomalous and 1.300 normal series of length 985, normalized between 0 and 1. The encoder of the autoencoder is composed by two layers: a 16-channel and a 8-channel 1D-convolution both followed by ReLU; the decoder is composed by a 16-channel and 1-channel 1D convolutional layers, the first one followed by ReLU, the second one by Sigmoid activation function. The matching between the input series length and the corresponding output has been obtained by padding with zeros the output of each layer. Kernel size and stride of all layers have been set to 7 and 1. The Mean Square Error (MSE) between input and output of the network constitutes the loss function (reconstruction loss). The model has been trained with a 10fold cross validation procedure including 90% of normal series during training and tested on the remaining 10%, along with all anomalous ones. The number of epochs and the batch size have been fixed to 10 and 32, respectively; mean absolute error and Adam have been chosen as the loss function and optimizer, respectively. B. Composite material – non-supervised approach The inspection system was based on the Laser-Excited Acoustics technology, which enabled contact-free ultrasonic testing using fibre-coupled pulsed lasers to generate a broadband ultrasound signal within the sample. Defects such as delamination or porosity affect propagation and e could be detected via a single-sided (i.e., reflection) or transmission setup. In this case, a portion of an 8-ply carbon fibre-reinforced plastic plate has been scanned using the transmission setup to detect delamination defects placed at different depths and positions within the sample. The final dataset consists of 14300—corresponding to 130 × 110 pixels—time series with length 1264. Also in this case data are normalized between 0 and 1. The autoencoder is composed by a dense encoding layer with 3 neurons followed by ReLU, and a dense decoding layer, followed by Sigmoid activation function, that restores the original size of the series. Also in this case, the loss function is the MSE between input and output of the network. The model has been trained with 60% of the dataset, including all the samples (normal and anomalous) for 50 epochs and a batch size of 32, optimized by Adamax. C. Soil moisture – supervised approach By using the open-source software GprMax, a virtual scenario has been created that represents an antenna moving on the soil. Ground Penetrating Radar (GPR) operates by emitting electromagnetic waves into the ground and analyzing the backscattered signals reflected from various subsurface soil layers. The training and test data sets have been simulated under different scenarios. The soil used to generate the training data set consists of a homogeneous material box with fixed values of conductivity and permeability, and permittivity directly derived from Topp equation, by using 9 appropriate values of water content (see [6] for further information). For each value of relative permittivity 300 A-scans have been simulated, corresponding to 300 different distances of the antenna from the top of the soil The single A-scan represents the signal recorded by the receiver of the antenna, which consists of the three components of the electric field and three components of the magnetic field. Since the components of the magnetic field are discarded, the training dataset consists of 9 classes of 300 samples (3channel A-scans). The test dataset consists of 3-channel A2025 I-RIM Conference October 17-19, Rome, Italy ISBN: 9788894580570 10.5281/zenodo.17629825 191 scans recorded by the antenna while it moves horizontally above different heterogenous soils, characterized by the same 9 values of water content as before. The test dataset that is generated consists of 9 classes, each one containing 30 samples. The A-scans of the training set, labeled with the correspondent permittivity and water content, are normalized and fed to the autoencoder, whose encoder learns a mapping between the A-scans and two mentioned parameters. In particular, the autoencoder consists of two encoding layers and two decoding layers, followed by the hyperbolic tangent activation function. The first layer of the encoder is a 1D convolution that reduces the size of the input from 2598 and 3 channels to 432 and 1 channel, the second layer is a dense layer that projects its input onto a 32-dimensional latent space. The decoder shares a symmetric structure with the encoder: the first dense layer brings the dimension of its input to 432, the second layer is a transpose convolution that outputs an array of size equal to the original dimension of the input of the encoder. The loss function of the autoencoder consists of the usual reconstruction term, and an additional term that compares, through the MSE, the first two components of the latent array and the 2-dimensional array containing the ground truth parameters of relative permittivity and water content. The number of epochs and the batch size have been fixed to 50 and 60, respectively. III. RESULTS In the case of welds, the threshold for the classification of an anomalous test series has been chosen as one standard deviation above the mean reconstruction error of the train data series. Among the 130 normal test samples, only 13 have been misclassified. Moreover, no anomalous test sample has been classified as normal: all the 1300 anomalous test samples have been correctly detected. This is due to the fact that the training data samples belong to the normal class. Then, the model is extremely able not to confuse anomalous series with normal series. One can conclude that if a series does not belong to the same class as training samples then it certainly will not be misclassified. In this case of composite material, embeddings undergo a t-SNE algorithm, a non-linear dimensionality reduction technique that preserves the local structure of data., and are finally clustered by DBSCAN: the biggest cluster is reasonably assumed as the background, all the rest as anomalous pixels. The appropriate metric to be considered for unbalanced dataset like this is the balanced accuracy, i.e. the mean between the recall of positive samples and the recall of negative samples. The model shows a balanced accuracy of 94.43% and a F1 score of 75.26%. This latter values is lower than that one might expect due to misclassification of boundary pixels, classified as anomalies. This behaviour can be considered as not totally negative, since boundary time series are actually very different from background pixels and the model is able to detect this difference. For comparison with other anomaly detection techniques (see [7]), Isolation Forest and One-Class SVM have been trained in the default configuration of parameters, with contamination—the percentage of anomalies in the training set—close to zero in the case of welds and equal to the percentage of anomalous pixels in the case of composite material. The results showed poor values of metrics, with an exception for the Isolation Forest applied to welds, that has been able to classify correctly all the test samples. As to soil moisture, the described procedure of training the network with samples relative to homogeneous and testing it on samples that come from heterogeneous soil slightly depends on the initialization of the layers. Without the supervised constraint in the loss function, the network fails to consistently organize its latent space in a physically interpretable way, and the model becomes highly dependent on initialization. Including the supervised constraint, the distribution of the error of the predictions around the ground truth, after 30 instances of the model have been trained, suggests the possibility to correct the predictions with the mean value of the error relative to each class. The correction on the value of the moisture is smaller than distance between the value of moisture of two consecutive classes. The adjusted mean absolute error falls below 0.01. IV. CONCLUSION This work has explored supervised, one-class unsupervised, and unsupervised 1D-CAEs for soil moisture estimation and anomaly detection in welds and composite materials. The results demonstrate the effectiveness of these methodologies across different domains, confirming their versatility and robustness and highlighting the potential of extending the proposed approaches to larger and more diverse datasets, which would allow for a more comprehensive assessment of the networks’ generalization capabilities. REFERENCES [1] Masci, J., Meier, U., Cire¸san, D., and Schmidhuber, J., “Stacked convolutional auto-encoders for hierarchical feature extraction,” in [Artificial Neural Networks and Machine Learning–ICANN 2011: 21st International Conference on Artificial Neural Networks, Espoo, Finland, June 14-17, 2011, Proceedings, Part I 21], 52–59, Springer (2011). [2] Adriano Liso, Angelo Cardellicchio, Cosimo Patruno, Massimiliano Nitti, Ettore Stella, and Vito Renò. Awandt: assessing welding anomalies via non-destructive tests. In Multimodal Sensing and Artificial Intelligence: Technologies and Applications III, volume 12621, pages 66–74. SPIE, 2023. [3] Lan-Ling Fu, Jin-Shui Yang, Shuang Li, Hao Luo, Jian-Hao Wu, Artificial neural network-based damage detection of composite material using laser ultrasonic technology, Measurement, Volume 220, 2023, 113435, ISSN 0263-2241. [4] Liso, A., Patruno, C., Cardellicchio, A., Ardino, P., Gallo, N., del Prete, G., Dentico, V., Vespini, V., Coppola, S., Ferraro, P., and Ren`o, V., “A deep learning-based probabilistic approach for nondestructive testing of aircraft components using laser ultrasonic data,” IEEE Access 13, 66761–66773 (2025). [5] Zheng, J., Teng, X., Liu, J., and Qiao, X., “Convolutional neural networks for water content classification and prediction with ground penetrating radar,” IEEE Access 7, 185385–185392 (2019). [6] Adriano Liso, Nuria Rodríguez Calderón, Vega Perez-Gracia, Tiziana Rita D'Orazio, Vito Renò, 'Detecting the content of water in agricultural soils by GPR data and autoencoders,' Proc. SPIE 13570, Multimodal Sensing and Artificial Intelligence for Sustainable Future, 135700F (4 August 2025). [7] K. Lukito, A. F. Ihsan and Hasmawati, "Comparison of Isolation Forest and One Class SVM in Anomaly Detection of Gas Pipeline Operation," 2023 3rd International Conference on Intelligent Cybernetics Technology & Applications (ICICyTA), Denpasar, Bali, Indonesia, 2023, pp. 118-123. 192