ΨPsychology, Built

Act III · Sensing

Part 14 of 62

Seeing as Inference

Psych 101 and the majorstarts at this level65 min of film16 chaptersprerequisites: none

If every image fits many worlds, how does seeing choose one?

Two squares on a checkerboard send the eye the same light, and one looks dark and the other light: the viewer sees surfaces, with the shadow taken out. Every image fits many scenes, as the Ames room shows, so seeing must add assumptions. The Gestalt laws of grouping read as priors about objects; Kanizsa's triangle has edges that are not in the image, and Rubin's vase shows that an edge belongs to one side. Two eyes give disparity, which falls with the square of distance; Wheatstone's stereoscope and Julesz's random dots show it is enough for depth. Size constancy multiplies by seen distance, and makes the Ponzo and Müller-Lyer illusions on a page; the carpentered-world explanation is now contested. Bayes's rule with normal distributions gives precisions that add and means weighted by precision, shrinkage toward the prior, and a biased percept that is more accurate. Cue combination is predicted from each sense alone, checked on Psyche and by Ernst and Banks, and explains the ventriloquist. Light from above and a preference for slow motion are priors the viewer can see; the second solves the aperture problem. Retinex explains the two squares. Objects need invariance, faces are seen as wholes in cortex of their own, and deep networks predict the brain yet answer by texture until their diet changes.

What you need. Part 4's Bayes's rule, Part 11's psychometric functions and staircases, Part 12's forced choice, and Part 13's cells and filters. Normal distributions, completing the square, and a little vector geometry.

Hook
Two squares on a checkerboard send identical light and look different
Ideas, models and mathematics
the inverse problem, Gestalt laws as priors, disparity derived and a random-dot stereogram, constancy and its illusions, the normal posterior and shrinkage, cue combination predicted and tested, light from above and the slow prior, the aperture problem, retinex, objects and invariance, faces, a small network that learns texture
Psyche gains
a Bayesian observer, a cue combiner, retinex and a convolutional network
On you
your own Müller-Lyer illusion, by two staircases

What you will be able to do

Psych 101 and the major

  • Explain why a retinal image cannot fix the scene, with an example of size and distance.
  • State the Gestalt laws of grouping and read them as assumptions about objects.
  • Explain size constancy and how it produces the Ponzo and Müller-Lyer illusions.

Graduate

  • Derive the normal posterior by completing the square, and the weights of two combined cues.
  • Derive binocular disparity and its fall with the square of distance.
  • Compute the MAP velocity for two edges under a slow prior, and show it tends to the intersection of constraints.

Research

  • Judge when a Bayesian model of perception is a test and when it is a description after the fact.
  • Weigh the evidence on whether the Müller-Lyer illusion depends on culture, and on what the face area is selective for.

Practice

  • Explain the vergence-accommodation conflict in headsets and what a display must do about it.
  • Say how machine vision's errors differ from people's, and what that means for a human in the loop.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 51 min · Graduate 54 min · Research 65 min · Practice 54 min.

  1. 0Two squaresPsych 101 and the major3 min
  2. 1The inverse problemPsych 101 and the major2 min
  3. 2Grouping and the Gestalt lawsPsych 101 and the major3 min
  4. 3Depth from two eyesPsych 101 and the major5 min
  5. 4Constancy, and illusionsPsych 101 and the major4 min
  6. 5Bayes for perceptionPsych 101 and the major5 min
  7. 6Combining cuesPsych 101 and the major6 min
  8. 7Priors made visiblePsych 101 and the major6 min
  9. 8The two squares, explainedPsych 101 and the major4 min
  10. 9Recognizing objectsPsych 101 and the major4 min
  11. 10FacesPsych 101 and the major4 min
  12. 11Deep networks as modelsResearch4 min
  13. 12The LedgerPsych 101 and the major3 min
  14. 13In practice: headsets, camouflage and machine visionPractice3 min
  15. 14Frontier: where priors come fromResearch6 min
  16. Recap, problems, and the road aheadAll tracks4 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.

Two squaresPsych 101 and the major3 min

Look at this checkerboard. Part of it lies in a soft shadow. Square A, out in the light, is one of the dark squares. Square B, in the shadow, is one of the light ones. Which of the two is lighter? Most people don't hesitate.

Now measure them. The light coming from square A and the light coming from square B are the same: point four, in this picture's units. Cut them out and set them side by side, and they are the same grey. Edward Adelson made the classic version of this in 1995. You weren't seeing light. You were seeing surfaces, with the shadow taken out: A is a dark square in bright light, B a light square in shadow. That's what you saw, and it's correct about the board, and wrong about the picture.

The image on the back of your eye doesn't fix the world in front of it. Many different scenes could have produced exactly the same image. So the visual system has to guess, using what it knows about how worlds usually are: that light comes from above, that shadows have soft edges, that surfaces don't change colour where a shadow begins. Hermann von Helmholtz called it unconscious inference, in his handbook of physiological optics, completed in 1867. Today's question: what exactly is the bet, and how good is it? The surprising answer is that in some cases we can write down the best possible bet, and people come remarkably close to it.

This is Part 14 of Psychology, Built: seeing as inference. We'll start with the inverse problem, the reason every image is ambiguous. Then three things the visual system does about it: grouping, depth from two eyes, and the constancies, with the illusions they produce when they're applied in the wrong place. Then the mathematics of the bet, Bayes's rule for perception, derived with Gaussians; how two cues should be combined, and how people do combine them; and two priors you can see for yourself. Then recognizing objects and faces, and deep networks as models of the brain's object pathway. And at the end, virtual-reality headsets, camouflage, machine vision, and the open question of where priors come from.

What it does: The checkerboard; equal light; seeing is a bet; objectives

1The inverse problemPsych 101 and the major2 min

Here is the problem in its simplest form. A small object close to the eye, a larger one further away, and a larger one still: all three cast exactly the same image on the retina. Every combination of size and distance along this line makes the same two-degree image. So to see an object's size, the visual system needs a guess about its distance; and to see distance, it needs a guess about something else. The image alone can't decide. Mathematicians call this an inverse problem: going from effects back to causes, when many causes give the same effect.

Adelbert Ames built a room in the nineteen-forties that turns this into a show. Here it is from above. Its back wall runs away at a slant, but the walls and windows are cut so that through a peephole it looks like an ordinary rectangular room. Put one person in each back corner. The one in the far corner is much further away, so casts a much smaller image. The visual system bets the room is rectangular, and so both people must be at the same distance, and one must be a giant and the other a dwarf. Two assumptions conflict: that rooms are rectangular, and that adults are roughly the same size. The room wins.

What it does: One image, many worlds; the Ames room from above

2Grouping and the Gestalt lawsPsych 101 and the major3 min

Before the visual system can recognize anything, it has to decide which bits of the image belong together. Max Wertheimer laid out rules for this in 1923, and they are still taught as the Gestalt laws. Proximity: dots that are closer group together, so here you see columns. Similarity: dots that look alike group together, so here you see rows, though every dot is equally spaced. Good continuation: you see two smooth curves crossing, not two pointed shapes touching at their tips. Closure: four arcs with gaps, seen as one circle. The Gestalt psychologists thought of these as laws of the brain's own organization. The modern reading is statistical. Each rule is a regularity of the world: the parts of one object tend to be close together, to look alike, and to have smooth edges. Measured in photographs of natural scenes, edges that belong to one contour really do tend to continue smoothly. The laws are priors.

Grouping can go further than joining pieces. It can make things up. This figure was published by Gaetano Kanizsa in 1955. Most people see a white triangle lying on top of three discs and an outline triangle, and the white triangle looks slightly brighter than the page around it, with sharp edges. But those edges aren't in the image. Along most of their length, nothing on the page changes. Why see them? Because three discs, each with a wedge missing, with the wedges lined up exactly, would be a remarkable coincidence. A triangle lying on top, covering them, explains all of it at once. The visual system takes the explanation, and draws its edges in. And not just in experience: in 1984, Rüdiger von der Heydt and colleagues found neurons in the monkey's second visual area that fire to these illusory edges as if they were real.

One more decision the visual system makes before it recognizes anything: which side of an edge is the object. Edgar Rubin's figure of 1915 can be a white vase on black, or two black faces in profile, looking at each other. The edges are the same either way. What changes is which side owns them, and they can belong to only one side at a time: most people see the vase or the faces, and flip between them, rarely both. Whichever region owns the edge is seen as in front, and as having a shape; the other becomes shapeless background, running on behind. This too has been found in single cells: in 2000, Zhou, Friedman and von der Heydt found cells in the second visual area that signal which side of an edge is the figure. These aren't decorations on vision. They are early, fast, and the rest of seeing builds on them.

What it does: Proximity, similarity, continuation, closure as priors; Kanizsa's triangle; figure and ground

3Depth from two eyesPsych 101 and the major5 min

Your two eyes are about six point three centimetres apart, so they see the world from slightly different places. Look at a point at distance d. The lines of sight from the two eyes meet there at an angle theta, which is two times the arctangent of I over two d, and for distances much larger than the gap between the eyes that's simply I over d. Now a second point, nearer by delta d. Its angle is a little larger. The difference between the two angles is the binocular disparity, and differentiating I over d gives it: I times delta d, over d squared. Disparity is the difference between where a point falls in the two eyes, relative to the point you're looking at. And it falls with the square of distance. Double the distance, and the same step in depth gives a quarter of the disparity.

Here's that square law for one centimetre of depth. The vertical axis is logarithmic. At half a metre, about arm's length, one centimetre of depth gives eight and a half minutes of arc of disparity. At two metres, about half a minute. At ten metres, two hundredths of a minute: just over one second of arc. The best observers can detect disparities of a few seconds of arc, finer than the spacing of the cones in the fovea, which is about half a minute. It's one of the hyperacuities: the brain compares positions across many receptors, and does better than any one of them. Even so, beyond a few tens of metres two eyes stop helping much, and depth has to come from other cues.

That disparity alone can make depth was shown by Charles Wheatstone, a physicist, to the Royal Society in June 1838. His stereoscope used two mirrors at right angles, so that each eye saw its own drawing, each drawn from that eye's position. Two flat line drawings of a cube or a pyramid fused into one solid object, standing out in depth. Nothing else in the drawings had depth in it: no shading, no perspective that the other drawing lacked. The only difference between the pictures was the disparity. And within twenty years, stereoscopes and stereo photographs were a craze in Victorian parlours.

Here's a test you can take. These are two pictures of random dots. Look at either one: there's no shape in it at all. But in the right picture, a square patch of the left picture's dots has been shifted six dots sideways, and the gap filled with fresh random dots. If you can, cross your eyes slightly, so the two pictures slide over each other and become three. Hold the middle one steady, and wait. For most people with working stereo vision, after a few seconds, a square appears, floating in front of or behind the rest. If it doesn't work for you, you're not alone: several people in every hundred have little or no stereo vision. Bela Julesz, an engineer at Bell Labs, made these in 1960. They proved that the brain can find depth before it has found any shape: there's no shape to find in either eye's image. It has to match dots between the two eyes, which is a hard problem, since every dot looks like every other.

