Painful intelligence:
What AI can tell us about
human suffering
Aapo Hyvärinen
 
University of Helsinki


Second Edition, September 2024

html compiled on 10 March 2025

Abstract

This book uses the modern theory of artificial intelligence (AI) to understand human suffering or mental pain. Both humans and sophisticated AI agents process information about the world in order to achieve goals and obtain rewards, which is why AI can be used as a model of the human brain and mind. This book intends to make the theory accessible to a relatively general audience, requiring only some relevant scientific background.

The book starts with the assumption that suffering is mainly caused by frustration. Frustration means the failure of an agent (whether AI or human) to achieve a goal or a reward it wanted or expected. Frustration is inevitable because of the overwhelming complexity of the world, limited computational resources, and scarcity of good data. In particular, such limitations imply that an agent acting in the real world must cope with uncontrollability, unpredictability, and uncertainty, which all lead to frustration.

Fundamental in such modelling is the idea of learning, or adaptation to the environment. While AI uses machine learning, humans and animals adapt by a combination of evolutionary mechanisms and ordinary learning. Even frustration is fundamentally an error signal that the system uses for learning. This book explores various aspects and limitations of learning algorithms and their implications regarding suffering.

At the end of the book, the computational theory is used to derive various interventions or training methods that will reduce suffering in humans. The amount of frustration is expressed by a simple equation which indicates how it can be reduced. The ensuing interventions are very similar to those proposed by Buddhist and Stoic philosophy, and include mindfulness meditation. Therefore, this book can be interpreted as an exposition of a computational theory justifying why such philosophies and meditation reduce human suffering.

Copyright ©2025 Aapo Hyvärinen. All rights reserved.
Distribution allowed as per Creative Commons Attribution-Noncommercial-NoDerivatives (CC BY-NC-ND) License.

Preface (1st Edition)
Preface (2nd Edition)
1 Introduction
 1.1 Investigating intelligence by constructing it
 1.2 Is the brain a big computer?
 1.3 Machine learning as analogue to evolution
 1.4 Can an AI actually suffer?
 1.5 Intelligence is painful—overview of this book
 1.6 Guide to the Reader
I  Suffering as error signalling
2 Defining suffering
 2.1 Medical definitions of pain
 2.2 Medical and psychological definitions suffering
 2.3 Ancient philosophical approaches to suffering
 2.4 Two main kinds of suffering
 2.5 Using the pain system for broadcasting errors
3 Frustration due to failed plan
 3.1 Agents, states, and goals
 3.2 Planning action sequences, and its great difficulty
 3.3 Frustration as not reaching planned goal
 3.4 Defining desire as a goal-suggesting mechanism
 3.5 Intention as commitment to a goal
 3.6 Heuristics can help in planning
4 Machine learning as minimization of errors
 4.1 Neurons and neural networks
 4.2 Finding the right function by learning
 4.3 Learning as incremental minimization of errors
 4.4 Gradient optimization vs. evolution
 4.5 Learning associations by Hebbian rule
 4.6 Logic and symbols as an alternative approach
 4.7 Emergence of unexpected behavior
5 Frustration due to reward prediction error
 5.1 Maximizing rewards instead of reaching goals
 5.2 Learning to plan using state-values and action-values
 5.3 Frustration as reward loss and prediction error
 5.4 Expectations or predictions are crucial for frustration
 5.5 Unexpected implications of state-value computation
 5.6 Evolutionary rewards as obsessions
 5.7 Reward maximization is insatiable
6 Suffering due to self-needs
 6.1 Self as long-term performance evaluation
 6.2 Self as self-preservation and survival
 6.3 Self-related suffering as intrinsic frustration
7 Threat as anticipation of possible frustration
 7.1 Decision-making under uncertainty
 7.2 Risk aversion and economic gambles
 7.3 Fear, threat, and predictions
 7.4 Threat as prediction of possible large frustration
 7.5 Interplay of threat and frustration
 7.6 Threats and the level of intelligence
8 Fast and slow intelligence and their problems
 8.1 Fast and automated vs. slow and deliberative
 8.2 Neural network learning is slow, data-hungry, and inflexible
 8.3 Using planning and habits together
 8.4 Advantages of categories and symbols
 8.5 Categorization is fuzzy, uncertain, and arbitrary
9 Summarizing the mechanisms of suffering
 9.1 Frustration on different time scales
 9.2 Frustration based on desires, expectations, and general errors
 9.3 Self, threat, and frustration
 9.4 Why there is frustration: Outline of the rest of this book
II  Origins of suffering: uncontrollability and uncertainty
10 Emotions and desires as interrupts
 10.1 Computation is one aspect of emotions
 10.2 Emotions interrupt ongoing processing
 10.3 Desire as an emotion and interrupt
 10.4 Emotions include hard-wired action sequences
 10.5 How interrupts increase suffering
 10.6 Emotions are boundedly rational
11 Thoughts wandering by default
 11.1 Wandering thoughts and the default-mode network
 11.2 Wandering thoughts as replay and planning
 11.3 Replay and planning focus on reinforcing events
 11.4 Replay exists in rats, humans, and machines
 11.5 Wandering thoughts multiply suffering
12 Perception as construction of the world
 12.1 Vision only seems to be effortless and certain
 12.2 Perception as unconscious inference
 12.3 Prior information can be learned
 12.4 Illusions as inference that goes wrong
 12.5 Attention as input selection
 12.6 Subjectivity and context-dependence of perception
 12.7 Reward loss as mere percept
 12.8 Ancient philosophers on perception
13 Distributed processing and no-self philosophy
 13.1 Are you really in control?
 13.2 Necessity of parallel and distributed processing
 13.3 Central executive and society of mind
 13.4 Control as mere percept of functionality
 13.5 Philosophy of no-self and no-doer
14 Consciousness as the ultimate illusion
 14.1 Information processing vs. subjective experience
 14.2 The computational function of human consciousness
 14.3 The origin of conscious experience
 14.4 Why is simulated suffering conscious?
 14.5 Self vs. consciousness
 14.6 Nothing is real?
III  Liberation from suffering
15 Overview of the causes and mechanisms
 15.1 Why there is (so much) suffering
 15.2 Cognitive dynamics leading to suffering
 15.3 An equation to compute frustration
16 Reprogramming the brain to reduce suffering
 16.1 Reducing expectation of rewards
 16.2 Reducing certainty attributed to perception and concepts
 16.3 Reducing self-needs
 16.4 Reducing desire and aversion
17 Retraining neural networks by meditation
 17.1 Contemplation as active replay
 17.2 Mindfulness meditation as training from a new data set
 17.3 Speeding up the training
 17.4 Reducing interrupting desires
 17.5 Emptying the mind and reducing simulation
 17.6 Metacognition and observing the nature of mind
18 Recapitulating and unifying interventions
 18.1 Recapitulating the interventions
 18.2 How far should reducing desires and expectations go?
 18.3 Positive viewpoints to reduction
 18.4 Letting go and relaxation as unifying principles
19 Epilogue
Bibliography

[next]