Fitting predictive coding to the neurophysiological data (Spratling 2019)

 Download zip file 
Help downloading and running models
Accession:264514
MATLAB code for simulating the response properties of V1 mismatch neurons and for testing the ability of predictive coding algorithms to scale. This code performs the experiments described in: Spratling MW (2019) Abstract: "Recent neurophysiological data showing the effects of locomotion on neural activity in mouse primary visual cortex has been interpreted as providing strong support for the predictive coding account of cortical function. Specifically, this work has been interpreted as providing direct evidence that prediction-error, a distinguishing property of predictive coding, is encoded in cortex. This article evaluates these claims and highlights some of the discrepancies between the proposed predictive coding model and the neuro-biology. Furthermore, it is shown that the model can be modified so as to fit the empirical data more successfully."
Reference:
1 . Spratling MW (2019) Fitting predictive coding to the neurophysiological data. Brain Res 1720:146313 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Predictive Coding Network;
Brain Region(s)/Organism: Neocortex; Mouse;
Cell Type(s):
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: MATLAB;
Model Concept(s): Vision; Posture and locomotion; Sensory processing;
Implementer(s): Spratling, MW [michael.spratling at kcl.ac.uk];
function multisensory_integration(method)
%perform feature integration given two features represented by Gaussian population codes
if nargin<1 || isempty(method)
  method='DIM'; %'randb'; %
end
figoff=0;

%define range of values over which feature values can vary, and how these ranges
%are sampled in input space and by feature-integration neurons
lowest=-40;
highest=100;
instep=8;
centstep=15;

inputs=[fliplr(0:-instep:lowest),instep:instep:highest];
centres=[fliplr(0:-centstep:lowest),centstep:centstep:highest];
partition{1,1}=[1:length(inputs)];
partition{1,2}=length(inputs)+[1:length(inputs)];

stdW=15;
stdx=20;

%define weights, to produce a 2d basis function network, where nodes have gaussian RFs.
W=[];
for c=centres
  W=[W;code(c,inputs,stdW,0,1),code(c,inputs,stdW,0,1)];
end
W=W./2;
[n,m]=size(W);

%define test cases
X=zeros(m,4);
X(:,1)=[code(40,inputs,stdx),code(40,inputs,stdx)]'; %running and visual flow
X(:,2)=[code(40,inputs,stdx),code(0,inputs,stdx)]';  %running and no visual flow
X(:,3)=[code(0,inputs,stdx), code(40,inputs,stdx)]'; %no running and visual flow
X(:,4)=[code(0,inputs,stdx), code(0,inputs,stdx)]'; %no running and no visual flow
X(:,5)=[code(40,inputs,stdx), 0*code(0,inputs,stdx)]'; %running in dark
X(:,6)=[code(0,inputs,stdx), 0*code(0,inputs,stdx)]'; %no running in dark

%present test cases to network and record results
for k=1:size(X,2)
  x=X(:,k);
  switch method
    case 'DIM'
      [y,e,r]=dim_activation(W,x);
    case 'randb'
      [y,e,r]=randb_pc_activation(W,x);
  end
  figured(figoff+k),clf
  plot_network({x},{y},{e},{r},partition)
end

%define ranges used to bin running speed (p) and visual flow (v)
visual=[0:6:60]; %exp(-2.772588722:0.693147181:4.16);
motion=[0:6:60]; %exp(-2.772588722:0.693147181:4.16);
mismatch_fit=ones(length(visual),length(motion),length(e)).*NaN;
integrate_fit=ones(length(visual),length(motion),length(y)).*NaN;
vc=0;
for v=visual
  vc=vc+1;
  mc=0;
  for m=motion
    mc=mc+1;
    x=[code(m,inputs,stdx),code(v,inputs,stdx)]';
    switch method
      case 'DIM'
        [y,e,r]=dim_activation(W,x);
      case 'randb'
        [y,e,r]=randb_pc_activation(W,x);
    end
    mismatch_fit(vc,mc,:)=e;
    integrate_fit(vc,mc,:)=y;
  end
end

%show responses of error neurons to different combinations of p and v
figured(figoff+11),clf
num=size(mismatch_fit,3);
[rows,cols]=best_subplot_rows_cols(num);
range=[min(0,min(mismatch_fit(:))),max(mismatch_fit(:))]
for i=1:num
  maxsubplot(rows,cols,i); imagesc(flipud(mismatch_fit(:,:,i)),range); axis('equal','tight','off')
end
colormap('jet')
set(gcf, 'Color', 'w'); 


%show responses of prediction neurons to different combinations of p and v
figured(figoff+12),clf
num=size(integrate_fit,3);
[rows,cols]=best_subplot_rows_cols(num);
range=[min(integrate_fit(:)),max(integrate_fit(:))]
for i=1:num
  maxsubplot(rows,cols,i); imagesc(flipud(integrate_fit(:,:,i)),range); axis('equal','tight','off')
end
colormap('jet')

Loading data, please wait...