'Could any information regarding distance/similarity in a latent space be retrieved?

I'd to retrieve information regarding a fixed set of features in a latent space in such a way that I could establish how similar given any two features are. For instance, using another approach such as KNN, I can retrieve the k closest features. There's any way to perform something similar using latent space based on distance metric or similarity?

NOTE: my array is composed of continuous values, not related to NLP.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source