Submitted by Blutorangensaft t3_10ltyki in MachineLearning
I would like to measure the smoothness of an NLP-autoencoder's latent space. The idea is to sample two Gaussian vectors v1 and v2 in the latent space of the AE, and generate N-1 points between them like so:
vi = v1 + (v2 - v1) / (N * i)
My idea is to then decode these vectors and measure the BLEU score between d(vi) and d(vi+1) for all N-2 comparisons.
Is this idea reasonable, do you have a better one? Is there a technique from AEs with images that can be useful here?
jackilion t1_j5zk1sb wrote
I'm not working on NLP but I have seen your idea in papers on diffusion models. You are basically linearly interpolating your latent space. There are other interpolation techniques you could try, but your idea will definitely give you some insight into your latent space.
Another possibiltiy would be some kind of grid search through the latent space, tho depending on your dimensions it could be too hard.
Lastly, you could visualize the latent space by projecting it into 2 or 3 dimensions via t-SNE or something similar.