Close one eye, and the world doesn't go flat. There are many cues to depth in a single image. What hides something is nearer than what it hides. Things of the same size look smaller and their textures denser as they get further away, like these ellipses. Parallel lines meet at the horizon. Shading gives shape, and distant things are hazier. And moving gives you more: as your head moves, near things sweep past faster than far ones. Within a few metres, how your eyes turn inward and how they focus also tell the brain how far away something is. None of these cues is certain. Each can be faked, as painters have known for five centuries. So the visual system has many uncertain cues, and a question that is mathematical: how should they be combined? We'll answer it in chapter six.

What it does: Disparity derived; its square law; Wheatstone's stereoscope; a random-dot stereogram to fuse; cues for one eye

4Constancy, and illusionsPsych 101 and the major4 min

The inverse problem had a size and a distance traded against each other. Here's what the visual system does about it. A person walking away from you halves the size of their image on your retina each time their distance doubles. They don't seem to shrink. A friend across the room looks the size of a friend, not of a doll. To a first approximation, the visual system multiplies the size of the image by the distance it thinks it sees, and the product stays constant. That's size constancy. It's an excellent bet, as long as the distance is right. Get the distance wrong, and the size goes wrong with it, which is what the Ames room did, and what the next two figures do.

Mario Ponzo described this one in 1911. Two yellow bars of exactly the same length, between converging lines. The upper bar looks longer. The converging lines are a perspective cue. They look like railway tracks running away from you, and they say that the upper bar is further away. Two bars cast the same image; the one that's further away must be the larger. Size constancy, applied to a page where nothing is further away than anything else, gives the wrong answer. The illusion isn't a failure of the mechanism; it's the mechanism, working on a picture.

The most studied illusion of all was published by Franz Müller-Lyer in 1889. Two shafts of exactly the same length. The one with the fins turned outward looks longer than the one with them turned in. The dashed lines show their ends line up. Richard Gregory proposed in 1963 that this is size constancy too. Fins turned in look like the edges of a building's outside corner, coming toward you; fins turned out look like the inside corner of a room, going away. The shaft that seems further away is seen as longer. That explanation makes a prediction: the illusion should depend on growing up among rectangular buildings and rooms. And this part's interactive experiment measures your own illusion, with the staircase method from Part 11.

In 1966, Marshall Segall, Donald Campbell and Melville Herskovits published the test of that prediction. Fieldworkers showed versions of the figure to people in more than a dozen societies. The San foragers of the Kalahari showed the least illusion, and the samples from towns of European descent the most. For fifty years this was the textbook example of culture shaping perception itself, and it's often cited as a reason that psychology's usual samples aren't representative of humanity. In 2025, Dorsa Amir and Chaz Firestone reopened it. The methods differed from site to site in ways that could make the differences by themselves; children in India who gained their sight after cataract surgery saw the illusion within days, before corners could have taught them anything; and the illusion has been found in species that have never seen a building, birds and fish among them. The illusion is real. Whether its size depends on a carpentered environment is open, and nobody has repeated the study with modern methods. We'll put it in the Ledger.

What it does: Size constancy; Ponzo; Müller-Lyer and Gregory; the carpentered world reopened

5Bayes for perceptionPsych 101 and the major5 min

Helmholtz's unconscious inference was a phrase. In the last forty years it has become a calculation. Bayes's rule, from Part 4, says the probability of a world, given the image, is proportional to the probability of the image, given that world, times the probability of that world in the first place. The likelihood is the physics: how probable this image would be if the world were so, given the optics of the eye and the noise in its receptors. The prior is what the visual system knows before it looks: that light usually comes from above, that rooms are usually rectangular, that most things are still or move slowly. The posterior is the bet: every possible world, weighted by how probable it is now. What you see is a choice made from it, usually the most probable world, or the average.

With normal distributions everything can be worked out. Here's a prior: the quantity, which could be a size, a speed or the slant of a surface, is usually near zero, with a standard deviation of one and a half. Now a measurement comes in, a noisy one. It says four, with a standard deviation of one. Multiply the two curves, point by point, and rescale, and you get the posterior. It's centred at two point seven seven, with a standard deviation of point eight three. Notice two things. The posterior lies between the prior and the measurement, nearer the more certain of the two. And it's narrower than either: combining them leaves you more certain than you were with only one.

Here's why, in four lines. Take logs. The log posterior is the log likelihood plus the log prior: two quadratics in the unknown s, plus a constant. Collect the terms in s squared and in s. A quadratic in s with a negative leading term is the log of a normal distribution, so the posterior is normal. Its precision, one over its variance, is the coefficient of s squared: the precision of the measurement plus the precision of the prior. Precisions add. And completing the square gives its mean: a weighted average of the measurement and the prior's mean, with each weighted by its precision. Here the measurement's weight is point six nine two, and point six nine two times four is two point seven seven. These two formulas, precisions add and means are precision-weighted, will carry the whole of the next chapter.

Now vary the noise in the measurement, and watch the percept. When the measurement is sharp, at the left, the percept is almost exactly what the image says, four. As it gets noisier, the percept slides toward the prior, toward zero. Statisticians call this shrinkage. And many things make a visual measurement noisy: low contrast, dim light, a brief glance, the edge of the visual field. So this simple model makes a prediction you can test: whatever the prior is, its effects, which we'd call illusions, should grow as the evidence gets worse. In chapter seven we'll see that this is what happens to the speed of things at low contrast.

There's an obvious objection. A percept pulled toward the prior is biased. Isn't that bad? Compare two strategies, over many worlds drawn from the prior. One takes the image at its word, and reports the measurement. Its average squared error is the measurement's variance, one. The other reports the posterior mean. Its average squared error is the posterior's variance, point six nine: about a third less. Biased, and more accurate. Statisticians call this the trade between bias and variance; here the brain is the estimator. The price comes when the world is unlike the prior: a room that isn't rectangular, a picture that only pretends to have depth. Then the bet is confidently wrong. Which suggests a way of reading illusions. Many of them aren't failures. They're the price of a bet that pays off almost all the time.

What it does: The rule; a normal prior, likelihood and posterior; completing the square; shrinkage; why bias can pay

6Combining cuesPsych 101 and the major6 min

Suppose you look at an object and hold it at the same time. Vision gives an estimate of its height, with some noise; touch gives another, with different noise. Write them as two normal measurements of the same height s, with standard deviations sigma V and sigma H. Last chapter's algebra applies directly: treat one cue as the prior for the other. The best estimate is a weighted average, with each cue weighted by its precision. And the combined variance is smaller than either cue's alone. Here's what makes this science rather than arithmetic. Measure each sense on its own, and you can predict two things in advance: the weight each sense will get when both are present, and how precise the combination will be. With no prior over the height itself, this is the maximum-likelihood estimate, and among unbiased averages of the two cues the one with the least variance.

In 2002, Marc Ernst and Martin Banks ran the test. Observers looked at a raised bar, rendered as a random-dot stereogram, and at the same time felt it between thumb and finger through two force-feedback robot arms. The visual bar and the felt bar were made to coincide. On each trial they judged which of two bars was taller, using vision alone, touch alone, or both. To control how good vision was, they added noise to the stereogram at four levels, from none to a great deal. And to measure the weights, they sometimes made the seen bar and the felt bar slightly different heights. If vision dominates, the combined percept follows the seen bar; if touch does, the felt one. Where it falls between them gives the weights.

We can run the same experiment on Psyche, whose vision and touch we built, with their noise known. Each curve is a psychometric function from Part 11: the chance of calling the comparison bar taller, against how much taller it really is, with two thousand trials a point. Vision first, then touch. The steeper the curve, the more precise the sense, and fitting a cumulative normal gives each sense's sigma. And with both senses, the curve is steeper than either. Combining two cues made Psyche more precise than its better sense.

Now the full design, at four levels of visual noise. Each row: vision's sigma, measured alone; the weight on vision, predicted from the two single-sense curves and then measured from the conflict trials; and the combined sigma, predicted and measured. As vision gets noisier, its weight falls from point eight eight to point three one, and the measured weights and precisions track the predictions to the second decimal place. A caution, though. Psyche combines cues optimally because we built it to. So this table checks the method: that single-cue curves really do predict the combination, and that conflict trials recover the weights. Whether people do it is the experiment's question. Ernst and Banks's observers came close. Their weights shifted toward touch as the visual noise rose, about as predicted, and their combined thresholds were near the optimal ones.

The same rule explains an old piece of stagecraft. In 2004, David Alais and David Burr presented a flash of light and a click from slightly different places, and asked where the event happened. With a sharp flash, vision is far more precise than hearing about location, so it gets nearly all the weight, and the sound seems to come from the flash. That's the ventriloquist's trick: the voice seems to come from the dummy's moving mouth. But Alais and Burr blurred the flash, until it was a large faint smudge. Then hearing was the more precise cue, and the flash was pulled toward the click. So vision doesn't dominate hearing, as textbooks once said. Precision dominates, and vision is usually more precise about where things are.

How far does the optimal observer go? Reliability-weighted combination has been found for vision with touch, vision with hearing, and many pairs of visual cues: stereo with texture, motion with shading. But not from birth. In 2008, Monica Gori and colleagues found that children below about eight to ten years old don't combine vision and touch this way: one sense or the other dominates, even when the combination would help them. And in 2018, Dobromir Rahnev and Rachel Denison reviewed the evidence on perceptual decisions and listed many ways that people fall short of the optimum, cue combination included. There's a methodological point too. With freedom to choose the prior, the noise and the loss, a Bayesian model can be fitted to almost any data after the fact. What made Ernst and Banks a real test is that the prediction was made in advance, from separate measurements, with nothing left to adjust.

What it does: The rule and its two predictions; Ernst and Banks; Psyche at the bench; the ventriloquist; how optimal

7Priors made visiblePsych 101 and the major6 min

Here are twelve discs, shaded from light to dark. To most people, the discs that are lighter at the top look like bumps, standing out of the page, and the ones lighter at the bottom like dents. The shading itself is ambiguous. A bump lit from above and a dent lit from below produce exactly the same image. So the visual system uses a prior: light comes from above. Vilayanur Ramachandran made this demonstration famous in 1988, and later measurements found the assumed light is above and a little to the left. If you can, tilt your head all the way over, or turn your screen upside down. The bumps and dents swap. The assumption is tied to your head, not to the real sky, which is a cheap approximation that works because we usually hold our heads upright.

Is that prior built in, or learned? In 2004, Wendy Adams, Erich Graf and Marc Ernst showed observers shaded shapes and asked whether each was a bump or a dent. Then they trained them. The observers touched the shapes through a force-feedback device, and what they felt was consistent with light falling from a direction off to the side, not from above. After the training, the direction of light they assumed when looking had moved toward the trained direction. And the change wasn't confined to the task they trained on. It carried over to a different judgment, of which of two patches looked lighter. So a prior isn't a fixed setting. It's a learned summary of the world, and it keeps being updated. Where priors come from in the first place is the frontier's question.

