ANNarchy 4.8.2
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

  • Reference
  • Core components
    • Population
    • Projection
    • Neuron
    • Synapse
    • Monitor
    • PopulationView
    • Dendrite
    • Network
  • Configuration
    • setup
    • compile
    • clear
    • reset
    • set_seed
    • get_population
    • get_projection
    • populations
    • projections
    • monitors
  • Simulation
    • simulate
    • simulate_until
    • step
    • parallel_run
    • enable_learning
    • disable_learning
    • get_time
    • set_time
    • get_current_step
    • set_current_step
    • dt
  • 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
    • STP
    • STDP
    • Hebb
    • Oja
    • IBCM
  • Inputs
    • InputArray
    • TimedArray
    • PoissonPopulation
    • TimedPoissonPopulation
    • SpikeSourceArray
    • HomogeneousCorrelatedSpikeTrains
    • CurrentInjection
    • DecodingProjection
    • ImagePopulation
    • VideoPopulation
  • IO
    • save
    • load
    • save_parameters
    • load_parameters
  • Utilities
    • report
  • Random Distributions
    • Uniform
    • DiscreteUniform
    • Normal
    • LogNormal
    • Exponential
    • Gamma
    • Binomial
  • Functions and Constants
    • add_function
    • functions
    • Constant
    • get_constant
  • Plotting
    • raster_plot
    • histogram
    • inter_spike_interval
    • coefficient_of_variation
    • population_rate
    • smoothed_rate
  • Callbacks
    • every
    • callbacks_enabled
    • disable_callbacks
    • enable_callbacks
    • clear_all_callbacks
  • 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

On this page

  • HomogeneousCorrelatedSpikeTrains
    • Parameters

HomogeneousCorrelatedSpikeTrains

inputs.SpikeTrains.HomogeneousCorrelatedSpikeTrains(
    self,
    geometry,
    rates,
    corr,
    tau,
    schedule=None,
    period=-1.0,
    name=None,
    refractory=None,
    copied=False,
)

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
ann.setup(dt=0.1)

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

ann.compile()

ann.simulate(1000.)

pop_corr.rates=30.

ann.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 = ann.HomogeneousCorrelatedSpikeTrains(
    geometry=200, 
    rates= [10., 30.], 
    corr=[0.3, 0.5], 
    tau=10.,
    schedule=[0., 1000.]
)

ann.compile()

ann.simulate(2000.)

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 positive float or a list) 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
SpikeSourceArray
CurrentInjection
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker