Chapter 1
Introduction:
Understanding human suffering by AI

What is the most central question in human life? For me, it is the question of suffering. There may be questions which are more fundamental, or philosophically more fascinating, for example: Why does the world exist? Or, how is it possible that we are conscious? But those questions are rather theoretical and mainly satisfy one’s intellectual curiosity. If you found the answer to those latter questions, would that change your life, or other people’s lives, for the better?

The question of suffering is with us at every moment. By suffering I mean mental pain, the opposite of pleasure and happiness. In some cases, it is a result of physical pain, but usually of purely mental origin. In fact, any casual observer of human life easily comes to the conclusion that it is full of such suffering: There is frustration, anxiety, sadness, depression, and so on.

Why is the “human condition” so unpleasant: did somebody (or something) make a huge mistake in designing humans? And, most importantly, is there anything we can do about it: can we remove suffering, or at least reduce it? Now, this is a question that has enormous practical significance. Reducing suffering, almost by definition, makes people’s lives better.

The starting point of this book is the idea that we can use the theory of artificial intelligence, or AI, to understand why there is so much suffering in humans. This book will show how suffering is largely due to the inability of an intelligent system, whether an artificial intelligence or a human being, to understand its own programming and its own limitations, in particular the limitations of its computation and data.

Investigating intelligence by constructing it

How can I claim that the theory of AI has any relevance to understanding the human mind, let alone suffering? The answer lies in how AI can help us understand the computational design principles which are applicable to humans as well.

When I asked above if somebody made a huge mistake in designing humans, that “somebody” was of course evolution, metaphorically speaking. Evolution designed the basic processes of our mental life, for good or bad. Importantly, evolution didn’t construct our brains in some random, arbitrary ways, but it designed us to be fit for certain purposes and goals. Ultimately, those evolutionary goals are about reproduction and spreading your genes, but to satisfy that ultimate goal, many more intermediate goals need to be considered. You have to get food, find sex partners, and not get killed. These, in turn, require that you know how to walk, and you are able to recognize objects as well as to plan your future actions.

We can learn to understand such evolutionary design goals by trying to design and construct an AI, or a robot. This is a perspective which is gaining more and more prominence in neuroscience: Trying to actually construct an intelligent system forces you to think about the computation and algorithms needed.

Ordinary neuroscience is based on conducting experiments on humans or animals. It can establish many interesting facts about the brain; for example, where in the brain the processing necessary for vision or fear takes place. It can also tell us something about how such processing happens; for example, by explaining how the brain recognizes that the animal in front of you is a cat and not a dog, and why we would get scared if it were a tiger.

However, the deepest question in neuroscience is the “why” question: Why does a certain kind of processing take place at all? What is its evolutionary purpose? Why do we, for example, have emotions like fear in the first place? Why is our mind frequently assailed by thoughts about the past and the future even when we try to concentrate on the present? And ultimately, why is there suffering?

Designing intelligent systems goes a long way toward answering the “why” question. If we find that an AI necessarily needs a certain kind of computation to achieve human-like intelligence, it is likely that the human brain does that same kind of computation—at least on some level of abstraction. AI can also give us a deeper understanding of “how” computations happen in the human brain, since designing it necessarily forces the scientists to figure out all the details needed in the computation.

Is the brain a big computer?

The prerequisite for learning about the brain by building intelligent systems is that our brain is in many ways like a computer. In fact, the modern paradigm in neuroscience and psychology considers the brain as an information-processing device. The term “cognition” is used to describe information-processing performed by the brain, while with ordinary computers we usually talk about computation.

The brain receives new data by seeing, hearing, or otherwise sensing things. It processes the sensory data in various ways, ultimately enabling us to recognize objects and act in the world. It can also process information retrieved from its own memory, which is necessary for what we call thinking in plain English. A system that processes information in such ways can be called, almost by definition, a computer, so it is natural to say that, actually, the brain is a computer.

Certainly, the brain is very different from any ordinary computer that you can buy in a shop. For example, your PC, or your mobile phone, has a central processing unit (CPU), sometimes a couple of them. The brain has no such thing. The information-processing happens in the neural cells, or neurons. Each of them is like a tiny CPU which can only perform extremely simple processing— but there is a huge number of them, tens of billions. The crucial difference with respect to a CPU is that each neuron processes its own input independently, and all the neurons do that at the same time—this is called parallel and distributed processing.

