Skip to content

Latest commit

 

History

History
79 lines (61 loc) · 4.37 KB

README.md

File metadata and controls

79 lines (61 loc) · 4.37 KB

Tuning Manifold Charting: the Official Code Base for the Manifold Paper: "the Tuning Landscape of the Ventral Stream", 2022 Cell Reports

Explore the dataset in Colab notebook!

  • General walk through of Evolution and Manifold data. Open In Colab
  • Visualizing population activity
  • Interpret Evolution using Deep Factor Modelling.

Data Processing Flow Chart

Dataset Structure

Our formatted and reduced neural dataset is stored in .mat format as a structure array, which can be accessed from Matlab or Python.

  • Each experimental session has one struct corresponding to Evolution, and one struct corresponding to Manifold experiment.
  • Array is organized in the order of experiment time for each monkey.

We provide download links for these formatted data in matdata subfolder.

Some analyses require access to the image data folder (16Gb), which will be hosted and downloadable online.

Code Structure

Our code is written in Matlab and Python. Matlab for experimental control, most statistical analysis of in vivo data, while Python esp. pytorch for the in silico experiment and modelling.

Deep neural networks DNN

We curated a library of deep neural nets classes to use in our analysis, some implemented in matlab, some interfaced with pytorch implementation. These classes are used both in online experiments and analysis.

  • Weight for our matlab implementation of FC6GAN is hosted in xxxx.

Black box optimization algorithms optimizers

We open source our adaption of Cholesky-CMA-ES optimization algorithms, and the ZOHA_Sphere algorithms for the constrained optimization on the hyper-surface of a hyper-sphere. The description and characterization of both optimizers were detailed in our paper and repo.

Test and demo code, to be added.

Experimental Control experiment_ctrl

Our experiments are controlled by custom Matlab script using Monkeylogic, with the image generator in matlab. The manifold image explorations are generated by Python / matlab after the Evolution finish.

Data Analysis analysis

  • Receptive field mapping.
  • Evolution trajectory analysis
    • Successfulness.
    • Coordinate of the best generation.
    • Convergence speed.
  • Single Tuning Map Characterization
    • Tuning Map, basic stats (ANOVA, F statistics).(calc_tune_stats)
    • Kent function fitting of tuning map, extract Kent parameters. (analysis\Kent_func)
    • Non-parametric statistics of tuning maps: Volume under the Surface (VUS), Peak location
    • Dirichlet energy of tuning map as measure of smoothness.
    • Population analysis: across areas, SU-MU pair Manif_Map_Stat_Pop_Synopsis.m, Manif_Map_SUMU_cmp.m
  • Radial Tuning Curve analysis
    • Image distance matrix using LPIPS and various image distance measure.
    • Radial Tuning curve over several different spaces; AUC for tuning curve.
  • Relationship between Evolution trajectory and Manifold tuning
    • Peak location
    • Sharpness
  • Evolution trajectory comparison in Full space vs 50dim space
    • Evolution analysis code.
    • Plotting average evolution trajectory
  • Tuning Map Similarity
    • Geometry of electrode organization. Extract_Channel_Organization.m, spikeID2cortexDist
    • Measuring tuning map similarity by functional correlation on manifold
    • Tuning map similarity as a function to cortical distance Manif_Map_SpatialRelation.m
    • Tuning map similarity of SU-MU pairs Manif_Map_SUMU_corr.m
  • Naive Bayes Decoding
    • Decode coordinate on the spherical manifold with population response. (analysis\naiveBayes)

Plotting visualization

Some of our specialized plotting function

  • Plot single tuning maps with colored framed image / color maps.(Figure 2B)
  • Plot multiple tuning maps in an montage.(Figure 3A,5A)
  • Plot radial tuning curves.(Figure 2D)
  • Summarize score trajectory during Evolution (Figure 3F)
  • Plot tuning maps in the same configuration as the electrode array. (Figure 5)

Other more generic plotting functions (inspired by Seaborn library in Python)

  • Violin plot (wrap around Violinplot-Matlab)
  • Paired stripe plots, stripe plots with masks. (analysis\stats_plot)