Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Public Member Functions | Public Attributes | List of all members
auryn::IzhikevichGroup Class Reference

This NeuronGroup implements the Izhikevich neuron model with conductance based AMPA and GABA synapses. More...

#include <IzhikevichGroup.h>

Inheritance diagram for auryn::IzhikevichGroup:
Inheritance graph
[legend]
Collaboration diagram for auryn::IzhikevichGroup:
Collaboration graph
[legend]

Public Member Functions

 IzhikevichGroup (NeuronID size)
 The default constructor of this NeuronGroup. More...
 
virtual ~IzhikevichGroup ()
 
void set_tau_ampa (AurynFloat tau)
 Sets the exponential time constant for the AMPA channel (default 5ms) More...
 
AurynFloat get_tau_ampa ()
 Gets the exponential time constant for the AMPA channel. More...
 
void set_tau_gaba (AurynFloat tau)
 Sets the exponential time constant for the GABA channel (default 10ms) More...
 
AurynFloat get_tau_gaba ()
 Gets the exponential time constant for the GABA channel. More...
 
void clear ()
 Resets all neurons to defined and identical initial state. More...
 
void evolve ()
 Integrates the NeuronGroup state. More...
 
- Public Member Functions inherited from auryn::NeuronGroup
 NeuronGroup (NeuronID n, NodeDistributionMode mode=AUTO)
 Default constructor. More...
 
 NeuronGroup (NeuronID n, double loadmultiplier, NeuronID total)
 Old default constructor. More...
 
virtual ~NeuronGroup ()
 
void set_state (std::string name, AurynState val)
 Conveniently sets all values in a state vector identified by name in this group. More...
 
void set_state (std::string name, NeuronID i, AurynState val)
 Conveniently sets a single value of element i in a state vector identified by name in this group. More...
 
virtual AurynStateVectorget_default_exc_target ()
 Returns default exc target input. More...
 
virtual AurynStateVectorget_default_inh_target ()
 Returns default inh target input. More...
 
void random_mem (AurynState mean=-60e-3, AurynState sigma=5e-3)
 
virtual void init_state ()
 
void safe_tadd (NeuronID id, AurynWeight amount, TransmitterType t=GLUT)
 
void tadd (NeuronID id, AurynWeight amount, TransmitterType t=GLUT)
 
void tadd (AurynStateVector *state, NeuronID id, AurynWeight amount)
 
- Public Member Functions inherited from auryn::SpikingGroup
void add_state_vector (std::string key, AurynStateVector *state_vector)
 Adds a state vector passed as an argument to the dictinary. More...
 
void remove_state_vector (std::string key)
 Removes a state vector passed as an argument to the dictinary. More...
 
AurynStateVectorfind_state_vector (std::string key)
 Returns existing state vector by name or NULL if it does not exist. More...
 
AurynStateVectorget_state_vector (std::string key)
 Creates a new or returns an existing state vector by name. More...
 
AurynStateVectorget_existing_state_vector (std::string key)
 Returns an existing state with the supplied name. More...
 
AurynStateVectorcreate_state_vector (std::string key)
 Creates a new state vector and throws an exception if a vector with the same name exists. More...
 
AurynStateget_state_variable (std::string key)
 Creates a new group-wide state variable or returns an existing group-wide variable by name then returns a pointer to it. More...
 
void randomize_state_vector_gauss (std::string state_vector_name, AurynState mean, AurynState sigma, int seed=12239)
 Randomizes the content of a state vector with Gaussian random numbers. Seeding is MPI save. More...
 
 SpikingGroup (NeuronID size, NodeDistributionMode mode=AUTO)
 Default constructor. More...
 
virtual ~SpikingGroup ()
 Default destructor. More...
 
virtual void evolve_traces ()
 Evolves traces. More...
 
void set_name (std::string s)
 Set connection name. More...
 
std::string get_name ()
 Retrieves the groups name. More...
 
std::string get_file_name ()
 Extracts the class name of the connection from the file name. More...
 
std::string get_log_name ()
 Returns a string which is the combination of file and connection name for logging. More...
 
void inc_num_spike_attributes (int x)
 Instructs SpikingGroup to increase the number of spike attributes by x. More...
 
int get_num_spike_attributes ()
 
void conditional_evolve ()
 Conditional evolve functino which is called by System. More...
 
