## 2 Methodology
### Synthetic Data Generation with Variational Autoencoders  
Intuitively, in the autoencoder models, the deep and nonlinear complex architectures of the encoder and the decoder are able to provide greater dimensionality reductions while maintaining a low amount of reconstruction loss. However, in the absence of any regularization, autoencoders can lead to severe overfitting with a latent space lacking any structure and organization, which makes it impossible to generate new meaningful data. Unlike traditional autoencoders, VAEs are a kind of deep generative model whose implementation introduces a probability-based approach of deep autoencoders. In this way, a continuous latent space distribution is modeled by generating synthetic diverse and novel data samples with realistic variations. This approach allows for the capture of patterns not available in the original dataset. The architecture of VAEs is similar to traditional autoencoders. However, unlike traditional autoencoders, VAEs are implemented within a probabilistic framework, which allows for the generation of new data points. In other words, encoders of traditional autoencoders reproduce fixed points in the latent space, while the encoder of VAEs does not produce single points but a distribution, usually Gaussian, over the latent space, characterized by a mean and a variance. By sampling from the distribution of the latent space and subsequent reconstruction with the decoder, new data points are generated, synthetically augmenting the original dataset. To achieve this purpose, VAEs are trained by minimizing a loss function which combines two terms. On the one hand, one term measures the accuracy of the reconstruction provided by the decoder from an original input. This term is similar to that used to train traditional autoencoders. The second term includes a KL (Kullback Leibler) divergence regularization term whose purpose is to ensure that the learned latent probability distribution resembles a Gaussian distribution. This regularization term avoids overfitting and givesthe latent space the ability to generate new data, which is the main reason to consider VAEs as deep generative models. Figure 5 shows the difference between a deterministic traditional autoencoder and a probabilistic variational autoencoder. VAEs introduce probabilistic encoders and decoders. A probabilistic encoder, defined by \(\mathbf{p}(\mathbf{z}/\mathbf{x})\), describes the distribution of the encoded variable given the decoded one, while a probabilistic decoder, defined by \(\mathbf{p}(\mathbf{x}/\mathbf{z})\), describes the distribution of the decoded variable given the encoded one. In VAEs, the input is constrained to be encoded as a normal distribution over the latent space. Then, the decoding process is performed on sampled points from that distribution. Finally, the reconstruction error on these sampled points is backpropagated through the network for training. In this case, training is required not only to guarantee the performance of the encoding-decoding scheme, as usual, but also to organize the latent space by means of standard normal distributions as a result of the encoding procedure (regularization process), for which the mean and the covariance matrix of the normal distributions must be returned. In this way, VAEs provide a more effective and diverse use of the latent space, which makes it possible to work with a wider range of variations in the input data. By means of this capacity, all the dimensions of the latent space are explored instead of relying on only a few. This feature can become very powerful in applications such as damage monitoring and synthetic data generation. As VAEs are generative models, not only do they learn to compress and reconstruct the data, but they are also able to generate new data by sampling from the latent space and following the learned distribution of the training set.