Have you ever had a spiritual experience? I have. One day in high school, I left campus for lunch with friends to the nearby town square. It was an autumn day, one of those perfectly blue, cloudless September afternoons when trees are rich with yellows and reds. I lay down on the grass and put on headphones. As I looked up at the azure sky, a single brilliant yellow maple leaf descended in spirals toward me, just as the chorus of the song I was listening to reached a crescendo. What happened next is hard to describe. It was as if my consciousness caught on electric fire, burst out of my skull, and spiraled upward to meet the leaf. It was like dizziness or a head rush, if dizziness also implied a sense of cosmically extreme – even maximized – joy, or profound effervescence that included the whole scope of my life and the universe itself. Words can’t remotely do it any justice. And after about five seconds, it was over.

What was that experience? Where did it come from? How are people supposed to interpret or understand experiences like it? Plenty of scholars have tackled these questions from both religious and secular perspectives, from Catholic mystics like Teresa of Avila to agnostic psychologists like William James to nonbelievers like the journalist Barbara Ehrenreich. But a recent paper by a pair of neuroscientists, Michiel van Elk and André Aleman, offers a novel perspective: religious experiences of all kinds – mystical, ritualized, and even straightforwardly doctrinal – can be understood better if we use the framework of predictive processing.

The theory of predictive processing posits that much of the brain’s activity is geared toward building and correcting internal models using feedback from both the body and the environment. This goes for everything from basic motor acts, like reaching for a cup, to more complicated, higher-level experiences like taking part in a religious service.

For example, if you reach for a cup and saucer, your brain uses feed-forward models to generate internal simulations of the consequences of that motor action, and it uses feedback to correct those simulations if those predicted consequences don’t actually match what happens.

Say you’re on a cruise ship. The seas are rough and the ship is heaving to and fro, so your cup slides a few inches away on the table as you reach for it. The simulated prediction your brain had generated falls flat. Fortunately, you’re probably able to grasp the cup in its new position, because your brain uses that sensory feedback to hastily update its model of your body’s relationship to the room, including your table, cup, and saucer. It even incorporates the rhythmic seesawing of the ship into its models.

(Incidentally, this is part of why you get “sea legs” after you’ve been onboard a boat or ship for a few hours – your brain has learned to dynamically compensate for the constant, rhythmic rocking of the boat. Then, when you set foot back on dry land, your motor repertoire is still trying to match the rhythm of the waves, but there are no waves to match. So you feel wobbly, as the electro-chemical memory of the ocean sloshes around inside your nervous system, telling your brain to expect and compensate for a rhythmic rocking that isn’t there anymore.)

According to van Elk and Aleman, this cognitive process of constantly building and correcting models – or selectively failing to correct them – may explain a lot of what we call religious phenomena. How? A core feature of their model is that religious experiences emerge from changes in how the brain processes the external (or exteroceptive) versus the internal (or interoceptive) data that it receives.

For example, they describe intense experiences of personal prayer as resulting from more intense focus on interoceptive signals. Inward focus enables us to simulate the internal mental processes of other people, creating predictive models of what we would likely be feeling, or what plans we’d probably be hatching, if we were in their circumstances. So, when we’re highly focused on our own interoceptive signals, we may be more primed to attribute mental and emotional states to others – even imaginary or invisible others. In the prediction processing model, then, personal prayer – talking to God or gods – involves focusing so intently on our own internal experiences that we become easily able to attribute mental states, emotions, and desires to whatever divine being we (believe we) are engaging with.

Mystical experiences are another type of religious phenomenon, one that’s often characterized by feelings of expansiveness or loss of identification with one’s own ego or consciousness. In the predictive processing model, mystical experience – unlike personal prayer – is most likely to result from an increased attention to exteroceptive data. That is, the brain becomes focused on external sense data to the exclusion of internal information, and this absorption in external input actually decouples the brain’s self-understanding from its own bodily signals. As a result, one suddenly seems to exist outside of, or to transcend, the body.

A seminal illusion used in cognitive psychology, called the “rubber hand” illusion, illustrates how this might happen. In this illusion, a subject puts her real hand under a cardboard covering, concealing it from view. A fake rubber hand rests on top of the cardboard, where the subject can see it. The experimenter then uses a pair of paintbrushes or a similar tool to stroke the patient’s real (invisible) hand and the fake rubber hand in the same apparent place and at the same rhythm.

Because the subject is looking at a paintbrush stroking what appears to be a fake hand, her brain simulates the sensory consequences that would result from that action. But lo and behold – underneath the cardboard, her real hand is experiencing exactly those predicted consequences (specifically, the tickling feeling of paintbrush bristles on skin). The brain determines that its internal simulation matches the real-world data – and so the hand that it’s looking at must be its own. The subject is struck with the uncanny feeling that the fake rubber hand belongs to her, flesh and blood.

This illusion is possible because the brain is weighting its external data – the visual input, which shows a paintbrush stroking a hand – more than its internal data, which is the actual bodily sensation being produced by the second paintbrush underneath the cardboard.

In a mystical experience, van Elk and Aleman argue, a similar process could be occurring. As the brain focuses more and more on exteroceptive signals, it could lose touch with its own interoceptive signals – to the point that it loses contact with the physical sense of where the body and its boundaries actually are. The result could be a disorienting, but pleasant, sense of blurring the borders between oneself and the world, of melting into the entirety that exists outside the self:

Mystical experiences could be understood as an extreme case in which the weighting of interoceptive signals for the body self-model is strongly reduced, while the reliance on exteroceptive signals increases, resulting in a reduced awareness of one’s physical body and the feeling of strong connection with the surrounding world.

As evidence for this postulate, Van Elk and Aleman argue that some of the regions of the brain most centrally involved in distinguishing the limits of the body, and in discriminating between oneself and others, are also centrally involved in integrating different types of sensory input. These include the right temporoparietal junction (TPJ) and the superior parietal lobe – which, brain-imaging studies have shown, both become more subdued in meditating monks. Similarly, other studies have found that reduced activation in the TPJ made people more spiritual. In general, the TPJ and nearby areas seem to be in charge of discriminating the self from the outside world, and when these brain areas go quiet – for whatever reason – the result is a melding between self and environment, and higher levels of “spiritual” feelings. The reason may be that, when the TPJ goes quiet, the brain’s prediction/correction processes become so exclusively focused on the external world that it literally loses track of its own body.

How Much Does this Model Explain?

Van Elk and Aleman are careful to avoid claiming that their model exhaustively explains all religious experience – or even that it disproves religious beliefs, despite showing how such beliefs are (at least partly) rooted in brain function. Instead, they merely point out that prediction processing is an important, and growing, framework within the cognitive sciences for understanding how the brain works. As such, we should take it seriously, and apply it to understanding religious phenomena.

So back to high school. Does the prediction processing model shed light on my profound, if brief, experience of transcendent joy? It might. Listening to music and looking up at the dazzling autumn sky could have drawn my attention away from my own internal bodily schema. As a result, my brain’s internal model of where and in what position my body was – a model that would normally be constantly updated as new data came in from, say, a crick in my neck or the sensation of grass tickling against skin – was suddenly empty, lacking enough data to keep going. So my sense of self came springing out of my normal spatial boundaries, subjectively “merging” with the surrounding environment and the music in my headphones.

What’s not really accounted for in this neurocognitive model, though, is the affective, or emotional, dimensions of religious or spiritual experience. Why would the feeling of sudden spatial disorientation trigger a feeling of overwhelming joy, for example, or of effervescent happiness? Why wouldn’t it just be weird and uncomfortable?

Because it wasn’t uncomfortable at all, or even mildly eerie, like the rubber-hand trick can be. It was one of the most powerful experiences of my life. One weakness of the predictive processing model, as van Elk and Aleman have articulated it in their paper, is that it doesn’t yet account for such intensity of emotion. And it’s emotion that makes the difference between a profound spiritual experience and an trippy sensory illusion.

At its best, though, the prediction processing model of religious belief and experience is a framework for building useful, testable hypotheses about how religious beliefs are maintained in the brain, how religious rituals have many of the effects they have, and what the building blocks of religious experience might be. It’s no more a comprehensive explanation of “religion” than, say, developmental psychology is an exhaustive description of what it’s like to be a child. But it does get the ball rolling in some interesting new directions – and offers some predictions about where it’s likely to go.