J Comput Neurosci DOI 10.1007/s10827-007-0042-x Integral equation methods for computing likelihoods and their derivatives in the stochastic integrate-and-fire model Liam Paninski · Adrian Haith · Gabor Szirtes Received: 11 August 2006 / Revised: 13 March 2007 / Accepted: 19 April 2007 © Springer Science + Business Media, LLC 2007 Abstract We recently introduced likelihood-based methods for fitting stochastic integrate-and-fire mod- els to spike train data. The key component of this method involves the likelihood that the model will emit a spike at a given time t. Computing this likelihood is equivalent to computing a Markov first passage time density (the probability that the model voltage crosses threshold for the first time at time t). Here we detail an improved method for computing this likelihood, based on solving a certain integral equation. This integral equation method has several advantages over the tech- niques discussed in our previous work: in particular, the new method has fewer free parameters and is easily differentiable (for gradient computations). The new method is also easily adaptable for the case in which the model conductance, not just the input current, is time- varying. Finally, we describe how to incorporate large deviations approximations to very small likelihoods. Keywords Volterra integral equation · Markov process · Large deviations approximation Action Editor: Barry J. Richmond L. Paninski (B ) Department of Statistics, Columbia University New York, NY, USA e-mail: liam@stat.columbia.edu URL: http://www.stat.columbia.edu/liam A. Haith Institute for Perception, Action and Behaviour, University of Edinburgh, Edinburgh, UK L. Paninski · G. Szirtes Center for Theoretical Neuroscience, Columbia University New York, NY, USA 1 Introduction A classic and recurring problem in theoretical neuro- science is to estimate the probability that an integrate- and-fire-type neuronal model, driven by white Gaussian noise, that has fired at time t = 0 will not fire again until time t = T. This problem appears in a number of con- texts, including firing rate computations (Plesser and Gerstner 2000; Plesser and Tanaka 1997), statistical model fitting (Iyengar and Liao 1997; Paninski et al. 2004b), and decoding (Pillow et al. 2005). In particular, Paninski et al. (2004b) recently introduced likelihood- based methods for fitting stochastic integrate-and-fire models to spike train data; these techniques rely on the numerical computation of these interspike interval (ISI) densities. Computing this likelihood is equivalent to computing a Markov first passage time density, the probability that the model voltage (a Markov process) crosses threshold for the first time at time t = T, given that the voltage was reset to some fixed subthreshold value at time t = 0. The main motivation for this paper is to develop efficient, robust techniques for computing this likelihood in the model-fitting framework, to facil- itate the application of these models to real in vivo and in vitro data (Paninski et al. 2004a,b; Pillow et al. 2005). Here we detail an improved numerical method for computing this likelihood, based on techniques intro- duced by Plesser and Tanaka (1997) and DiNardo et al. (2001). We begin by noting that the ISI den- sity uniquely solves a certain linear Volterra integral equation, then provide details on approximating this integral equation by a lower-triangular matrix equa- tion, which may be solved efficiently on a computer. In addition, the gradient of this solution with respect to the model parameters may be efficiently computed via