The topology of neural activity in mouse visual cortexThe topology of neural activity in mouse visual cortex

This article is about my research in computational neuroscience on the Amgen Scholars Program in Munich during the summer of 2022. In short, we studied the function of mouse visual cortex using topological analysis. You can take a look at the code or at the poster.

Abstract

To better understand general features of visual processing, we investigated the topology of neuronal activity of mouse primary visual cortex in response to static gratings and natural images. Both the set of static gratings with varying orientations and phases as well as the set of local patches of natural images exhibit topological features of a Klein bottle. A Klein bottle is a surface which is not orientable; if one moves on this one-sided surface, the path can be followed back to the point of origin, but “back” and “front” might be interchanged. For gratings, we used silicon-probe recordings of 41 neurons from a fixed-head experiment. The topology of this stimulus set is precisely a Klein bottle. We show that this topology is preserved in the neuronal activity. The neural responses to natural images were recorded with calcium imaging. Previous studies indicated that small patches of natural images have the Klein bottle topology. We extended these findings by showing that the activity of neurons with similar receptive fields (i.e., neurons that were responsive to the same image segments) possesses the Klein bottle topology, too, and that the decoded loop parameter correlates with the orientation of the gratings that approximate image patches. This result indicates that at least from a topological point of view, images are locally represented like gratings in the visual cortex.

Introduction to topology

In simple terms, we can think of topology as the study of the features of shapes (sets) which are persistent during their continuous transformations. We use it, because we are interested in the general structure of the shapes we are working with rather than their geometry. We are interested in two types of sets:

Topology of image sets To work with image sets, we should parametrize them and look at which parameter values correspond to similar image. Consider set of images with horizontal line: It has just one parameter, x: the distance from the line to the top. This image set is isomorphic to a line segment [0,1]: we can map an image to its corresponding point on the line, such that images will be similar if and only if their corresponding points are close. Let's now look at images where lines have different orientations: We, again, have one parameter. We could map it to a line again, but then, for example, images for 0o and 360o would map to different points on the line even though they are similar. That's why the actual topology of this set is a loop: there is a one-to-one correspondence between points on a circle and images with close points corresponding to similar images. The grating images have two parameters orientation and phase (we fix frequency and contrast): Both parameters are cyclic, but if we fix phase and go 180o in orientation, we would “arrive” at the opposite phase. That's why we should “glue” the sides of the square above with a twist and get a Klein bottle.

Method

  1. Data were obtained by recording neural activity during fixed-head experiments with mice while presenting stimulus images on a screen. For each of K images (400 for gratings with 50 repetitions, 2800 for natural images) and for each of N neurons (41 for gratings, 10K for natural images), its firing rate (the frequency of spikes the main measure of its activity) was calculated. Thus, we get K points in an N-dimensional space if we treat the firing rate of each neuron as a dimension.
  2. For the natural image stimuli, only a portion of the neurons was selected (more on that later).
  3. It's hard to work with N-dimensional spaces where N is more than 40, so this step and the next are reducing the dimensionality. For, that, we first do Principal Component Analysis (PCA).
  4. After PCA, we use Uniform Manifold Approximation (UMAP) to get to 4 dimensions. Thus, we get a shape that is simpler, but isomorphic to the source. We can then visualize 3 of the dimensions, you will see figures later.
  5. We are interested in studying topological features of these shapes. For that, the main tool is persistence analysis. For instance, we can detect persistent loops in the shape using it.

Gratings

As explained above, the topology of the stimuli set in this case is a Klein bottle. After processing the experimental data obtained from the Laura Busse lab at LMU using silicone probe recordings (41 neurons), this the resulting shape after PCA and UMAP:

The point clouds above are obtained from the neuronal activity and are topologically isomorphic to the source shapes. On the left, points are color-coded by orientation of the corresponding gratings, on the right — by its phase.

Natural images

Hypothesis

The hypothesis is that if we looked at the neurons with the same center of their receptive field, we would see the Klein bottle topology because image segments can be locally efficiently represented as gratings. For that, for each neuron, we calculate its receptive field — the measure of how strongly the neuron's activity correlates with a specific point on the image (by averaging images with the neuron's activity as coefficients). Then, we measure how close the receptive field is to a single gaussian. We filter neurons for which the receptive fields are localized (they have a high score of similarity to a gaussian). Then, we filter neurons which have roughly the same receptive field center. Example of a receptive field: RF example

Results

For each image segment, we mapped a grating onto it using Fourier transform. Grating mapping

This diagram shows neuronal activity for natural images after PCA and UMAP colored by the decoded loop parameter (on the left) and by orientation mapped to the image segments (on the right), smoothed by averaging orientation of the nearest neighbors:

We got a good correlation of the decoded parameter with orientation in a range of the parameter values:

Conclusion

This result indicates that, at least from a topological point of view, images are locally represented like gratings in the visual cortex. This has connections to, for example, compression theory — JPEGs also use grating-like patterns to locally represent images. Also, previous research has shown that natural images in very small patches have roughly the Klein bottle topology.

If you have any questions or just want to discuss something, you can write me using email or on Telegram. Also, connect with me on LinkedIn.

References and acknowledgements

I would like to acknowledge my lab: the group leader Prof. Andreas Herz, my supervisor Martin Stemmler, and Arash Shahidi. I would also like to acknowledge the Laura Busse lab at LMU for providing experimental data for grating stimuli and the Stringer lab at Janelia for providing the natural images dataset. The paper On the Local Behavior of Spaces of Natural Images by G. Carlsson et al showed that 3-by-3-pixel segments of natural images have the Klein bottle topology. UMAP (McInnes, L, Healy, J, UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction, ArXiv e-prints 1802.03426, 2018) was used for studying the datasets.