## Introduction

Clarifying how the brain processes information requires the simultaneous observation of the activities of multiple neurons. Extracellular recording with multi-channel electrodes is a commonly used technique to record the activities of tens or hundreds of neurons simultaneously, with a high temporal resolution (O’Keefe & Recce, 1993; Wilson & McNaughton, 1993; Fynh *et al.*, 2007). Each channel of such an electrode detects a superposition of signals from many neurons, and spike trains of the individual neurons can be sorted from these signals by some mathematical techniques. The fact that different channels sense spikes from the same neuron with varying degrees of attenuation, depending on the distances between the channels and the neuron, makes this sorting a little easier (Lewicki, 1998; Brown *et al.*, 2004; Buzsáki, 2004). Similar mathematical techniques can be applied to data recorded with an array of single electrodes, in which different electrodes detect signals mainly from different neurons.

Spike sorting requires three steps of analysis: (i) detecting spikes from extracellularly recorded data, (ii) extracting features characteristic of the spikes, and (iii) clustering the spikes of individual neurons based on the extracted features. In a standard method of spike sorting, the recorded signals undergo a linear band-pass filter and those with amplitudes larger than a prescribed threshold are identified as spikes. Principal component analysis (PCA) is then used for extracting the features of spike waveforms and the expectation maximization (EM) method is used for clustering the extracted features (Abeles & Goldstein, 1977; Wilson & McNaughton, 1993; Csicsvari *et al.*, 1998; Wood *et al.*, 2004).

Other methods have also been proposed. Wavelet transform (WT) decomposes a spike waveform into a combination of time–frequency components (Mallat, 1998), among which the features can be searched (Halata *et al.*, 2000; Letelier & Weber, 2000). WT was combined with ‘superparamagnetic clustering’, which classifies the data without strong assumptions on their distributions (Quiroga *et al.*, 2004). A method was proposed to trace bursting spikes (Pouzat *et al.*, 2004), which can be sorted correctly as bursting spikes of the same neurons. The Markov Chain Monte Carlo algorithm was utilized to estimate the number of source neurons in spike clustering (Nguyen *et al.*, 2003) and to trace a bursting state (Delescluse & Pouzat, 2006). Spike clustering was solved with the EM method for a mixture model of Student’s *t*-distributions (Shoham *et al.*, 2003) or with Bayesian inference (Wood & Black, 2008). Spike correlation analysis was shown to require careful treatment of overlapping spikes (Bar-Gad *et al.*, 2001). The detection of submillisecond-range spike coincidences was attempted with massively-parallel multi-channel electrodes and independent-component analysis (Takahashi *et al.*, 2003).

Multi-unit data, however, are corrupted by biological noise and accurate sorting is generally difficult. In particular, the previous methods of spike sorting suffer from convergence to local minima and selection of an inappropriate model (i.e. the number of clusters). The errors left in a computer-aided sorting must be corrected by human eyes but this procedure is time-consuming and inherently suffers from subjective bias (Harris *et al.*, 2000). In the present study, we explore a method for accurate and robust spike sorting to reduce the load of manual operation. We compare several methods of spike sorting by using the data of simultaneous extracellular and intracellular recordings of neuronal activity (Harris *et al.*, 2000; Henze *et al.*, 2000). These methods include newly devised methods as well as improved versions of conventional methods. In particular, we developed robust variational Bayes (RVB) for spike clustering and a novel filter for spike detection. Variational Bayes (VB) has been used with a mixture of normal distributions (Attias, 1999), whereas RVB employs a mixture model of Student’s *t*-distributions. At each stage of spike sorting, we tested known and newly developed mathematical tools, and found that an RVB-based method exhibits an excellent overall sorting performance. All of the sorting methods were solved with deterministic annealing. Neither the EM algorithm nor the variational Bayesian algorithm employs annealing in their usual descriptions. These algorithms, however, are sometimes trapped by local minima that do not correspond to optimal solutions. The deterministic annealing introduces a phenomenological ‘temperature parameter’ to avoid the convergence to non-optimal solutions (Ueda & Nakano, 1998; Katahira *et al.*, 2008).

We implemented all of the sorting methods tested in this study into an open-source code named ‘EToS’ (Efficient Technology of Spike sorting) that runs at a high speed. The preliminary results of this study were presented in Takekawa *et al.* (2008).