The second prior you can see concerns speed. In 1982, Peter Thompson showed that a moving grating of low contrast looks slower than the same grating at high contrast, moving at exactly the same speed. In 2002, Yair Weiss, Eero Simoncelli and Edward Adelson explained it with two assumptions: that most things in the world are still or move slowly, and that a measurement of motion is noisier at low contrast. That's chapter five's shrinkage. A noisier measurement means more weight on the prior, and the prior says slow. In this version of their model, a grating at full contrast is seen at about nine tenths of its true speed; at contrast point three, half; at point one, a tenth. Those exact numbers are the model's, not people's, but the direction is right, at least for slow and moderate speeds.

A prior that slows faint motion has an obvious practical worry. In 1998, Robert Snowden, Nicola Stimpson and Roy Ruddle put drivers in a simulator and lowered the contrast of the whole scene, as a uniform fog would. Speeds looked slower, and people drove faster to compensate. If that held on real roads, fog would be even more dangerous than it seems. But in 2012, Paolo Pretto and colleagues simulated fog the way real fog behaves, thicker with distance, so that far contrast is lost much more than near. Then speeds looked faster, not slower. The difference is informative. Real fog leaves the near road, sweeping past, at reasonable contrast, and the far field, which is now washed out, normally moves slowly in the image anyway. The laboratory effect is robust. What it means on a road depends on the details, which is what the Ledger's note says.

Weiss's model explains more than the speed of gratings. It explains a puzzle about direction. Look at a moving edge through a small window. Only the motion across the edge, perpendicular to it, changes the image. Here the stripes really move to the right. But motion to the right and a slower motion straight across the stripes look identical through the window, as does any combination of either one with sliding along the stripes. This isn't a curiosity: every neuron in primary visual cortex looks at the world through such a window, its receptive field. So one edge gives not a velocity but a line of possible velocities. An object with two edges at different angles gives two lines, and they cross at the true velocity.

Here are those two lines of possible velocities, for an object with edges at twenty and sixty degrees, really moving to the right at speed one. They cross at the truth. When the edges are high in contrast and the measurements are sharp, the most probable velocity is just there. Lower the contrast, and the lines become blurry bands, and the slow prior, centred on zero, pulls the answer toward stillness. It doesn't pull straight toward zero. It slides along the bands, toward the point where they're both nearly satisfied at low speed: eight degrees off course, at eight tenths of the speed. At the lowest contrast, thirty degrees off, at less than half the speed, heading toward the simple average of the two edges' motions. And that's what people see. A thin rhombus moving to the right, at low contrast, appears to drift off at an angle. Researchers had explained the high-contrast and low-contrast cases with two different rules. One prior, and one noise level, explains both.

What it does: Bumps and dents; retraining the prior; low contrast looks slower; fog; the aperture problem and the MAP velocity

8The two squares, explainedPsych 101 and the major4 min

Back to the two squares. The light reaching your eye from any point is the product of two things: how much light falls on the surface there, and what fraction the surface reflects. The picture on the left is the product of the two on the right: a checkerboard of surfaces, and a soft shadow. The eye receives only the product. What the visual system wants is the first factor, the surfaces, because surfaces are what things are made of. But at every point there's one number and two unknowns: the inverse problem again. To split them, you need an assumption about each. A natural pair: surfaces change abruptly, at their edges, while illumination changes smoothly, across shadows and gradients.

Edwin Land, the inventor of the Polaroid camera, and John McCann turned that pair of assumptions into an algorithm in 1971. They called it retinex, from retina and cortex. Take logs, and the product becomes a sum: log light equals log reflectance plus log illumination. Now take differences between neighbouring points. Where the difference is large, it's an edge between surfaces: keep it. Where it's small, it's a gentle change in the light: set it to zero. Then add the kept edges back up, and anchor the result by calling the brightest surface white. What's left is an estimate of the surfaces alone.

Here's the result. On the left, the light, where squares A and B both send point four. On the right, retinex's estimate of the surfaces. The shadow is gone. Square A comes out at point five, and B at nearly one: B is about twice as light as A. The true surfaces, which we know because we built the board, are point four and point eight: also a ratio of two. Retinex gets the absolute levels wrong, because its anchor guesses that the brightest square is white, but the ratio very nearly right. And that's what you saw. The illusion was the correct answer about the board, and a wrong answer only about the picture of it.

Retinex is a good first model. It isn't the whole story. The same edge in an image could be the border of a shadow, a stain on a surface, or a fold where a surface turns away from the light, and how light a surface looks depends on which the visual system decides it is. In 1977, Alan Gilchrist changed nothing but the apparent depth of a surface, making it seem to lie in a different plane, and its lightness changed dramatically. In 1991, David Knill and Daniel Kersten showed that the same pattern of shading looks different in lightness depending on whether it's seen as a curved surface or a flat one. So lightness is an inference about the whole scene, its shapes, its lights and its surfaces together, not a filter on the image. The dress, at the end of Part 13, was the same problem in colour: one image, two theories of the light, two sets of surfaces.

What it does: Light as surface times illumination; retinex; what it sees; where edges are not enough

9Recognizing objectsPsych 101 and the major4 min

The simplest theory of recognition stores a picture of each object and compares new images with the pictures. It fails, and here's why. Four images: a square; the same square, moved; the same square, turned; and a disc. Measure how different each is from the first, pixel by pixel. The moved square differs by eighteen and a half units, the turned one by nine point four, and the disc by only six point nine. By the pixels, the disc is more like the square than the square is like itself, moved or turned. And for real objects it's far worse: changes of lighting, distance and viewpoint make the images of one mug more different from each other than from the images of a bowl. So recognition needs a description of an object that stays the same when its image changes. The name for this is invariance, and achieving it is the central problem of object recognition.

David Marr, in a book published in 1982, two years after his death at thirty-five, proposed that vision builds a series of descriptions. From the image, a primal sketch: edges, bars and blobs, the kind of thing Part 13's cortical cells signal. From that, a two-and-a-half-D sketch: the depth and slant of the surface at each point, as seen from where you stand, built from stereo, shading, texture and motion. And from that, a 3-D model: the object's parts and how they're arranged, described in the object's own frame, not yours. Only that last description is invariant. A mug is a cylinder with a curved handle on its side from any viewpoint. The levels of explanation this series uses, what is computed, how, and in what hardware, come from the same book.

Irving Biederman made one version of the 3-D model concrete in 1987. His theory was that objects are recognized by their parts: a few dozen simple volumes he called geons, cylinders, blocks, cones, wedges, curved tubes, and how they're joined. A mug is a cylinder with a curved tube attached to its side. The advantage is that the kind of a part, whether its edges are straight or curved, parallel or tapering, can be seen from almost any viewpoint. One of his tests: delete pieces of the lines in a drawing of an object. If you delete the joints, where parts meet, recognition fails. Delete the same amount of line from the middles of the edges, and people still recognize the object. It's a theory with invariance built in. But it can't be the whole story: telling one face or one bird from another isn't a matter of their parts, which are the same. The rival view, from Heinrich Bülthoff and Shimon Edelman in 1992, is that we store a few remembered views of an object and interpolate between them. The usual resolution is that both happen: something like parts for telling a mug from a bowl, and something like views for telling one mug, or one face, from another.

Whatever the description, it's computed fast. In 1996, Simon Thorpe, Denis Fize and Catherine Marlot flashed photographs for twenty milliseconds and asked people whether each contained an animal. The electrical responses of the brain to animal and non-animal pictures began to differ about a hundred and fifty milliseconds after the picture appeared. In monkeys, signals reach primary visual cortex at about fifty milliseconds and the top of the object pathway, inferior temporal cortex, at about a hundred. That leaves time for little more than one pass up the hierarchy, each stage firing a few spikes. So a single feedforward sweep, with little feedback, must be able to do a lot. That's what made the next idea plausible: a deep network, which is exactly such a sweep.

What it does: Templates fail; Marr's stages; geons, and the rival of remembered views; 150 milliseconds

10FacesPsych 101 and the major4 min

Faces are the objects people are most expert at. Two findings suggest they're also processed differently. In 1969, Robert Yin asked people to remember photographs of faces, houses, aeroplanes and other things, upright or upside down. Turning them upside down made every kind of picture harder to remember. But it hurt faces far more than anything else. In 1987, Andrew Young and colleagues joined the top half of one famous face to the bottom half of another. The halves fused into a new face, and naming the person in the top half became hard; slide the halves apart sideways, and it became easy again. Both findings suggest faces are seen as wholes: the arrangement and spacing of the eyes, nose and mouth together, rather than each feature on its own. And turning a face upside down seems to break that whole.

Here's a demonstration you can try on yourself. Two faces, upside down. They look much the same. Perhaps one has a slightly odd expression. Now turn them upright. One of them is grotesque. Its eyes and mouth had been turned upside down within the face, and upside down you barely noticed. With a real photograph the effect is far stronger than with this drawing. The usual explanation follows from the last slide: upside down, the face isn't seen as a whole, so each feature is checked on its own, and each feature, a pair of eyes, a mouth, is fine. Upright, the whole is seen, and the whole is wrong. Peter Thompson, the same Thompson as the slow gratings, published it in 1980, with a photograph of the British prime minister, and it's been called the Thatcher illusion ever since.

If faces are special, is there special hardware? In 1997, Nancy Kanwisher, Josh McDermott and Marvin Chun found a region on the underside of the brain, in the fusiform gyrus, that responded much more to faces than to other objects, in twelve of the fifteen people they scanned. They called it the fusiform face area, and Part 8 used it as an example of a brain map. In 2006, Doris Tsao and colleagues used scans to find similar face patches in monkeys, then recorded from single cells inside one: ninety-seven percent of its visually responsive cells preferred faces. And there are people who can't recognize faces, a condition called prosopagnosia. It can follow damage to this part of the brain, or be present from birth, with no damage at all: by one estimate in about two people in a hundred. At the other end are super-recognizers, who can pick out a face seen once, years before. Some police forces now employ them.

Is the region for faces as such, or for whatever a person is expert at? In 1999, Isabel Gauthier and colleagues trained people for many hours to tell apart invented creatures they called greebles, which share a structure the way faces do. As the observers became experts, the face area's response to greebles rose. Bird watchers and car enthusiasts show some of the same for birds and cars. Kanwisher and others reply that the effects of expertise are much smaller than the response to faces, and that some patients lose the ability to recognize faces while keeping their expertise with other things. That the region is selective for faces has been found in study after study. What it's selective for is still argued, and the Ledger's row will say so.

What it does: Inversion and wholes; the Thatcher illusion; face-selective cortex; faces or expertise

11Deep networks as modelsResearch4 min

A deep convolutional network is a stack of layers. Each applies many small filters to the layer below, like Part 13's simple cells, then pools and rectifies, like complex cells and normalization. Train one, by gradient descent, to do nothing but name the objects in millions of photographs. In 2014, Daniel Yamins, James DiCarlo and colleagues recorded from 168 sites in monkeys' inferior temporal cortex while the monkeys looked at thousands of images. Then they asked how well a trained network's top layer could predict those responses to images it hadn't been fitted on. It predicted them far better than any earlier model, accounting for about half of what was predictable at all. Its middle layers predicted the intermediate area V4. And across many networks, the better a network was at recognition, the better it predicted the neurons. Nobody fitted the network to the brain. The match came from training it on the same task. Part 60 takes up how far such models explain the brain. Here's one way they differ from us.

