Cortical Activity is a Mess: The Trouble with Averaging

Neuroscientists recording activity of single neurons in cortex have known for a long time that neural activity in cortex can be extremely variable. Even when the timing of a stimulus presentation or behavioral measurements are tightly controlled, a cortical neuron is likely to fire action potentials at slightly different times and rates on any given trial.

Take a look at this example raster, where each tick represents an action potential, each line is a separate trial, and the green vertical bar is the time when a stimulus was presented (or a behavior was measured):


Looking closely at the timing of cortical action potentials, it is striking how noisy the activity appears, despite being aligned to the same event. The distribution of spikes is usually well described as a Poisson process, where the timing of any one spike is independent from the times of other spikes (this is only an estimation, since realistically the timing of spikes is constrained by a neuron’s refractory period - a neuron can’t produce action potentials closer than 1ms apart).

A natural reaction to that variability is to average it out. This has produced sensical results in many cases, and has supported models for various cognitive phenomena. One prominent example that has taken advantage of averaged cortical neuron activity is the Ramping model of decision making. The model attempts to explain how one could make a decision about a sensory stimulus when that stimulus is imperfect, or noisy.

The classic example, used in many neurophysiology experiments, is a video of moving dots, where each dot moves in a random direction at any given time point, but overall is biased to the left or right. An experimental subject looking a display of randomly moving dots has to decide whether they are on the whole moving left or right, and the difficulty of that decision depends on the coherence of motion (at 100% coherence, all dots are moving in one direction; at 0%, there is no net movement). The Ramping model requires some cognitive process to observe the noisy dots and count the evidence for leftward vs. rightward motion over time, until the counts hit some internal threshold, at which time the decision is made.



As with many experiments of neural recordings, the phrase “ask and ye shall receive” proved true here (not to underplay how difficult it probably was to gather the data): neurons in the macaque Lateral Intraparietal Area, just downstream of motion-sensitive neurons in area MT, responded to the moving dots with ramping firing rates whose slopes were correlated with the coherence of the dots’ motion1,2, just as the model predicted. 

Those ramping firing rates came from averages of single neurons’ responses over many noisy trials. In a paper published in Science in July 2015, Jonathan Pillow and lab mates asked if the ramping might actually be just an average of many instantaneous jumps in firing rates3. If a neuron’s firing rate jumps instantly but at slightly different time points on each trial, the average firing rate would look like a ramp. To answer this question, Pillow’s team modeled the neurons’ spiking as Poisson processes whose rates of firing were distributed either according to a ramping model or a stepping one.


Because the stepping wasn’t a measured variable (but rather a latent one imposed on the data by the researchers), in order to get the right parameters for their models, the team simulated neural activity using Markov Chain Monte Carlo (MCMC). 

Not surprisingly, when each trial’s activity was aligned to the inferred step time rather than stimulus onset, the average firing rate turned from a ramp to a step. The stepping model seems to capture the neural activity qualitatively, but is it actually better than the ramping model? This is a crucial question that plagues many models of neural activity. Because the models in this paper were based on Bayesian statistics, with real data serving as a guide for the parameters, the authors were able to directly compare the two models using information criteria that compare how well the models fit the data and how many parameters were needed for each (the more parameters are needed for a model to fit the data, the more likely it is to be overfit; at the extreme end of this spectrum, a model could have as many parameters as there are data points, in which case the model would be useless), and showed that the Stepping model was more parsimonious with the data than the Ramping model.


1. Newsome, W. T., Britten, K. H., & Movshon, J. A. (1989). Neuronal correlates of a perceptual decision. Nature.

2. Roitman, J. D., & Shadlen, M. N. (2002). Response of neurons in the lateral intraparietal area during a combined visual discrimination reaction time task. Journal of Neuroscience, 22(21), 9475–9489.

3. Latimer, K. W., Yates, J. L., Meister, M. L. R., Huk, A. C., & Pillow, J. W. (2015). Single-trial spike trains in parietal cortex reveal discrete steps during decision-making. Science, 349(6244), 184–187.

Luck in Science

