Using UMAP to visualize (very) high dimensional neural recordings

A fun little side project on intracranial recordings during DBS…

Updated: 2022-01-17

A very cool, and needed, trend in science right now is the movement away from studying scalars, or single numbers. A lot of very simple systems can’t be adequately described by single numbers, so it makes sense that for us to actually study a system in a meaningful way we’re going to need to study its multidimensional nature.

That’s very challenging for many reasons. One reason in particular is in the visualization of whatever lessons we learn.

One tool that many have heard of by now is Principal Components Analysis (PCA). This is a linear technique that tries to break up a dataset into directions of “maximal variance” or the most informative directions. How it does that then captures some useful information about the data while also providing a way to display the data sufficiently well. Visualization is one common reason to do dimensionality reduction.

PCA has major challenges, some of which I explore in my MinS post, and more nuanced approached have emerged, especially for visualization. t-distributed stochastic neighbor embedding (tSNE) is becoming quite popular and unwraps a high dimensional dataset into lower dimensions in a way that preserves, as best as possible, certain distances in the data. Think of it almost like flattening a candy bar wrapper, except that candy is a 10-dimensional Snickers. I know, sounds delicious.

tSNE has major issues, though these are mostly implementation-side issues where it’s mis-applied, and other approaches have emerged that may be more appropriate for neuroscience and, specifically, neuroengineering. I’ve started using UMAP, an alternative to tSNE, and am finding its rationale a lot (a) cooler and (b) more reasonable for the type of data that I’m exploring. I’m still in the middle of learning it (see the UMAP paper here) but wanted to share a cool picture capturing brain-wide coherences induced by DBS for Depression, the work of my PhD and soon-to-be publications (hopefully).

Coherence across measurable brain visualized

I’d comment more but… I’m not entirely sure yet what I’m looking at. All I know is I think it looks cool… And, as Dirac once said:

I think it’s a peculiarity of myself that I like to play about with equations, just looking for beautiful mathematical relations which maybe don’t have any physical meaning at all. Sometimes they do. - Paul Dirac

-V