In 2019, Robert Geirhos and colleagues found that networks trained on photographs rely on texture far more than people do. We can see why on a network small enough to train in seconds. Three shapes: a disc, a square and a triangle. In this training set, each shape always comes filled with its own texture: discs are striped, squares dotted, triangles checked. The network has one layer of eight five-by-five filters, averaged over the image, and a readout. We train it on six hundred images to name the shape. The loss falls quickly, and on three hundred new images it names the shape correctly every time. But which cue did it learn? In this training set, shape and texture always agree, so the scores can't tell us.

So ask with a conflict, as Geirhos did. Make images where shape and texture disagree: a disc filled with dots, a triangle with stripes. Each answer the network gives must follow one cue or the other. On three hundred conflict images, it followed the texture two hundred and eighty-three times, and the shape sixteen. It learned texture. That's not surprising once you think like the network. Texture is local: a small filter can detect stripes anywhere in the image. Shape depends on the whole outline. Given two cues that are equally good in the training data, gradient descent finds the easier one. Geirhos and colleagues found the same in large networks trained on the ImageNet photographs: on cue-conflict images, a cat's shape filled with an elephant's skin, the networks mostly said elephant. People, shown the same images, mostly said cat.

Is the texture bias in the network, or in what it was fed? Train the same network on images where the textures are shuffled at random, so that texture says nothing about the shape. Now the only way to succeed is to learn the shape, which is harder. After the same amount of training, it's right about half the time, where guessing would be right a third of the time. And on conflict images it now follows the shape: a hundred and forty-seven answers to sixty-six. Geirhos's group did the large version, training on photographs repainted in random artistic styles, and the networks became more shape-biased, and more robust to distortions. The bias is a property of the training data and the architecture. It tells us about networks, not about minds, but it's a warning: a model can match the brain's responses and still solve the problem a different way.

What it does: IT predicted; a small network that learns texture, and then shape

12The LedgerPsych 101 and the major3 min

Four rows today. The first: when two senses report the same property, people combine them roughly as an optimal observer would, each cue weighted by its reliability, and the combination less variable than either alone. The original: Ernst and Banks, 2002, with four observers. The record: Alais and Burr's ventriloquist in 2004, and many other pairs of cues since; and Rahnev and Denison's review of 2018, which lists the departures. The note: reliability weighting has been found again and again, but it isn't universal. Children come to it late, and the review lists many conditions where people fall short of the optimal weights. For the claim as stated, roughly optimal: replicated.

The second: a moving pattern of low contrast looks slower than the same pattern at high contrast. The original: Thompson, 1982. The record: Weiss, Simoncelli and Adelson's model in 2002 predicted it, along with several other illusions of motion, and it's been measured in many laboratories. The qualification: it holds for slow and moderate speeds. At high temporal frequencies the results are mixed, and some studies find low contrast speeds things up, which a single slow prior doesn't predict. Replicated, within that range.

The third: the Müller-Lyer illusion is much weaker in people who grow up without rectangular buildings. The original: Segall, Campbell and Herskovits, 1966. The record: in 2015, children who gained their sight after cataract surgery saw the illusion at once; and in 2025, Amir and Firestone's review argued that the original differences may come from method, and noted that many animals see the illusion. The illusion is real; nobody doubts that. Whether its size depends on a carpentered world is now disputed, and the original study hasn't been repeated with modern methods. Contested.

The fourth: a region of the fusiform gyrus responds much more to faces than to other objects, in most people tested. The original: Kanwisher, McDermott and Chun, 1997, in twelve of fifteen people. The record includes Gauthier's greebles in 1999, and the region has been found in study after study since; it's now routinely located in a few minutes of scanning. The note keeps the dispute: what the region is selective for, faces as such or any category a person is expert at. For the claim as stated: replicated.

What it does: Cue combination; contrast and speed; the carpentered world; the face area

13In practice: headsets, camouflage and machine visionPractice3 min

Chapter six said cues are combined. A virtual-reality headset is a machine for making cues disagree. When you look at a virtual object, your eyes turn inward for its depth: here, forty centimetres. That part works, because the headset gives each eye its own picture, as Wheatstone's did. But the light comes from a screen whose optical distance is fixed, about a metre and a half in many headsets, and your lens has to focus there to keep the picture sharp. In the real world, where the eyes point and where they focus always agree, and the two are coupled in the brain. In 2008, David Hoffman, Ahna Girshick, Kurt Akeley and Martin Banks showed that this vergence-accommodation conflict slows the fusing of stereo images, makes depth harder to judge, and causes fatigue and discomfort. Engineers are now building displays whose focal distance changes with where you look. The theory says what the display must get right.

Animals have been attacking the visual system's bets for far longer than engineers have been helping them. Disruptive colouring puts patches of strong contrast at the edge of the body, which break its outline into pieces that group with the background instead of with each other. In 2005, Innes Cuthill and colleagues pinned paper moths, with dead mealworms as bait, to trees in a wood, and counted how many birds took. Targets with patches touching their edges survived better than targets with the same patches inside. Countershading, dark on the back and light on the belly, cancels the shading that light from above would put on a rounded body, which chapter seven showed the visual system reads as shape. Camouflage is designed against the priors. It doesn't hide information so much as make the wrong explanation the best one.

Last, machines that see for us. Machine vision now reads medical scans, inspects parts on production lines and helps drive cars. Chapter eleven showed that its errors aren't ours. It can rely on texture where we rely on shape, and can be thrown by changes we'd ignore. In 2018, Kevin Eykholt and colleagues put a few black and white stickers on a real stop sign, and a network read it as a speed-limit sign from most of the angles and distances they tested. A person sees a stop sign with graffiti. That difference is also an opportunity. If a person's errors and a machine's are different, the two together can beat either, but only if each knows when to defer to the other, which is a question about people as much as machines. That's human factors, Part 51, and minds and machines, Part 60.

What it does: The vergence-accommodation conflict; camouflage against the priors; machines in the loop

14Frontier: where priors come fromResearch6 min

Here's where things stand. Solid: images don't determine the scenes that made them, and perception adds assumptions to close the gap. Many illusions follow from good assumptions used in the wrong place. Cues are weighted by their reliability, often close to the optimum. And there's a hierarchy of areas for objects, with regions selective for faces. Argued: where the priors come from; whether the brain represents probabilities, or merely acts as if it did; how much of seeing is inference at all; and what deep networks explain. Let's take them in turn.

If priors are summaries of the world, they should match its statistics. In some cases they've been checked. Measured in photographs of natural scenes, nearby edges tend to continue smoothly, at about the rates that predict how people group contours: the law of good continuation, found in the world. In 2006, Alan Stocker and Eero Simoncelli went the other way, and fitted each observer's speed prior from their own judgments of speed at different contrasts. It came out peaked at zero, with heavier tails than a normal distribution. And chapter seven's light-from-above prior moved after an hour or two of training. What isn't known is the timescale: whether a given prior is learned in a lifetime, in infancy, or over evolution, and the answer may be different for each.

One question about where perception comes from is over three hundred years old. In 1688, the Irish scientist William Molyneux wrote to the philosopher John Locke. Suppose a man born blind, who has learned to tell a cube from a sphere by touch, were suddenly made to see. Could he tell, by sight alone, which was the cube? Locke and Molyneux thought not. In 2011, Richard Held, Pawan Sinha and colleagues finally asked, with children in India born with cataracts and treated in Project Prakash. Within two days of surgery, they could see the shapes clearly, and could match one seen shape to another. But matching a shape they'd felt to one they saw was near chance. Within days, it was much better. So some links between the senses must be learned, and are learned quickly. And recall that the Müller-Lyer illusion was there from the start. Some assumptions seem to need experience; others don't.

A new kind of evidence comes from cameras worn on infants' heads. Some families have recorded what one child sees and hears, an hour or two a week, for years. In 2024, Wai Keen Vong, Brenden Lake and colleagues trained a network on sixty-one hours of video from one child, recorded between six and twenty-five months of age. That's about one percent of the child's waking hours. From it, the network learned to link many words to the objects they name, and its visual features carried over to new images. So a fair amount of what vision knows can be learned from one child's experience, by a learner with no built-in knowledge of objects. Whether infants actually learn that way, and what they bring with them, is the subject of Part 30, the infant mind.

What does calling perception Bayesian commit you to? It depends on the level. At Marr's first level, it says what the problem is, inference under uncertainty, and gives a benchmark, the best possible answer, to compare people with. That's uncontroversial, and useful. At the second level it says much more: that the brain represents whole probability distributions, not single guesses. Some theorists argue that the noisy firing of populations of neurons could carry exactly that. Whether it does is open. The critics, Jeffrey Bowers and Colin Davis among them in 2012, point out that with the prior, the likelihood and the loss all free to choose, a Bayesian model can be fitted to almost any data after the fact. The defence is to fix them in advance from separate measurements, as Ernst and Banks did, so that the model can fail. Part 58 takes the boldest version: the brain as a machine for prediction, from vision to everything else.

A last challenge, to the whole chapter. James Gibson argued, in his book of 1979, that the inverse problem is an artefact of the laboratory. A single image on one still retina is poor. But an animal moves, and the light around it changes in structured ways as it does. The flow of that light specifies the layout of the world, with no need to guess. And what an animal perceives, he said, isn't geometry but possibilities for action: a surface to walk on, a gap to pass through, a branch to grasp. He called them affordances, and the word is now used by designers everywhere. Most researchers now hold both views at once. There's far more information in the light than a single picture suggests, and inference fills in wherever that information runs out, which, in a dim room, a blur, a glance or a picture, is often.

What it does: What is solid and argued; priors as statistics; Molyneux answered; a child's head camera; what "Bayesian" commits to; Gibson

Recap, problems, and the road aheadAll tracks4 min

Part fourteen in ten lines. Two squares sent your eye the same light and looked different, because you saw the surfaces, with the shadow taken out. Every image fits many scenes, so seeing must add assumptions. Grouping, illusory edges and the choice of figure over ground are the first of them, and the Gestalt laws read best as priors. Two eyes give disparity, which falls with the square of distance. Constancy multiplies an image's size by its seen distance, and misapplied to a page, it makes illusions. Bayes's rule for perception says precisions add, and means are weighted by precision. Cues are combined by reliability, as predicted in advance from each cue alone, and people nearly meet the prediction. Some priors you can see for yourself: light from above, and things that move slowly. Recognizing objects needs invariance, faces are seen as wholes and have cortex of their own, and deep networks predict the brain's responses, and still see by texture.

Kant's wager. Today the third objection, that watching a mental state changes it, met two replies. Ernst and Banks never asked anyone how much they relied on vision. The weights were read from where their choices fell when the senses disagreed, a method that doesn't depend on looking inward. And the two squares still look different now that you know they're the same. Seeing doesn't change when you watch it, or when you know better. Whether the same holds for thought and feeling is a question for later parts.

Where this comes back. The other senses, and how they're combined, are Part 15. Priors and prediction errors in learning, Part 17. Attention, and seeing what you expect, Part 18. What infants know before they've learned anything, Part 30. Displays, headsets and the human in the loop, Part 51. The predictive brain, Part 58. And deep networks as models of minds, Part 60.

