Eye Tracking Code

Eye-tracking using V1 neuron activity


Description:

This algorithm uses probabilistic models of the stimulus processing of visual cortical neurons to infer an animal's eye position. It is designed for use with multi-electrode array recordings from primary visual cortex during presentation of dynamic stimuli. The basic idea behind the algorithm is that one can use models of each neuron's stimulus processing to predict their response to a given displayed stimulus over a range of possible eye positions, with different eye positions corresponding to translations of the image on the retina. At a given time one can then infer the likelihood of each eye position given the neurons' observed spiking activity. By integrating such evidence across a population of neurons, and utilizing a simple model of eye position dynamics, we can accurately track an animal's fixational eye movements, and use the estimated eye positions to generate more accurate models of the neurons' stimulus processing.

Since the stimulus processing models themselves depends on the estimated eye positions (which are used to reconstruct the retinal stimulus), the eye-tracking method uses an expectation maximization algorithm to alternate between estimating the stimulus-processing models given a sequence of eye positions, and estimating the eye positions given stimulus processing models. This alternation converges rapidly and is robust towards initial estimates of the eye positions and stimulus processing models.

Details can be found in our paper

  • McFarland JM, Bondy AG, Cumming BG, Butts DA (2014) High-resolution eye tracking using V1 neuron activity. Nature Communications. 5:4605. [PDF on Nat Comms website]

Code:

We provide a demonstration of our algorithm applied to a simulated data set. The simulation is based on a recording from a 96-electrode Utah-array, and contains 101 units whose stimulus tuning is given by quadratic functions of the stimulus (based on models estimated from the recorded neural population). The simulated data (simDATA.mat), demo script (ET_demo.m) and associated helper functions can be downloaded here:

Demo Code

We use the Nonlinear input model (NIM) framework for estimating stimulus-processing models. Thus, to run the demo script, the NIMtoolbox must be included in the Matlab path. The NIM toolbox can be downloaded here. Note that with the default settings (using L1 regularization) the code also requires that Mark Schmidt's function L1General be installed. See the NIM website for information on downloading Mark Schmidt's code.
Also, see the included help documentation for more details on the simulated data and demo script.