Package: nengo-bio
NengoBio ‒ Biologically (more) plausible Nengo models⚠ Warning:This project is work-in progress. Everything described here, including the name of the project and the API, is subject to change.NengoBiois an add-on library for theNengospiking neural network simulator. Nengo is used by scientists to construct detailed models of neurobiological systems. However, Nengo and, to some degree, the underlyingNeural Engineering Framework, have restrictions that limit the biological plausibility of the created networks.NengoBiolifts some of these restrictions by implementing the following:Dale's Principle(:ballot_box_with_check:Fully implemented)While it is possible to work around this limitation, Nengo usually does not explicitly mark neurons as excitatory or inhibitory. This means that a single can connect to post-neurons both excitatorily and inhibitorily, depending on the sign of the weights computed by of the weight solver.NengoBiomarks neurons as either excitatory or inhibitory and accounts for this while solving for connection weights.Bias current elimination(:ballot_box_with_check:Fully implemented)The Neural Engineering Framework assumes that each neuron is connected to a constant bias current source. This bias current is used to diversify the avilable neuron tuning curves, yet is a little unrealistic from a biological perspective.NengoBioeliminates the bias current by solving for synaptic weights in current space, effectively decoding the bias current from the pre-population state.Support for dendritic computation(:ballot_box_with_check:Fully implemented)Dendritic nonlinearities play a key role in information processing in central nervous systems and can be systematically exploited to perfrom nonlinear, multivariate computations.NengoBioadds support for dendritic computation to Nengo by allowing an arbitrary number of neuron ensembles as pre-objects in a connection.Support for conductance-based synapses as well as neurons with arbitrary passive dendritic trees(Planned)
Dendritic computation relies on nonlinear effects in the dendritic tree and the specific tree topology.NengoBioadds support for arbitrary passive multicompartment neuron models to Nengo.Installing NengoBioDependencies:NengoBiorequires Python 3 and depends onnumpy>=1.16.3,scipy>=1.2.0,cvxopt>=1.2.2,nengo>=3.0.0.dev0.Clone this repository by runninggitclonehttps://github.com/astoeckel/nengo_bioYou can then install the package by running the following inside thenengo_biorepositorypip3install-e.This will automatically install all dependencies. Note thatNengoBiocurrently requires the most recent development version ofNengo, which has to be installed separately.Using NengoBio📝 See the example notebookAssuming that you know how to use Nengo, usingNengoBioshould be quite simple. Just add the following to your list of importsimportnengo_bioasbioand replacenengo.Ensemblewithbio.Ensembleandnengo.Connectionwithbio.Connectionwhere applicable.Thebio.EnsembleclassThebio.Ensembleclass acts like a normal Nengo ensemble but has two additional parameters:p_excandp_inh. These parameters describe the relative number of excitatory/inhibitory neurons in the population. Note thatp_excandp_inhhave to sum to one. These parameters are only relevant if an ensemble is a pre-object.Note:Neurons will be assigned a synapse type at build time. If any ofp_excorp_inhis set, each neuron will either be excitatory or inhibitory. Withoutp_excandp_inh, the ensemble will behave just like a normal Nengo ensemble.Warning:bio.Ensemblecan be used in conjunction with the normalnengo.Connectionclass. The excitatory/inhibitory nature of the neurons in abio.Ensemblewill only be taken into account when usingbio.Connection(see below).ExamplesExamples 1:An ensemble exclusively consisting of excitatory neuronsens_exc=bio.Ensemble(n_neurons=101,dimensions=1,p_exc=1.0)Examples 2:An ensemble exclusively consisting of inhibitory neuronsens_inh=bio.Ensemble(n_neurons=101,dimensions=1,p_inh=1.0)Examples 3:An ensemble consisting of 80% excitatory and 20% inhibitory neurons (both lines are equivalent):ens_mix=bio.Ensemble(n_neurons=101,dimensions=1,p_exc=0.8)ens_mix=bio.Ensemble(n_neurons=101,dimensions=1,p_inh=0.2)Thebio.ConnectionclassAbio.Connectionconnection connectsn-pre ensembles to a single target ensemble. It will automatically account for the synapse type assigned to each neuron.Notable Parameterspre: This can be either a single pre-population or a tuple of pre-populations. The dimensions of the values represented by the pre-populations will be stacked.decode_bias(defaultTrue): ifTruethe post-neuron bias current will be decoded from the pre-population instead of being assumed constant. Set this toFalsefor any but the firstbio.connectiontargeting the same post population.solver(defaultQPSolver()): anExtendedSolverinstance fromnengo_bio.solvers.ExtendedSolverscan solve for currents and take neuron parameters into account.ExamplesExample 1:Simple communication channel betweenens_aandens_btaking neuron/synapse types into account and decoding the bias current:bio.Connection(ens_a,ens_b)Example 2:2D communication channel whereens_a,ens_brepresent a one-dimensional value andens_crepresents a two-dimensional value.bio.Connection((ens_a,ens_b),ens_c)Example 3:Linear "Dendritic Computation"bio.Connection((ens_a,ens_b),ens_c,function=lambdax:np.mean(x))CitingThe techniques used in this library are described in more detail in this arXiv preprint:https://arxiv.org/abs/1904.11713. We would appreciate it if you could cite this paper in case you use this library in a published model.@misc{stoeckel2019passive,author={Andreas Stöckel and Chris Eliasmith},title={Passive nonlinear dendritic interactions as a general computational resource in functional spiking neural networks},year={2019},eprint={arXiv:1904.11713},}Licensenengo_bio -- Extensions to Nengo for more biological plausibility
Copyright (C) 2019  Andreas Stöckel

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.