Understanding Latent Space in Machine Learning

Learn a fundamental, yet often ‘hidden,’ concept of deep learning

Ekin Tiu
Towards Data Science
9 min readFeb 4, 2020

--

Source: Hackernoon, https://hackernoon.com/latent-space-visualization-deep-learning-bits-2-bd09a46920df

What is Latent Space?

If I have to describe latent space in one sentence, it simply means a representation of compressed data.

Imagine a large dataset of handwritten digits (0–9) like the one shown above. Handwritten images of the same number (i.e. images that are 3’s) are the most similar to each other compared to other images of different numbers (i.e. 3s vs. 7s). But can we train an algorithm to recognize these similarities? How?

If you have trained a model to classify digits, then you have also trained the model to learn the ‘structural similarities’ between images. In fact, this is how the model is able to classify digits in the first place- by learning the features of each digit.

If it seems that this process is ‘hidden’ from you, it’s because it is. Latent, by definition, means “hidden.”

The concept of “latent space” is important because it’s utility is at the core of ‘deep learning’ — learning the features of data and simplifying data representations for the purpose of finding patterns.

--

--