Talk Topographica: Python simulator for computational neuroscience

Presented by Christopher E. Ball in Scientific track 2010 on 2010/07/11 from 10:15 to 10:30 in room Dussane
Abstract

Topographica is a simulator used in computational neuroscience research and teaching. Designed to simulate many thousands of neurons with millions of connections, Topographica makes it practical to study phenomena that are visible only at a large scale, such as the development of two-dimensional visual orientation maps, and object segmentation and grouping processes [1].

While used primarily for computational neuroscience, with a neuroscience-specific level of components such as Sheets and Projections [2], Topographica at its more general levels provides mature, robust, and reusable components that could be of interest to a variety of Python-based scientific software. We describe some of these components here.

Simulation framework Topographica supports both clocked and event-driven simulations using an underlying event-driven architecture. A simulation is a directed graph of event-processing nodes called EventProcessors (EPs), which generate data-carrying Events that are routed through the graph to other EPs via delayed connections. Most objects in the simulation are subclasses of EP, customized to provide specific behaviour. Any causal, physical process can be simulated efficiently in this framework if the computation in individual events is large compared to the number of events.

Parameters Many parameters of a simulation or component should only take values of a particular type within a particular range, but Python's attributes do not normally allow a range or type to be specified. Parameters make it easy to handle attribute setting robustly, and also allow an attribute to be generated dynamically (from a particular statistical distribution, for example), to have a default value (allowing the provision of sensible defaults), and to be documented easily. Additionally, GUI programming is vastly simplified because a parameter can automatically be represented by the appropriate widget type, which also allows GUI editing of object properties without writing any code. Parameters are implemented in pure Python and support the default Tkinter GUI (distinguishing them from Enthought's Traits).

Integrated simulation environment Although Topographica provides a variety of modules and components, it is used daily as a coherent simulation and scientific data analysis environment. Commandline and optional Tkinter-based interfaces are provided for interactive construction of models and control of simulations, and a batch interface (also suitable for use on clusters) stores all information needed to repeat simulations at a later date, including version control information. Complete workspace state saving is provided through pickling, which is flexible enough to support old snapshots despite continuously updated source code.

Optimization Topographica's base is designed to result in isolated components written in a clear, simple way. Performance bottlenecks are therefore isolated to particular components, which can be identified through profiling with Python's built-in tools. These components can optionally be substituted by optimized versions using SciPy's Weave or Cython. Once there are no more dramatic improvements from this approach, the isolated nature of components allows parallelization, e.g. using MPI (via mpi4py).

Reliability Topographica is developed continuously by a team of researchers, and so relies on continuous, automatic testing. Ensuring that simulation results do not change between revisions is critical, so Buildbot is used to re-run full simulations and compare results each day, in addition to running unit tests. Additionally, Buildbot ensures that the software continues to work on all supported platforms.

To conclude, using Python and extensions such as NumPy has made possible both implementation of a general-purpose neural simulator and its usage by non-computer scientists. The same language is used to build the simulator as is used to specify models, construct components, and run simulations. Additionally, Python has allowed interoperability with other neuroscience simulators [3], and because of its strong 'glue' properties and clear syntax, it is now one of the standard languages in the field [4]. Topographica itself has been used in computational neuroscience education [5], as well as in research papers and theses investigating a variety of phenomena in visual, somatosensory, and auditory cortex.

Available from topographica.org, Topographica and all of its components are free and open source (BSD licence), and can run on any platform where Python, NumPy, and PIL are available (including Windows, Mac OS X, and Linux). Development was supported by the US National Institute of Mental Health under Human Brain Project grant R01-MH66991, and by the UK EPSRC/MRC Neuroinformatics Doctoral Training Centre at the University of Edinburgh.

[1]Miikkulainen et al. (2005). Computational Maps in the Visual Cortex. Berlin: Springer.
[2]Bednar, J. A. (2008). Understanding neural maps with Topographica. Brains, Minds, and Media, 3:bmm1402. In Lorenz S., Egelhaaf M. (eds), Interactive Educational Media for the Neural and Cognitive Sciences.
[3]Bednar, J. A. (2009). Topographica: Building and analyzing map-level simulations from Python, C/C++, MATLAB, NEST, or NEURON components. Frontiers in Neuroinformatics, 3:8.
[4]Cannon et al. (2007). Interoperability of neuroscience modeling software: Current status and future directions. Neuroinf., 5:127-138.
[5]Computational Neuroscience of Vision course at the University of Edinburgh: http://homepages.inf.ed.ac.uk/jbednar/teaching.html