The Novel as a Bayesian Inference Machine

A novel, or a story, can’t be anything of the sort. It can’t be a machine, or a process, whether this is doing Bayesian inference or not. The novel itself is not dynamic and it doesn’t take an input, doesn’t produce an output.

But of course when the book is picked up and read by someone else, other than its writer, something dynamic does begin to take place. The story’s characters and what they do are somehow enacted in the reader’s imagination. The evolution of characters and their actions, in this imaginary spacetime, is tracked by the reader. It is this tracking process that I am interested in here, and where it leads to in the end.

Bayesian inference is one of the most powerful mathematical methods we have in our disposal for dealing with future events in an uncertain world. How do you quantify the likelihood of something happening in the future, given partial knowledge of the past? How do you identify a plausible event, or series of events, and hence a plausible course of action, from the implausible one, when any one of them is conditioned on a chain of other inter-dependent events?

In the case of a story the number of variables influencing its particular world is heavily restricted. It has to be restricted in order to keep the story tractable. The factors on which the story depends are kept to a minimum, yet it is still true that there are many possible courses of action, some more plausible than others, and the reader is constantly on the lookout: trying to predict what will happen next, or what could happen if a character reacts one way and not another, or how the story will end. The reasoning a reader uses is necessarily following the laws of Bayesian inference.

When Meursault in The Stranger is in jail, waiting for his execution, he is seen by a priest who insists that it is possible for him to seek salvation and redeem his soul. The reader knows by this point that Meursault is disconnected from others around him on a deep emotional level, and yet he is able to remain perfectly lucid in the assessment of his own predicament. In fact, he has a complete, self-consistent theory about the world: existence is meaningless – ‘meaning’ is used in the traditional sense of the word, the one which entails religious belief or moral purpose – and life is governed by pure chance. So, as soon as the priest steps into Meursault’s cell, the story is asking the reader, ‘How will Meursault react to the priest?’ And the reader is making a hypothesis, based on his or her knowledge of the character so far in the story and his or her own experiences, judgements and ideas. And as the story unfolds, and the reader witnesses the interaction between the two men, the original hypothesis is altered in view of new information.

This tentative view may not come as a surprise to some people, like Karl Friston and his group at UCL. For a number of years, they have been pursuing a very exciting research program on the so-called Bayesian Brain. In the simplest possible terms, they have provided strong evidence that we think in a way that is very much Bayesian in its nature: (i) We make predictions about the world and constantly update them in the face of new information; (ii) We try to minimize the gap between these predictions and what happens in actuality.

In more specific terms,

the Bayesian brain says that we are trying to infer the causes of our sensations based on a generative model of the world.

For instance, assume you’re walking in the jungle and you hear rustling behind a bush. You jump, even before you realize that you’ve heard the rustling. This is a spontaneous reaction, and I believe that neuroscientists would say that your “right brain” (the right half of your brain) has registered the rustling event, and triggered a flight or fight response, automatically. Then your “left brain” kicks in and provides a plausible interpretation of the whole situation. You say to yourself, “I jumped because I heard the sound of something moving near the bush – it could be a tiger”. That’s the hypothesis that you make on the fly, based on prior information, and then in the face of further evidence you update it.

So if that’s a plausible model of how our brain works, on that level at least, then it may not be entirely unfounded to consider the reader, or the process of reading a novel, as a three-step feedback mechanism:

  1. The reader steps into a world (character, setting, situation) and forms a hypothesis (what the character is like, how the situation will develop).
  2. The reader collects more information about this world and updates the hypothesis according to this new information.
  3. The reader discovers key aspects of the world and converges on a single, dominant hypothesis, which may or may not be confirmed conclusively at the end of the novel.

The formation of the original hypothesis is not only influenced by the reader’s prior experiences (what the reader knows, where the reader comes from, etc.) but crucially also by the the reader’s and the novel’s respective engagements with a genre. If a particular reader is a massive fan of thrillers and the book uses many conventions of this genre then of course the formation of the original hypothesis will be influenced by the specific interaction between this reader and the genre they are most in tune with.

I’m not sure if this perspective illuminates anything at all, but it has helped me understand, or rather interpret in my own way, the advice I received as a writer: that a novel should have an ending that is both surprising and inevitable. It has to be surprising, or else the initial hypothesis turns out to be completely trivial (I knew what would happen, and it happened). But it also has to be inevitable, in that a subsequent, updated hypothesis – formed in view of new information, as the story moves forward – must have anticipated this surprising ending.

So, here we have it: a story should lead to a surprising inevitability. Isn’t that the ultimate contradiction in terms? I don’t think so, it’s just… plain old Bayes.

Categories: Crossover, Fiction, Global Brain, Mathematics, Thomas Bayes

Tags: , , , , , ,

2 replies

Trackbacks

  1. Hypotheses and Options | Life is Mysterious

Leave a comment