The Brain as a Bayesian Machine: From Computational Cognitive Neuroscience to Psychotherapy
Read Article 1: The Brain as a “Bayesian Machine”: Uncertainty, Prediction, and the Illusion of Control
2. Exposure as Bayesian Learning: How New Experience Changes the Brain’s Predictions of Danger
2.1. At the intersection of CBT, neuroscience, and Bayesian cognitive science
One of the most effective methods in cognitive behavioral therapy (CBT) for anxiety disorders is exposure therapy: controlled and purposeful confrontation with objects, situations, bodily sensations, thoughts, or memories that evoke fear and anxiety.
At first glance, the logic of the method seems fairly simple: a person repeatedly encounters a situation they fear, and fear decreases over time. For decades, one important explanation of exposure’s therapeutic effects has been habituation: the gradual weakening of the fear response when a fear-provoking stimulus is presented repeatedly or for a prolonged period. Historically, the idea of desensitization—the gradual reduction in reactivity to a feared stimulus—has also played an important role. However, contemporary learning theory, cognitive neuroscience, and computational psychology offer a deeper understanding of exposure. Its primary value may lie less in helping a person feel less afraid at a particular moment than in providing the brain with new data that allow earlier predictions to be revised. From this perspective, exposure can be viewed as a particular form of Bayesian learning.
The brain has a prediction, while the environment unfolds in a particular way. If reality does not match the prediction, a prediction error arises. If this new information is accepted and integrated into the internal model, the next prediction changes.
In other words:
Prior probability (initial belief) → prediction → experience / new data → prediction error → posterior probability (updated estimate) → new prior probability (new initial belief)
This is the sequence that bridges Bayesian cognitive science and CBT.
2.2. We respond not only to reality, but also to our predictions
Imagine a person with panic disorder who thinks, when experiencing palpitations: “If my heart is beating this fast, I might have a heart attack.” The bodily sensation itself does not inherently carry the meaning “heart attack.” The brain attempts to identify the cause of the sensation. Previous experience, beliefs, medical knowledge or its absence, previous panic attacks, and attention to bodily sensations together shape a particular prior belief.
For illustration, let us say:
P(danger) = 80%.
Under the influence of this prior probability, the palpitations are interpreted as possible evidence of danger. Now imagine that interoceptive exposure is conducted during therapy: the person increases their heart rate through physical exercise and remains in that state for several minutes without their usual safety behaviors.
Their prediction was: “My heart will beat fast → something dangerous will happen.” The actual outcome is: “My heart beat fast → it was very unpleasant → but no catastrophe occurred.”
A discrepancy emerges between the expected and actual outcomes.
This is a threat prediction error.
The new information provides an opportunity to revise the previous belief. Perhaps next time the estimated danger will be 60% rather than 80%, then 40%, and eventually 20%. These numbers are, of course, illustrative. What matters is the logic of the mechanism. Each new experience can become new evidence that changes the next prediction.
2.3. Bayesian learning is continuous
One of the most important features of Bayesian inference is that learning is not a completed, one-off act. Today’s posterior is tomorrow’s prior. In other words, if we revise a belief today on the basis of new information, that revised belief becomes the starting prediction for the next situation.
Formally:
Prior₁ + Evidence₁ → Posterior₁
Then:
Posterior₁ = Prior₂
And:
Prior₂ + Evidence₂ → Posterior₂
And so on.
This is precisely why CBT places such importance not only on cognitive techniques, but also on behavioral techniques: behavioral experiments, exposure, and real-life homework.
Our beliefs about ourselves or the world have developed through hundreds and thousands of experiences. A single logical argument is not always sufficient to change them. A new model requires new evidence—that is, new information about the environment obtained through direct engagement. Accordingly, within a computational interpretation of CBT, a behavioral experiment can be understood as purposeful information gathering, and exposure as prediction-error-based learning under uncertainty.
2.4. Does every new piece of information change a prediction?
An important clarification is needed here. In Bayesian terms, new data can, of course, change a posterior prediction. In humans, however, not every new experience changes beliefs to the same degree.
Imagine a person with social anxiety disorder. Their prediction is: “If I make a mistake while speaking, people will think I am stupid.” They give a presentation and become confused several times, but nobody laughs or reacts negatively. This seems like a perfect prediction error. However, it does not always work that way. The person may say: “The people there just happened to be polite this time,” “They probably noticed everything but simply did not show it,” or “I controlled my emotions so well that I managed to prevent a bad outcome.” The new information was available, but the threat model barely changed. This phenomenon is particularly important for understanding exposure.
Prediction error ≠ prediction change
A prediction error does not necessarily lead to a change in prediction. Having an unexpected experience does not in itself mean that a person has learned from it.
2.5. From prediction error to prediction change
Clinical research in recent years has demonstrated the importance of this distinction. In 2023, Pittig and colleagues analyzed 8,484 exposure exercises completed by 605 patients with anxiety disorders.
They distinguished three processes:
- Expectancy violation: the extent to which the actual outcome differed from the predicted danger.
- Expectancy change: the extent to which the next prediction of danger changed afterwards.
- Learning rate: how effectively and rapidly a prediction error was translated into a new prediction.
Treatment effectiveness is predicted less by the mere presence of a prediction error than by how much that error actually changes the next prediction.
In 2025, Winkler and colleagues also found, in experimental research using an exposure analogue for social anxiety, that changes in anxiety were more closely associated with prediction change and learning rate than with the magnitude of prediction error.
In 2026, Zbozinek, Rosenberg, Treanor, and Craske published findings from a study in which 84 participants with social anxiety disorder or panic disorder completed nine sessions of exposure therapy. The researchers compared two variables during exposure: fear reduction and revision of threat expectancy—expectancy updating. Expectancy change predicted symptom reduction both at the end of therapy and three months later. A direct reduction in fear during exposure did not have the same predictive value. This is an important distinction that changes the clinical meaning of exposure. Successful exposure does not necessarily have to end with “I am no longer afraid.” It can end with: “I am still afraid, but what I predicted did not happen.”
2.6. Habituation or learning?
Within a habituation framework, a therapist may monitor how much fear decreases during exposure. For example, they might ask the person to rate their fear on a 100-point scale after each exposure and subsequently compare the ratings.
The inhibitory learning approach, however, proposes a different question: “What did you predict, and what actually happened?”
Contemporary models of extinction and inhibitory learning suggest that old fear memories are not necessarily erased during exposure. Instead, new, competing knowledge may develop: “This stimulus can be safe.” Consequently, even after successful therapy, the same responses may return under certain conditions. Neuroscientific studies of fear extinction likewise suggest that extinction is often better understood as the formation of a new memory rather than the erasure of the original fear memory.
2.7. Two competing models
Imagine that a person’s brain contains two possible models of the same situation.
Model A — danger: “A dog is approaching → it might bite me.”
Model B — safety: “A dog can approach without attacking.”
During exposure, the person repeatedly receives evidence supporting Model B. However, Model A does not necessarily disappear.
Bayesian latent-cause models even propose that, during extinction of a conditioned response or fear, an organism may either update an existing threat model or create a new “safe” latent cause.
This is an important distinction. If safety learning is too closely tied to the therapist’s office, the old threat model may become active again in a different situation. Contemporary computational models of CBT consider latent-cause inference a possible model for understanding the return of fear after exposure (Berwian et al., 2025). This highlights the importance of conducting exposure in different environments, using different stimuli, and repeatedly practicing the learning in real-life conditions.
2.8. Why can safety behaviors interfere with Bayesian updating?
Imagine a person with panic disorder who believes: “If I start panicking on the subway and do not have medication with me, I will lose control.” They enter the subway, but only with medication in their pocket, water in their hand, and continuous phone contact with a family member. Panic occurs. No catastrophe happens. One possible Bayesian inference would be: “Perhaps my prediction was exaggerated.” However, the actual conclusion may be: “I did not lose control because I had my medication with me.”
In this case, the safety behavior creates an alternative explanation. The safe outcome is attributed not to the hypothesis “The situation was not as dangerous as I thought,” but to the hypothesis “My safety behavior saved me.” Thus, the prior belief about danger may remain unchanged.
2.9. Precision: why are some beliefs so difficult to change?
The Bayesian approach offers another useful concept: precision. Put simply, precision can be understood as the confidence a system assigns to a particular prediction or piece of evidence.
Two people may hold the same belief: “I might faint.” For one, it may be a tentative assumption. For the other, it may be an almost unquestionable conviction. In the second case, the prior belief may have a very high degree of subjective precision. As a result, even repeated contradictory experiences may have little effect. Likewise, new evidence of safety may be assigned low precision and seem insufficiently credible: “That was just one lucky occasion.”
During exposure, therefore, what matters is not only how large a prediction error we generate, but also the significance the person assigns to the new experience.
2.10. Exposure and uncertainty
An anxious person’s demand or expectation often goes beyond the idea “It is safe.” The fuller demand may be: “I must know for certain that it is safe.” Yet such guarantees hardly ever exist in the real world. A dog can bite. An airplane can, theoretically, crash. Someone may genuinely judge us negatively during a public presentation. An increased heart rate can sometimes have a medical cause.
The aim of successful CBT, therefore, is not to teach a person that “Danger equals zero,” but rather: “I can estimate the probability of danger more accurately and act even when some uncertainty remains.”
In recent years, computational psychology has increasingly considered anxiety not only as an excessively high expectation of danger, but also as a possible expression of disrupted learning about uncertainty or difficulties in developing tolerance of uncertainty. In several computational studies, higher anxiety has been associated with difficulties in learning about safety and adapting to changing environmental conditions (Brown et al., 2023).
In this sense, exposure has a dual purpose: learning that the predicted catastrophe often does not occur, and learning that the absence of complete certainty is not itself danger.
2.11. What happens in the brain?
The neurobiology of exposure is extremely complex, and simplifications such as “Exposure activates this or that center” require scientific caution. Nevertheless, several interconnected systems play recurring roles in research on threat learning and extinction.
The amygdala is involved in threat learning, the evaluation of salience, and the expression of fear.
The hippocampus is important for context and memory: it helps distinguish which association is relevant in which environment.
The medial and ventromedial prefrontal cortical systems are involved in extinction learning, valuation, and the regulation of responses to threat.
The striatum is associated with reinforcement learning and prediction-error-based learning.
Dopaminergic systems are also being investigated in the context of prediction error and extinction learning (Papalini et al., 2020).
Research in this field also supports the idea that human fear extinction depends not on a single brain center, but on interactions among amygdala–hippocampal–prefrontal and other networks. At the same time, neuroimaging findings are more variable than popular accounts sometimes suggest (Chen et al., 2025).
It is therefore more appropriate to say that exposure creates conditions for learning that engage neural systems associated with threat, memory, context, and prediction.
2.12. How can all this change exposure practice?
If exposure is viewed not only as remaining in a frightening situation, but also as a process of testing and updating predictions, its connection with behavioral experiments becomes much clearer.
In Տագնապամարիչ (Begoyan, 2020), we presented the behavioral experiment as a CBT method through which clients can test their assumptions, beliefs, and predictions in real-life conditions. From a Bayesian perspective, the same process can be described more precisely: a person has particular prior beliefs about the world, makes predictions on their basis, compares the resulting experience with those predictions, and updates their beliefs if the new data are sufficiently convincing.
In this sense, a behavioral experiment can be regarded as a clinical tool for Bayesian updating.
In anxiety disorders, a person may hold a threat-related prior belief with high confidence—or, in Bayesian terminology, high precision: “If I stay in an enclosed space and my anxiety increases, I will lose control.” A specific prediction follows from this belief. If the person consistently avoids enclosed spaces or stays in them only with the help of safety behaviors, that prediction is never fully tested. Consequently, the system has little basis for revising its prior belief.
This is where exposure can be conducted as a behavioral experiment.
1. Clarify the prior belief and the prediction
Before exposure, it is useful to ask not only “How anxious are you?”, but also “What exactly do you predict will happen?” For example: “If I stay in an enclosed space for five minutes, there is a 70% chance that I will suffocate or lose control.” In this way, a general fear becomes a testable hypothesis. We can also assess not only the estimated probability of the event, but the client’s confidence in that prediction. In Bayesian terms, we are trying to identify the prior operating in that situation and how much precision the person assigns to it.
2. Conduct the behavioral experiment: exposure
The client then enters a situation in which their prediction can be tested. At this stage, the aim is not merely to provoke anxiety or wait for it to decrease. The aim is to obtain new evidence from reality. For example, the person stays in an enclosed space for five minutes, allowing the prediction “I will suffocate or lose control” to be tested. Exposure thus becomes an attempt to test a prediction against reality, rather than simply to “remain with anxiety.”
3. Do not make anxiety reduction the main criterion of success
If, at the end of exposure, the client still experiences anxiety at an intensity of, for example, 70/100, this does not in itself mean the experiment has failed. The important question is: “Despite the anxiety, what actually happened?” A person may feel intense anxiety without losing control, fainting, or suffocating, and may be able to remain in the situation. It is this discrepancy between the prediction and the actual outcome that can generate a prediction error. If the prediction was “I will not be able to bear it,” while the actual experience was “I felt very intense anxiety, but I stayed and endured it,” the evidence contradicts the prior belief.
4. Compare the prediction with the actual outcome
After the experiment, it is important to explicitly compare two things: the prediction, “I will lose control,” and the actual outcome, “My anxiety reached 80/100, but I did not lose control and stayed in the situation.” From a Bayesian perspective, the new data are considered alongside the prior belief. When the actual outcome differs from the predicted one, a prediction error arises that may provide a basis for belief updating. However, the presence of a prediction error does not guarantee that the belief will change.
5. Explore how the outcome is attributed and interpreted
After a behavioral experiment, it is particularly important to ask: “Why do you think the event you predicted did not happen?” Imagine that the client replies: “Because I kept looking at the door and knew that I could leave immediately if necessary.” Objectively, no catastrophe occurred, but the person’s internal model may remain almost unchanged. They may conclude not “The enclosed space was not as dangerous as I thought,” but “The danger was real; I just managed to prevent it.” In other words, the new evidence has been attributed to safety behaviors, and the threat-related prior belief has been preserved.
From a Bayesian perspective, a person may assign greater precision—that is, greater credibility—to their previous belief than to the new evidence contradicting it. Consequently, the prediction error will have little influence on belief updating. Exploring safety behaviors and interpretations of the outcome is therefore not merely an additional discussion: it may determine whether genuine belief updating occurs.
6. Assess the new posterior belief
After the experiment, we can ask again: “Next time you are in the same situation, how likely do you think it is that you will lose control?” If the initial estimate was 70% and has fallen to, for example, 30%, we already have a measurable indicator of belief change.
In Bayesian terminology, the prior has been transformed into a posterior through new experience and evidence. In simplified form:
Prior belief → prediction → behavioral experiment / exposure → actual outcome → prediction error → interpretation of the outcome → posterior belief
7. Make the posterior belief the prior for the next experiment
One successful experiment does not mean that the person’s threat model has changed completely. They may think: “It worked in this room, but I definitely will not manage in an elevator,” or “Nothing happened this time because my therapist was next to me.” Behavioral experiments and exposure should therefore be repeated in different situations and under different conditions, so that the new learning is not tied to one specific context. The posterior formed through each experiment becomes the new prior for the next:
Prior₁ → new evidence₁ → posterior₁ = prior₂ → new evidence₂ → posterior₂ → …
Therapy can thus be understood not as a one-time “refutation” of an incorrect belief, but as the gradual updating of a person’s probabilistic model of the world. From this perspective, the boundary between behavioral experiments and exposure is somewhat conventional. Both can be organized around the same basic principle:
Prediction → experiment → outcome → updating
A behavioral experiment usually involves explicitly formulating and testing a particular belief or prediction, whereas exposure involves systematically confronting fear-provoking situations, stimuli, or internal sensations. However, when exposure is organized as the purposeful testing of predictions, it simultaneously becomes a behavioral experiment.
This approach also helps avoid a common oversimplification of exposure: “You must stay in the situation until fear decreases.”
Anxiety may decrease, but from a learning perspective the central question is different: “What did I predict, what actually happened, and how did my understanding of danger change after that experience?” Exposure then becomes more than an exercise in enduring anxiety. It becomes a structured behavioral experiment in which a person can compare predictions with evidence from reality, revise prior beliefs on the basis of the resulting prediction error, and gradually develop a new, more accurate internal model.
Summary
The human brain must live with incomplete information about the future. It therefore continuously generates predictions and compares them with new evidence from reality.
In anxiety disorders, some predictions of danger may become overly broad, rigid, or held with excessive confidence. Avoidance and safety behaviors often prevent people from obtaining or accurately interpreting information that contradicts those predictions. Exposure changes these conditions. The person remains in the situation long enough for reality to have an opportunity to answer their prediction.
However, a prediction error is still only an opportunity. Genuine therapeutic learning occurs when the person can say: “What I predicted was not confirmed, or it was not confirmed in the way I expected. Therefore, my next prediction should be slightly different.” It is the accumulation of these small changes that can gradually transform the threat model. The Bayesian approach therefore offers a valuable perspective on exposure: the aim of psychotherapy is not to teach people never to feel afraid. It helps the brain learn more accurately from its own experience.
References
Բեգոյան Ա.Ն. Տագնապամարիչ. տագնապային խանգարումների հաղթահարման ուղեցույց / Ա.Ն. Բեգոյան. – Եր.: Հիլֆմանն Պրեսս, 2020. – 368 էջ։
Chen, J., Fang, Z., Zhang, X., Zheng, Y., & Chen, Z. (2025). How fear memory is updated: From reconsolidation to extinction? Neuroscience Bulletin, 41, 1054–1084.
Craske, M. G., Treanor, M., Conway, C. C., Zbozinek, T., & Vervliet, B. (2014). Maximizing exposure therapy: An inhibitory learning approach. Behaviour Research and Therapy, 58, 10–23.
Berwian, I. M., Hitchock, P., Pisupati, S., Schoen, G., & Niv, Y. (2025). Using computational models of learning to advance cognitive behavioral therapy. Communications Psychology, 3(1), Article 72.
Blakey, S. M., & Abramowitz, J. S. (2016). The effects of safety behaviors during exposure therapy for anxiety: Critical analysis from an inhibitory learning perspective. Clinical Psychology Review, 49, 1–15.
Brown, V. M., Price, R., & Dombrovski, A. Y. (2023). Anxiety as a disorder of uncertainty: Implications for understanding maladaptive anxiety, anxious avoidance, and exposure therapy. Cognitive, Affective, & Behavioral Neuroscience, 23(3), 844–868.
Papalini, S., Beckers, T., & Vervliet, B. (2020). Dopamine: From prediction error to psychotherapy. Translational Psychiatry, 10(1), Article 164.
Pittig, A., et al. (2023). Change of Threat Expectancy as Mechanism of Exposure-Based Psychotherapy for Anxiety Disorders: Evidence From 8,484 Exposure Exercises of 605 Patients. Clinical Psychological Science, 11(2).
Brown, V. M., et al. (2023). Anxiety as a disorder of uncertainty: Implications for understanding maladaptive anxiety, anxious avoidance, and exposure therapy.
Winkler, C. D., Pittig, A., Phillips, L. J., & Felmingham, K. L. (2025). Associations among threat prediction error, prediction change, and anxiety during an exposure therapy analogue in adults with healthy to clinical social anxiety. Behaviour Research and Therapy, 187, 104709.
Zbozinek, T. D., Rosenberg, B. M., Treanor, M., & Craske, M. G. (2026). Expectancy updating predicts anxiety symptom reduction from exposure therapy: Predictive analyses from a randomized clinical trial. Behaviour Research and Therapy, 202, 105040.
