laitimes

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

author:Institute of Physics, Chinese Academy of Sciences
Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

This article is produced by "Light Science Workshop".

Written by: Jiao Shuming

Reviewer: Zuo Chao

Movie "The Three Teams"

In the movie "Three Teams", Cheng Bing was a police officer who was responsible for solving a murder case. Cheng Bing has been searching for the whereabouts of a suspected murderer, Wang Eryong. At the beginning, there was only a vague image of the target person, and the probability that Cheng Bing judged that the other party was Wang Eryong was very low. Later, it was learned that a man looked similar to Wang Eryong, and Cheng Bing's confidence in his target increased a little.

After an in-depth investigation, it was found that the man not only likes to watch legal programs, but also likes to play old-fashioned Tetris games, these two clues that coincide with Wang Eryong's hobbies make Cheng Bing convinced that he is the person he is looking for, and the probability of thinking that the other party is Wang Eryong is close to 100%.

As new clues are discovered, Cheng Bing's judgment on the identity of the target is constantly updated, from the initial low-probability suspicion to the final high-probability confirmation. This process uses Bayesian reasoning to continuously modify the prior probability to obtain the result of the posterior probability.

Cheng Bing's process of judging that the target person is Wang Eryong is actually Bayesian reasoning. Suppose there are two bags of balls, A and B, the red balls in bag A account for 3/4, and the green balls in bag B account for 3/4. Give you a bag at random, and judge whether it is a bag or a bag B by touching the color of the ball one by one, which is similar to the process of Cheng Bing determining whether the other party is Wang Eryong.

At the beginning, there is no clue, assuming that the probability of bags A and B is 50%, which is the "prior probability". If a red ball is touched, because it is more likely to come from bag A, the probability of bag A is increased to 75%, which is the updated "posterior probability" based on the new clue. Then, if another red ball is drawn, the probability of bag A continues to increase to 90%. But if two green balls are drawn in a row, the probability of bag A will be reduced to 50% again. If you go on and find 4 more balls, if you have 6 reds and 2 greens in 8 times, the probability of bag A will be as high as 98.8%, although it is difficult to determine that it is definitely A, but it is very certain.

This process of dynamically updating probabilities is to continuously integrate the original judgment with new clues to make the results more and more accurate. Bayesian reasoning not only gives the most likely answer, but also quantifies the degree of confidence in that answer. It represents a concept of thinking: insist on feedback and iteration, abandon complacency, tolerate uncertainty, be diligent in learning and exploration, and pay equal attention to theory and practice.

Encyclopedia: What is "Bayesian reasoning"?

Bayesian reasoning is a mathematical method for making probabilistic judgments and decisions under uncertain circumstances, which originated from the research of the 18th-century British mathematician Thomas Bayes.

The core principle of Bayesian reasoning is to derive a "prior probability" based on known information, and then use the Bayesian formula to modify the prior probability with new clues for each new piece of evidence, and obtain an updated value of the "posterior probability". This correction process is repeated over and over again, with new information being introduced to bring the probability estimate closer to the true probability.

Specifically, the Bayesian formula uses the multiplication rule of conditional probabilities to express the posterior probability as: posterior probability = prior probability * likelihood function / evidence probability. The likelihood function describes the probability of new evidence occurring, and the evidence probability is a normalization factor. In this way, a modified posterior probability estimate can be obtained by integrating the prior probability with the new evidence through simple probability multiplication and division.

Through cyclic iteration, Bayesian reasoning allows us to dynamically adjust our judgment of the likelihood of an event while continuously absorbing new information. In the end, not only is the most likely choice of conclusion given, but also quantified the degree of confidence in that choice.

Bayesian reasoning all play an important role in helping us make informed judgments and decisions in an uncertain world.

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 1: The British mathematician Thomas Bayes (1702-1761), the originator of Bayes' theorem

The murder of Simpson's wife in the United States

The Simpson murder case in the United States caused a sensation in the 90s of the 20th century, and Simpson hired a "dream lawyer team" to defend him. Prosecutors presented evidence that Simpson had abused his wife for a long time, arguing that it was a "prelude to murder." Defense lawyer Alan countered that although 4 million women are subjected to domestic violence in the United States every year, only 1,432 are killed, with a probability of only 1 in 2,800, suggesting that Simpson may be innocent [1].

According to Bayesian reasoning, the wife has indeed been killed, and the question is whether Simpson is the murderer. Although Simpson's domestic violence is a clue, it is not related to the probability of 1 in 2800. We should pay attention to the probability that in the case of a wife's murder, the murderer is the perpetrator. Statistics show that among women who are victims of domestic violence and are killed, the probability of the murderer being a domestic violence man is as high as 90%. This evidence greatly increased Simpson's suspicions, but Alan's sophistry weakened his persuasiveness.

