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 z=code(mu,s,sigma,noise,norm,stdnorm,wrap)
if nargin<7 || isempty(wrap)
  wrap=0;
end

z=zeros(1,length(s),'single');

if isnan(mu)
  return; %NaNs = distribution all zeros
end

%Make distribution with given standard deviation and mean, and with an amplitude of one.
%Used to define input PPCs (when all have same precision) and V weights
if wrap %input space wraps around 
  a=s(end)-s(1)+s(2)-s(1);
  z=z+exp(-(0.5/sigma.^2).*min([abs(mu-s);abs(mu-(s+a));abs(mu-(s-a))]).^2);
else %no wrap-around
  z=z+exp(-(0.5/sigma.^2).*(mu-s).^2);
end

%add noise
if nargin>3 && noise
  %add poisson noise
  z=single(imnoise(uint8(125.*z),'poisson'))./125; 
end

%Modify distibution so that it has a sum of one, used to define W weights
if nargin>4 && norm
  spacing=mean(diff(s));
  z=spacing.*z./(sigma*sqrt(2*pi));
  
  if 0 %~wrap 
    %for weights cut-off at edges, adjust weights at edge so that sum remains one
    if z(1)>z(end)
      z(1)=z(1)+1-sum(z);
    else
      z(end)=z(end)+1-sum(z);
    end    
  end
end

%Modify distibution so that it would have an amplitude of one if sigma=stdnorm
%(amplitude is <1 if sigma>stdnorm, and amplitude is >1 if sigma<stdnorm). Used
%to define input PPCs which all have a constant sum (so that the effects of
%changing the precision can be observed without the confound of changing the overal strength
%of the input).
if nargin>5 && stdnorm
  z=stdnorm.*z/sigma;
end


Loading data, please wait...