One of the most fascinating results in brain research - one that revolutionized neuroscience, launching it into the modern age - came from David Hubel and Torsten Wiesel in a series of papers in the early 1960’s. Hubel and Wiesel were awarded the Nobel Prize in 1981 for finding that the brain breaks down visual scenes into elementary components, dedicating networks of neurons to compute simple features that are eventually built up again into ever more complex representations.

As we wait to learn who this year’s Nobel Prize winners are, I can’t help but wonder how those women and men come upon their fascinating findings. From Galileo’s revolutionary work in astronomy to Oswald Avery’s determination of DNA as the molecule of heredity, the scientific method has been the unrivaled system of discovery in a world full of mysteries. While there is no doubt that the scientific method is still producing incredible new knowledge, it is not clear why some scientists are more successful than others at utilizing that method. If all scientists - supposedly intelligent, driven people - employ the same general strategy, why are some so much better at discovery than others?

In their account of their 25-year collaboration, Brain and Visual Perception, Hubel and Wiesel describe the chance situation that contributed to their initial result:

“Suddenly, just as we inserted one of our glass slides into the ophthalmoscope, the cell seemed to come to life and began to fire impulses like a machine gun. It took a while to discover that the firing had nothing to do with the small opaque spot [i.e. the intended stimulus]—the cell was responding to the fine moving shadow cast by the edge of the glass slide as we inserted it into the slot... People hearing the story of how we stumbled on orientation selectivity might conclude that the discovery was a matter of luck.”


My own experience in neurophysiology has produced some seemingly lucky results. As a technician in the lab of Tim Gardner at Boston University, I worked to develop a system to record the activity of large numbers of neurons in singing zebra finches using minimally invasive carbon fiber electrodes that promised to outperform traditional metal electrodes because of their small size and biocompatibility.

Our strategy seemed straightforward, but I kept running into a problem - after coating the carbon fibers with insulating plastic, the fibers’ electrical resistance went through the roof, making it practically impossible to see electrical activity from the neurons.

After taking several images of the fibers’ tips under an electron microscope, I realized that the problem lay in the way that I had been cutting the fibers: instead of a nice carbon core surrounded by a layer of plastic, like a pencil’s graphite cased in wood, the tips more closely resembled a chewed straw or gnarled tree, with the plastic practically swallowing the carbon in a frayed mess. The scissors I was using had been crushing my fibers, leaving almost no carbon surface exposed to record neural activity!

I needed a way to cut the fibers cleanly. This was a stage of wild exploration: the first idea featured a hacked hard-drive that was supposed to grind the plastic off the carbon tips; after that failed, I embedded the fibers in wax and cut them on a machine normally used to cut slices of brain (a distant cousin of the deli slicer). When that didn’t pan out, I nearly burned down the lab by trying to torch carbon tips that were just barely protruding from the same wax embedding I had used before; in the excitement of the prospect of success, I forgot that the wax was based in ethanol, and watched my latest idea go up in flames.

The torching wasn’t such a bad idea though - I simply needed to experiment using a non-flammable insulator. The answer was water. I poured a little bath for my carbon electrodes and immersed them in the water, with the tips sticking out above the water surface; I then ran my torch over the water and measured their resistance. The tips emerged clean, the resistance low and as an added bonus the tips had tapered to a fine point, making insertion into the brain much easier!

This modest scientific success seems to have come from a combination of perseverance and exploration, two seemingly contradictory tactics - a sort of focused play. Was it a matter of luck that I eventually stumbled onto a suitable method? Hubel and Wiesel analyze the matter of luck in their first success:

“While never denying the importance of luck, we would rather say that it was more a matter of bullheaded persistence, a refusal to give up when we seemed to be getting nowhere. If something is there and you try hard enough and long enough you may find it; without that persistence, you certainly won't. It would be more accurate to say that we would have been unlucky that day had we quit a few hours before we did... But just as important as stubbornness, in getting results, was almost certainly the simplicity, the looseness, of our methods of simulation.”



While it may be impossible to predict who will succeed in science or which experiments are going to be worthwhile, we shouldn’t rely on blind luck for success. Louis Pasteur wrote that chance favors the prepared mind. That adage might work not just for school examinations, but for the uncharted land of science as well. Perhaps what we can take from Hubel and Wiesel’s reflections is that chance favors the open yet persevering mind, those who ask interesting questions and don’t give up until the results are in hand.