Where does a line become a line?
Look at the edge of your desk, a window frame, a pencil. You find lines and outlines without any effort. The cells lined up at the back of your eye only measure how much light falls on them. Each one can only say "bright here" or "dark here". So how does your brain come to know that "there is a line tilted at 45° over there"?
A big clue came from experiments at the end of the 1950s, in which researchers recorded single neurons one at a time in the cat's primary visual cortex, known as V1. Some cells fired vigorously only when a line with a particular tilt appeared in a particular small part of the visual field. Here we build such a "tilt-loving neuron" out of arithmetic, and you make it fire with your camera or synthetic stimuli.
The patch a single cell watches
The part of the visual field that a neuron responds to is called its receptive field. Whatever happens outside it, the neuron simply ignores.
The term "receptive field" was first used by the English physiologist Charles Sherrington in 1906, for the patch of a dog's skin where a tickle sets off the scratch reflex of the hind leg. Haldan Keffer Hartline in the United States carried the idea into vision: in 1938 he recorded single nerve fibers from a frog's retina and showed that each responds only to light falling on a small area. Hartline shared the 1967 Nobel Prize in Physiology or Medicine for his work on the neural mechanisms of vision. In the 1950s it was found that retinal ganglion cells in the cat have circular receptive fields in which the center and the surround respond in opposite ways.
Photoreceptors catch light, retinal ganglion cells take the difference between center and surround, and in the primary visual cortex cells that care about tilt appear. Information is assembled step by step, from points to lines.
The shadow of a slide's edge
How was such a tilt-loving cell found? In 1958, in Stephen Kuffler's laboratory at Johns Hopkins University, David Hubel and Torsten Wiesel teamed up to record neurons one by one in the cat's primary visual cortex. Earlier, at an Army research institute, Hubel had built his own tungsten microelectrode for recording single cells in the brain, and a hydraulic drive to advance it, learning basic machinist skills to make them. Yet stimulating with spots of light, which worked well in the retina, gave disappointing results. According to Hubel's own recollection, they were sliding a glass slide with a black spot on it into an ophthalmoscope when a cell suddenly went off like a machine gun: the edge of the slide was casting a faint but sharp shadow, a straight dark line, onto the retina. That is how it became clear that V1 cells prefer tilted lines, not spots. The two distinguished simple from complex cells and shared the 1981 Nobel Prize in Physiology or Medicine. Researchers often listened to recorded spikes through a loudspeaker, the idea behind the clicks here.
Their work had a second great pillar. If one eye of a young kitten is kept closed for a while, the inputs from the open eye take over the parts of the primary visual cortex that would normally serve the closed eye. The change happens during a limited window of development, called a critical period, and is hard to undo later. This finding is credited with opening the way to understanding and treating cataracts and strabismus in children. Seeing actually wires the brain.
An arrangement that measures tilt
When the receptive fields of V1 "simple cells" were mapped in detail, they turned out to consist of long, narrow zones side by side. For example, there may be a central strip where light excites the cell, flanked on both sides by strips where light inhibits it, so that darkness there excites it.
Let's do a thought experiment. Put a bright bar on top of this cell. If the bar lies exactly along the central strip, only the excitatory zone is lit, and the cell fires happily. Now rotate the bar by 90°. It crosses the excitatory and the inhibitory strips alike, the plus and the minus cancel, and the cell hardly fires.
So the preference for a tilt comes straight out of the way the excitatory and inhibitory zones are arranged. No special "angle-measuring device" is needed: the arrangement itself is the protractor.
The preference for tilt shows up in psychology too. People discriminate horizontal and vertical lines better than oblique ones, which is called the oblique effect. On the surface of the cortex, the preferred tilt changes gradually from place to place, forming orientation maps.
Weigh, then add up
The starting point is experiment. Probe a receptive field with a small spot of light and you find that each place either excites the cell when lit or inhibits it. Mark the first kind of place + and the second −. A neuron receives signals from many cells through synapses, adding excitatory inputs and subtracting inhibitory ones. The simplest assumption is that the contributions of all the places just add up. If is the weight at each point of the receptive field, giving the size and sign of its contribution, and is the brightness there, the response is
This has the same form as a dot product of vectors. Line up the weights as a vector and the image as a vector ; then , where is the angle between them. Which image makes as large as possible? Among images of equal "strength" , the winner has : points the same way as , an image that looks exactly like the pattern of weights. Mathematicians know this as the Cauchy–Schwarz inequality. So if you can see the weights, you know the cell's favorite stimulus. Think of the receptive field as a stamp pressed onto the image, a stamp with dents as well as bumps: places where darkness, not light, earns points. These are the negative weights.
Here the weights are a Gabor function. With measured across the bar and along it,
Measured cross-sections showed an excitatory strip in the middle, inhibitory strips on either side, all fading away from the center. The cosine creates the alternating excitatory and inhibitory strips, and the Gaussian factor makes them fade with distance. We use and , which makes the field twice as long along the bar as across it.
The Gabor function is named after Dennis Gabor, who won the 1971 Nobel Prize in Physics for inventing holography. In 1946 he proposed a theory of communication in which signals that change in time, like sound, are described at once by "when" and by "what pitch," or frequency, using a Gaussian multiplied by a wave. More than thirty years later, from around 1980, studies including measurements of cat cells showed that simple-cell receptive fields are approximated well by Gabor functions. A function built for communication engineering turned out to describe the receptive fields of brain cells.
A Gabor function, a Gaussian times a sine wave, describes both "where" and "how fine a stripe" with moderate precision. Fourier analysis makes this property clear.
Let's check the tilt preference with this shape. A thin light bar placed through the center along the strips, in the direction, gives a response proportional to the weights summed along the bar, . Turn it 90° to lie along , and now the bar adds up the peaks and troughs of the cosine:
This integral is beyond high-school math, so we just use the result. The ratio of the two is : a perpendicular bar gets only about 2% of the response to the preferred tilt. In this simulation the weights are also adjusted to average zero, so that uniform brightness gives no response, which pushes it even closer to zero.
Cells that respond anywhere
There are also "complex cells". They are just as fussy about tilt, but they respond wherever the bar is inside the receptive field, and to light bars as well as dark ones. Combining several simple cells is thought to produce this behavior.
In this simulation, a second set of weights with sin instead of cos gives a second response . For a simple cell, : negative values are cut to zero, because a firing rate cannot be negative. For a complex cell,
the "energy model". Why does this barely change when the bar shifts? Suppose a grating of the preferred fineness sits at a phase from the center of the receptive field. The sum with the cosine weights behaves like and the sum with the sine weights like , where depends on the grating's strength. Then
which does not depend on , that is, on where the grating is. The most basic identity of trigonometry, , is what makes a complex cell respond wherever the stimulus falls.
Contrast in, firing rate out
One more step matters. With raw brightness, doubling the room lighting would double the response. So we divide by the average brightness in the receptive field first; in other words, we work with contrast. Real visual systems also care more about ratios to the surroundings than about absolute brightness.
By the way, an action potential is all-or-none: every spike has the same size, so stimulus strength is carried by how often a cell fires.
Finally, is turned into a firing rate in hertz:
This shape goes back to 1966, when K. I. Naka and W. A. H. Rushton fitted it to the way the electrical response of cells in a fish retina grows with light intensity and then levels off. It is known as the Naka–Rushton function. Later, in 1982, D. G. Albrecht and D. B. Hamilton showed that the same form, with the input raised to a power greater than 1, describes how cells in the visual cortex of cats and monkeys respond to the contrast of gratings; this simulation uses an exponent of 2. Read the formula: when is much smaller than the denominator is close to and grows like ; at it reaches exactly half of ; when is much larger the numerator and denominator are nearly equal and the rate levels off at . However much a cell loves a stimulus, its firing rate has a ceiling; even neurons need to catch their breath. The refractory period, a brief pause after each spike, is one reason for the ceiling. We chose , and to illustrate the idea; they are not measurements from a particular cell. Spikes are then generated by a Poisson process: in every millisecond the cell fires with probability . So the same stimulus gives a slightly different spike train every time, just as in real neurons.
Receptive fields in machines
Receptive fields tie together the "nerves" chapter of a biology book and the "image processing" chapter of a computing book.
In 1979 Kunihiko Fukushima proposed the "neocognitron," an image-recognition network built from layers modeled on simple and complex cells, and published it in English in 1980. It was used for tasks such as recognizing handwritten characters and is regarded as one of the ancestors of today's convolutional neural networks, or CNNs. The first layer of a CNN slides small weight patterns, called filters, across the whole image, exactly like a grid of identical receptive fields covering the visual field. In computing, sliding the same weights across a whole image is called convolution, the foundation of CNNs.
In 2012 a large CNN trained on huge numbers of photographs won an image-classification contest with 1,000 object categories, getting the fraction of images whose correct label was missing from its top five guesses down to 15.3%, more than 10 points better than the runner-up. It is one of the sparks of today's deep-learning boom. The paper shows the filters the network learned in its first layer: a variety of frequency- and orientation-selective patterns that look a lot like Gabor functions, although nobody told it to make them. Recognizing faces and objects in your photos, analyzing medical images, sensing the surroundings of a car: these "artificial receptive fields" are working behind many technologies you use every day.
And in the 2012 CNN, which was split across two processors, one half ended up with filters that largely ignore color while the other half collected color-specific ones, as the paper notes. That looks a little like the brain's own division between brightness-defined shape and color, a division explored in the "Isoluminant Motion" simulation.
Edge detection in image processing belongs to the same family; finding brightness changes helps cameras focus, read text and detect lane markings.
Listen to the neuron fire
- When you open the page, "Input" is set to "Rotating bar (tuning curve)": a bar turns on the receptive field, which is the yellow ellipse. Each click is a spike. For which tilts do the clicks become frequent? The "Tuning curve" box on the right side of the canvas fills in as you watch.
- How far from the preferred orientation, shown by the dashed line, does the curve fall to half its peak? Predict whether a larger "Receptive-field size σ" makes the peak wider or narrower, then test it.
- Under "Input", choose "Move a bar by hand". Drag its center, and rotate it with the ring at its end. Outside the receptive field, the bar does nothing at any tilt.
- Set "Cell type" to "Simple" and choose "Drifting grating" under "Input". The spikes come in rhythmic bursts. What happens with "Complex"? Explain the difference using the formulas.
- Turn on "Compare with a Laplacian detector", which sums tilt-blind edge strength along a thin strip and fires above a threshold. It also fires for bars at the wrong angle.
- Press "📷 Use the camera" and hold a pencil or your arm over the receptive field, tilting it. Why does dimming the room hardly change the response? The video never leaves your device.
From points to lines, and beyond
A receptive field is the part of the visual field a neuron "watches". Many cells in the primary visual cortex respond strongly to a line of a particular tilt inside it, and that preference arises from the arrangement of excitatory and inhibitory zones, which the model expresses as a weighted sum with a Gabor function. The firing rate changes smoothly with stimulus strength, and spikes come out irregularly. The same principle lives on in CNNs and edge detection.
The word "receptive field" began with a tickle reflex in a dog, passed through Hartline's frog retina and the shadow of a slide's edge in Hubel and Wiesel's lab, changed how doctors think about children's eyes, and now lives on in the artificial neurons inside your phone.
So how does the brain build faces and letters out of thousands of tilt detectors? That is still a question at the frontier of research.
Sources and further reading
Main sources for the facts mentioned above.
- S. W. Kuffler, Discharge patterns and functional organization of mammalian retina, Journal of Neurophysiology, 1953 (center-surround fields in the cat retina)
- D. H. Hubel & T. N. Wiesel, Receptive fields of single neurones in the cat's striate cortex, Journal of Physiology, 1959
- D. H. Hubel, Evolution of ideas on the primary visual cortex, 1955–1978: a biased historical account, Nobel lecture, 1981 (the tungsten electrode at Walter Reed, the slide edge)
- T. N. Wiesel, The postnatal development of the visual cortex and the influence of environment, Nobel lecture, 1981 (the critical period, children with congenital cataract or strabismus)
- D. Gabor, Theory of communication. Part 1: The analysis of information, Journal of the IEE, 1946
- J. P. Jones & L. A. Palmer, An evaluation of the two-dimensional Gabor filter model of simple receptive fields in cat striate cortex, Journal of Neurophysiology, 1987
- K. Fukushima, Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position, Biological Cybernetics, 1980
- A. Krizhevsky, I. Sutskever & G. E. Hinton, ImageNet Classification with Deep Convolutional Neural Networks, NeurIPS, 2012 (figure of first-layer filters)
- K. I. Naka & W. A. H. Rushton, S-potentials from colour units in the retina of fish (Cyprinidae), Journal of Physiology, 1966 (origin of the Naka–Rushton function)
- D. G. Albrecht & D. B. Hamilton, Striate cortex of monkey and cat: contrast response function, Journal of Neurophysiology, 1982
Further reading (encyclopedia):