Seven problems, with full solutions in this part's README. One derives the normal posterior. One combines vision and touch, with a conflict. One works out when two eyes stop helping. One makes a giant out of a misjudged distance. One solves the aperture problem with a prior. One uses Psyche's inference module to find when a network's diet tips it from shape to texture. And the last, with the star, is the frontier's problem. Pause here if you'd like to try them.

The books and papers behind this part are listed here and in the README. Palmer's Vision Science is the place to start, and Knill and Richards's collection is where the Bayesian view was set out.

So seeing is a bet, made fast, with assumptions learned from a world in which they're usually true. But vision is one sense of many. Next time: an ear whose cochlea splits sound into frequencies, a nose with about four hundred kinds of receptor, touch and pain, and the sense you never notice, of where your own body is. Each has its own code, and the same mathematics of combination. It's Part 15: the other senses.

Where it goes next. The other senses are Part 15, prediction errors in learning Part 17, attention and expectation Part 18, what infants know Part 30, displays and the human in the loop Part 51, the predictive brain Part 58, and deep networks as models of minds Part 60.

Key results

The part's results in one place, for revision.

Bayes for perception\(\displaystyle p(s \mid x) \propto p(x \mid s)\, p(s)\)
Precisions add\(\displaystyle \frac{1}{\sigma_{\text{post}}^2} = \frac{1}{\sigma^2} + \frac{1}{\sigma_0^2}\)
Cue weights\(\displaystyle w_V = \frac{1/\sigma_V^2}{1/\sigma_V^2 + 1/\sigma_H^2}\)
Disparity\(\displaystyle \delta \approx \frac{I\,\Delta d}{d^2}\)
Size constancy\(\displaystyle \text{size} = 2\,d\,\tan(\theta/2)\)
Lightness\(\displaystyle L = R \times E,\ \log L = \log R + \log E\)

Try it

Lab 14 · Seeing as inference: priors, cues and a small network

Multiply a prior by a likelihood and watch the posterior shrink toward the prior as the evidence gets noisier; predict the weights and the combined precision of two cues from each cue alone, and check them with a simulated cue-conflict experiment; solve the aperture problem with a slow prior and see the percept slow and turn at low contrast; find where two eyes stop helping; take the shadow out of a checkerboard with retinex; and train a network that answers by texture until its diet changes.

Figure produced by Lab 14: Seeing as inference: priors, cues and a small network
Produced by the lab below, seed 0, in 3.1 s.
python -m videos.psychology.labs 14 needs numpy, scipy, matplotlib · download lab14.py · source on GitHub
prior N(0, 1.5^2), measurement 4 with sd 1: posterior mean and sd                                  2.769, 0.832
posterior mean as the measurement's sd grows (0.25, 1, 2, 4)                                       3.89, 2.77, 1.44, 0.49
mean squared error over worlds from the prior: raw measurement vs posterior mean                   1.000 vs 0.692
vision sd 1.5 mm, touch 4 mm: weight on vision predicted/measured; combined sd predicted/measured  0.87/0.88; 1.44/1.40
vision sd 3.0 mm, touch 4 mm: weight on vision predicted/measured; combined sd predicted/measured  0.63/0.64; 2.39/2.41
vision sd 6.0 mm, touch 4 mm: weight on vision predicted/measured; combined sd predicted/measured  0.30/0.31; 3.27/3.34
edges at 20 and 60 deg, likelihood sd 0.02: MAP direction (deg) and speed                          -0.0, 1.00
edges at 20 and 60 deg, likelihood sd 0.3: MAP direction (deg) and speed                           -7.9, 0.82
edges at 20 and 60 deg, likelihood sd 1.0: MAP direction (deg) and speed                           -30.5, 0.44
the vector average's direction (deg)                                                               -41.0
disparity of 1 cm of depth at 0.5, 2 and 10 m (arcmin)                                             8.493, 0.539, 0.022
checkerboard: light at A and B; retinex's surfaces at A and B                                      0.40, 0.40; 0.50, 0.96
network on paired images: test accuracy; conflict answers by texture / by shape                    1.00; 136 / 14

Precisions add and means are precision-weighted, so noisy evidence leans on the prior and a biased percept can be the more accurate one. Single-cue curves predict the weights and the precision of the combination. A slow prior makes faint edges slower and turns them toward the vector average. Disparity falls with the square of distance. Retinex recovers the surfaces from the light, and a network fed paired cues learns the easy one, texture.
The code (101 lines; it asserts its own result)
"""Lab 14: the normal posterior and shrinkage, reliability-weighted cue combination recovered from simulated
two-interval experiments, the aperture problem solved with a slow prior, disparity's square law, retinex on a
checkerboard in shadow, and a small network that learns texture before shape."""

import numpy as np

from videos.coursekit import labs
from explainer.psychology.psyche import infer as I

TITLE = "Seeing as inference: priors, cues and a small network"
GOAL = ("Multiply a prior by a likelihood and watch the posterior shrink toward the prior as the evidence gets "
        "noisier; predict the weights and the combined precision of two cues from each cue alone, and check them with "
        "a simulated cue-conflict experiment; solve the aperture problem with a slow prior and see the percept slow "
        "and turn at low contrast; find where two eyes stop helping; take the shadow out of a checkerboard with "
        "retinex; and train a network that answers by texture until its diet changes.")
TASKS = [
    "Run the cue-combination experiment with 200, 500 and 2,000 trials a point, 50 times each. How far are the "
    "measured weights from the predicted ones, and how many trials would Ernst and Banks's four observers have needed "
    "to tell 0.6 from 0.7?",
    "Repeat the aperture problem for edges at 10 and 80 degrees, and at 40 and 50. Which pair rotates further at low "
    "contrast, and why does the angle between the edges matter?",
    "Train the network on training sets in which a fraction q of the images carry their shape's own texture. Find "
    "the q at which half the conflict answers follow texture. What does that say about how little evidence texture "
    "needs?",
]


def run(seed=0):
    out = labs.Lab()
    rng = lambda k: np.random.default_rng(seed + k)  # noqa: E731

    # 1. a posterior, and shrinkage
    m, s = I.posterior(0.0, 1.5, 4.0, 1.0)
    out.row("prior N(0, 1.5^2), measurement 4 with sd 1: posterior mean and sd", f"{m:.3f}, {s:.3f}")
    shrink = [I.posterior(0.0, 1.5, 4.0, sd)[0] for sd in (0.25, 1.0, 2.0, 4.0)]
    out.row("posterior mean as the measurement's sd grows (0.25, 1, 2, 4)", ", ".join(f"{v:.2f}" for v in shrink))
    assert all(a > b for a, b in zip(shrink, shrink[1:])), "noisier evidence moves the percept toward the prior"
    out.row("mean squared error over worlds from the prior: raw measurement vs posterior mean", f"1.000 vs {s ** 2:.3f}")

    # 2. cue combination, predicted and measured
    d = np.linspace(-14, 14, 15)
    n = 2000
    g = rng(1)
    fh = I.fit_cumulative(d, I.two_interval(4.0, d, n, g), n)
    rows = []
    for sv in (1.5, 3.0, 6.0):
        fv = I.fit_cumulative(d, I.two_interval(sv, d, n, g), n)
        _, pred_sd, w = I.combine([0, 0], [fv["sd"], fh["sd"]])
        true_w = I.combine([0, 0], [sv, 4.0])[2]
        fc = I.fit_cumulative(d, I.two_interval(None, d, n, g, weights=true_w, sds=(sv, 4.0)), n)
        fk = I.fit_cumulative(d, I.two_interval(None, d, n, g, weights=true_w, sds=(sv, 4.0), conflict=6.0), n)
        rows.append((sv, w[0], fk["pse"] / 6.0 + 0.5, pred_sd, fc["sd"]))
    for sv, wp, wo, sp, so in rows:
        out.row(f"vision sd {sv:.1f} mm, touch 4 mm: weight on vision predicted/measured; combined sd predicted/measured",
                f"{wp:.2f}/{wo:.2f}; {sp:.2f}/{so:.2f}")
        assert abs(wp - wo) < 0.08 and abs(sp - so) / sp < 0.1, "single-cue curves predict the combination"

    # 3. the aperture problem
    cons = I.edge_constraints((1.0, 0.0), (20, 60))
    for sd in (0.02, 0.3, 1.0):
        v = I.map_velocity(cons, sd)
        out.row(f"edges at 20 and 60 deg, likelihood sd {sd}: MAP direction (deg) and speed",
                f"{np.degrees(np.arctan2(v[1], v[0])):.1f}, {np.linalg.norm(v):.2f}")
    va = I.vector_average(cons)
    out.row("the vector average's direction (deg)", f"{np.degrees(np.arctan2(va[1], va[0])):.1f}")

    # 4. disparity and retinex
    out.row("disparity of 1 cm of depth at 0.5, 2 and 10 m (arcmin)",
            ", ".join(f"{I.disparity_arcmin(x, 0.01):.3f}" for x in (0.5, 2.0, 10.0)))
    cs = I.checker_shadow()
    R = I.retinex(cs["luminance"])
    out.row("checkerboard: light at A and B; retinex's surfaces at A and B",
            f"{cs['luminance'][cs['A']]:.2f}, {cs['luminance'][cs['B']]:.2f}; {R[cs['A']]:.2f}, {R[cs['B']]:.2f}")
    assert R[cs["B"]] > 1.5 * R[cs["A"]], "retinex sees the surfaces, not the light"

    # 5. a small network (short training, so the lab runs in seconds)
    X, y, _ = I.shape_texture_images(300, mode="paired", seed=seed + 1)
    net = I.TinyConvNet(seed=seed)
    loss = net.fit(X, y, steps=150, lr=0.1)
    Xt, yt, _ = I.shape_texture_images(150, mode="paired", seed=seed + 2)
    bias = I.texture_bias(net, 150, seed=seed + 99)
    out.row("network on paired images: test accuracy; conflict answers by texture / by shape",
            f"{(net.predict(Xt) == yt).mean():.2f}; {bias['texture']} / {bias['shape']}")
    out.note = ("Precisions add and means are precision-weighted, so noisy evidence leans on the prior and a biased "
                "percept can be the more accurate one. Single-cue curves predict the weights and the precision of the "
                "combination. A slow prior makes faint edges slower and turns them toward the vector average. "
                "Disparity falls with the square of distance. Retinex recovers the surfaces from the light, and a "
                "network fed paired cues learns the easy one, texture.")

    fig, ax = labs.figure(2, size=(11, 4.2))
    x = np.linspace(-4, 8, 400)
    gauss = lambda mu, sd: np.exp(-0.5 * ((x - mu) / sd) ** 2) / (sd * np.sqrt(2 * np.pi))  # noqa: E731
    ax[0].plot(x, gauss(0, 1.5), color=labs.PINK, lw=1.6, label="prior")
    ax[0].plot(x, gauss(4, 1.0), color=labs.BLUE, lw=1.6, label="likelihood")
    ax[0].plot(x, gauss(m, s), color=labs.GREEN, lw=2.0, label="posterior")
    ax[0].set(title="A prior, a measurement, a posterior", xlabel="the quantity", ylabel="density")
    ax[0].legend(fontsize=8)
    ax[1].plot(range(len(loss)), loss, color=labs.GREEN, lw=1.6)
    ax[1].set(title="The small network's training loss", xlabel="step", ylabel="cross-entropy")
    out.fig = fig
    return out