Yet, from an abstract viewpoint, such differences can be seen as just technical details. In particular, if we are interested in the question of “why” certain computations are performed, the physical structure of the information-processing device, or even the details of the programming do not matter. What really matters for our purposes is whether the brain and the computer need to solve the same kinds of computational problems. This will be the case if humans and the AI live in the same kind of environment, have the same kind of goals for their actions, and use similar means to try to reach them. That is increasingly the case when AI develops in terms of autonomous robots, for example, and in any case, we can use our current AI theory to extrapolate what AI’s might be like in the future.

Machine learning as analogue to evolution

Even granted that humans and computers are both information-processing devices, some would argue that they process information based on very different principles. A popular claim is that a computer does exactly what it is programmed to do, and nothing else, and this is supposed to be very different from humans who do what they want themselves —so any parallels between humans and computers are impossible. I think this reasoning is fundamentally wrong, for two reasons.

First, modern AI systems do not just do what they are programmed to do. That’s because their function is based on learning. They are programmed to learn from input data. The input may be a database determined by the programmer; it can be obtained by crawling the internet; or it can be the result of interactions with the environment, like a robot using a camera or users typing words, and so on. What the programmer really does is to provide an algorithm for learning. The algorithm is based on certain goals or objective functions that the AI is trying to optimize. An AI dedicated to searching the internet for images that resemble a given target image will learn to optimize the accuracy of its search results, for example by maximizing the number of clicks users make on each image it proposes.

What this means is that anyone who programs an AI cannot really know in detail what the AI will actually do, because it is often impossible to know what kind of input the AI will receive, and it is equally difficult to understand what the AI will learn from it. Even in the simplest case where the programmer completely decides the input to the AI, the input is often so complex (say, millions of pictures downloaded from the internet) that it is impossible for a human programmer to understand what can be learned from that data.

The second reason why this is not a major difference between humans and AI is that just like an AI is programmed by humans, we humans are designed—one might say “programmed”—by evolution. From an evolutionary perspective, we are programmed to maximize an objective function which roughly is given by the total number of copies of our genes in the population. To satisfy such programming, we gather a lot of data—by reading things, talking to people, and simply looking around—which is not so different from an AI.

So, I have turned the claim about the difference between AI and humans on its head. What humans and AI have in common is that both are programmed by something else to have certain goals and needs; nobody has really decided “by themselves” to have the needs and goals they have. To accomplish those goals, both humans and AI gather data from the environment and learn from it, which leads to actions that are very difficult to predict. So, in the end there is little difference between AI and humans, except regarding the source of the original programming—whether it was by evolution or a human programmer.

Can an AI actually suffer?

By now, I hope to have convinced you that an AI is a useful model of many phenomena taking place in the human brain. But perhaps there are limits. Some would argue that we cannot talk about AI’s or robots suffering: They may seem to be suffering, or look like they are suffering, but in fact they are not, because they cannot feel anything.

I think this argument may not be completely wrong, but it is quite irrelevant. Obviously, it depends on the exact definition of what suffering is. It is true that AI may not feel suffering in the same way as humans because that might require that it is conscious. This argument against AI’s suffering really hinges on two points: First, that an AI is not conscious, and second, that consciousness is necessary for suffering.

However, conscious feeling is only one part of suffering. The situation is similar with emotions, such as fear, which are actually clever information-processing mechanisms. The conscious feeling of being afraid is only one part of a complicated process involving cognition (or information-processing), behavioural tendencies, and several other aspects. I would argue it is the same for suffering.

Suffering is actually a signal in a complex information-processing system. The real meaning of the suffering signal is that an error occurred—this will be elaborated in several chapters in this book. Any information-processing system can create error signals. That’s why we can, in that specific sense, say that an AI or a robot is suffering, even if they are not conscious. All that would be missing is the conscious feeling components of suffering.

There is an even more important reason why it is largely irrelevant here if an AI really suffers according to some stringent definition of the word. This book does not just aim to describe the mechanisms of suffering; the primary goal here is to develop various ways of alleviating suffering. For the purpose of reducing suffering, it does not matter if computers actually suffer in some deep sense. If we can reduce suffering in an AI that is sufficiently human-like, then, with reasonable probability, the same methods will apply to humans, and they will reduce suffering in humans, including the conscious experience of suffering. In other words, the AI is really a simulation or a model of mechanisms that are relevant for making humans happier.

For those who find it impossible to think that a computer could suffer in any sense of the word, I suggest the following viewpoint that they can use while reading this book. Trying to understand human suffering by AI is one big thought experiment, where we try to understand how much the AI would suffer under various circumstances, if it were able to consciously experience suffering. It is like a mathematical model of atoms, or like a computer simulation of chemical processes. Everybody agrees that models and computer simulations are not the real thing, but they can help us understand the actual natural processes, and in particular, predict their behaviour. A model may tell you how a change in one quantity, say X, leads to a change in another quantity, Y. If you know that, you can perhaps choose X to maximize or minimize Y—which might be suffering.

