Our brain is a prediction machine that can’t be stopped. No matter how hard we try, it will still build expectations.
If you’re reading this, you’ve probably asked yourself the same question I always have: What exactly makes users subconsciously follow Color Psychology, Gestalt principles, and behavioral patterns like Hick’s law? Why does all of this work? Is there a way to understand the true nature of our brain and not just how it reacts, but why it predicts, expects, and perceives the world the way it does?
Now it’s time to go one level deeper — into the core of how our brain actually works. In this article, we’ll touch on one of the fundamental theories that helps me personally answer these questions, and I would love to share it with you. Buckle up, we’re shifting into nerd gear!
The Free Energy Principle
In 2010, in his paper The free-energy principle: a unified brain theory?, Karl Friston formally introduced a theory stating that every system, including living organisms, strives to minimize free energy. Simple enough: we don’t like surprises. But let’s take a closer look at what that really means.

The brain’s main task is to minimize the gap between expectation and reality. This gap is what the Free Energy Principle defines as free energy. When the brain encounters unpredictable input, its stress level rises. And it’s crucial to understand: this isn’t about you as a person or a “user”, it’s about your brain. It’s not something we consciously control, but it’s something we can use.
After all, as humans, we don’t always chase predictability or comfort. Many people enjoy physical exercise, even though it’s technically stress for the muscles. We love movies with unexpected plot twists, and even comedy works by placing us in a familiar setup and then adding an unpredictable punchline.
That’s because we’re more than just our brains. The human organism and our consciousness is a complex system of subsystems, including our hormonal system, which can reward the brain with the right chemistry under stress, or reinforce behavior when we act in line with its internal “program.”
So, the Free Energy Principle is actually quite a complex theory, and there are different mathematical interpretations of it. But for simplicity and convenience, today we’re going to look at a more accessible formula:

We can break it down into several key variables:
- F — variational free energy: this is the result of our brain’s calculations. For the brain (or any predictive system) to remain in a stable, low-stress state, F should approach zero. The higher the free energy, the greater the stress or uncertainty in the system. This idea directly connects to the concept of entropy, the natural tendency toward disorder which both we and our brains constantly try to resist.
- s — sensory input: everything we receive from the external world — sounds, tactile sensations, visual images, etc.
- m — internal model: our internal representation of how the world works. Essentially, our expectations about external reality or specific aspects of it.
- P — probability: represents the likelihood of a certain sensory input given our internal model (it’s defined by what’s in the parentheses but not part of the main operation). The result ranges from 0 to 1, since it’s a probability.
- −ln — natural logarithm: this function converts probabilities (values between 0 and 1) into a scale from 0 to infinity, making the difference between expectation and reality mathematically measurable but not limited.
The higher the probability, the smaller the resulting value. In other words, our brain is “happy” when the probability of our expectations matching what we actually perceive equals 1 (maximum probability) — in that case, F=0. The lower the probability (P), the greater the amount of free energy (F): 1 = 0; 0.5 = 0.69; 0.1 = 2.3; 0.01 = 4.6.
Let’s look at an example. A user moves the cursor over something that looks like a button: text on a bright blue rectangle.

m — the user expects that the button will somehow change its state, what we usually call a hover state.
s — nothing happens to the button itself, but the cursor changes.
Technically, the user’s expectations were violated. But since our internal models are more complex than a single visual reaction, the additional input (the cursor change) helped complete the picture. When the button eventually responds to a click, the user almost immediately forgets the odd interaction.
Their P might have dropped slightly, perhaps to 0.95, meaning the probability that their mental model still matches the incoming input remains very high. The amount of free energy is close to zero. The brain is calm, the user is satisfied, the product is sold.
Now let’s take a negative example. The user moves the cursor over the same button: the same text, the same blue rectangle. The user once again expects that clicking it will initiate a purchase, that’s our m (the internal model).
But the response is nothing: no color change, no cursor change, not even an error message. The user clicks repeatedly. Their P (probability) that their mental model matches the actual input, drops close to zero.

