Reward modulated STDP (Legenstein et al. 2008)

 Download zip file 
Help downloading and running models
"... This article provides tools for an analytic treatment of reward-modulated STDP, which allows us to predict under which conditions reward-modulated STDP will achieve a desired learning effect. These analytical results imply that neurons can learn through reward-modulated STDP to classify not only spatial but also temporal firing patterns of presynaptic neurons. They also can learn to respond to specific presynaptic firing patterns with particular spike patterns. Finally, the resulting learning theory predicts that even difficult credit-assignment problems, where it is very hard to tell which synaptic weights should be modified in order to increase the global reward for the system, can be solved in a self-organizing manner through reward-modulated STDP. This yields an explanation for a fundamental experimental result on biofeedback in monkeys by Fetz and Baker. In this experiment monkeys were rewarded for increasing the firing rate of a particular neuron in the cortex and were able to solve this extremely difficult credit assignment problem. ... In addition our model demonstrates that reward-modulated STDP can be applied to all synapses in a large recurrent neural network without endangering the stability of the network dynamics."
1 . Legenstein R, Pecevski D, Maass W (2008) A learning theory for reward-modulated spike-timing-dependent plasticity with application to biofeedback. PLoS Comput Biol 4:e1000180 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Neocortex;
Cell Type(s):
Gap Junctions:
Simulation Environment: Python; PCSIM;
Model Concept(s): Pattern Recognition; Spatio-temporal Activity Patterns; Reinforcement Learning; STDP; Biofeedback; Reward-modulated STDP;
#  Computer simulation 2 of
#      A Learning Theory for Reward-Modulated Spike-Timing-Dependent 
#        Plasticity with Application to Biofeedback
#  Author: Dejan Pecevski,
#  Date: March 2008

import sys
import os


from pypcsim import *
import pypcsimplus as pcsim
from numpy import *
import random, getopt
import numpy
from datetime import datetime
from math import *
from tables import *
from math import exp
from mpi4py import MPI
from BeforeAfterBiofeedModel import *
from PoissInputModel import *

class BeforeAfterExperiment(pcsim.Experiment):
    def defaultExpParameters(self):
        ep = self.expParams 
        # General simulation parameters
        ep.Tsim = 20
        ep.DTsim = 1e-4
        # Network distribution parameters
        ep.netType = 'ST'
        ep.nThreads = 1
        ep.minDelay = 1e-3
        ep.maxDelay = 2   
        # Seeds of the experiment
        ep.numpyRandomSeed = 153564312
        ep.pyRandomSeed = 1615335    
        ep.constructionSeed = 31653476
        ep.simulationSeed = 13421639
        ep.runMode = "long"        
        ep.modelName = "PoissInput"
    def setupModels(self):        
        p = self.modelParams
        ep = self.expParams
        ep.samplingTime = int(ep.Tsim / (200 * ep.DTsim))
        self.models.input = eval(ep.modelName + '(, self.expParams, p.get("input",{}))')        
        self.models.biofeed = BeforeAfterBiofeedModel(, self.expParams, p.get("biofeed",{}), depModels = self.models.input.elements)
        # then synchronize (override) the value of n.nNeurons from the other parameters
        input_p = self.models.input.params
        biofeed_p = self.models.biofeed.params 
    def setupRecordings(self):
        r = self.recordings
        r.biofeed = self.models.biofeed.setupRecordings()        
        return r
    def scriptList(self):
        return [""]
if __name__ == "__main__":    
        exper = BeforeAfterExperiment('beforeAfter', experParams = {}, modelParams = {})"longrun")

Loading data, please wait...