unsigned int get_locked_rank ()
 Returns locked rank for SpikingGroups which are not distributed across all ranks. More...
 
unsigned int get_locked_range ()
 Returns locked range of ranks for SpikingGroups which are not distributed across all ranks. More...
 
SpikeContainerget_spikes ()
 Returns pointer to a spike container that contains spikes which arrive in this timestep from all neurons in this group. More...
 
SpikeContainerget_spikes_immediate ()
 Returns pointer to SpikeContainer of spikes generated during the last evolve() step. More...
 
AttributeContainerget_attributes ()
 Returns pointer to Attributecontainer for usage in propagating Connection objects. Same as get_spikes_immediate(), however might be overwritten to contain Spikes that have been delayed. More...
 
AttributeContainerget_attributes_immediate ()
 Returns pointer to Attributecontainer of spikes generated during the last evolve() step. More...
 
NeuronID get_size ()
 Returns the size of the group. More...
 
NeuronID get_pre_size ()
 Returns the size of the group. More...
 
NeuronID calculate_rank_size (int rank=-1)
 Determines rank size and stores it in local variable. More...
 
NeuronID get_rank_size ()
 Returns the size on this rank. More...
 
NeuronID get_post_size ()
 Returns the size on this rank. More...
 
void set_clock_ptr (AurynTime *clock)
 
bool evolve_locally ()
 Returns true if the calling instance has units which are integrated on the current rank. More...
 
NeuronID get_uid ()
 Get the unique ID of the class. More...
 
Traceget_pre_trace (AurynFloat x)
 Returns a pre trace with time constant x. More...
 
void add_pre_trace (Trace *tr)
 Adds trace to pretrace stack of a connection. More...
 
Traceget_post_trace (AurynFloat x)
 Returns a post trace with time constant x. More...
 
void add_post_trace (Trace *tr)
 Adds trace to posttrace stack of a connection. More...
 
void push_spike (NeuronID spike)
 Pushes a local NeuronID as spike into the axonal SpikeDelay buffer. More...
 
void push_attribute (AurynFloat attrib)
 Pushes a spike attribute into the axonal SpikeDelay buffer. More...
 
void clear_spikes ()
 Clears all spikes stored in the delays which is useful to reset a network during runtime. More...
 
Traceget_post_state_trace (std::string state_name="mem", AurynFloat tau=10e-3, AurynFloat b=0.0)
 Returns a post trace of a neuronal state variable e.g. the membrane potential with time constant tau. More...
 
Traceget_post_state_trace (AurynStateVector *state, AurynFloat tau=10e-3, AurynFloat b=0.0)
 Returns a post trace of a neuronal state variable specified by pointer. More...
 
void set_delay (int d)
 Sets axonal delay for this SpikingGroup. More...
 
virtual bool write_to_file (const char *filename)
 Writes current states of SpikingGroup to human-readible textfile if implemented in derived class. More...
 
virtual bool load_from_file (const char *filename)
 Reads current states of SpikingGroup to human-readible textfile if implemented in derived class. More...
 
NeuronID ranksize ()
 Returns size (num of neurons) on the current rank. More...
 
NeuronID global2rank (NeuronID i)
 Converts global NeuronID within the SpikingGroup to the local NeuronID on this rank. More...
 
NeuronID rank2global (NeuronID i)
 Converts local NeuronID from the local rank to a global NeuronID. More...
 
bool localrank (NeuronID i)
 Checks if the global NeuronID i is integrated on this MPI rank. More...
 
NeuronID get_vector_size ()
 Rank size but rounded up to multiples of 4 (or potentially some other and larger number in future versions) for SSE compatibility. More...
 

Public Attributes

AurynFloat avar
 
AurynFloat bvar
 
AurynFloat cvar
 
AurynFloat dvar
 
- Public Attributes inherited from auryn::NeuronGroup
AurynStateVectormem
 
AurynStateVectorg_ampa
 
AurynStateVectorg_gaba
 
AurynStateVectorg_nmda
 
AurynStateVectorthr
 
- Public Attributes inherited from auryn::SpikingGroup
SpikeDelaydelay
 
bool active
 Toggles group active. More...
 
std::map< std::string, AurynStateVector * > state_vectors
 
std::map< std::string, AurynStatestate_variables
 

Additional Inherited Members

- Protected Member Functions inherited from auryn::NeuronGroup
void init ()
 