Now change it

  1. Run the cue-combination experiment with 200, 500 and 2,000 trials a point, 50 times each. How far are the measured weights from the predicted ones, and how many trials would Ernst and Banks's four observers have needed to tell 0.6 from 0.7?
  2. Repeat the aperture problem for edges at 10 and 80 degrees, and at 40 and 50. Which pair rotates further at low contrast, and why does the angle between the edges matter?
  3. Train the network on training sets in which a fraction q of the images carry their shape's own texture. Find the q at which half the conflict answers follow texture. What does that say about how little evidence texture needs?

Problems, with solutions

Try each problem before opening its solution.

1. The normal posterior. Multiply a normal prior \(N(\mu_0, \sigma_0^2)\) by a normal likelihood \(N(x, \sigma^2)\) and show the posterior is normal, with precision \(1/\sigma_0^2 + 1/\sigma^2\), and mean the precision-weighted average.

Solution

log p(s | x) = −(x − s)²/2σ² − (s − μ₀)²/2σ₀² + c = −½(1/σ² + 1/σ₀²)s² + (x/σ² + μ₀/σ₀²)s + c′. A quadratic with negative leading coefficient is a normal log density: its precision is the coefficient, 1/σ² + 1/σ₀², and its mean is (x/σ² + μ₀/σ₀²)/(1/σ² + 1/σ₀²) = wx + (1 − w)μ₀ with w = (1/σ²)/(1/σ² + 1/σ₀²). Since the precision exceeds each term, σ_post < min(σ, σ₀).

2. Vision and touch. Vision's \(\sigma\) is 2 mm and touch's 4 mm. Find the weights and the combined \(\sigma\). If the seen bar is 3 mm taller than the standard and the felt bar 3 mm shorter, where does the combined percept fall?

Solution

w_V = (1/4)/(1/4 + 1/16) = 0.8, w_H = 0.2; σ = (1/4 + 1/16)^(−1/2) = 1.79 mm, below vision's 2. The combined percept is 0.8 × 3 + 0.2 × (−3) = 1.8 mm taller than the standard: it follows vision, but not all the way.

3. When two eyes stop helping. With the eyes 6.3 cm apart, find the disparity, in seconds of arc, of 1 cm of depth at 0.5 m and at 5 m. Could an observer with a 10\(''\) threshold see the second?

Solution

δ ≈ IΔd/d²: at 0.5 m, 0.063 × 0.01 / 0.25 = 2.52 × 10⁻³ rad ≈ 520″ (8.7′); at 5 m, 2.52 × 10⁻⁵ rad ≈ 5.2″. The second is below a 10″ threshold: invisible to that observer, though the best observers, at 2″ to 5″, might just see it.

4. A giant from a distance. A person 1.8 m tall stands 10 m away. What angle do they subtend? If the visual system takes them to be 5 m away, how tall do they look?

Solution

The angle is 2 arctan(0.9/10) = 10.3°. Taken to be 5 m away, the person looks 2 × 5 × tan(5.14°) = 0.90 m tall: half the distance, half the size. The Ames room does the reverse to the person in the near corner.

5. The aperture problem with a prior. An edge with unit normal \(\mathbf{n}\) moving at velocity \(\mathbf{v}\) shows only \(\mathbf{n}\cdot\mathbf{v}\). For two edges, find the MAP velocity under a prior \(N(\mathbf{0}, \sigma_p^2 I)\) and noise \(\sigma\), and show it tends to the intersection of constraints as \(\sigma \to 0\).

Solution

With the two normals as the rows of N and the measured normal speeds s, the log posterior is −|Nv − s|²/2σ² − |v|²/2σ_p², maximized by v̂ = (NᵀN/σ² + I/σ_p²)⁻¹Nᵀs/σ² = (NᵀN + (σ²/σ_p²)I)⁻¹Nᵀs: ridge regression. As σ → 0 it tends to (NᵀN)⁻¹Nᵀs = N⁻¹s, the intersection of the constraint lines (N is invertible when the edges are not parallel). As σ grows, ridge regression shrinks most the component of v that N measures least, the direction along both edges, so v̂ slows and turns toward the edges' normals, and the vector average.

6. When the diet tips. With explainer.psychology.psyche.infer: train `TinyConvNet' on sets in which a fraction \(q\) of images carry their shape's own texture, and find the \(q\) at which half the conflict answers follow texture.

Solution

See the table below; with the training of compute.py (600 images, 400 steps, seed 0) the share of conflict answers that follow texture rises steeply with q, and crosses one half when only a small minority of the images are matched: texture is learned from far less evidence than shape, because a 5 × 5 filter sees it everywhere.

share of training images with their shape's own texture, q 0 0.02 0.05 0.10 0.15 0.2 0.4 0.6 0.8 1
conflict answers that follow texture 31% 37% 53% 58% 72% 81% 90% 94% 97% 95%

The crossing is near q = 0.05: thirty matched images out of six hundred are enough to make the network answer by texture as often as by shape.

7. ★ Learned or present at birth. Design an experiment that could tell whether a perceptual prior is learned in a lifetime or present at birth, and say what result would decide it.

Solution

Test the prior before the relevant experience could have taught it, and after experience that contradicts it. Newly sighted people (as in Project Prakash) give a natural test for visual priors: if a prior is present within hours of sight onset, as the Müller-Lyer illusion was, it was not learned from seeing. Animals reared in controlled worlds give another: Hershberger (1970) reared chicks with light only from below, and they still pecked at photographed grains as if the light came from above, which points to an inborn prior in chickens. Then retrain it, as Adams, Graf and Ernst did: a prior that moves with an hour of contrary experience is at least being maintained by learning. A decisive design needs both, the earliest possible test and a manipulation of the experience, with the prediction of each account written down beforehand.

Notes and sources

Where it comes back

The other senses, and combining them: Part 15. Priors and prediction errors in learning: Part 17. Attention, and seeing what you expect: Part 18. What infants know before they learn: Part 30. Displays, headsets and the human in the loop: Part 51. The predictive brain: Part 58. Deep networks as models of minds: Part 60. Psyche's infer module supplies the posterior, the cue combiner and the observers those parts use.

Sources

Books. S. E. Palmer, Vision Science: Photons to Phenomenology (MIT Press, 1999). J. P. Frisby and J. V. Stone, Seeing: The Computational Approach to Biological Vision, 2nd ed. (MIT Press, 2010). D. Marr, Vision (Freeman, 1982). D. C. Knill and W. Richards (eds.), Perception as Bayesian Inference (Cambridge University Press, 1996). J. J. Gibson, The Ecological Approach to Visual Perception (Houghton Mifflin, 1979). H. von Helmholtz, Handbuch der physiologischen Optik (Voss, 1856–1867). M. H. Segall, D. T. Campbell and M. J. Herskovits, The Influence of Culture on Visual Perception (Bobbs-Merrill, 1966).

Papers. E. H. Adelson, Lightness perception and lightness illusions, in M. Gazzaniga (ed.), The New Cognitive Neurosciences, 2nd ed. (MIT Press, 2000) 339–351. M. Wertheimer, Untersuchungen zur Lehre von der Gestalt II, Psychol. Forsch. 4 (1923) 301–350. G. Kanizsa, Margini quasi-percettivi in campi con stimolazione omogenea, Riv. Psicol. 49 (1955) 7–30. R. von der Heydt, E. Peterhans and G. Baumgartner, Illusory contours and cortical neuron responses, Science 224 (1984) 1260–1262. H. Zhou, H. S. Friedman and R. von der Heydt, Coding of border ownership in monkey visual cortex, J. Neurosci. 20 (2000) 6594–6611. C. Wheatstone, Contributions to the physiology of vision, Part the first, Phil. Trans. R. Soc. 128 (1838) 371–394. B. Julesz, Binocular depth perception of computer-generated patterns, Bell Syst. Tech. J. 39 (1960) 1125–1162. R. L. Gregory, Distortion of visual space as inappropriate constancy scaling, Nature 199 (1963) 678–680. T. Gandhi, A. Kalia, S. Ganesh and P. Sinha, Immediate susceptibility to visual illusions after sight onset, Curr. Biol. 25 (2015) R358–R359. D. Amir and C. Firestone, Is visual perception WEIRD? The Müller-Lyer illusion and the cultural byproduct hypothesis, Psychol. Rev. (2025). M. O. Ernst and M. S. Banks, Humans integrate visual and haptic information in a statistically optimal fashion, Nature 415 (2002) 429–433. D. Alais and D. Burr, The ventriloquist effect results from near-optimal bimodal integration, Curr. Biol. 14 (2004) 257–262. M. Gori, M. Del Viva, G. Sandini and D. C. Burr, Young children do not integrate visual and haptic form information, Curr. Biol. 18 (2008) 694–698. D. Rahnev and R. N. Denison, Suboptimality in perceptual decision making, Behav. Brain Sci. 41 (2018) e223. V. S. Ramachandran, Perception of shape from shading, Nature 331 (1988) 163–166. J. Sun and P. Perona, Where is the sun?, Nat. Neurosci. 1 (1998) 183–184. W. J. Adams, E. W. Graf and M. O. Ernst, Experience can change the 'light-from-above' prior, Nat. Neurosci. 7 (2004) 1057–1058. P. Thompson, Perceived rate of movement depends on contrast, Vision Res. 22 (1982) 377–380. P. Thompson, K. Brooks and S. T. Hammett, Speed can go up as well as down at low contrast, Vision Res. 46 (2006) 782–786. Y. Weiss, E. P. Simoncelli and E. H. Adelson, Motion illusions as optimal percepts, Nat. Neurosci. 5 (2002) 598–604. R. J. Snowden, N. Stimpson and R. A. Ruddle, Speed perception fogs up as visibility drops, Nature 392 (1998) 450. P. Pretto, J.-P. Bresciani, G. Rainer and H. H. Bülthoff, Foggy perception slows us down, eLife 1 (2012) e00031. E. H. Land and J. J. McCann, Lightness and retinex theory, J. Opt. Soc. Am. 61 (1971) 1–11. A. L. Gilchrist, Perceived lightness depends on perceived spatial arrangement, Science 195 (1977) 185–187. D. C. Knill and D. Kersten, Apparent surface curvature affects lightness perception, Nature 351 (1991) 228–230. I. Biederman, Recognition-by-components, Psychol. Rev. 94 (1987) 115–147. H. H. Bülthoff and S. Edelman, Psychophysical support for a two-dimensional view interpolation theory of object recognition, PNAS 89 (1992) 60–64. S. Thorpe, D. Fize and C. Marlot, Speed of processing in the human visual system, Nature 381 (1996) 520–522. R. K. Yin, Looking at upside-down faces, J. Exp. Psychol. 81 (1969) 141–145. A. W. Young, D. Hellawell and D. C. Hay, Configurational information in face perception, Perception 16 (1987) 747–759. P. Thompson, Margaret Thatcher: a new illusion, Perception 9 (1980) 483–484. N. Kanwisher, J. McDermott and M. M. Chun, The fusiform face area, J. Neurosci. 17 (1997) 4302–4311. D. Y. Tsao, W. A. Freiwald, R. B. H. Tootell and M. S. Livingstone, A cortical region consisting entirely of face-selective cells, Science 311 (2006) 670–674. I. Kennerknecht et al., First report of prevalence of non-syndromic hereditary prosopagnosia, Am. J. Med. Genet. A 140 (2006) 1617–1622. R. Russell, B. Duchaine and K. Nakayama, Super-recognizers, Psychon. Bull. Rev. 16 (2009) 252–257. I. Gauthier et al., Activation of the middle fusiform 'face area' increases with expertise in recognizing novel objects, Nat. Neurosci. 2 (1999) 568–573. D. L. K. Yamins et al., Performance-optimized hierarchical models predict neural responses in higher visual cortex, PNAS 111 (2014) 8619–8624. R. Geirhos et al., ImageNet-trained CNNs are biased towards texture, ICLR (2019). D. M. Hoffman, A. R. Girshick, K. Akeley and M. S. Banks, Vergence-accommodation conflicts hinder visual performance and cause visual fatigue, J. Vis. 8(3) (2008) 33. I. C. Cuthill et al., Disruptive coloration and background pattern matching, Nature 434 (2005) 72–74. K. Eykholt et al., Robust physical-world attacks on deep learning visual classification, CVPR (2018). W. S. Geisler, J. S. Perry, B. J. Super and D. P. Gallogly, Edge co-occurrence in natural images predicts contour grouping performance, Vision Res. 41 (2001) 711–724. A. A. Stocker and E. P. Simoncelli, Noise characteristics and prior expectations in human visual speed perception, Nat. Neurosci. 9 (2006) 578–585. R. Held et al., The newly sighted fail to match seen with felt, Nat. Neurosci. 14 (2011) 551–553. W. K. Vong, W. Wang, A. E. Orhan and B. M. Lake, Grounded language acquisition through the eyes and ears of a single child, Science 383 (2024) 504–511. J. S. Bowers and C. J. Davis, Bayesian just-so stories in psychology and neuroscience, Psychol. Bull. 138 (2012) 389–414.

About this partfrom its README

Two squares on a checkerboard, one out in the light and one in a soft shadow. Square A looks dark grey, square B light grey, and nobody hesitates. Measure them and they send the eye exactly the same light. Edward Adelson made the classic version in 1995; this part draws its own, and at the end explains it with a model that does what the viewer did: it sees the surfaces, with the shadow taken out.

That is the theme. The image on the retina does not fix the world that made it: a small thing near and a large thing far cast the same image, and a light square in shadow sends the same light as a dark square in the sun. So seeing must add assumptions, and Helmholtz's phrase for it, unconscious inference, can now be written down as Bayes's rule. The part follows the assumptions in turn: grouping and the Gestalt laws, read as priors, with Kanizsa's triangle and Rubin's vase; depth from two eyes, with the disparity derived and Julesz's random-dot stereogram to free-fuse; size constancy, and the Ponzo and Müller-Lyer illusions it produces when it is applied to a page, with the carpentered-world hypothesis and its 2025 reopening. Then the mathematics: a normal prior times a normal likelihood, completing the square, precisions that add, shrinkage, and why a biased percept can be the more accurate one. Then cue combination, predicted in advance from each sense alone and tested on Psyche and by Ernst and Banks; the ventriloquist explained by Alais and Burr; and two priors the viewer can see: light from above (and Adams, Graf and Ernst retraining it) and slow motion (Thompson's faint gratings, fog on the road, and the aperture problem solved by Weiss, Simoncelli and Adelson's MAP velocity). Then objects and faces: why pixel templates fail, Marr's stages, geons and views, Thorpe's 150 ms; Yin's inverted faces, a schematic Thatcher illusion, the fusiform face area and the expertise dispute. Then deep networks: Yamins and DiCarlo's IT predictions, and a small network trained here that learns texture rather than shape, and learns shape when its diet changes. The practice chapter is headsets, camouflage and machines that see for us; the frontier is where priors come from, from Molyneux's question to a child's head camera, what "Bayesian" commits you to, and Gibson's challenge. For Kant's third objection, that watching a mental state changes it, the part offers cue weights read from choices rather than reports, and an illusion that knowing does not undo.

What is computed and built
  • explainer/psychology/psyche/infer.py: the normal posterior and reliability-weighted combination; a two-interval observer with one cue or two, a conflict, and a cumulative-normal fit; speed under a slow prior; edge constraints, the MAP velocity and the vector average; the checkerboard under a shadow and retinex; disparity, random-dot stereograms, size-distance invariance; textured-shape images and a one-layer convolutional network in numpy, with its texture bias on cue-conflict images. Tested in tests/psychology/test_infer.py.
  • The Ledger gains four rows and the Archive fifteen datasets.
  • The course's interactive measures the reader's own Müller-Lyer illusion by two interleaved staircases and reports the point of subjective equality.
Chapter notes
# Chapter What it does
0 Two squares The checkerboard; equal light; seeing is a bet; objectives
1 The inverse problem One image, many worlds; the Ames room from above
2 Grouping and the Gestalt laws Proximity, similarity, continuation, closure as priors; Kanizsa's triangle; figure and ground
3 Depth from two eyes Disparity derived; its square law; Wheatstone's stereoscope; a random-dot stereogram to fuse; cues for one eye
4 Constancy, and illusions Size constancy; Ponzo; Müller-Lyer and Gregory; the carpentered world reopened
5 Bayes for perception The rule; a normal prior, likelihood and posterior; completing the square; shrinkage; why bias can pay
6 Combining cues The rule and its two predictions; Ernst and Banks; Psyche at the bench; the ventriloquist; how optimal
7 Priors made visible Bumps and dents; retraining the prior; low contrast looks slower; fog; the aperture problem and the MAP velocity
8 The two squares, explained Light as surface times illumination; retinex; what it sees; where edges are not enough
9 Recognizing objects Templates fail; Marr's stages; geons, and the rival of remembered views; 150 milliseconds
10 Faces Inversion and wholes; the Thatcher illusion; face-selective cortex; faces or expertise
11 Deep networks as models IT predicted; a small network that learns texture, and then shape
12 The Ledger Cue combination; contrast and speed; the carpentered world; the face area
13 In practice: headsets, camouflage and machine vision The vergence-accommodation conflict; camouflage against the priors; machines in the loop
14 Frontier: where priors come from What is solid and argued; priors as statistics; Molyneux answered; a child's head camera; what "Bayesian" commits to; Gibson
Recap, problems, and the road ahead Ten lines; the third objection; payoffs; problems; references; Part 15
NotesWhere the numbers come from
What Source
A checkerboard (reflectances 0.4 and 0.8) under a soft shadow that halves the light: squares A and B both send 0.40; retinex's surfaces 0.50 and 0.96 Psyche (infer.checker_shadow, infer.retinex), after Adelson (1995); the image is drawn, not reproduced
Size = 2 × distance × tan(angle / 2), for a 2° image geometry
The Ames room, built in the 1940s the usual account; the decade only
Gestalt laws, 1923; Kanizsa's triangle, 1955; Rubin's vase, 1915; V2 cells for illusory contours (1984) and border ownership (2000) Wertheimer; Kanizsa; Rubin; von der Heydt, Peterhans and Baumgartner; Zhou, Friedman and von der Heydt, from the abstracts and later accounts
Disparity δ = IΔd / d(d + Δd), I = 6.3 cm: 1 cm of depth gives 8.49′ at 0.5 m, 0.54′ at 2 m, 0.022′ at 10 m; good observers' thresholds of a few to about ten seconds of arc Psyche (infer.disparity_arcmin); stereoacuity from the usual accounts
The stereoscope, read to the Royal Society in June 1838 Wheatstone (1838)
Random-dot stereograms, Bell Labs, 1960 Julesz (1960)
Ponzo (1911); Müller-Lyer (1889); Gregory's inappropriate constancy scaling (1963) the usual accounts
More than a dozen societies; San foragers least susceptible Segall, Campbell and Herskovits (1966), from later accounts
Newly sighted children aged 8 to 16 see the Ponzo and Müller-Lyer illusions within 48 hours of surgery Gandhi, Kalia, Ganesh and Sinha (2015)
The cross-cultural evidence reopened; the illusion in many animals Amir and Firestone (2025)
Prior N(0, 1.5²), measurement 4 with σ = 1: posterior 2.77, σ 0.83; weight 0.692; mean squared error 0.69 against 1 Psyche (infer.posterior)
A ridge seen in a random-dot stereogram and felt with two force-feedback arms; four levels of visual noise; four observers Ernst and Banks (2002), from the abstract and later accounts
Psyche at σ_V = 1.5, 3, 4.5, 6 mm and σ_H = 4 mm: weights predicted 0.88, 0.64, 0.44, 0.31 and measured 0.88, 0.65, 0.44, 0.31; combined σ predicted 1.40, 2.41, 3.01, 3.34 and measured 1.42, 2.42, 2.99, 3.37 (2,000 trials a point) Psyche (infer.two_interval, infer.fit_cumulative, infer.combine)
Blurred flashes and clicks: the ventriloquist effect reverses Alais and Burr (2004)
Children below about eight to ten years do not combine vision and touch optimally Gori et al. (2008), from the abstract
Many departures from optimality Rahnev and Denison (2018)
Shape from shading assumes light from above; above and a little to the left Ramachandran (1988); Sun and Perona (1998), from later accounts
Haptic training shifts the light-from-above prior, and the shift transfers to a lightness task Adams, Graf and Ernst (2004), from the abstract
Low contrast looks slower Thompson (1982)
Psyche's slow-prior model: 0.92, 0.50, 0.10 of the true speed at contrasts 1, 0.3 and 0.1 (the model's numbers, not people's) Psyche (infer.speed_estimate), after Weiss, Simoncelli and Adelson (2002)
Uniform fog in a simulator: speeds look slower and people drive faster; fog that thickens with distance: speeds look faster Snowden, Stimpson and Ruddle (1998); Pretto, Bresciani, Rainer and Bülthoff (2012), from the abstracts
Edges at 20° and 60°, true velocity (1, 0): MAP direction −0.0°, −7.9°, −30.5° and speed 1.00, 0.82, 0.44 at likelihood widths 0.02, 0.3, 1.0; the vector average at −41° Psyche (infer.edge_constraints, infer.map_velocity, infer.vector_average)
Retinex Land and McCann (1971)
Perceived depth changes lightness; perceived curvature changes lightness Gilchrist (1977); Knill and Kersten (1991)
Pixel distances from a 40 × 40 square: moved 18.5, turned 9.4, a disc 6.9 Psyche (compute.py, item templates)
Marr's Vision, 1982, after his death at 35 the usual account
Recognition by components; deleting joints versus midsegments Biederman (1987)
Bent-wire objects recognized near learned views Bülthoff and Edelman (1992)
Photographs flashed for 20 ms; brain responses differ at about 150 ms; latencies of about 50 ms in V1 and 100 ms in IT Thorpe, Fize and Marlot (1996); the latencies are approximate, from the usual accounts
Inversion hurts faces most Yin (1969)
The composite face Young, Hellawell and Hay (1987)
The Thatcher illusion Thompson (1980); drawn with a schematic face
A face-selective region in 12 of 15 people Kanwisher, McDermott and Chun (1997)
97% of visually responsive cells in a monkey face patch prefer faces Tsao, Freiwald, Tootell and Livingstone (2006), from the abstract
Developmental prosopagnosia in about 2 in 100, by one estimate Kennerknecht et al. (2006), from later accounts
Super-recognizers Russell, Duchaine and Nakayama (2009)
Greebles and the face area Gauthier et al. (1999)
A performance-optimized network predicts 168 IT sites, about half of the predictable variance; middle layers predict V4 Yamins et al. (2014), from the abstract
Networks trained on ImageNet follow texture on cue-conflict images; people follow shape; Stylized-ImageNet raises the shape bias Geirhos et al. (2019)
A one-layer network (8 filters of 5 × 5, global average pooling, softmax readout) on 600 images of three shapes: with each shape's own texture, 100% correct on 300 new images and 283 of 299 conflict answers by texture; with textures shuffled, 50% correct (chance 33%) and 147 by shape to 66 by texture Psyche (infer.TinyConvNet, infer.texture_bias)
The vergence-accommodation conflict slows fusion and causes fatigue Hoffman, Girshick, Akeley and Banks (2008)
Paper moths with edge patches survive birds better Cuthill et al. (2005)
Stickers make a network read a stop sign as a speed limit Eykholt et al. (2018)
Edge statistics in natural images predict contour grouping Geisler et al. (2001)
Observers' speed priors fitted from their judgments: peaked at zero, heavy-tailed Stocker and Simoncelli (2006)
Molyneux's letter to Locke, 1688; newly sighted children fail to match felt to seen shapes at first, and improve within days Held et al. (2011), from the abstract
61 hours of head-camera video from one child aged 6 to 25 months, about 1% of waking hours Vong et al. (2024)
Bayesian just-so stories Bowers and Davis (2012)
Affordances and the optic array Gibson (1979)

Psyche's numbers are computed by compute.py; the simulated observers run 2,000 trials a point, so the numbers shown are close to the model's own and no single run is chosen.

Notes
Finding Original Status
Two senses reporting one property are combined roughly as an optimal observer would Ernst and Banks 2002 replicated
Low-contrast motion looks slower Thompson 1982 replicated
The Müller-Lyer illusion is much weaker without rectangular buildings Segall, Campbell and Herskovits 1966 contested
A fusiform region responds much more to faces than to other objects Kanwisher, McDermott and Chun 1997 replicated

The second row's note records that above about 8 Hz the results are mixed; the fourth keeps the expertise dispute. Shown without a row, with the reason recorded in explainer/psychology/ledger.py: Adelson's checkerboard (a demonstration), Adams, Graf and Ernst (a single experiment told as an example), Yin's inversion (history; faces are entered with the face area), Yamins et al. (a modelling result; deep networks as models are entered in Part 60), Geirhos et al. (a property of networks, not of minds), Vong et al. (learning from an infant's experience is entered in Part 30) and Wheatstone's stereoscope (the history of an instrument).

Notes

Before the narrated master:

  • Adelson (1995): the board is our own; the values (0.4, 0.8, a shadow of 0.5) are chosen, not Adelson's.
  • The Ames room "in the 1940s" is the usual account; the year is not stated.
  • Kanizsa's "slightly brighter" triangle and the brightness of illusory figures are the usual account.
  • Stereoacuity "a few seconds of arc" and "about 10 arcsec" for a good observer are general statements, as is "several people in every hundred" with little or no stereo vision.
  • Segall et al.: "more than a dozen societies" and the ordering are from later accounts. Amir and Firestone (2025): the summary of their argument is from the abstract and press accounts.
  • Ernst and Banks: four observers, the force-feedback arms and the four noise levels are from the abstract and later accounts; their weights and thresholds are described, not plotted.
  • Ramachandran (1988) and Sun and Perona (1998): "above and a little to the left" is from later accounts.
  • Adams, Graf and Ernst (2004): "an hour or two" of training and the lightness task are from the abstract.
  • Snowden et al. (1998) and Pretto et al. (2012): from the abstracts.
  • Biederman's "few dozen" geons (36 in the paper) and the deletion experiment are from later accounts.
  • Thorpe et al. (1996): 20 ms and 150 ms from the abstract; the V1 and IT latencies are approximate.
  • Tsao et al. (2006): 97% from the abstract. Kennerknecht et al. (2006): "about 2 in 100" is their estimate (2.5%).
  • Yamins et al. (2014): "about half of the predictable variance" is from summaries.
  • Held et al. (2011): "within two days" and "within days" are from the abstract.
  • Vong et al. (2024): 61 hours, 6 to 25 months and about 1% are from the paper's abstract and summaries.
  • Hershberger (1970), in problem 7, is cited from memory as an example of a rearing study.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: the checkerboard in shadow (Psyche's own board, after Adelson 1995): both squares send 0.40; seeing is a bet; objectives.
  2. The inverse problem: one 2° image from every size and distance on a line; the Ames room from above.
  3. Grouping and the Gestalt laws: proximity, similarity, continuation and closure read as priors (edge statistics in natural images); Kanizsa's triangle and V2's illusory-contour cells (1984); Rubin's vase and border ownership (2000).
  4. Depth from two eyes: disparity derived, δ ≈ IΔd/d² (1 cm gives 8.49′ at 0.5 m, 0.54′ at 2 m, 0.022′ at 10 m; thresholds of a few seconds of arc); Wheatstone's stereoscope (1838); a random-dot stereogram to free-fuse (Julesz 1960); the cues for one eye.
  5. Constancy, and illusions: size constancy; Ponzo; Müller-Lyer and Gregory's misapplied constancy (1963); Segall, Campbell & Herskovits (1966), newly sighted children (Gandhi et al. 2015) and Amir & Firestone's reopening (2025).
  6. Bayes for perception: the rule; a normal prior (0, 1.5) and measurement (4, 1) give a posterior of 2.77, σ 0.83; completing the square (precisions add, means are precision-weighted, w = 0.692); shrinkage as noise grows; the biased posterior mean's error 0.69 against 1.
  7. Combining cues: the weights and the combined variance derived; Ernst & Banks (2002); Psyche at the bench (weights predicted 0.88 to 0.31 and recovered from conflict trials; combined σ predicted and measured within 2%), with the caution that Psyche is optimal by construction; the ventriloquist reversed (Alais & Burr 2004); children (Gori et al. 2008); departures (Rahnev & Denison 2018); why an advance prediction makes it a test.
  8. Priors made visible: bumps and dents (light from above, Ramachandran 1988), retrained by touch (Adams, Graf & Ernst 2004); low contrast looks slower (Thompson 1982) under a slow prior (0.92, 0.50, 0.10 of the speed in the model); fog in a simulator (1998) and fog that thickens with distance (2012); the aperture problem and the MAP velocity for two edges (8° and 30° off course, at 0.82 and 0.44 of the speed, toward the vector average).
  9. The two squares, explained: light as surface times illumination; retinex (Land & McCann 1971) gives 0.50 and 0.96 (true ratio 2, found 1.94); where edges are not enough (Gilchrist 1977; Knill & Kersten 1991).
  10. Recognizing objects: pixel templates fail (a disc nearer a square than the square moved); Marr's stages; geons (Biederman 1987), and the rival of remembered views (Bülthoff & Edelman 1992); 150 ms (Thorpe et al. 1996).
  11. Faces: inversion (Yin 1969) and the composite face; a schematic Thatcher illusion; the fusiform face area (12 of 15), face patches (97%), prosopagnosia and super-recognizers; greebles and the expertise dispute.
  12. Deep networks as models: IT predicted (Yamins et al. 2014); a one-layer network trained here learns texture (283 of 299 conflict answers), and shape when textures are shuffled (147 to 66). Continued in Part 60.
  13. The Ledger. 13. In practice: the vergence-accommodation conflict (Hoffman et al. 2008); disruptive colouring and countershading (Cuthill et al. 2005); stickers on a stop sign (2018) and the human in the loop.
  14. Frontier: what is solid and argued; priors as world statistics (Geisler 2001; Stocker & Simoncelli 2006); Molyneux's question answered (Held et al. 2011); one child's head camera (Vong et al. 2024); what "Bayesian" commits you to (Bowers & Davis 2012; Part 58); Gibson's affordances.

Psyche: infer (explainer/psychology/psyche/infer.py, six tests): the normal posterior and reliability-weighted combination; a two-interval observer with one or two cues and a conflict, with a cumulative-normal fit; speed under a slow prior; edge constraints, the MAP velocity and the vector average; the checkerboard in shadow and retinex; disparity, random-dot stereograms and size-distance invariance; textured shapes and a one-layer convolutional network in numpy, with its texture bias. On you: the checkerboard; a random-dot stereogram; bumps and dents; the Thatcher illusion. The course's interactive measures the reader's own Müller-Lyer illusion with two interleaved staircases and reports the point of equality. Ledger: reliability-weighted cue combination (replicated, with documented departures); low contrast looks slower (replicated, for slow and moderate speeds); the Müller-Lyer illusion's dependence on culture (contested); the fusiform face area (replicated; what it is selective for is argued). Shown without rows, with reasons: Adelson's checkerboard, Adams et al. (2004), Yin (1969), Yamins et al. (Part 60), Geirhos et al., Vong et al. (Part 30) and Wheatstone's stereoscope. In practice: headsets and the vergence-accommodation conflict, camouflage, machine vision and the human in the loop. Frontier: where priors come from; what "Bayesian" commits a model to (Part 58); learning from one child's experience (Part 30); Gibson. Reading: Helmholtz, Handbuch der physiologischen Optik; Marr 1982; Knill & Richards (eds.) 1996; Ernst & Banks 2002; Weiss, Simoncelli & Adelson 2002; Palmer, Vision Science; Frisby & Stone, Seeing; Kanwisher, McDermott & Chun 1997; Yamins et al. 2014; Geirhos et al. 2019.

Build the film

python -m videos.psychology.psych14.compute        # the part's numbers, into .cache/psych14
python tools/build.py psych14                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych14 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/psychology/psych14. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.psychology.psych14.compute            # every number (about three minutes), into .cache/psych14/
python tools/qa_scene.py psych14 Cues                  # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych14 -q l   # the whole part, silent preview
python tools/build.py psych14                          # 1080p30 with narration
python tools/qa_scene.py psych14 Cues --lang zh        # the Chinese edition of one chapter
python tools/make.py psych14                           # both editions, with the checks a long build needs
python -m videos.psychology.labs 14                    # the lab: posteriors, cue combination, the aperture problem
python tools/check_ledger.py psych14                   # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology                      # Psyche's inference module, the Ledger, the Archive

The Chinese edition is zh_lines.py (the narration, line by line) and the series table videos/psychology/psychology_text_zh.json (the text on screen); the terms are in PSYCHOLOGY_ZH_GUIDE.md.