Latent space trajectories of biological and artificial neural-networks

Abstract

Untangling black boxes can shed insight into highly complex systems. One class of methods is dimensionality reduction, which takes high dimensional data, and transforms it into an encoded representation. How this encoding works has potential to relate to underlying patterns of the data. In this project, I use Tensor Component Analysis (TCA) which can reduce Nth order tensors into factors representing each axis. TCA is applied to both biological and artificial neural networks, shown to provide insights on both sets. Visualizing this complex data becomes, but advanced visualization techniques help uncover meaning.

Resources

A jupyter notebook showing the TCA on the MNIST dataset with 30 models can be accessed HERE under the TCA repository.

However, since the biological data has not been published yet, it will not be available for some time. If you so desire, email me at ( ash@ucsc.edu )

The full paper can opened HERE

Overview

The Tensor Component Analysis package - tensortools was used with python to create all of these visualizations. Each package in the beginning imports needs to be installed (future instructions will be added in the original github repo, including a requirements file). The jupyter notebook can be run and will produce each visualization.

In general the data processing formats the data into the corresponding tensor (4D in this case, models x digits x neural weights x timesteps). The notebook covers the following:

  • Downloading MNIST (hand-written digit dataset) locally
  • Training 30 models and logging their weights
  • Doing TCA and plotting factors
  • Reducing the dimensionality and plotting a 3D trajectory which is interactive

Example Visualization

Factors identified through training on biological neurons:

ANN facts

Biological trajectory through reduced dimensions (reducing from neurons space to 3D):

Bio trajectory

Factors identified through training MNIST:

ANN facts

Trajectory of different paths that models take when training to classify MNIST:

ANN trajectory