 # PLS: A Simple, Scalable, and Efficient Framework for Modeling Neurons

Dear all,

We recently published the paper in which we started to develop a framework for fast and inexpensive calculations for neuron models. The idea is simple: instead of discontinuous dynamics (like in IaF, ExLIaF, QIaF, and so on), use discontinuous functions on the right-hand side of differential equations. This idea led us to the set of functions, namely Polynomial, piecewise-Linear, Step (PLS), and a set of rules for the development of continuous and well-behaved models

You can find this paper here: Polynomial, piecewise-Linear, Step (PLS): A Simple, Scalable, and Efficient Framework for Modeling Neurons

The code is available through ModelDB #266863

I implemented the PLS functions for Brian2 as an independent single-file module brian2pls.py. The functions can be loaded from the module like this:

``````from brian2pls import *
``````

After that, PLS functions can be used in equations and Brian converts them in efficient Cython or C++ code.

For example, here the equations for the integrator in the paper:

``````T1equ="""
dv/dt = ( P3(v,T1v0,T1v1,T1v2)*L1(v,T1v0,T1a0,T1a1,0)+I*int(t>200*ms)-w*w )/L1(v,T1v3,T1r0,T1r1,0)/ms : 1
dw/dt = ( L2(v,T1v4,0,T1v5,1,0,0) - w )/S2(v,T1v6,T1v7,T1s0,T1s1,T1s2)/ms               : 1
I : 1
"""
``````

for the resonator, they are even simpler:

``````T2equ="""
dv/dt = ( P32(v,T2v0,T2v2)*L1(v,T2v0,T2a0,T2a1,0)+I*int(t>200*ms)-w*w )/L1(v,T2v3,T2r0,T2r1,0)/ms : 1
dw/dt = ( L2(v,T2v4,0,T2v5,1,0,0) - w )/S2(v,T2v6,T2v7,T2s0,T2s1,T2s2)/ms               : 1
I : 1
"""
``````

The full implementation of both models with the functions imported from the module can be found here

Note that there is a long list of future research and development in this paper. I wonder if anyone is interested in contributing to the PLS framework, so we can open a project here Looking forward to receiving your comments.
RTH.

2 Likes