We monitor and observe neural activity in order to gain insight into behavior, cognitive functions, and basically any other activity controlled by the brain. In the past, researchers mainly made these discoveries by measuring a single neuron in relation to a given task. Nonetheless, as more and more research into brain function and neurons has been conducted, it has become clear that every activity or task is not the consequence of a single neuron firing, but rather, numerous neurons fire in synchronization to perform the particular goal. That’s why researchers have been trying to find techniques to record and interpret data from a large number of neurons all at once. Thousands of neurons can now be recorded at once thanks to improvements in brain recording technology. Today, we can image thousands of neurons in a single session using calcium imaging or record neuronal spikes using electrode arrays with thousands of electrodes. However, the growth of the analysis methodologies needed to examine the data from the recording lagged behind the growth of such techniques. Thus, although we can record the activity of thousands of neurons in the brain, we lack sufficient processing tools that can interpret such high-dimensional data. One analysis approach that has been researched and developed extensively is “**Neural Manifold Learning**.” This method relies on the notion that crucial details present in high-dimensional brain data can be mapped to low-dimensional latent data.

# What Is Neural Manifold Learning?

**Manifold learning, also known as non-linear dimensionality reduction, is a popular machine learning method for mapping high-dimensional datasets such as images and audio to a low-dimensional subspace. ** In mathematics, a manifold is an abstract space where each point has a neighborhood similar to the space around a point in Euclidean space. They are defined in terms of dimensions. A one-dimensional manifold, like a line or a circle, has points whose neighborhood will resemble a line segment. Consequently, in a two-dimensional manifold, like a sphere, the neighborhood will resemble a disk. If you want to have a deep insight on manifolds, do give this article a read! The manifold hypothesis states that the latent manifold, which may be discovered by linear or non-linear approaches such as principal component analysis and t-SNE, is embedded within this manifold of high dimensional data.

A Neural Manifold Learning algorithm takes as input a high-dimensional brain activity matrix and gives as output an embedded lower-dimensional matrix with properties resembling those of high-dimensional data but with fewer independent variables. Typically, the manifold involved in such low-dimensional action is one dimension, which may appear curved globally but is linear locally. In other words, the neighborhood of a point in the space represents a line segment. This also helps in visualizing the high-dimensional data in a 3D coordinate system for better interpretation.

# Neural Manifold Learning Algorithms

A number of manifold learning algorithms, both linear and non-linear, are utilized in machine learning and, more especially, in neuroscience. Even though the steps and attributes of each process may be different, the end result is always the same: a mapping from high-dimensional activity to lower-dimensional latent dynamics.

## Principal Component Analysis

Many computational neuroscience studies employ principal component analysis (PCA) as a standard linear dimensionality reduction method. The covariance matrix of the high-dimensional data is decomposed into eigenvectors, or principal components, that capture the maximum variance of the data. These principal components are computed as a linear combination of the individual neurons’ activity while also maximizing the variance. For a step-by-step explanation, read this article.

## Multidimensional Scaling

MDS is based on the visual representation of distance or dissimilarity between two sets of vectors or individual neurons’ activity. Typically, either the euclidean distance or the cosine dissimilarity between the vectors is used to determine the dissimilarity measure. By minimizing a loss function termed strain, we can transfer this distance matrix to a lower-dimensional matrix in which the distances are proportionate to their original values. Simply put, we estimate neuronal activity in the lower dimension by minimizing a strain measure that compares paired distances in the high and low dimensions. Then, to determine the low-dimensional activity, simply determine the eigenvectors of the modified distance matrix. Read in more detail about the MDS technique here.

## Isomap

Isomap is a widely used non-linear dimensionality reduction method that preserves the geodesic distance between pairs of points in the dataset while reducing the dimensionality. Like the distance between two locations on a map, the geodesic distance is the shortest route between two points that is conceivable in the dataset. However, geodesic distance cannot be calculated directly. To do this, we estimate geodesic distance by computing the euclidean distance between each point and its k closest neighbors in the high-dimensional data. The MDS method is then used to reduce the dimensionality of this weighted graph while maintaining the same inter-point distance. Read in more detail about Isomap here.

## Locally Linear Embedding

LLE is a non-linear approach that keeps the distances between points in the dataset constant, and therefore the manifold’s geometry. In the same vein as Isomap, we determine the k nearest neighbors of a data point and then compute weights so that every point on the manifold can be found by adding up the weights of its k nearest neighbors. Each point in the lower-dimensional space is then calculated as the sum of its k nearest neighbors in the lower-dimensional subspace, using the weights determined in the previous step. Learn more about the steps involved in LLE here.

## Laplacian Eigenmaps

Similar to Isomap and LLE, LEM preserves the neighborhood information of each point in the high-dimensional data while mapping it to the lower-dimensional data. Given the points in the high-dimensional manifold, identify the n closest neighbors to the point and assume them to be connected. The weight between these connected points is considered 1, while it is 0 for the unconnected points. The lower-dimensional points are located by minimizing a cost function that moves connected points closer together and unconnected ones farther apart. Read the original paper on Laplacian eigenmaps here.

## t-distributed Stochastic Neighbor Embedding

t-SNE is a non-linear statistical method for dimensionality reduction used extensively in signal processing, bioinformatics, computer research, genomics, and computational neuroscience. The method tries to preserve the local distances in high-dimensional data when mapping to low-dimensional data. Initially, any metric (often Euclidean distance) is used to calculate the degree of similarity between pairs of neural activities in the high-dimensional data. This is then transformed into a probability distribution. Similarly, the probability distribution for low-dimensional data is evaluated with the unknown variables. Minimizing the Kullback-Leibler divergence, a measure of the dissimilarity between two probability distributions is used to determine the values of the variables. By doing so, we can map the action to a low-dimensional space while ensuring that the two probability distributions are comparable. Read in more detail about the t-SNE technique here.

## Probabilistic Latent Variable Models

The latent variable model maps the response or manifest variables in the dataset to a set of latent variables that are not directly observable. The parameters of the latent variables can then be used to depict the probability distribution of the neural activity. Finally, the parameters for the latent variables and their values are determined by maximizing the probability distribution. Neuroscientists utilize a variety of LVMs, including GPFA (Gaussian Process Factor Analysis) and GMM, to transform high-dimensional neural activity into lower dimensions. Furthermore, deep learning methods such as autoencoders are often used to both map the activity to low dimensions and decode the denoised high-dimensional activity from these latent variables. Learn more about LVMs here.

Neural Manifold Learning has emerged as an important tool for analyzing population-level activity and tying together brain responses with the actual execution of a task. Not only does this method improve our comprehension of behavior and neural dynamics, but it also improves the precision with which prosthetic devices, which rely heavily on decoding the task from neural activity, perform their function. It’s also useful for comprehending the effects of diseases like Alzheimer’s and Parkinson’s on brain dynamics throughout time.