Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.
/ dnnvsbrain Public archive

Representational Similarity Analysis in Python

Notifications You must be signed in to change notification settings

lappalainenj/dnnvsbrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Representational Dissimilarity Analysis

Representational Dissimilarity Analysis looks at the pairwise correlation of neural activity given different stimuli. How active are particular neurons of a subject if the subject is seeing a house versus if the subject is seeing an apple?

I explored representational dissimilarity of stimuli in medial temporal lobe and deep neural networks as part of my MSNE research project with Prof. Jakob Macke@CNE.

This package resulted from our project and provides automated representational dissimilarity analysis and comparison for preprocessed brain recordings, AlexNet, VGG, and ResNet.

Example usage:

We want to know how 10 images from 10 semantically different classes from Imagenet are represented in a AlexNet.

Here are the images (one column corresponds to one class):

diagram

And here's the code:

experiment = ImagenetExperiment()   # init experiment, links to the images
visualization = RDMVis(experiment)  # init plotter

dataset = RDMDataset(experiment)    # this is a pytorch dataset
activations = DNNActivations("alexnet", dataset) # automatically downloads the pretrained alexnet from pytorch

rdms = RDM(activations) 

vis.plot(rdms) 

Giving these results:

diagram

Note: Cleaning the code is still work in progress. Example notebooks should be available soon. Feel free to contact me.

About

Representational Similarity Analysis in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages