Using LeakyIntegrator with Projection

32 views
Skip to first unread message

David, Myungseok Shim

unread,
Oct 2, 2017, 9:30:02 PM10/2/17
to ANNarchy
Hi!

I have an issue using Leaky Integrator with Projection.

# Definition of the neuron
LIF = LeakyIntegrator(tau=20, B=-70, T=70, sum=('exc'))

# Projection
PIH = Projection(pre=groupi_in,post=group_hid,target='exc',synapse=RMSTDP_I)
PIH.connect_all_to_all(weights=Uniform(-5.0, 0.0))

When I compiled this, it showed the following error.

pop2.hpp:142:51: error: ‘exc’ was not declared in this scope
                 double _v =  __stepsize_v*(B[i] + exc - v[i]);
                                                   ^
In file included from ANNarchy.h:62:0,
                 from ANNarchyCore0.cpp:541:
proj0.hpp: In member function ‘void ProjStruct0::compute_psp()’:
proj0.hpp:159:26: error: ‘struct PopStruct1’ has no member named ‘g_exc’
                     pop1.g_exc[post_rank[i]] +=  w[i][j];
                          ^

I am not sure on the leaky integrator for implementing the following equation.
dVm/dt=(Vl-Vm)/tau : volt

Also, the error with projection maybe related with target. I think it's because of my inexperience with the library.

Regards,
Myung Seok 

Julien Vitay

unread,
Oct 3, 2017, 5:37:05 AM10/3/17
to ANNarchy
Hi,

LeakyIntegrator is a rate-coded neuron, i.e. it has no spiking mechanism. You want to use IF_curr_exp or so in your case:


Best
Julien
Message has been deleted

David, Myungseok Shim

unread,
Oct 10, 2017, 11:31:53 AM10/10/17
to ANNarchy
Hi Julien.

Thanks for the reply. I attached a leaky integrate and fire model equation below, which I am trying to implement.

In Brian1 or 2, LIF is represented as following equation

lif_eqs = '''
dVm/dt=(Vl-Vm)/tau : volt
'''

# Hidden Neuron
hid = NeuronGroup(60, model=lif_eqs, threshold=-55*mV, reset=Vr)

# Synapse for providing spikes to target(Vm)
link_in_hid_in  = Connection(input, hid, 'Vm', weight=rand(len(groupi_in),len(group_hid))*-5*mV,sparseness=1)


In ANNarchy, I implemented LIF model using the example given by the documentation website.

LIF = Neuron(
parameters="""
tau = 20.0 : population
Vl = -70.0 : population
Vt = -54.0 : population
Vr = -70.0 : population
""",
equations="""
dv/dt = (Vl - v)/tau + g_exc : init=-70.0
""",
spike="""
v > Vt
""",
reset="""
v = Vr
"""
)

group_hid = Population(name='Hidden', geometry=60, neuron=LIF)
PIH = Projection(pre=groupi_in, post=group_hid, target='exc', synapse=)

Are those both same representation of LIF? 

Thanks,
Myung 

Julien Vitay

unread,
Oct 10, 2017, 2:24:50 PM10/10/17
to ANNarchy
Hi,

yes, it sounds quite similar to the Brian implementation. Apparently you do not need a synapse type, and you can use PIH.connect_all_to_all(weights=Uniform(0.0, 5.0)) to create the projection.

Best
Julien 

David, Myungseok Shim

unread,
Oct 10, 2017, 3:22:29 PM10/10/17
to ANNarchy
Hi Julien.

Thank you for the clarification.

Additionally, I tried the following equation and it worked close to the network based on Brian.

Now I am moving to implement Liquid State Machine based on ANNarchy. In aspect of the simulation speed, ANNarchy works at least 10 times faster than Brian2.

Thank you for bringing up the nice SNN package!

Regards,
Myung 

-------------------------------------
# Definition of the neuron
LIF = Neuron(
    parameters="""
        tau = 20.0 : population
        Vl = -70.0 : population
        Vt = -54.0 : population
        Vr = -70.0 : population
    """,
    equations="""
        dg_exc/dt = (Vl - g_exc)/tau : init=-70.0
    """,
    spike="""
        g_exc > Vt
    """,
    reset="""
        g_exc = Vr
    """
)
Reply all
Reply to author
Forward
0 new messages