Hippocampal spiking model for context dependent behavior (Raudies & Hasselmo 2014)

 Download zip file 
Help downloading and running models
Accession:194882
Our model simulates the effect of context dependent behavior using discrete inputs to drive spiking activity representing place and item followed sequentially by a discrete representation of the motor actions involving a response to an item (digging for food) or the movement to a different item (movement to a different pot for food). This simple network was able to consistently learn the context-dependent responses.
Reference:
1 . Raudies F, Hasselmo ME (2014) A model of hippocampal spiking responses to items during learning of a context-dependent task. Front Syst Neurosci 8:178 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Hippocampus;
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):
Implementer(s): Raudies, Florian [florian.raudies at gmail.com];
/
CodePublished
screenshots
README.html
binariness.m
errorarea.m
Figure3AAndFigure4.m
Figure3BAndFigure5.m
firingRateToSI.m
gpl-3.0.txt *
index2label.m
lifModel.m
ManySlotBuffer.m
meanWoutNaN.m
NetworkSimulation100Runs.mat
rasterPlotToFiringRate.m
semWoutNaN.m
spikingNetworkContextLearning.m
StackContainer.m
stdpModel.m
TimeBuffer.m
                            
function FiringRate = rasterPlotToFiringRate(RasterPlot, opt)
% rasterPlotToFiringRate
%   RasterPlot  - Assumes that this is an object instance of ManySlotBuffer
%                 with dimensions: nSlots x nEntry x nData.
%   opt         - Structure with fields:
%                 * nTrial      - Number of trials.
%                 * nStim       - Number of stimuli.
%                 * nCell       - Number of cells.
%                 * nMaxSample  - Maximum number of samples per cell.
%                 * dt          - Time step in msec.
%
% RETURN
%   FiringRate - Matrix with firing rates per trial, stimulus, and cell.
%                The dimension of the matrix is:
%                nTrial x nStim x nCell.
%

%   Florian Raudies, 09/07/2014, Boston University.

nTrial      = opt.nTrial;
nStim       = opt.nStim;
nCell       = opt.nCell;
nMaxSample  = opt.nMaxSample;
dt          = opt.dt;
% Use a stack container to gather all the samples.
FiringRate          = zeros(nTrial,nStim,nCell);
FiringRateSamples   = StackContainer(nTrial*nStim*nCell,nMaxSample);
% For all slots (which are all stimuli and hippocampal cells combined).
for iSlot = 1:nStim*nCell,
    % Piece out the index for the stimulus and the hippocampal cell.
    [iStim iHippo]  = ind2sub([nStim nCell],iSlot);
    DataTrialSpike  = RasterPlot.getAllEntryForSlot(iSlot);
    % Get the spike counts from index 3 to the end.
    SpikeCount      = sum(DataTrialSpike(:,3:end),2);
    % Get the number of steps from the index 2.
    Steps           = DataTrialSpike(:,2);
    % Get the trial numbers from index 1.
    DataTrial       = DataTrialSpike(:,1);
    % Caclulcate the spike rate.
    nSample         = size(DataTrialSpike,1);
    SpikeRate       = SpikeCount./(Steps*dt);
    % For each sample add the spike rate for this data point composed of
    % trial, stimulus, and hippocampal cell index.
    for iSample = 1:nSample,
        iTrial = DataTrial(iSample);
        iData = sub2ind([nTrial nStim nCell],iTrial,iStim,iHippo);
        FiringRateSamples.push(iData, SpikeRate(iSample)); 
    end
end

% Convert all the computed firing rates from one trial, which could include
% different stimuli, into a mean firing rate. This happens if the same 
% stimulus occurs multiple times in a trial.
for iData = 1:nTrial*nStim*nCell,
    sumFiringRate = 0;
    nEntry = FiringRateSamples.numel(iData);
    if nEntry,
        while ~FiringRateSamples.empty(iData),
            sumFiringRate = sumFiringRate + FiringRateSamples.pop(iData);   
        end
        [iTrial,iStim,iHippo] = ind2sub([nTrial nStim nCell],iData);
        FiringRate(iTrial,iStim,iHippo) = sumFiringRate/nEntry;
    end
end