140 likes | 258 Views
http://brian.di.ens.fr. Dan Goodman & Romain Brette Ecole Normale Supérieure Projet Odyssée. goodman@di.ens.fr brette@di.ens.fr. Structure of a neuron. Synapse. Axon. Dendrites. Soma (cell body). Membrane potential. Potential difference (V)
E N D
http://brian.di.ens.fr Dan Goodman & Romain Brette Ecole Normale Supérieure Projet Odyssée goodman@di.ens.fr brette@di.ens.fr
Structure of a neuron Synapse Axon Dendrites Soma (cell body)
Membrane potential Potential difference (V) Due to the difference in concentrations of sodium and potassium ions (mostly). Roughly -70 mV at rest Inside cell Membrane (semi-permeable) Outside cell
Synapses Neurotransmitter Presynaptic terminal Postsynaptic terminal Synaptic cleft
Model neurons • “Single compartment model” – the simplest • Time evolution (differential equation) • Spike propagation (delta function) • Spike initiation • Threshold condition • Action potential (spike) • Reset V
Perfect integrator model • One variable V • No time evolution, or dV/dt=0 • Spike propagation, when spike arrives set V→V+w • Threshold, fire spike if V>Vt • Reset, after spike V→Vr
Leaky I&F • One variable V • Exponential decay (‘leak current’) orτdV/dt = -(V-Vr) • Spike propagation, when spike arrives set V→V+w • Threshold, fire spike if V>Vt • Reset, after spike V→Vr
Introducing Brian – leaky I&F • Code is in Python • Equations (differential, define time evolution) • Threshold • Reset • Model • NeuronGroup • Connection
Brian is flexible • Threshold increases when spike arrives and decays • Implemented as DE and user-defined reset and threshold functions
Efficiency: vectorisation • Python is slow (interpreted) • In Brian most operations are vector operations (same operation on multiple pieces of data) • Use NumPyfor vector operations • Linear differential equation, use matrix algebra for exact update t→t+dt • Spike propagation, V→V+w for certain V, w • Threshold, V>Vt • Reset V→Vr
Data structures State matrixS, values of model variables atanygiven time V=0 x=1 y=2 Update matrixA Encodes exact solution to linear differential equation Weight matrix W, synapse strengths
Brian’s vector operations Update matrix A State matrix S V x y *
The End • Brian is useful for modelling if: • Network of spiking neurons • Each neuron is modelled as single compartment • Not too many neurons (tens of thousands?) • Benefits are: • Easy to learn and use compared to other software • Quick to implement and tweak models