Intelligence is painful—overview of this book

The central claim in this book is that if we create an artificial intelligence that is really intelligent, really worthy of its name, it is necessarily going to suffer— more or less like humans. In spite of the many differences between AI’s and humans, there is a common logic in the design. In order to achieve sufficiently human-like intelligence, certain design principles have to be followed, and these lead to suffering. This book explores several interwoven ideas about such a computational basis of suffering, and the necessity of suffering as a part of intelligence.

The fundamental principle is that suffering is caused by error signalling, which is typically due to frustration. Frustration occurs when the system, generally called an “agent”, fails to achieve a goal. Such errors are inevitable in a complex world, where things are uncertain and unpredictable, and we have limited control over them. Error signalling is necessary for any sufficiently intelligent system, since such error signals are used by learning algorithms. Our brain produces error signals automatically, and we simply cannot shut off the error-signalling system.

In fact, the complexity of the world is overwhelming for any known intelligent system, whether the very best supercomputer in the world, or the most intelligent human brain. The computations available to them cannot handle all the different possibilities, for example, in choosing action sequences to reach a given goal.

Modern AI uses learning to cope with such complexity. Learning from complex data enables particularly sophisticated information processing. However, for such learning to be really successful, huge data sets are required. Obtaining data sets which completely capture the complexity of the world is rarely possible in practice.

These two factors, lack of computational resources together with scarcity of data, mean that the intelligent agent cannot work optimally. Its intelligence, and its control over the world, are limited. Thus, there will be errors: Its actions do not always lead to the desired outcome. This is the fundamental reason why such errors, and suffering, are ubiquitous.

Suffering is greatly enhanced by several information-processing principles inherent in the design of human-like intelligent systems. One is the phenomenon of experience replay, where memories related to past errors are recalled and repeated in the system in order to optimize learning about past experiences. Likewise, plans for future actions are constantly computed, which means the agent simulates or “imagines” them in its mind, together with the ensuing errors. Such replay and planning multiply any suffering arising from real events. Errors are signalled as if those bad, imagined events happened for real. Replay and planning even lead to conscious suffering in humans. Somehow, some part of the brain does not understand that recalling or imagining an event is not the same as actually living it. That is why we suffer from mishaps which only happen in our imagination.

Modern AI has found systems based on parallel and distributed information processing to be useful for programming intelligent systems, which makes it understandable that our brain uses similar principles. However, parallel and distributed systems are difficult to control by any central “executive”. Instead, different computational modules are competing for control, making, for example, any sustained attention or concentration difficult. Any internal control of the agent’s computations is further reduced by emotions such as fear, which work as evolutionarily conditioned “interrupts” of ongoing processing. Thus, the agent has little control of even its own internal processing, let alone the external world.

Yet another problem is the difficulty of understanding how uncertain most perceptions and inferences are. Perceptions are often highly subjective and contextual interpretations, sometimes little more than guesses. Yet, humans often mistakenly think that our perceptual systems are able to discover some underlying objective reality. To simplify the overwhelming complexity of the world, an agent may further divide it into categories. However, the categories may be arbitrary and assigning objects to categories difficult. Our inability to appreciate such uncertainty and even arbitrariness leads to more suffering.

Finally, the goals and desires that have been programmed in us by evolution are ultimately counterproductive and make us unhappy. Evolution never had our happiness as its goal anyway. In fact, it forces us to do things which are clearly bad for our happiness, something I call “evolutionary obsessions”. Evolution makes us worry about our survival and our evolutionary performance, creating a sense of self. In fact, evolution does not want us to reduce suffering because the error-signalling system is necessary for learning and optimal behaviour. Evolution does want us to learn to act in more and more efficient ways, but the goals towards which this intelligence is used are those set by evolution, not us. Even worse, both AI and humans are usually trying to satisfy their drives and desires endlessly, without any limits; at no point do they become satiated and think that they have achieved enough.

However, there is hope. At the very end of the book, I sketch methods that can be used to decrease suffering, based on the theories outlined in this book. What is needed is a reprogramming of the brain. The key method is to retrain the brain by inputting new data into the learning system. The new data will change the computations in such a way that error signals, and in particular frustration, are reduced. This is difficult and takes a lot of time, but various forms of philosophical contemplation and meditation attempt to do it. These methods are rather logical consequences of the theory, while at the same time, they have mostly been proposed earlier in Buddhist, and to some extent Stoic, philosophy. Thus this book can be seen as an attempt to construct a scientific, computational theory on the underpinnings of such philosophies.