Variational autoencoders are a suitable framework for capturing sequence spaces. Variational autoencoders (VAEs) are a type of deep generative learning model whose goal is to generate new data that is similar to the input. VAEs consist of two main components: an encoder and a decoder (Fig. ). The encoder takes the input data and maps it to a lower dimensional representation called a latent space. Within this latent space, the encoded input is modeled as a normal distribution by two parameters, mean and variance. Subsequently, the decoder draws samples from this latent space distribution and maps these samples back to the original input data. The training of a VAE is based on minimizing the loss function which consists of two parts. The first part, called the reconstruction term, penalizes incorrect reconstruction of the input data, thus helping the model to make the latent space rich enough for the decoder to reconstruct the input sequences. The second part, called the regularization term, serves to constrain the latent space distribution of encoded values. The application of the regularization term is made possible by the encoder's ability to encode inputs into distributions, which are enforced to be close to normal distribution by measuring the Kulback-Leibler divergence. As a result, the individual distributions are forced to overlap within the latent space, ensuring that every latent space point, once reconstructed as a sequence by the decoder, aligns with the sequences corresponding to the nearby points in the latent space.