Optimal spatiotemporal spike pattern detection by STDP (Masquelier 2017)

 Download zip file 
Help downloading and running models
Accession:230138
We simulate a LIF neuron equipped with STDP. A pattern repeats in its inputs. The LIF progressively becomes selective to the repeating pattern, in an optimal manner.
Reference:
1 . Masquelier T (2018) STDP Allows Close-to-Optimal Spatiotemporal Spike Pattern Detection by Single Coincidence Detector Neurons. Neuroscience 389:133-140 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Neuron or other electrically excitable cell;
Brain Region(s)/Organism:
Cell Type(s): Abstract integrate-and-fire leaky neuron;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: MATLAB;
Model Concept(s): Coincidence Detection; STDP; Unsupervised Learning; Hebbian plasticity; Long-term Synaptic Plasticity; Pattern Recognition; Spatio-temporal Activity Patterns;
Implementer(s): Masquelier, Tim [timothee.masquelier at alum.mit.edu];
miss = zeros(n_post,n_pattern);
hit = zeros(n_post,n_pattern);
false_alarm = zeros(1,n_post);

for n=1:n_period_record_spike
    p = mod(n-1,n_pattern)+1;

    %check for false alarms
%     range = round((n-1)*period/dt)+2:round((n*period-pattern_duration)/dt);
%     range_prec = round((n-1)*period/dt)+1:round((n*period-pattern_duration)/dt)-1;
%     [neuron, time ] = find(V_post(:,range)==0 & V_post(:,range-1)~=0); 
    neuron = spike_list( spike_list(:,1)>(n_period-n)*period & spike_list(:,1)<=(n_period-n+1)*period-pattern_duration-2*jitter , 2);
    false_alarm(ismember(1:n_post,neuron)) = false_alarm(ismember(1:n_post,neuron))+1;
    
    %check for misses
%     range = round((n*period-pattern_duration)/dt)+2:round(n*period/dt);
%     range_pred = round((n*period-pattern_duration)/dt)+1:round(n*period/dt)-1;
%     [neuron, time ] = find(V_post(:,range)==0 & V_post(:,range-1)~=0);
    neuron = spike_list( spike_list(:,1)>(n_period-n+1)*period-pattern_duration-2*jitter & spike_list(:,1)<=(n_period-n+1)*period , 2);
    miss(~ismember(1:n_post,neuron),p) = miss(~ismember(1:n_post,neuron),p)+1;
    hit(:,p) = hit(:,p) + histcounts(neuron,1:n_post+1)';
end

n_w = sum(w>.5,2);

file_name = '../data/perf-';
if exist('seed','var')
    file_name = [ file_name sprintf('%03d',seed) ];
else
  c = clock;
  file_name = [ file_name sprintf('%04.0f',c(1)) '-' sprintf('%02.0f',c(2)) '-' sprintf('%02.0f',c(3)) '-' sprintf('%02.0f',c(4)) '-' sprintf('%02.0f',c(5)) ];
end

file_name = [ file_name '.mat' ];

save(file_name,'miss','false_alarm', 'hit', 'n_w', 'n_thr','n_dw_post','n_period_record_spike','n_pattern')

Loading data, please wait...