The brain starts trying to reduce the growing amount of free energy, sending out emotional signals. In this case, the button, the site, the entire interaction become irritants. Almost unconsciously, the user begins performing a series of random actions, trying to fix the problem.
And if we’re lucky, they eventually scroll up and notice that the email field is outlined in red with a message saying it’s required. They enter the email, click Buy again, and finally succeed.
Not as happy, but at least with a product on the way. All of this happened simply because the button had no disabled state, no visual communication that it couldn’t yet be pressed, forcing the user to waste five tense seconds clicking into nothing.
This is a fairly simple example that directly illustrates the relationship between our expectations and our perception of reality. But there are many others that you, as designers, already know well.
Take the Gestalt principles, for instance. We don’t just see a random collection of shapes but we instinctively try to group them and assign meaning. It’s something our brain does automatically, without conscious effort. That’s exactly why, at the beginning of this section, I emphasized that this principle isn’t about us as individuals. It’s about our brain itself.
Our brain constantly relies on its internal model, comparing it with the incoming sensory input we receive. And when the amount of free energy becomes too high, the brain automatically tries to fix the problem.
It starts to create new categories or groups, sending the necessary emotional signals to push us toward resolving the discrepancy. Sometimes, it adjusts the internal model itself, modifying m in the formula to reduce the gap between expectation and reality. That’s actually how we learn something new and this, in fact, can explain the very nature of our neuroplasticity.
But the brain can also go the other way distorting perception, effectively altering s in the formula, the sensory input itself. And that’s where we enter the territory of cognitive biases and perceptual illusions, an entire field in itself, and one that truly deserves the attention of us designers.
Abduction is the key to humanity
I’m confident in saying that almost every well-known principle we are using in design can ultimately be explained through the Free Energy Principle. But that doesn’t mean we, as designers, need to consciously apply it in our daily work. Good and even excellent designers usually operate within the beginner and intermediate levels of design psychology, and that’s more than enough to create meaningful, functional products.
For me personally, it has always been and still is fascinating to understand why things, principles, and rules work the way they do. That’s why I try to find explanations and new perspectives through different sciences. And psychology is one of them.
With this article, I’d like to invite you to look at the familiar design dogmas we follow from a slightly different angle and to try broadening our perspective.
In a world where AI already knows all these rules and can even create interfaces based on them, what may soon remain truly ours is our human curiosity, the desire to reach for truth, to question what we take for granted, and to look at problems from new angles, expanding the boundaries of any given task.
In the language of philosophy, specifically the branch of logic we, as humans and users, most often rely on deduction and induction.
Deduction is deriving consequences from established rules. When we build our hypotheses based on principles and patterns. All clickable elements should change their state on hover → This button changes its state on hover → Therefore, this button is a clickable element.
Induction is generalizing from experience. When we conduct direct user testing. Our user clicked 100 different buttons, and each time the button changed its state on hover → The user now expects that all buttons should change their state when hovered over.
But we, as designers, are expected to bring new ideas into the world.
So I’d like to invite you to look at another type of reasoning — abduction. It is the process of forming a hypothesis that could best explain an observation.

We notice that users often close the payment page without clicking the button → What if the problem isn’t the button’s state but the emotional context — the anxiety or distrust triggered by the act of payment? → Let’s change “Pay” to “Secure Payment” and add the logos of trusted payment providers below the button to increase confidence.
Abduction is the process of forming explanatory hypotheses. It is the only logical operation which introduces any new idea.
Charles S. Peirce in Collected Papers, CP 5.172

You could even say that by using abduction, we ourselves become prediction machines: the feeling of anticipation, building a hypothesis, is what has made us human for thousands of years. It’s how we were able to achieve such heights of science and technology out of nothing.
And this ability appeared in us precisely because our brain tries to get rid of free energy. That’s why I believe this principle is important not only to try to explain user behavior, but it is fundamental for us, as creators, thinkers, and engineers.
Final thoughts
And as for the practical application of today’s topic, I suggest you the following approach as an experiment just for yourself: if you’re facing a tough problem or one you’ve solved a hundred times, try ignoring all design principles for a moment. Approach it as if you only had abduction to generate hypotheses and the Free Energy Principle to evaluate them.
Take a specific user and the situation they’re in, then sketch several alternative solutions you can score with the formula F = −ln P(s∣m).
Fill in the variables: m (what the user expected) and s (what the user actually saw). Then estimate which solution “minimizes free energy”, meaning yields the highest probability that perception will match expectation. And that’s your leading candidate.
And remember, psychology gives us the lens, design provides the tools, but the final verdict always belongs to the human being whose subjective perception can overturn any formula. That’s why theory is only valuable as long as it remains flexible, ready to yield to real observation, to the living unpredictable experience of the people we design for.
Lower the surprise: Applying The free energy principle to UX was originally published in UX Collective on Medium, where people are continuing the conversation by highlighting and responding to this story.
