KInNeSS: A modular framework for computational neuroscience
Massimiliano Versace, Heather Ames, Jasmin Léveillé, Bret Fortenberry, and Anatoli
Department of Cognitive and Neural Systems
Center of Excellence for Learning In Education, Science, and Technology
Technical Report CAS/CNS-TR-2007-007
Keywords: Behavioral modeling, compartmental modeling, object oriented design, spiking
neurons, software framework
Submission Date: June 12, 2007
First Revision Date: December 17, 2007
Second Revision Date: March 23, 2008
Third Revision Date: May 25, 2008
All correspondence should be addressed to
Department of Cognitive and Neural Systems
677 Beacon Street
Boston, MA 02215
This work was supported by the Center of Excellence for Learning in Education, Science and Technology (NSF
SBE-0354378). Massimiliano Versace was supported in part by the Air Force Office of Scientific Research (AFOSR
F49620-01-1-0397), the National Science Foundation (NSF SBE-0354378), and the Office of Naval Research (ONR
N00014-01-1-0624). Heather Ames, and Jasmin Léveillé were supported in part by the National Science Foundation
(NSF SBE-0354378) and the Office of Naval Research (ONR N00014-01-1-0624). Bret Fortenberry and Anatoli
Gorchetchnikov were supported in part by the National Science Foundation (NSF SBE-0354378). The authors
would also like to thank Prof. Steve Grossberg, Himanshu Mhatre, Prof. Mike Hasselmo, Dash Sai Gaddam, and
Jesse Palma for numerous valuable discussions and suggestions for this paper.
Copyright © 2007
Permission to copy without fee all or part of this material is granted provided that: 1. The copies are not made or
distributed for direct commercial advantage; 2. the report title, author, document number, and release date appear,
and notice is given that copying is by permission of the BOSTON UNIVERSITY CENTER FOR ADAPTIVE
SYSTEMS AND DEPARTMENT OF COGNITIVE AND NEURAL SYSTEMS. To copy otherwise, or to
republish, requires a fee and / or special permission.
Making use of very detailed neurophysiological, anatomical, and behavioral data to build
biologically-realistic computational models of animal behavior is often a difficult task. Until
recently, many software packages have tried to resolve this mismatched granularity with
different approaches. This paper presents KInNeSS, the KDE Integrated NeuroSimulation
Software environment, as an alternative solution to bridge the gap between data and model
behavior. This open source neural simulation software package provides an expandable
framework incorporating features such as ease of use, scalability, an XML based schema, and
multiple levels of granularity within a modern object oriented programming design. KInNeSS is
best suited to simulate networks of hundreds to thousands of branched multi-compartmental
neurons with biophysical properties such as membrane potential, voltage-gated and ligand-gated
channels, the presence of gap junctions or ionic diffusion, neuromodulation channel gating, the
mechanism for habituative or depressive synapses, axonal delays, and synaptic plasticity.
KInNeSS outputs include compartment membrane voltage, spikes, local-field potentials, and
current source densities, as well as visualization of the behavior of a simulated agent. An
explanation of the modeling philosophy and plug-in development is also presented. Further
development of KInNeSS is ongoing with the ultimate goal of creating a modular framework that
will help researchers across different disciplines to effectively collaborate using a modern neural
Advances in functional, anatomical, and behavioral neuroscience techniques have led to an
increase in the data available for modeling complex dynamics of biologically inspired neural
networks at many levels of abstraction, from in-depth descriptions and analyses of individual
membrane channels to large-scale investigations of whole brain activity. This wealth of data is
essential for creating realistic neural models and increases our understanding of animal and
human behavior. Furthermore, it has pushed the modeling community towards the design of
increasingly complex models, incorporating unprecedented amount of biophysical and
anatomical constraints. These large-scale neural models are often non-linear dynamical systems
which can be analytically intractable and require numerical simulation to gain insight into their
behavior. Emergent properties of large-scale neural networks often remain unnoticed until the
whole system is simulated and components are allowed to interact (Cannon et al., 2002).
An additional level of complexity is finding a neural simulator and simulation
environment that would enable the large variety of researchers from neurophysiology,
psychology and computational modeling to share data and work collaboratively (an excellent
review can be found in Brette et al., 2007). Most available software packages are specialized in
different applications. For example, CSIM (Maass et al., 2002; Natschläger et al., 2002) and
NEST (Gewaltig and Diesmann, 2007) make use of single compartmental models whereas
KInNeSS, NEURON (Hines, 1989, 1993; Hines and Carnevale, 1994; Carnevale and Hines,
2006), GENESIS (Bower and Beeman, 1998), and SPLIT (Hammarlund and Ekeberg, 1998) also
include functionality for creating multi-compartmental models. Other software, such as
XPPAUT (Ermentrout, 2002), focus primarily on dynamical systems analysis.
An attempt to integrate this diverse set of neural simulators has led to the development of
NeuroML1 (Neuron Markup Language; Crook et al., 2007), which seeks to provide a common
schema for unifying network descriptions and building a database of neural models. While
developing such a standard format is a necessary step towards the interoperability of various
existing software approaches to neural simulations, it is barely sufficient and far from achieving
this goal (Brette et al., 2007; Goddard et al., 2001; Cannon et al., 2007).
The open source2 KDE Integrated NeuroSimulation Software environment (KInNeSS3)
follows an XML schema similar to NeuroML and represents a step towards the development of
an interdisciplinary, modular neural network software environment. The main goal of KInNeSS
is to allow modelers to quickly design, test, and tune their neural models and study their
behavior, which can either be the behavior of a simulated agent or the more abstract behavior of
a target neural population. For this purpose, KInNeSS users can design simple integrate-and-fire
neurons as well as branched structures with complex conduction based models obeying Hodgkin-
Huxley dynamics (Hodgkin and Huxley, 1952).
KInNeSS is built using C++ modern programming techniques such as Object-Oriented
Programming (OOP), polymorphism, multithreading, and functional objects. KInNeSS users
with different levels of expertise can quickly and effectively design, run, and analyze simulations
at many levels of granularity, from single compartment and single cells to large-scale dynamics
recorded in the form of local field potentials (LFP) and current source densities (CSD), and
eventually link them to the behavior of the simulated agent. Users without programming skills
can take advantage of the simple and intuitive interface and experienced programmers can add
2 KInNeSS is licensed under the GNU general public license; © Anatoli Gorchetchnikov.
features and components to the system without waiting for software updates. Finally, KInNeSS’s
modular design allows for integration of different simulation projects within the same interface.
The following section gives a general overview of the KInNeSS software and its
computational engine, SANNDRA4 (Synchronous Artificial Neural Networks Distributed
Runtime Algorithm). The third section describes the XML schema adapted for KInNeSS and the
fourth section gives an overview of the modeling philosophy used in KInNeSS including a
description of the equations used in spiking neural modeling architectures. The fifth section
illustrates plug-in development that advanced users can employ to expand KInNeSS
functionality to their needs. The sixth section presents KInNeSS performance on two benchmark
networks and a coarse comparison to other neural simulators. Finally, future developments and
conclusions are presented.
2. KInNeSS overview
KInNeSS was originally developed to be a simulation environment for modeling of neural
systems and neurons whose characteristics are closely linked to experimental data and whose
explanatory power encompasses behavioral data. KInNeSS is capable of simulating both
conductance based models of cells obeying Hodgkin-Huxley dynamics and simpler systems
based on integrate-and-fire models of neurons. KInNeSS is best suited to simulate networks of
branched neurons containing approximately 1-4 compartments per branch and biophysical
properties such as: membrane potential, voltage-gated or ligand-gated channels, gap junctions or
ionic diffusion, neuromodulation channel gating, habituative or depressive synapses, axonal
delays, and synaptic plasticity. KInNeSS records the voltage of individual compartments, as well
as aggregate cell recordings such as local field potentials (LFP) and current source densities
(CSD). Typical simulations that have been performed by KInNeSS include models of
hippocampal neurons and spatial navigation (Gorchetchnikov and Hasselmo, 2005), models of
thalamo-cortical learning (Grossberg and Versace, 2008; Leveille et al., 2008), and models of
interactions between electric field and cell activity (Berzhanskaya et al., 2007).
KInNeSS can be used independently of any specific programming skills. A friendly
point-and-click interface allows the modeler to set all the necessary parameters. The interface
also contains functionality for loading projects, which can be written separately from KInNeSS.
The project environment contains the tools needed to simulate the environmental and behavioral
components of the model. Furthermore, KInNeSS makes use of an XML schema for both import
and export of model specifications.
The current KInNeSS 0.3.4 release contains a project environment for modeling spatial
navigation tasks, a generic project where an input pattern is provided for the network without
specifying how it was created, and a dummy instructional project that illustrates the necessary
interactions between the project environment and the core shell for programmers who wish to
create new projects. The model interface is implemented as a set of plug-ins, so that the same
model can be used in different project environments and different models can be used within the
Two plug-ins are contained in the current release of KInNeSS: one for creating and
editing the network, and the other for running the simulations. The simulation plug-in allows the
user to set global simulation parameters and to control the time course of the simulation. The
interface allows interruptions at any point in time of the simulation, correcting parameters, and
restarting the simulation from the point of interruption or from the original starting point.
Additional plug-ins can be created and loaded by the user; see Section 5.
2.1 Computing with SANNDRA
The computational engine behind KInNeSS is SANNDRA (Synchronous Artificial Neural
Networks Distributed Runtime Algorithm). SANNDRA was originally designed under the name
of SiMeON (Simulation of Memory based On Natural principles) in 1997–1999 and developed
using SIMD architecture on the MasPar MP1 parallel computer. It was ported for Linux as a
partial SIMD emulation in 2000 (Gorchetchnikov, 2000). Initially, SANNDRA was intended to
run a long iterative loop through relatively simple computations done in parallel on many similar
elements. Due to the SIMD paradigm, it was a synchronous time driven rather than event-driven
algorithm from the start. Later design relaxed the SIMD requirements on the similarity of
computational elements, but these elements are still synchronized for data exchange. On a
sequential computer this leads to an unavoidable performance loss due to synchronization, but
ensures that these elements receive the correct input signals.
Each element in SANNDRA can have access to the output of any other element. This
design makes SANNDRA capable of numerical integration of large systems of non-
homogeneous differential equations and it can be put into much simpler uses like iterative
solving of systems of algebraic equations or image processing. For differential equations
SANNDRA uses the fourth order Runge-Kutta integration method.
SANNDRA is currently a separately distributed open source5 library while its main use
and testing is done in the KInNeSS project. SANNDRA extensively uses polymorphism to
achieve an optimal combination of flexibility and performance. Polymorphism is a key concept
of object-oriented design where object-specific individual implementations of methods can be
called through a pointer to a virtual method declared in the common base of these objects. The
system of equations is combined together from objects derived in the user code from SANNDRA
basic objects. In the case of KInNeSS, this user code is part of the package that links the
graphical user interface (GUI) and the computational engine. A set of standard building blocks is
provided by the library, and the advanced user can always derive the additional blocks from
those that are provided. Once combined, the system can be solved independently of its actual
structure. There is a slight computational overhead in polymorphism, because a direct function
call is faster than a virtual call. For a homogeneous system, when the function for such a direct
call can be determined at compilation time, using polymorphism would be disadvantageous.
Since SANNDRA is designed to use non-homogeneous systems, the appropriate direct call
cannot be determined during compilation, and the choice is between polymorphism and some
other kind of run-time detection of the right method to call. In this case polymorphism clearly is
the best choice, since it is a part of the C++ language itself.
2.2 Interface quick start
One of the best ways to appreciate the usability of KInNeSS is to experience it in action. In a few
simple steps the user can design a neural network, create the input, run the model, and save the
results for further analysis. These steps for running a sample network, receptor_example.nml6 ,
are found in Figure 1.
5 SANNDRA is licensed under the GNU general public license; © Anatoli Gorchetchnikov.
When the user starts KInNeSS for the first time, the interface looks similar to the screenshot in
Figure 1a. The number of buttons in the Project Toolbar varies depending on the number of
installed project environments. The main interface contains the following functionalities:
• File Menu: loads and saves environments and other project-specific operations.
• Settings Menu: toggles the visibility of the main toolbar and status bar, and contains a
dialog window to configure shortcuts, the main toolbar, project toolbar buttons, and the
• Help Menu: accesses the KInNeSS manual, about dialogs, context help, and dialog for
bug report submission.
• Main Toolbar: accesses all commands in the three menus listed above and in the Project
• Status Bar: visualizes the progress of the simulation.
• Projects Menu and Toolbar: contains the list of project environments available to
KInNeSS. The current release includes:
• Navigation: creates mazes, places rewards in the mazes, and a virtual animal to
run through the maze;
• Generic: provides four input channels to the network symbolized by red, green,
blue, and yellow colors; and
• Vision: shows the example of the necessary skeleton to implement a new
For more in-depth information and installation instruction see the KInNeSS user manual online7.
A web-based tutorial that covers the basics of setting up a small network, running it, and
collecting the simulation results is also available online8.
2.3 Behavioral simulations
One of the unique components of KInNeSS is its link between empirical model simulations and
the resulting behaviors. KInNeSS was originally designed to create large scale dynamical neural
network models embedded in a perception-action loop so that the user can input realistic stimuli
(e.g. images) and visualize the resulting actions of a simulated agent exposed to these stimuli.
The behavioral level and the network level interact through both the input and output of the
network. The user is able to control which network population drives the behavior of the
simulated agent. KInNeSS contains three predesigned project environments for visualizing
behavioral results of the simulations. These environments are the Navigation Project, the Generic
Project, and the example Vision Project. Additional project environments can be designed by
advanced users based upon the skeleton provided in the Vision Project.
2.3.1 The Navigation project environment
This environment is designed to create and run projects in which a simulated agent (for example,
a rat) navigates in a simulated environment. This project has been extensively used for “rat in the
maze” simulations (Gorchetchnikov and Hasselmo, 2002; 2005). Users can create simple mazes
of variable dimensions, specify the location of the animal with the rat tool, and edit the
environment by adding obstacles with the shovel tool, and rewards of variable salience with the
Figure 2. (a) Structure of the model describing the cortico-hippocampal circuit used by a
simulated rat to flexibly navigate toward any arbitrary goal or multiple goals that change on a
trial-by-trial basis. PPC, posterior parietal cortex; PFC, prefrontal cortex; ATN, anterior thalamic
nucleus, which relays the output to the cingulate motor area, shown to control reward-driven
movements. Another possibility is to control the animal by output through deep layers of EC.
Split arrowheads represent diffuse projections. The model includes 1333 neurons with 2180
compartments. Reprinted with permission from Gorchetchnikov and Hasselmo, 2005. (b) The
Navigation Project Environment allows setting up environments where simulated agents can
navigate and obtain rewards (c). The trajectory of the simulated animal in the open field
simulations. S designates the starting location of the simulated animal and G stands for goal
location with the size of letter representing salience. (I) Simulation set 1: selection of the closest
goal. The initial vertical segment does not show a strong preference towards the closer goal to
the left. When the difference in distances towards both goals gets big enough, the trajectory starts
to bear left. (II) Simulation set 2: selection of the most salient goal. Initial bearing to the left does
not show a strong preference towards a more salient goal. When the difference in distances
towards both goals becomes big enough to affect the behaviour, the trajectory bends further left.
(III) Results for the simulation of a single salient goal versus multiple less salient goals.
Reprinted with permission from Gorchetchnikov and Hasselmo, 2005.
Figure 3. The Network Editor is one of the key features that enable KInNeSS users to explore
different modeling choices including creation of networks (a), populations (b), compartments
(c), and channels (d) in an easy to use interface.
Figure 4. Relationship between KInNeSS, SANNDRA, and the XML file. (a) In KInNeSS,
populations, cell characteristics and projections are stored as part of a hierarchical subtree. (b)
KInNeSS accesses and saves the network and related structures in XML format. Network
instantiation is then carried out via the KBrain plug-in which interfaces with SANNDRA. (c) In
NeuroML, populations, cell characteristics, and projections are stored as separate subtrees.
Figure 5. Equivalent circuit representation of branching neuron. VB is the potential at the
branching point (Equation 11). Note that
corresponds to the actual resistance for
branch k in a branching intersection (Equation 8a). When two compartments are connected by a
non-branching intersection (e.g. compartments V3 and V4), specific axial resistance
same for both compartments (i.e.
k R is the
Figure 6. Local Field Potentials (LFP) and Current Source Densities (CSD) of 3-compartment
layer 2/3 cells of a simulated laminar cortical circuit in a 1 sec simulation (Grossberg and
Versace, 2008). The display on top right show the somatic membrane voltage of the 9x9 neural
sheet, with light gray representing depolarized states and dark gray representing hyperpolarized
states. The bottom panels plot the CSD and LFP measured with a 24-tip electrode of the selected
central cell in the 9x9 sheet. Lighter and darker gray stands for source/sink and
depolarization/hyperpolarization in CSD and LFP, respectively.
Figure 7. KInNeSS benchmark simulation results. (a) Soma membrane potential plot of
excitatory neurons 230-240 in the quadratic integrate-and-fire (Benchmark 1) simulation for 500
msec of simulation time. (b) Spike raster of 3200 excitatory neurons in the quadratic integrate-
and-fire (Benchmark 1) simulation. (c) Soma membrane potential plot of excitatory neurons 230-
240 in the Hodgkin-Huxley (Benchmark 3) simulation.