1 of 28

The neural code�Decoding population activity

Kenneth D Harris, UCL

2 of 28

Code = correlation

  • In this course we use the word “code” to mean “correlation”

  • If a pattern of neural activity correlates with a stimulus (or action, or cognitive state), we say it codes for it.

  • “Decoding” is when we predict the stimulus, action, or state from neuronal population activity

  • If we can do this, it shows there is a correlation between the stimulus, action, or state and neuronal population activity

  • That’s all it shows

3 of 28

Decoding

  •  

4 of 28

Linear decoder

  •  

5 of 28

 

6 of 28

 

7 of 28

Multiple linear regression

  •  

8 of 28

Brain-machine interface from decoding of motor cortex

9 of 28

Brain computer interface

  • 7mins 39s

10 of 28

11 of 28

12 of 28

Bayesian decoder

  •  

13 of 28

Naïve Bayes decoder

  •  

14 of 28

Decoding position from place cells

  • Around 100 cells simultaneously (it was a lot in 1993!)

Actual trajectory�Decoded trajectory

15 of 28

Decoding images from visual cortex

16 of 28

Neural network decoder

  •  

17 of 28

Kim, Brackbill, Batty, Lee, Mitelut, Tong, Chichilnisky, Paninski

18 of 28

Kim, Brackbill, Batty, Lee, Mitelut, Tong, Chichilnisky, Paninski

19 of 28

Synthesizing viewed images from fMRI using diffusion models

Viewed image

Decoded image

Viewed image

Decoded image

20 of 28

Diffusion image synthesis (Dall-E, stable diffusion, etc)

Neural network

Caption

21 of 28

Diffusion models to reconstruct brain activity

22 of 28

23 of 28

Confirmatory analysis

  • Both choices and neural activity can drift slowly
  • Need to avoid nonsense correlations

  • If you are predicting a stimulus or task variable that was randomized, use pseudosession method

  • If you are predicting a behavioral choice, use session permutation method

24 of 28

Example of pseudosession test

Original

Different blocks

No encoding of stimulus

Encoding of stimulus

Prediction error

Prediction error

25 of 28

Pseudosession method does not require independent trials

26 of 28

Session permutation test

Behavior, session 1

Neurons, session 1

Behavior, session 2

Neurons, session 2

Behavior, session 3

Neurons, session 3

Behavior, session S

Neurons, session S

 

27 of 28

Session permutation test

Behavior, session 1

Neurons, session 1

Behavior, session 2

Neurons, session 2

Behavior, session 3

Neurons, session 3

Behavior, session S

Neurons, session S

 

 

28 of 28

Session permutation test