The Nonlinear Input Model (NIM)
The Nonlinear Input Model (NIM) is a probabilistic model for describing nonlinear computation in sensory neurons. In this model, the predicted firing rate is given as a sum over nonlinear inputs followed by a 'spiking nonlinearity' function (equivalent to an LNLN cascade):
Each nonlinear input is itself specified by a linear stimulus filter, as well as a static 'upstream nonlinearity' that is assumed to be some rectifying function (but can also encompass linear, quadratic, and non-parametric forms). As a sum of rectified inputs, the model neuron can be viewed as integrating a set of stimulus-driven inputs that are either excitatory or suppressive. The stimulus filters, and the form of the 'upstream nonlinearities', can be inferred from the data (along with additional linear terms describing e.g. spike-history dependence). More recent additions to the code allow for the incorporation of multiple stimulus covariates into calculating neural firing rates (each which can have associated non-linear subunits) as well as some forms of multiplicative (gain/normalization-like) interactions.
Our paper, which describes parameter estimation procedures in detail and shows a variety of applications, can be downloaded here:
- McFarland JM, Cui Y, Butts DA (2013) Inferring nonlinear neuronal computation based on physiologically plausible inputs. PLoS Computational Biology 9(7): e1003142. [PDF on PLoS website, Supplemental Materials]
Note that this model can implicitly be used to fit other previously suggested probabilistic models of neural spiking:
- Generalized Linear Model (GLM) [Paninski (2004); Truccolo et al. (2005)], where the upstream nonlinearities are fixed as linear.
- Generalized Quadratic Model (GQM) [Park and Pillow (2011)], where the upstream nonlinearities are fixed to be linear and quadratic.
- Generalized Nonlinear Model (GNM) [Butts et al. (2011)], which is an early version of the NIM applied to LGN data.
We thus offer model estimation code that can flexibly describe sensory neuron computation using a number of state-of-the-art models.
We have produced a Matlab toolbox for estimating parameters of the Nonlinear Input Model from spiking data (see links below). In addition to routines for estimating the stimulus filters and upstream nonlinearities associated with each nonlinear input, the toolbox contains functions for estimating parameters of the spiking nonlinearity function, and includes built-in support for modeling spike-history dependence. Likewise, upstream nonlinearities can be fixed to estimate the GLM and GQM. Several different forms of regularization on the stimulus filters and upstream nonlinearities are currently supported, including sparseness (L1 norm) and several forms of smoothness (L2 norm) regularization. Thus, this code provides a general tool to estimate a variety of model forms in the literature, as the example applications below illustrate.
There are two versions of the Matlab toolbox available: (1) the code released with our 2013 paper, combined with tutorials exploring the different examples considered in the paper; (2) the current working version of the code being used by the lab, available on Github.
Github version: https://github.com/dbutts/NIMclass
Instructions on installing are included on the github website, as well as a detailed manual for the NIM code. Once downloaded, its directory should be added to your Matlab path.
This code relies on the Matlab Optimization toolbox, as well as a very nice set of optimization routines written by Mark Schmidt, which can be downloaded from his website. In particular, Mark Schmidt's L1-optimization routines must be installed to use L1-regularization. Additionally, we strongly recommend installing Mark Schmidt's functions minFunc and minConf to take advantage of all regularization possibilities and speed up parameter optimization.
Example applications (see further below for list associated with 2013 paper):
- NIMdemo_LGNtemporal.zip: application to processed data from an LGN neuron in response to temporally modulated white noise stimuli, recorded in the Alonso Lab (SUNY), and described in detail in Butts et al. (2011). Includes demonstration of applications of spike-history terms, alternative models, regularization, and cross-validation.
Original (2013) Source Code:
Matlab Toolbox: NIMtoolbox.zip (last updated Aug. 31, 2015)
After it is downloaded and unzipped, its directory should be added to your Matlab path. This code relies on the Matlab Optimization toolbox, as well as optimization routines provided by Mark Schmidt. Mark Schmidt's L1-optimization routines (L1General) must be installed to use L1-regularization. Additionally, we strongly recommend installing these functions minFunc and minConf to take advantage of all regularization possibilities and speed up parameter optimization.
Example applications (try these first to learn how to use the code):
- NIMdemo_RGCsim.zip: simulated ON-OFF retinal ganglion cell in response to temporally modulated white noise (see Figures 1 and 3 in the manuscript).
- NIMdemo_LGNtemporal.zip: application to processed data from an LGN neuron in response to temporally modulated white noise stimuli, recorded in the Alonso Lab (SUNY), and described in detail in Butts et al. (2011). Includes demonstration of applications of spike-history terms, and cross-validation.
- NIMdemo_V1sim1d.zip: simulated V1 neuron in response to optimally oriented "random bar" data (see Figure 6 in the manuscript).
- NIMdemo_Auditory.zip: simulated auditory neuron in response to naturalistic sound (represented in a spectrogram). Includes demonstration of nested cross-validation and regularization.
- More applications (to simulated and real data) to be added...
See the references and help documentation for further details. Please report any bugs to: jmmcfarl at umd dot edu.
Contributed applications of the NIM welcome!
- Butts DA, Weng C, Jin JZ, Alonso JM, Paninski L (2011) Temporal precision in the visual pathway through the interplay of excitation and stimulus-driven suppression. J. Neurosci. 31: 11313-27. [PDF, Additional information]
- Schinkel-Bielefeld N, David SV, Shamma SA, Butts DA (2012) Inferring the role of inhibition in auditory processing of complex natural stimuli. J. Neurophysiol. 107: 3296. [PDF]
- Lochmann T, Blanche TJ, Butts DA (2013) Pooling of local features as a basis for direction selectivity in the primary visual cortex. PLoS One 8: e58666. [PDF]
- Paninski L (2004) Maximum likelihood estimation of cascade point-process neural encoding models. Network 15: 243-262.
- Truccolo W, Eden UT, Fellows MR, Donoghue JP, Brown EN (2005) A point process framework for relating neural spiking activity to spiking history, neural ensemble, and extrinsic covariate effects. J Neurophysiol 93: 1074-1089.
- Park IM, Pillow JW (2011) Bayesian spike-triggered covariance analysis. Adv Neural Inf Process Syst (NIPS) 24: 1692-1700.