3
$\begingroup$

I have a neural network that maps my data samples to a 64-dimensional embedding. I wish to visualize a few of these embeddings (between 30 and 600) through a 2-dimensional projection, and I plan to use umap to do that. Would providing more embeddings sampled from the dataset along with the ones I want to project help the algorithm to identify the manifold and improve the quality of projection?

$\endgroup$
2
  • $\begingroup$ Let me see if I understand you correctly, you learn a 64-dimensional embedding from your data using a neural network and you want to reduce it to a 2-dimensional space to visualize using UMAP? What prohibits you of providing more embeddings sampled from the dataset? Intuitively speaking, it sounds to me having more data points would make a difference in the manifold (though I have no proof of it!; have to dig more). $\endgroup$ – TwinPenguins Jan 1 '19 at 15:01
  • $\begingroup$ It's merely a matter of performance. I'd like to have an idea of the order of magnitude of the number of samples needed to have a meaningful projection. More samples for UMAP means I need to forward more samples through the network and that UMAP will train for longer. With less than ~50 samples, I can run UMAP in my mainloop and not worry much about the impact. With more than that, I'll need to run a secondary thread. $\endgroup$ – Le Frite Jan 1 '19 at 15:50
1
$\begingroup$

Yes, more data will improve the quality of the embedding UMAP can produce. While UMAP is somewhat robust/stable under subsampling in general you will get significantly better results with more data. It is also worth noting that most UMAP implementations are not designed for very small datasets (they make some optimization choices that assume a a reasonable dataset size). In practice it is probably best not to use UMAP with less than 100 or so data samples.

$\endgroup$
1
  • $\begingroup$ What I've found since - by experimenting around - is that the projection of a very few samples shares the "same ordering" as the projection of these same samples but with a few hundred additional samples fed to UMAP for training. I.e., while the distance between the projected points varies between the two projections, the same clusters appear. When it comes to clustering alone, it seems that adding more samples does not influence the end result much. $\endgroup$ – Le Frite Mar 23 '19 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.