Toolbox – Bayesian Inference

On January 17th, 1966, a US Air Force bomber flying over the south of Spain exploded in midair while attempting to refuel, sending its cargo, including four hydrogen bombs, raining down from the sky. Of these, three were recovered, undetonated, on land, while the fourth was disturbingly AWOL. According to a local fisherman, it splashed down somewhere in the Mediterranean Sea. How would you go about looking for the bomb in a way that maximizes the chance you’ll find it?

In addition to sounding like an end-of-chapter question from Math for Rambos, this story is historical fact. It came to be known as the Palomares Incident, and its successful resolution depended on a statistical tool called Bayesian inference. The roots of Bayesian statistics go back to 18th century England with the discoveries of Reverend Thomas Bayes, who was interested in the problem of determining causes from observations of results. Bayes realized that any analysis of causes should incorporate not only the observations of results but also prior expectations about the various causes. In Bayesian terminology, beliefs about potential causes at the outset of your experiment are referred to as your “prior,” as they are formed prior to making an observation. Here’s an example to illustrate its importance: imagine waking up in the night to get a drink of water. As you stand at the sink filling your glass, you feel a warm, slobbery tongue lick your calf. Now, your response to this will differ greatly depending on whether or not you have a dog. That is to say, your belief about the cause of the warm wetness on your calf (the observation) depends on your belief about the presence of a dog (the prior). It is the inclusion of a prior that makes Bayesian statistics such a powerful tool for answering complex problems.

Let’s return to our bomb hunt. Search teams set to work building their prior by establishing various hypotheses about the bomb’s location and assigning certainties to each of them. The fisherman’s sighting was their best clue, but there was always the possibility that he was mistaken, and it actually landed somewhere else. The bomb had two parachutes, and its location depended on whether one or both or none deployed successfully. All of these beliefs should factor into our search plan, and the Bayesian prior allows precisely for that to occur. When the prior was complete, the team sent a deep sea-submersible, Alvin (the same one that explored the Titanic), to the sites that had the highest probability of containing the bomb. Each night, the team would revise their prior to incorporate that day’s data, and use the new prior to inform the next day’s search path. Using this method, the bomb was eventually located and safely recovered.

At UC Berkeley, Professor Jack Gallant and colleagues are using Bayesian statistics to plumb the depths of a different great unknown. To better understand how the brain works, they have set off on a quest to reconstruct what people are seeing based on their brain activity (“Decoding the mind’s eye” by Alexis Fedorchak). Reconstruction is an incredibly hard task, as the possible hypotheses are every combination of real-life objects imaginable. In analogy to the bomb hunt, the space containing the possible movie locations is absolutely enormous: far more expansive than all of the Earth’s oceans. Luckily, there exists a repository that approximates possibilities on such a grand scale, the wondrous product of millions of individual and societal neuroses known as YouTube. The authors used this resource to harvest the roughly 18 million one-second snippets that served as their “natural movie” prior. Next, they showed subjects longer movies while recording brain activity and, for each second, calculated the likelihood that the on-screen movie contained elements from a particular prior snippet. By design, none of the prior snippets perfectly matched the test movie, but the hope was that the set of priors would include enough elements of the test movie that averaging the 100 most likely snippets together would produce an estimated reconstruction of the subject’s visual experience, second-by-second. Using this method, the team was able to reproduce the movies with surprising accuracy.

One reason Bayesian inference is so popular is that it mathematizes a very intuitive and reasonable approach – start with what you know, make observations based on your prior knowledge, update what you know with what you find out. Lather, rinse, repeat. By incorporating our incoming beliefs via the prior probability, Bayesian inference has formed the backbone of fields as diverse as search-and-rescue, brain decoding, medical diagnoses, and artificial intelligence.

Leave a Reply