Google Open Sources Approach to Visualize Large and High Dimensional Datasets using tSNE

Pranav Dar 10 May, 2019 • 3 min read

Overview

  • An intern at Google has pioneered an approach that uses tSNE to visualize high dimensional datasets
  • This method generates plots faster than anything created before, and it can be executed on your web browser!
  • It has been created and open sourced in the TensorFlow.js family

 

Introduction

Dealing with high dimensionality data has always been a major challenge for data scientists. You are expected to mine for hidden features by exploring the vast terrain of the (mostly) unknown dataset, which contains hundreds, if not thousands, of variables. How in the world do you even begin?

To deal with this, the tSNE algorithm was created. Sure you still have the likes of PCA you can leverage but when you have a MASSIVE dataset and want to search for a pattern in non-linear style (a more advanced method), tSNE has proven to be more effective. It maps multi-dimensional datasets on to two or more dimensions. It also reduces the number of plots you need to generate when dealing with a huge number of dimensions.

If you’re new to tSNE, or need a refresher, check out this guide that comprehensively explains this wonderful concept.

But one of the limitations with tSNE has been that it is computationally very complex. Even though it is meant for large datasets, this restriction has limited it to relatively small datasets. So an intern at Google decided to pioneer a novel approach to maximize the use of tSNE. His method relives heavily on modern graphics hardware.

This new approach generates embeddings way faster than any other technique in this space. But where it really stands out is that it can be executed in a web browser! How, you ask? This is where TensorFlow.js comes to the fore. Google’s method leverages GPU capabilities through WebGL, a JavaScript API that is used for rendering 2D and 3D graphics within any browser. Check out our coverage of TensorFlow.js here.

The team, led by the intern, then tested their approach on the popular MNIST handwritten images dataset. What used to take 15 minutes to calculate can now be done in real-time and in the web browser itself. Talk about breakthroughs!

The above image gives an overview of this approach. I have summarized it below, taking an excerpt from their research paper:

  • First image: the minimization of the objective function is computed in linear time by making use of a scalar field
  • Second image: and a 2-dimensional vector field
  • Third and fourth images: The fields are computed on the GPU by splatting properly designed kernels using the additive blending function of the modern rendering pipeline. The rest of the minimization is treated as a tensor computation pipeline that is computed on the GPU using TensorFlow.js

I have listed a few resources below I encourage you to check out in order to get an in-depth understanding of this approach:

 

Our take on this

If you’ve ever dealt with high dimensional datasets, you might already be on your way to using this approach! This tSNE approach could be a real game changer for organizations that deal with huge datasets and don’t have a lot of time on their hands.

One of the (few) limitations currently is it’s ability to only generate 2D visualizations (doesn’t work with 3D yet). But I don’t see this as being a problem since most of the visualizations data scientists work with is in the 2D space (unless you work with geospatial data).

“Google Open Sources” has become such an oft-used phrase these days. I love that they consistently open up their research results to benefit the overall ML community. Let me know what you think of this technique in the comments section below.

 

Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!

 

Pranav Dar 10 May 2019

Senior Editor at Analytics Vidhya. Data visualization practitioner who loves reading and delving deeper into the data science and machine learning arts. Always looking for new ways to improve processes using ML and AI.

Frequently Asked Questions

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

Responses From Readers

Clear

Munesh Singh Chauhan
Munesh Singh Chauhan 24 Jan, 2019

Hi Pranav Can you please possibly provide a link to some good research papers in the domain of deep learning usage for visualisation of large datasets. Thanks.