This suggests that in uncertain situations, we should not stop at the surface numbers, but pay attention to the correlation between conditional probabilities. Bayesian reasoning teaches us that when acquiring new cues, we need to dynamically modify existing judgments and deduce posterior probabilities from prior probabilities.

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 2: Simpson in court in 1995

Applications of Bayesian reasoning

Bayesian reasoning has a wide range of applications, including World War II code breaking, medical diagnosis, e-commerce recommendation, spam identification, financial investment decision-making, script killing games, etc. It also plays an important role in the field of artificial intelligence and computational optical imaging.

When we take a photo, the camera records the complete light field data, and we get a clear image directly. However, in many cases, the camera can only acquire limited data and need to reconstruct a clear photo. A case in point is the first image of a black hole released in 2019. Since the black hole is located in the distant depths of the universe, the ideal condition is to build a radio telescope the size of the Earth, but in reality there are only eight normal-sized telescopes scattered around the world to collect data. Although the data is limited, it is possible to guess a "reasonable" picture from the scientific understanding of black holes.

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 3: The first image of a black hole in history released in 2019

Reconstructing a photograph requires both idealizing the constraints and fitting the measurement data realistically. Under the Bayesian framework, these two requirements can be quantified as probability values and combined into overall probability values to find the best reconstruction results. It took the researchers two years to combine a variety of algorithms to finally obtain the widely disseminated black hole photo, which is the most likely to be correct, although it is not 100% guaranteed to be true.

The uncertainty of the truth of photographs needs to be taken into account not only in the exploration of the universe, but also in our daily applications. For example, ordinary cameras can only take flat images, and to measure the three-dimensional shape of an object, it needs to be combined with a projector and a camera. Usually it is necessary to project different structured light fringe patterns several times to obtain sufficient data, and if there is only a single streak pattern, insufficient data will lead to the non-uniqueness of the reconstruction results. In this case, how can the 3D model be reconstructed smoothly [2]?

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 4: 3D measurement of structured light: it is often necessary to project several different stripe patterns in sequence [3]

Another limitation of a regular camera is that it can only record the amplitude (or intensity) of the light field, that is, the brightness and darkness of the light, which is no problem for taking an ordinary everyday photo. However, under the microscope, in the face of the transparent cells and microorganisms to be observed, the amplitude of the light often cannot reflect the details of the sample, and the phase information of the light is more important, the phase indicates the length of the light propagation distance, and the difference in the thickness of different parts of a cell will cause the change of light phase. However, there is no way to measure and record the phase of the light directly, and we not only need a phase photo of the sample, but also for the microscope, we also want the phase photo to be the result of magnification.

In order to obtain high-resolution phase imaging results, the researchers proposed a method combining differential phase contrast (DPC) and Fourier Ptychographic Microscopy (FPM), which simply irradiates the sample through an array of LED lights, and only turns on a part of the LED illumination at a time. This means that light shines on the microscope from a different direction each time. In each lighting mode, a photograph of the light intensity is taken, and finally from the details of all the light intensity photos, the high-resolution phase imaging results that would otherwise be invisible can be calculated and reconstructed. "There is no such thing as a free lunch", in this scenario, the price to be paid is the number of photos taken in different lighting conditions, often more than 100, so if we only have 5 such photos, can we still get the same high-quality calculations when the data is seriously insufficient [4]?

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 5: In a combination of differential phase contrast and Fourier tandem microscopy, the number of photos with different light intensities in different lighting modes is reduced from 173 to 185 to just 5, and the data-trained Bayesian neural network can still be used to predict high-resolution phase images of microscopic microscopic specimens, along with an uncertain probability plot that represents the confidence of the different parts of the prediction [4,5]

The image sensor used in a normal camera is usually an array of tiny cells, each of which is used to record information about each pixel in a photo, but in some wavelengths other than visible light, such as infrared, X-ray, and terahertz, such array sensors are difficult to manufacture or very expensive, so researchers have turned to another alternative called single-pixel imaging (SPI). In this special camera, the sensor has only one pixel, and can only record the overall light intensity of the object scene at a time, and the photographer needs to irradiate a different projection pattern to the surface of the object each time, and after many times of irradiation of different patterns, the single-pixel detector collects enough data to calculate and reconstruct the object image. But again, the key word here is "enough", if we only want to illuminate a small amount of projection patterns and record a small amount of data, can we still reconstruct a clear image of the object [6]?

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 6: A single-pixel imaging system

Source: Drawn by the author

