ANNarchy 5.0.3
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • ANNarchy
  • Core components
    • Network
    • Population
    • Projection
    • Monitor
    • PopulationView
    • Dendrite
  • Neuron and Synapse models
    • Neuron
    • Synapse
    • Parameter
    • Variable
    • Creating
    • Pruning
    • Constant
  • Neuron models
    • LeakyIntegrator
    • Izhikevich
    • IF_curr_exp
    • IF_cond_exp
    • IF_curr_alpha
    • IF_cond_alpha
    • HH_cond_exp
    • EIF_cond_alpha_isfa_ista
    • EIF_cond_exp_isfa_ista
  • Synapse models
    • Hebb
    • Oja
    • IBCM
    • STP
    • STDP
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions
    • add_function
    • functions
  • Callbacks
    • every
  • Utilities
    • report
    • timeit
    • sparse_random_matrix
    • sparse_delays_from_weights
    • magic_network
  • Convolution
    • Convolution
    • Pooling
    • Transpose
    • Copy
  • BOLD monitoring
    • BoldMonitor
    • BoldModel
    • balloon_RN
    • balloon_RL
    • balloon_CN
    • balloon_CL
    • balloon_maith2021
    • balloon_two_inputs
  • Tensorboard logging
    • Logger
  • ANN-to-SNN conversion
    • ANNtoSNNConverter
  • DEPRECATED Top-level API
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
    • simulate
    • simulate_until
    • step
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
    • save
    • load
    • save_parameters
    • load_parameters
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks

On this page

  • HomogeneousCorrelatedSpikeTrains
    • Parameters
    • Methods
      • update

HomogeneousCorrelatedSpikeTrains

HomogeneousCorrelatedSpikeTrains(
    self,
    geometry,
    rates,
    corr,
    tau,
    schedule=None,
    period=-1.0,
    name=None,
    refractory=None,
    copied=False,
    net_id=0,
)

Population of spiking neurons following a homogeneous distribution with correlated spike trains.

The method describing the generation of homogeneous correlated spike trains is described in:

Brette, R. (2009). Generation of correlated spike trains. Neural Computation 21(1). http://romainbrette.fr/WordPress3/wp-content/uploads/2014/06/Brette2008NC.pdf

The implementation is based on the one provided by Brian http://briansimulator.org.

To generate correlated spike trains, the population rate of the group of Poisson-like spiking neurons varies following a stochastic differential equation:

\frac{dx}{dt} = \frac{\mu - x}{\tau} + \sigma \, \frac{\xi}{\sqrt{\tau}}

where \xi is a random sample from the standard normal distribution. In short, x will randomly vary around \mu over time, with an amplitude determined by \sigma and a speed determined by \tau.

This doubly stochastic process is called a Cox process or Ornstein-Uhlenbeck process.

To avoid that x becomes negative, the values of mu and sigma are computed from a rectified Gaussian distribution, parameterized by the desired population rate rates, the desired correlation strength corr and the time constant tau. See Brette’s paper for details.

In short, you should only define the parameters rates, corr and tau, and let the class compute mu and sigma for you. Changing rates, corr or tau after initialization automatically recomputes mu and sigma.

Example:

import ANNarchy as ann

net = ann.Network(dt=0.1)

pop_corr = net.create(
    ann.HomogeneousCorrelatedSpikeTrains(
        geometry=200,
        rates=10.,
        corr=0.3,
        tau=10.)
)

net.compile()

net.simulate(1000.)

pop_corr.rates=30.

net.simulate(1000.)

Alternatively, a schedule can be provided to change automatically the value of rates and corr (but not tau) at the required times (as in TimedArray or TimedPoissonPopulation):

pop_corr = net.create(
    ann.HomogeneousCorrelatedSpikeTrains(
        geometry = 200,
        rates = [10., 30.],
        corr = [0.3, 0.5],
        tau = 10.,
        schedule = [0., 1000.]
    )
)

Even when using a schedule, corr accepts a single constant value. The first value of schedule must be 0. period specifies when the schedule “loops” back to its initial value.

Parameters

Name Type Description Default
geometry int | tuple[int] population geometry as tuple. required
rates float | list[float] rate in Hz of the population (must be a float or a list of float) required
corr float | list[float] total correlation strength (float in [0, 1], or a list) required
tau float correlation time constant in ms. required
schedule list[float] list of times where new values of ratesand corrwill be used to computre mu and sigma. None
period float time when the array will be reset and start again, allowing cycling over the schedule. Default: no cycling (-1.) -1.0
name str unique name of the population (optional). None
refractory float refractory period in ms (careful: may break the correlation) None

Methods

Name Description
update Update the parameters of the homogeneous correlated spike trains.

update

update(rates, corr, schedule=None, tau=None, reset=True)

Update the parameters of the homogeneous correlated spike trains.

Parameters

Name Type Description Default
rates float | list[float] rate in Hz of the population (must be a float or a list of float) required
corr float | list[float] total correlation strength (float in [0, 1], or a list) required
schedule list[float] list of times where new values of ratesand corrwill be used to computre mu and sigma. None
tau float correlation time constant in ms. None
reset bool whether to reset the internal timers before updating. If True the simulation will continue with the first elements provided by rates/schedule. If False, the simulation will continue with values of the provided rates/schedule at the position of the current internal timers. Default: True. True
SpikeSourceArray
CurrentInjection
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker