Vipassana Meditation and Active Inference: A Framework for Understanding Suffering and its Cessation

I want to thank Jan Kulveit, Tomáš Gavenčiak, and Jonathan Shock for their extensive feedback and ideas they contributed to this work and for Josh Burgener and Yusuf Heylen for their proofreading and comments. I would also like to acknowledge the Epistea Residency and its organisers where much of the thinking behind this work was done.

This post aims to build towards a theory of how meditation alters the mind based on the ideas of active inference (ActInf). ActInf has been growing in its promise as a theory of how brains process information and interact with the world and has become increasingly validated with a growing body of work in the scientific literature.

Why bring the idea of ActInf and meditation together? Meditation seems to have a profound effect on the experience of people who practise it extensively, and in many cases purports to help people to come to great insight about themselves, reality, and in many cases profoundly alters their relationship to their lived experience. ActInf seems to promise a legible framework for understanding some of the mechanisms that are at play at the root of our experience. Considering these ideas seem to both be pointing at something fundamental about how we experience the world it stands to reason they might be talking about some of the same things in different languages. The hope is that we can use these two to explore these two theories and start to bridge some of the gap in science in providing a theoretical explanation for how these meditative techniques work.

This post will be quite speculative in nature without me providing much in the way of experimental evidence. This is a weakness in the work that I may try to address later but for now I would like to stick to what the theories say and how we can fit them together.

I will focus on the technique of Vipassana meditation and in a future post I will examine Anapana and Metta meditation. I’ll be talking about these techniques because I have a reasonable body of personal experience with them and because I have found their practice leads to fairly predictable and replicable results in those who practise them. My personal experience is the source of much of the discussion below.

Anecdotally, I have found that thinking about suffering in the way described below has helped me to recognise and escape from painful thought cycles where I was able to realise I was generating needless prediction error by simply going back to observing reality through sensations. This has been very helpful to me.

A quick intro to Active Inference

My goal in this section is to give a barebones summary of some key concepts in ActInf that we will use to examine various meditative practices. My focus will be on defining terms and concepts so that if you have never heard of active inference before you can have the context to follow this post and judge the merits of the arguments yourself. The precise neuroscience is not explored here, but by hypothesising we can work towards a story that seems to fit our observations.

ActInf is a theory that tries to explain how and why agents (in our context this refers to all living things) act in the world in the way that they do. The key concept of ActInf is that the primary objective of an ActInf agent is to minimise the gap between its predictions of the world and how the world actually appears. This happens through 2 methods: it improves the accuracy of its world model, or generative model, by updating that model with new information, and by taking action in the world to bring the world more in line with the predictions of its generative model.

Generative models and preferences

ActInf hinges on the assertion that we are constantly making predictions about our environment and what we expect to see. We compare what we see with what we predicted and use the difference between these two to update the model we used to produce this prediction.

A simple idea to start with would be vision, where we construct our idea of what we are seeing based on what we know ie. What we can predict about what we’re seeing. When we see a totally new thing for the first time it is simple for us to construct the low level features of what we are seeing, as this was mastered early in our development and applies to almost all visual stimuli that we see. Here I am referring to the ability to make out colours, shapes, patterns in the environment. However, the higher level features need to be learned before we naturally infer what something is.

For example, imagine someone who had never seen a cat before, seeing a big fluffy cat for the first time. They might only understand it to be a brown splotch on the table before making inferences from other animals they had observed. The legs, face and tail of the cat are easily inferred if they’ve spent time with other mammals. While this is happening the predictions are working as hypotheses about the cat. These hypotheses are rapidly confirmed or denied as the animal stands up, walks around and starts licking itself.

Further, we model physical interactions, such as what we expect to happen as a stack of books is slowly pushed over the edge of a table. Jean Piaget is known for experiments in children’s development and demonstrated how children of different ages develop intuitions for the outcomes of physical scenarios. This demonstrates the development of the child’s world model to greater levels of precision in the domain of physics. What we call intuitions are well developed models of a particular scenario such that the outcome is readily predicted. Everything that we learn to do is based on parts of our world model, from dance, to language, to chess, to our means of survival, and will involve many predictions that are occurring without conscious deliberation.

However, our model of the world does not simply predict the world as accurately as possible, it models the world in such a way as to help us maximise the likelihood of us being in our preferred states. This is because the purpose of all of these systems is to help us to survive and for that we are constantly shaping the world into one in which our preferences are satisfied. This means that our preferences in a large way define our world model.

Satisfying preferences

In general, we want good things to happen to us. To this end, we need a mechanism for bringing the world we want into reality. Our world model is not just static, but is shaped around the ultimate goal of survival and flourishing, and everything within our world model is tied back in some way towards this purpose. This may seem like a strong claim, but consider that many things will simply be judged as neutral with regard to the achievement of our goals.

We have reasonable models of physical interactions, such as gravity, but this is highly approximate and doesn’t reflect the precise underlying mechanisms that are occurring. It simply predicts what is most relevant to our preferences, such as what is happening to the food we are cooking or what will happen to us if we walk into a busy street. Our model certainly doesn’t predict relativistic physics, just the simple interactions necessary for our survival, unless you have a particularly intense interest in physics.

It is essential to understand the connection between preferences and the world model and how they interplay. We can think about our distribution of preferences as being independent of the world model but informing it in critical ways. These preferences are static and formed by the biology of the organism in question, and broadly define the set of conditions necessary for a specimen of this species to be healthy and content.

For everything that exists in the world we essentially embed some judgement, positive or negative, for how this thing pertains to our goals. Imagine you are walking through the world observing various objects, and imagine there was a glow around those objects to indicate your attitude towards them. You might see them as useful, desirable, neutral, or threatening, depending on your goals. You might also imagine the feeling you experience while in this state. For a state to be preferred the feeling you are experiencing would likely be positive, or you would have access to things which made it possible for you to achieve goals which would ultimately create a good feeling. In this way preferences impact our world model, by adjusting our reactions and attitudes to things in the world and shaping what we think about or consider important.

Below is an illustration of the model of someone who might be afraid of the bee but has a strong desire to eat some honey.

Preferences have a hierarchy from very fundamental phenotypical drives such as specific sensations or states of one’s nervous system. These preferences don’t really change over time, but rather make themselves known when a specific preference is not being met. For example after running a marathon you will have a strong desire to rest and drop the arousal of your nervous system and attend to the protests of your body. The preference distribution you had remains the same, but the degree to which a particular preference is or is not being met is what drives your strong response to the water or soft mattress after the race.

Furthermore, our preferences do not change when we decide we don’t like something, our world model simply changes. Say you were to change our mind about something, for example you discovered that vegetable oils were toxic to humans, and we were presented with a tub of margarine. Before, you may have felt neutral or slightly positive towards the margarine; but now you feel active disgust at the thought of eating it. In this case your model of the world is what has changed, not your preferences. Your ultimate preference has and continues to be to feel good and healthy, and now you know that this margarine will not help you to achieve that goal. Instead it will make you feel worse in the long run.

We have established that world states contain things which embed our preferences. Thus, states that have many things we like and fewer things we dislike will be preferred. When we make a prediction, we are more likely to make a prediction that aligns with these preferred states, as our brain is biassed towards outcomes that minimise discomfort and maximise fulfilment.

Because our world model is shaped by our preferences, and our goal as ActInf agents is to minimise deviations from our predicted world, this gives us motivation to act to bring about a world more in line with our preferences. When what we observe differs from our predictions—when unexpected elements arise, or when anticipated pleasures are absent—this discrepancy generates prediction error. The state we predicted, which was biassed towards the things we wanted to happen, is not what we are observing. To minimise this prediction error in future, we adjust our world model, and we take action to bring the world closer to our prediction.

Prediction error

The unifying goal of an active inference agent is to minimise free energy. For this purpose, perception and action are the tools that the agent primarily has at its disposal. “Free energy” is a fairly abstract term, but refers to the degree of discrepancy between one’s predictions of the world (Where one’s world model is fundamentally shaped by the preferences you have) and what one actually observes in the world. We minimise free energy by taking actions to change the world to bring the world in line with our model of how the world should be. This means that updating beliefs can be painful because it means experiencing prediction error rather than trying to force the evidence to fit your model.

A key mechanism in the prediction error is that of attention and how it governs precision. Imagine you are in a noisy restaurant speaking to someone. Your attention on the conversation causes greater precision for this information stream and the corresponding predictions regarding this information, while the noise from other sources is blurred out. However, if you shift your attention to try and listen to the table next to yours, your perception of their conversation will become much more precise. Prediction error is generated throughout the system constantly, and our handling of this prediction error is largely informed by our attention. Attention modulates the precision of predictions and information sensing, allowing you to have a better sense of a specific phenomena.

Precision essentially refers to how fine grained the predictions we make are. When carefully scrutinising something we are making many more predictions about the forthcoming information as a way of hypothesis testing. This helps us to more rapidly tease out the true information from observations.

Prediction error is sometimes referred to as surprisal. Surprisal is a technical term that is different from the emotion of surprise we sometimes experience. It refers to the degree of new information we are getting about the world based on the difference between our expectation of a situation (based on priors) and what we are now experiencing.

This is measured as Shannon entropy. This entropy is an estimation of how much information you can gain from making a particular observation. While Shannon entropy and prediction are not the same, they both relate to the experience of observing something unexpected. Shannon entropy refers more to the extent to which to update you can update your model based on what you’ve observed, while prediction error relates to the distance between your prediction and what was actually observed.

If you’d never seen a black swan, and only ever seen white swans, and you saw a whole flock of black swans you might have extreme surprisal because of how this extremely unlikely phenomenon has come to pass. Your model will likely update to predict more swans that are black in future and the degree of update will arise from how many pieces of your world have to shift to accommodate this new information.

While this is not a complete overview of ActInf I believe this is sufficient to begin the discussion on meditation. The key insight that will become apparent is the relationship between prediction error and suffering and how Vipassana meditation can be used to reduce suffering. Some other key ActInf concepts will also be introduced along the way.

Vipassana Meditation

Vipassana meditation, or insight meditation, is a technique which focuses on the observation of sensations throughout the body. One observes regardless of the nature of the sensation, whether intense, artificial or hyper mundane. As one advances in this practice one begins to pick up on sensations which one may not have been aware of at all initially due to their subtlety.

The ultimate purpose of Vipassana, in combination with the cultivation of other qualities, is liberation from dukkha. Dukkha is sometimes translated as suffering, but can also be translated as discontent, or a sense of dis-ease. In theory, this is achieved by altering the habit of reacting blindly to the sensations one experiences in the body. Below is the chain from an event occurring to the experience of suffering.

  1. An external event occurs

  2. Nerves on the body register the event

  3. Reaction to the sensation occurs

  4. Craving /​ aversion arises

  5. Suffering is experienced

The traditional view in Vipassana is that all external events are processed via some kind of sensation in the body, which the subconscious mind reacts to, which then creates craving and aversion. By becoming aware of the sensations and learning to observe them without reacting with craving or aversion, you break the chain that leads to suffering.

Below I will argue that suffering will still be experienced by the meditator as a result of prediction error, but one’s generative model is more rapidly able to adapt to the new information and so suffering is not so prolonged or painful. In fact it is very rapidly dissolved.

What is suffering?

The suffering we feel is caused by a range of emotions, which manifest through our judgements and reactions to things in the world. However, the value that Vipassana provides is that it helps us to avoid becoming unbalanced and slipping into turmoil. We become faster and faster at returning to a sound and balanced mental state where we no longer experience the suffering. To do this we experience the feelings fully and observe them. To repress the feeling would be a reaction of aversion. Instead we allow the full sensation to sweep through us while we observe its passage and avoid identification with the sensation. Under normal circumstances we might roll in these sensations for hours.

The question is in fitting this picture into one of active inference. It seems as though suffering is fundamentally about experiencing prediction error or being unable to minimise prediction error. To break this down further, one’s world model is configured a certain way, particularly in such a way as to model your preferences. When you encounter evidence which would cause you to generate a significant prediction error, you experience suffering.

For example, if a close family member were to pass away, then a significant part of your world model would be disrupted because every time you would normally expect to be able to have a positive experience with that person you would experience the prediction error again. This is why specific places or experiences that remind you strongly of that person would be likely to evoke a painful response. Adjusting to this new state of affairs requires adjusting expectations along many different dimensions of your world model, which is why it can take so long to overcome grief.

Chronic suffering arises when your world model is expecting a specific state of affairs which is generally good for you, but then consistently gets a result which is less than that. For example, when someone has a dysfunctional behaviour pattern that causes someone to push people away from them so as to protect themselves, but instead find that this leaves them sad and alone. They are in a state where their priors are trapped because they are unable to see evidence of an alternative behaviour pattern which could produce a different outcome. It takes significant courage to risk more pain, for an uncertain outcome.

There is always some suffering that we experience in our lives even if our circumstances are relatively ideal. This is because we generally predict a world in which our preferences are as close to fully satisfied as possible and there is always a significant gap between that world and the one we are in.

The brain at the most basic level reacts to observations 1 of 3 ways: pain, pleasure, or meh. While there are more complex emotions and experiences built on top of these, these are the basis of these more complex reactions. These experiences can manifest in many more subtle and complex ways, but our most basic reward system is surprisingly simple in the basic positive/​negative feedback loop.

When we experience prediction error it does not necessarily imply suffering, because often we are positively surprised. For example, someone winning the lottery will be experiencing prediction error, but in a way in which they are now updating their world model to one which includes more positive future experiences. This leads to a strong pleasure response, but can start to produce weird experiences if positive things keep happening in such a way as to fundamentally undermine one’s model, as illustrated by the shock experienced by this man winning the lottery again when re-enacting winning the lottery.

The question of mood plays into this as well, which acts as an overall reflection of how we are doing, and if we are in general progressing towards more of the kind of things we want rather than towards fewer. One may feel one is having more and more of the kind of experiences one enjoys, and this permeates into our perception of the world as one in which good things happen to us. This makes us feel like we are using some strategy that is effective and which we should continue using. Conversely, if we are repeatedly experiencing prediction errors regarding the things that we wanted to happen, then our mood will drop which is a feedback mechanism indicating that we need to change our approach.

With this we can define suffering as the state which arises from updating one’s model to include fewer positive experiences in future or more negative experiences while joyful states arise from updating one’s model to include more positive future states or fewer negative ones. This makes sense with regard to activities like exercise or certain extreme sports where one might experience pain or unpleasant sensations but not be bothered by them because one knows the future will contain more future positive experiences as a result.

To expand on this, it is worth pointing out that our preferences are always exerting a certain pressure on our world model to be one which satisfies our preferences while still being coherent with our expectations of reality. Because of this pressure towards good outcomes for us we can be in a state of continuous, ongoing prediction error, where we want the world to be a certain way but continuously observe that the world is otherwise, such as a man living in slavery who believes that the world should be one in which he can live freely. The high level belief is continuously at odds with observations.

To tie this back to meditation the concept of craving and aversion may be useful here. Craving refers to desiring things which are not the case, and aversion refers to not wanting things to be the way they are. Craving and aversion are both mental actions that we can take, but both are means of inducing prediction error because we strongly imagine something which is very different to reality and in both cases are disappointed because the feedback we get is that the world is not the way we want it to be. To a great extent the purpose of Vipassana is to alter the habit pattern of the mind to not indulge in craving and aversion, but to simply observe reality as it is. This minimises prediction error both in the positive and negative sense, and results in a state of peace.

This leads to the slow erosion of the experience of suffering. This is not to say that experienced meditators do not suffer however, but rather that they are able to recover extremely quickly from the prediction error and come to a balanced state of mind that incorporates the information from their observations into their model without performing harmful mental moves of craving and aversion. We simply acknowledge the new reality and don’t waste time grasping onto what is gone, or what could have been. Thus our model quickly falls into line with reality rather than continuing to produce false predictions and generating suffering.

To summarise: prediction error that involves updating your world model to a less preferred state of affairs produces suffering. This is because your new priors involve fewer pleasant experiences in future than it did before, and implies that whatever strategy you are applying may need revision. There can be a fundamental prediction error between the state of affairs you prefer and what you are experiencing.

The mental move of craving and aversion, which occurs when unwanted things happen or desired things do not happen, causes unnecessary suffering because it generates prediction error by producing predictions of worlds that are not the case, and which are counter to the current situation by their nature, since you can only crave what is not present or feel aversion towards what is present. We continue to persist in craving and aversion because we are not aware that we are doing this and because it is a natural unconscious move, perhaps one that is evolutionarily selected for, due to it increasing rates of survival.

How Vipassana Works

Vipassana aims to change the default habit pattern of the mind from craving and aversion to one of equanimity and peace when making observations of the world. The new sensory experiences that we have are met with simple observation, rather than a reaction regarding how we want it to be instead. Training this new mental habit is the crux of Vipassana.

Vipassana works directly with sensations that we experience on our body, because this allows us to intervene as early as possible in the process of reacting to the environment. Sensations do not carry any kind of fundamental meaning other than what we assign to them. All further ideas, concepts and abstractions are ultimately built on sensations, if we include all our senses such as sight and sound in this definition of sensation. By retraining the automatic response of judging the sensation we interrupt the process that leads to craving and aversion and thus to suffering.

During Vipassana, you are forced to do nothing while various painful sensations arise. However, as time passes one begins to notice that some of these painful sensations naturally pass away of their own accord, with no action on the part of the meditator. During this you only observe, and actively try to not react positively or negatively to the sensation. One can inquire about the sensation, trying to find the core of it, the shape of it, the texture of this particular sensation. This begins to shift one’s priors from reacting to the sensation to instead simply observing. The urgency of forming a response and acting on it is diminished.

For example, as one is sitting during meditation you might observe an unpleasant sensation such as pain in your back. This is very common at least for me on a long course. As you scan over the body you notice this sensation over and over again. Eventually, of its own accord the sensation disappears. Perhaps you got up to take a break, perhaps it dissolved while you sat with the sensation and observed it for a minute. The mechanism is unimportant, the key is in observing it without reacting to it or trying to get rid of it, and then observing how the sensation disappears naturally on its own.

The insight that one gains is through the constant change of the world and our internal landscape. The feelings of suffering come and go without us doing anything. It is our mind responding to things which leads to suffering at all. The word for this insight is Anicca(uh-NI-chuh), which roughly translates to “impermanence”. What is critical during this process is that when you simply observe the sensation with equanimity without reacting to it there is no suffering. This ability to observe with equanimity develops slowly over time.

While you continue to carefully observe, one begins to develop more high precision models of subtle sensations that occur in the body. This allows for smaller and smaller areas to be analysed for sensation. This observation is helpful because it allows for fine-grained understanding in the shifts in state one experiences in the world. It is through the refinement of these internal models of sensations and the feelings that go with them that we develop our awareness. This is helpful for the process of becoming more curious about the sensations as you observe them, because you begin to see more and more interesting details as you zoom into specific sensations.

One way that I have experienced this is being able to easily and precisely describe complex mixes of emotion such as shame, fear and anger as specific sensations arising in the body while on a retreat. As I performed a slightly silly behaviour, and simply observed those feelings without identifying with them or building on them with craving and aversion. There was some suffering in the feelings because there was a gap between what I ideally would have wanted and what happened, but I was able to quickly recover because I was curious about the feelings and soon returned to a balanced mind rather than dwelling on what had happened, because now I was doing something else and the moment has passed.

How does Vipassana cause a change?

There is a distinct and interesting experience in Vipassana of observing a specific painful sensation over and over and again or for a long period of time until it disappears completely. When this first began to happen to me I found it to be a very strange and almost miraculous experience. As I observed the sensation it became a smaller and smaller spot and more intense, until suddenly I could observe all the little vibrating pieces that made up the sensation, and the knot of pain itself disappeared.

One explanation of this phenomena that predictive processing makes is that one’s model has become extremely well calibrated to this particular sensation, and thus there is no more prediction error being produced from it as you continue to observe it. Since your prediction is in near perfect alignment with the sensory data, no error exists, no further updates need to be made, and thus the sensation appears to collapse into a field of subtle sensations. A question that arises from this is how one overcomes the pain/​pleasure prior, as this is a very powerful prior.

In the Vipassana community, the prevailing belief is that these specific sensations relate to personal complexes regarding things in our lives, and these complexes are broken apart through the equanimity one has towards the corresponding sensation, or sankhara as they are called, on the body. For example you might have a specific aversion to a person, say a family member with whom you had an argument with, and this sensation is a physical manifestation of your aversion towards that person. As sankhara dissolves through repeated observation, so does the underlying aversion to this person, and so the feelings you had may soften towards them.

This is quite a wild and difficult to verify claim, but I have found during meditations that specific sensations do seem to trigger specific memories or feelings within me and sometimes I can feel my disposition towards the problem changing as I sit with this painful sensation and simply observe it. While the specifics of the claim may not hold water it does seem as though the specific reactions which come up in both situations can be modified through adjusting my reaction during meditation. This alters my corresponding reaction to the person or situation which normally evokes a similar reaction.

From an ActInf perspective what we are doing here is retraining our world model to not expect to have aversive reactions to these people and experiences by instead continuously having non-reactive experiences to similar sensations. Then, when next I think about those people or experiences my feeling towards them is less aversive and more equanimous.

When we are doing Vipassana meditation we are essentially retraining our world model to steer towards non-reactive responses for situations which previously we were highly reactive to, by exposing ourselves to potentially triggering sensations and continuously not reacting to them. Because our models for interpreting these unpleasant feelings are inherently quite simple and share a lot of the same underlying framework, retraining our reaction to these sensations modifies our reactions to the external phenomena.

This is because fundamentally we are not responding to the external phenomena itself, we are reacting to the sensations which are caused by those external phenomena within our bodies. Painful or unwanted sensations can arise both from physical stimulus, and from our reactions to an aversive person or situation. By addressing one’s reaction to one, one addresses the reaction to the other. In this way the claims about specific complexes being associated with certain sensations in the body may be explained as a misattribution of a specific complex being resolved with a more general result.

For the meditator, while one is experiencing these pleasant and unpleasant sensations and reacting with equanimity one is generating prediction errors because you would normally react with craving or aversion to these sensations. However, despite generating prediction errors you are not necessarily suffering because you are updating your model of the future to contain positive or neutral experiences, rather than with the expectation of more future pain.

This is the essence of understanding impermanence. As you continue to generate these predictions your model slowly updates to react with equanimity to these painful and pleasant experiences, and because you are working at the very low level of sensations, you cannot tell the difference between the causes of these sensations whether they be physical or emotional or social, because all external experiences pass through the gate of generating some sensation on the body.

Closing thoughts

The actual meditation aspect of Vipassana is like the practice sessions of an orchestral musician. Real life is the actual performance. In the same way the purpose of vipassana is to rewire one’s reactions to everyday experiences to one of observation and careful, considered reaction rather than jumping to craving or aversion.

Furthermore, the ultimate goal of Vipassana is in fact to develop the capacity for continuous observations of sensations throughout one’s days and activities. This leads one to be able to experience the full fruits of the practice, as this means that one is avoiding suffering constantly, through skilful mental action. And when you forget about sensations and begin to react you can come back to careful non-reaction much faster than if you hadn’t done the practice.

The above article is primarily an attempt to generate a theory of this technique according to the principles of ActInf but does not account for the experiences of different people and their unique circumstances. Nor does it address concerns of dissociation or other potentially harmful outcomes that may arise from such a practice. Any meditative practice should be approached with care and guidance as the effects can be powerful and unpredictable.

The above article was produced with only a beginner’s understanding of ActInf and while I find many of the arguments compelling, many of the claims made are far from settled in the ongoing debates on ActInf. For example, the claim about being able to deliberately change your reaction to a sensation as it occurs as one seems to do during Vipassana, which some experts may disagree with. I hope that disagreements like this can invite further investigation into meditation as a tool for exploring active inference and vice versa.

In my next post I will discuss techniques such as Metta meditation as well as Anapana meditation using a similar approach.