void free ()
 
- Protected Member Functions inherited from auryn::SpikingGroup
void free ()
 Frees potentially allocated memory. More...
 
- Protected Attributes inherited from auryn::NeuronGroup
AurynStateVectordefault_exc_target_state
 
AurynStateVectordefault_inh_target_state
 
- Protected Attributes inherited from auryn::SpikingGroup
std::vector< Trace * > pretraces
 Pretraces. More...
 
std::vector< Trace * > posttraces
 Posttraces. More...
 
std::vector< Trace * > post_state_traces
 Post state traces. More...
 
std::vector< AurynFloatpost_state_traces_spike_biases
 
std::vector< AurynStateVector * > post_state_traces_states
 
std::string group_name
 Identifying name for object. More...
 
NeuronID size
 Stores the size of the group. More...
 
NeuronID rank_size
 Stores the size of the group on this rank. More...
 
SpikeContainerspikes
 SpikeContainers to store spikes produced during one step of evolve. More...
 
AttributeContainerattribs
 
- Static Protected Attributes inherited from auryn::SpikingGroup
static AurynTimeclock_ptr = NULL
 

Detailed Description

This NeuronGroup implements the Izhikevich neuron model with conductance based AMPA and GABA synapses.

This NeuronGroup implements the nonlinear integrate and fire neuron model by Eugene M. Izhikevich as described in Izhikevich, E.M. (2003). Simple model of spiking neurons. IEEE Transactions on Neural Networks 14, 1569–1572.

In this implementation the state variables have been rescaled to V and seconds for consistency. The model is controlled via the public members: avar, bvar, cvar, dvar which correspond to the a,b,c and d parameters in the paper.

Note that since this model has been rescaled to volts and seconds the reset and jump size parameters (cvar and dvar) also need to be given in volts (i.e. scaled by 1e-3).

Also keep in mind that the default interpretation of synaptic synaptic strength given in multiples of the leak conductance is not longer true for this group and you will need to "gauge" synaptic strength according to the size of membrane potential deflection it causes.

Constructor & Destructor Documentation

◆ IzhikevichGroup()

IzhikevichGroup::IzhikevichGroup ( NeuronID  size)

The default constructor of this NeuronGroup.

30  : NeuronGroup(size)
31 {
33  if ( evolve_locally() ) init();
34 }
NeuronGroup(NeuronID n, NodeDistributionMode mode=AUTO)
Default constructor.
Definition: NeuronGroup.cpp:36
bool evolve_locally()
Returns true if the calling instance has units which are integrated on the current rank...
Definition: SpikingGroup.cpp:323
System * sys
Global pointer to instance of System which needs to be initialized in every simulation main program...
Definition: auryn_global.cpp:37
void register_spiking_group(SpikingGroup *spiking_group)
Registers an instance of SpikingGroup to the spiking_groups vector.
Definition: System.cpp:261
NeuronID size
Stores the size of the group.
Definition: SpikingGroup.h:119
Here is the call graph for this function:

◆ ~IzhikevichGroup()

IzhikevichGroup::~IzhikevichGroup ( )
virtual
68 {
69  if ( !evolve_locally() ) return;
70 }
bool evolve_locally()
Returns true if the calling instance has units which are integrated on the current rank...
Definition: SpikingGroup.cpp:323
Here is the call graph for this function:

Member Function Documentation

◆ clear()

void IzhikevichGroup::clear ( )
virtual

Resets all neurons to defined and identical initial state.

Implements auryn::NeuronGroup.

59 {
60  clear_spikes();
61  mem->set_all(cvar);
62  g_ampa->set_all(0.);
63  g_gaba->set_all(0.);
64 }
void set_all(const T v)
Set all elements to value v.
Definition: AurynVector.h:232
AurynStateVector * g_ampa
Definition: NeuronGroup.h:66
void clear_spikes()
Clears all spikes stored in the delays which is useful to reset a network during runtime.
Definition: SpikingGroup.cpp:339
AurynFloat cvar
Definition: IzhikevichGroup.h:79
AurynStateVector * g_gaba
Definition: NeuronGroup.h:68
AurynStateVector * mem
Definition: NeuronGroup.h:64
Here is the call graph for this function:

◆ evolve()

void IzhikevichGroup::evolve ( )
virtual

Integrates the NeuronGroup state.

The evolve method internally used by System.