The common challenge in all of the above situations is that the actual acquisition of image data is pitiful, but the hope to restore a complete and clear photo looks like an "unrealistic fantasy", pinning hopes on the "white wolf with empty gloves", and artificial intelligence proves that "fantasy still exists, what if it comes true?" ”。 A deep learning neural network mathematical model, simulating the structure of the human brain, contains a large number of neurons and synaptic weights connected to each other, researchers prepare a large number of training data according to different tasks in advance, such as structured light 3D measurement is a single distorted stripe pattern and the corresponding actual 3D object model, phase microscopy imaging is a few photos of light intensity in different lighting modes and high-resolution phase imaging results, In single-pixel imaging, there is a limited amount of detector data and an actual image of the object. After the neural network model is trained, all the connection weights in the model are optimized, and we learn how to guess the desired photo from the insufficient data, which can help us accomplish these seemingly impossible tasks.

Lift the fog! Bayesian Reasoning: Reading "Uncertainty"

Figure 7: Reconstruction results of three imaging systems combined with Bayesian neural networks: ordinary neural networks can only give predictions (red boxes), while Bayesian neural networks can give both predictions (red boxes) and uncertainty estimates (blue boxes) [2,4,6]

Although ordinary deep learning models can give prediction results, they cannot quantify the reliability of the results. We want AI to not only guess the answer, but also be "self-aware" and give credibility to the answer.

Bayesian deep learning can meet this need, which treats the current connection weight value of the neural network as a prior probability model, and each training example is equivalent to a new clue, which can continuously update the prior probability to the posterior probability. In this way, the neural network is no longer fixed and can give both predictions and uncertainty estimates.

For example, in a computational imaging task, where a normal neural network can only output a reconstructed image, a Bayesian neural network can not only reconstruct the image, but also attach an uncertainty evaluation to each pixel value. This presents a more complete picture of an uncertain world.

summary

In general, in real life, we are often faced with uncertainties and cannot immediately know the exact answer. For example, criminal investigators need to judge whether the suspect is the real murderer from the clues; Scientists need to infer a clear astronomical picture from limited observational data; Doctors need to diagnose the cause of the disease from the symptoms and test results; Wait a minute. There are so many possible answers to these questions that it's hard to jump to conclusions all at once.

With Bayesian reasoning as a powerful tool, we can face these uncertainties with poise. Bayesian reasoning teaches us to first give a preliminary probability estimate based on existing information, which is called "prior probability". After that, as long as new clues and evidence are obtained, the Bayesian formula can be repeatedly used to fuse new information with prior probability, and dynamically update a new estimate of "posterior probability".

Through this cyclic and iterative approach, we can integrate the scattered old and new information in an objective and rational and gradual way of thinking, gradually narrow the scope of uncertainty, and move the probability estimate closer to the final true answer. In the end, Bayesian reasoning not only allows us to find the most likely answer choice correctly, but also quantifies how confident we are in this choice, giving us a clear idea of the reliability of the conclusion.

Therefore, whether it is tracking down the real culprit, reconstructing astronomical photographs, or diagnosing diseases, as long as Bayesian reasoning is used, we can navigate the uncertain environment and make informed judgments and decisions.

Resources

[1] Leonard Mlodinow, translated by Guo Siyu, The Footsteps of a Drunkard: How Randomness Dominates Our Lives, Hunan Science and Technology Publishing House (2010)

[2]S. Feng, C. Zuo, Y. Hu, Y. Li, and Q. Chen, "Deep-learning-based fringe-pattern analysis with uncertainty estimation," Optica 8(12), 1507-1510 (2021)

[3] Chao Zuo, Xiaolei Zhang, Yan Hu, Wei Yin, Detong Shen, Jinxin Zhong, Jing Zheng, Qian Chen, "Is 3D Really Coming?—— A Discussion on 3D Structured Light Sensors," Infrared and Laser Engineering, 49(3), 45 (2020).

[4]Y. Xue, S. Cheng, Y. Li, and L. Tian, "Reliable deep-learning-based phase imaging with uncertainty quantification," Optica 6(5), 618-629 (2019)

[5]L. Tian, X. Li, K. Ramchandran, and L. Waller, "Multiplexed coded illumination for Fourier Ptychography with an LED array microscope," Biomed. Opt. Express 5(7), 2376-2389 (2014)

[6]R. Shang, M. A. O’Brien, F. Wang, G. Situ, and G. P. Luke, “Approximating the uncertainty of deep learning reconstruction predictions in single-pixel imaging,” Commun. Eng. 2, 53 (2023).

Producer: Zhao Yang

Editor: Zhao Wei

Source: China Optics

Editor: Apo