Implements auryn::SpikingGroup.

92 {
93  // compute synaptic conductance based currents
94  // excitatory
95  cur_exc->copy(g_ampa);
96  cur_exc->scale(-1);
97  cur_exc->mul(mem);
98 
99  // inhibitory
100  cur_inh->diff(mem,e_rev_gaba);
101  cur_inh->mul(g_gaba);
102 
103  // compute izhikevich neuronal dynamics
104  temp_vector->copy(mem);
105  temp_vector->sqr();
106  temp_vector->scale(40);
107 
108  temp_vector->saxpy(5,mem);
109  temp_vector->add(0.140);
110  temp_vector->sub(adaptation_vector);
111 
112  // add synaptic currents
113  temp_vector->add(cur_exc);
114  temp_vector->sub(cur_inh);
115 
116  // update membrane voltage
117  mem->saxpy(auryn_timestep/1e-3,temp_vector); // division by 1e-3 due to rescaling of time from ms -> s
118 
119  // update adaptation variable
120  temp_vector->copy(mem);
121  temp_vector->scale(bvar);
122  temp_vector->sub(adaptation_vector);
123 
124  adaptation_vector->saxpy(avar*auryn_timestep/1e-3,temp_vector);
125 
126  check_thresholds();
127 
128  // decay synaptic conductances
129  g_ampa->scale(scale_ampa);
130  g_gaba->scale(scale_gaba);
131 }
void sqr()
Squares each element.
Definition: AurynVector.h:533
void sub(const T c)
Subtract constant c to each vector element.
Definition: AurynVector.h:288
void diff(AurynVectorFloat *a, AurynVectorFloat *b)
Definition: AurynVector.cpp:262
void mul(const float a)
Definition: AurynVector.h:819
AurynStateVector * g_ampa
Definition: NeuronGroup.h:66
void scale(const float a)
Definition: AurynVector.cpp:74
AurynFloat avar
Definition: IzhikevichGroup.h:77
AurynFloat bvar
Definition: IzhikevichGroup.h:78
double auryn_timestep
Simulation timestep in seconds.
Definition: auryn_definitions.cpp:31
void copy(AurynVector *v)
Copies vector v.
Definition: AurynVector.h:200
void add(const float c)
Definition: AurynVector.cpp:180
void saxpy(const float a, AurynVectorFloat *x)
Definition: AurynVector.cpp:96
AurynStateVector * g_gaba
Definition: NeuronGroup.h:68
AurynStateVector * mem
Definition: NeuronGroup.h:64
Here is the call graph for this function:

◆ get_tau_ampa()

AurynFloat IzhikevichGroup::get_tau_ampa ( )

Gets the exponential time constant for the AMPA channel.

160 {
161  return tau_ampa;
162 }

◆ get_tau_gaba()

AurynFloat IzhikevichGroup::get_tau_gaba ( )

Gets the exponential time constant for the GABA channel.

171 {
172  return tau_gaba;
173 }
Here is the call graph for this function:

◆ set_tau_ampa()

void IzhikevichGroup::set_tau_ampa ( AurynFloat  tau)

Sets the exponential time constant for the AMPA channel (default 5ms)

154 {
155  tau_ampa = taum;
156  calculate_scale_constants();
157 }

◆ set_tau_gaba()

void IzhikevichGroup::set_tau_gaba ( AurynFloat  tau)

Sets the exponential time constant for the GABA channel (default 10ms)

165 {
166  tau_gaba = taum;
167  calculate_scale_constants();
168 }

Member Data Documentation

◆ avar

AurynFloat auryn::IzhikevichGroup::avar

The "a" parameter in the Izhikevich model which controls the time course of the adaptation variable u

◆ bvar

AurynFloat auryn::IzhikevichGroup::bvar

The "b" parameter in the Izhikevich model which controls the fixed point of the adaptation variable u

◆ cvar

AurynFloat auryn::IzhikevichGroup::cvar

The "c" parameter in the Izhikevich model which is the reset voltage

◆ dvar

AurynFloat auryn::IzhikevichGroup::dvar

The "d" parameter in the Integrates model which is the spike triggered jump size of the adaptation variable u (note that it needs to be rescaled to units of V (i.e. multiplied by 1e-3) when paramters from Izhikevich's original publication are used because the model has been renormalized to volts for consistency reasons.


The documentation for this class was generated from the following files: