Sunday, 22 November 2015

How does a brain do the sort of things that a computer is good at?

In what follows the workings of computers, of which I know something, have been rather simplified for the purposes of the argument. The workings of brains, at which I guess, have to look after themselves.

So thirty years ago it was thought that computer programs were best designed using structured techniques, one of which was SDM, then widely used in government. For all I know it might well still be so thought, although I dare say the detail of the techniques has moved on a bit since I knew about them.

In this SDM world, all the logic needed to write computer programs is reduced to three constructs, three sorts of action: sequence, repetition and choice. Sequence is do this thing, then do that thing and so on. Repetition (boxes marked top right with an asterisk) is do this thing so many times or perhaps until some condition – for example, end of file or end of life – is true. Choice (boxes marked with a small circle) is do this thing when A is true, do that thing when B is true and so on. These three constructs can be used to build programs of more or less arbitrarily large size – programs which do work – with part their success lying in the way that the problem has been broken down into manageable chunks which can be specified, designed, built and tested in isolation. In the case of the brain, while such chunks may exist, we are some way from identifying them and what they do – and I think it likely that even if we do succeed in identifying such chunks, there will be a lot more complicating chit-chat between them than would be the case in a computer program; they cannot so easily be looked at in isolation.

The tea making example included above is adapted from a memory of a training course.

But underlying these three constructs we have two other ideas, so well understood by computer programmers that they are often more or less forgotten about.

First, in order to be able to do these things, you need to be able to execute a named object, a named object which might well be the subject of its own SDM model. The name of the object is a way to identify, to specify a place in the computer program which has been loaded into the computer from which to start execution – a place which, in the case of a brain, might be the name of a region, the name of a position in the cerebral space.

The caller, which is usually itself another named object, might supply some input data, pass control to the called object – often called a subroutine – and then be given some data back when the execution of that object terminates and control has been passed back. The calling routine will generally, although not necessarily, wait for that termination before carrying on. It is all very orderly and in many computers there is only one thing going on at once, code is being executed in at most one place at any one time, although modern computers do pretend to be cleverer than that. And there will be a very definite something doing all this controlling and passing, perhaps Microsoft’s Windows or Google’s Android.

Second, your data, be it in memory, on a tape, on a disc or whatever, incorporates the idea of next. You can bookmark your last chunk of data, perhaps all the information about a house in the street or a giraffe in the zoo, and then, perhaps some time later, get the next chunk of data, the next house or giraffe. A techy might call such a bookmark a cursor.

One widely used subroutine which builds on all of this is the SQL select statement which might do something like ‘give me all the birds with blue wings and yellow beaks’ – with SQL being the name of an internationally standardised query language which came after SDM (with, as it happens, ‘S’ for structured in both cases). Computers are rather good at this sort of thing. Brains, if they can manage at all, usually prefer the support of pencil and paper.

So how does the brain do it?

A brain, with its jungle of billions of interlaced, not to say interlocked, neurons rather than more or less neat sequences of instructions, does not do things in the same way at all, although we can draw or suggest parallels. In what follows I use the term region for a compact (rather than straggly) part of the brain responsible for something or other, with a region with very roughly comparable to a process or a subroutine. Maybe we have a hundred or so such regions, maybe several hundreds, but not thousands.

Roughly speaking , there is no fat controller, from Microsoft or anywhere else. The regions might talk to each other, but they all do their own thing – more or less. There are some regions which do have control functions, but these are rather global, rather broad brush. Activate or inhibit this or that region or super-region. Activate or inhibit this or that type of synapse.

Roughly speaking, all the regions are executing all the time, there is no question of just one region being allowed to be on the go at once, although that said it is also true that at any one time, some regions are more active than others and some regions are not very active at all.

And while a region never stops, never sleeps, it might exhibit periods of stability – with these periods perhaps being around half a second in duration – when it is projecting a repeating signal to some other region. A repeating signal which is not trivial in the sense that it is not no neurons firing and it is not all the neurons firing all the time; a signal which does contain some information, something interesting. We might say that this information, the content of such a repeating signal is expressed by its Fourier coefficients and if such a repeat is of sufficient strength, one might say that it amounts to the first region completing its action and passing the results on to the next. Projecting the results to some other region, with this other region being activated along the way and with all this being roughly analogous to sequence in a computer. It might, of course, project the results to a number of other regions, to be dealt with by them in parallel, something that an old fashioned computer could not do, although this is one of the things a modern computer can pretend to.

So in this projection we have something like the SDM sequence, with the sequence being expressed in the projection from one region to another, rather than in the sequence of execution.

Turning to SDM repetition, we could have the second region project back to the first. The second region does something, tells the first something about what it has done, which first region then does something else again. Maybe after a bit there would be a period of stability, when the signals in both direction are repeating themselves and we could say the repetition has finished. Rather a weak analogy, but the best that I can do.

Choice is rather easier. One region could project to a number of other regions, depending. So depending on the input, the first region chooses which of those other regions to project to. This seems entirely plausible; one could do this with neurons. What sort of choices one might be able to make in this way is another matter.

But none of this is the same as executing a subroutine. A region cannot stop what it is doing for a moment while it gets some other region to do some little job for it, perhaps converting a string like ‘October 14th 1066’ into the number of days since the birth of Christ, having made proper allowance for calendrical changes and leap years in the interval. That said, those two regions can interact and maybe that interaction can amount to a subroutine call of one by the other. Whether the brain actually does stuff like that I don’t know – although just presently I rather doubt it.

The brain is not very good at next either. While in principle one might have a chain of neurons, perhaps even allowing hundreds of neurons at each link of the chain just to make sure, and while one might devise a neural network which maintained a cursor on that chain, once again I rather doubt that this is what the brain does. And anyway, how could one be sure that one link was only firing up the next link? Given that neurons and their synapses are a lot more plastic, a lot more organic than the average line of computer code, how could you be sure some of the firing up was not leaking out to some place else? On the other hand, a brain can count well enough and it can be trained to say the alphabet. It can be trained to recite a more or less arbitrary sequence of words, say names of vegetables, and some people play games involving such sequences in public houses. Some other people can manage very long such sequences, but I do not think that this is the brain’s natural, or native way of working.

Just as an aside, I read recently that the brain is very good at discriminating colours. If you put two patches of colour next to each other, the brain is very good at saying whether they are the same or not. It can detect what are really very small differences. While it is very bad at naming colours, with most of us not going beyond ten or so and certainly not agreeing with anybody else past that point.

So what do we learn from all this?

Lesson one is that the brain does not look to have subroutines in the way that a computer does. It cannot package up widely used tasks in such a way that they can be invoked from anywhere and everywhere. Going further, it seems unlikely that it does much of the sort of stuff that subroutines are used for at all. Rather a tall order to code such stuff in genes, or learn it, post-natally, from first principles, then copy the resulting neuronal program all over the place.

It seems much more likely that great swathes of brain processing are driven by just a small number of general purpose, basic processes, basic processes which do fit the neural way of doing things and which can be replicated all over the place. Like the processes required to do hierarchical predictive coding (ask google about Hohwy & Friston). So perhaps the question of interest is to identify those processes and to catalogue all the stuff that they do.

That said, lesson two is that while the brain is not organised in the way that a computer is, it is, at some level, doing the same sort of stuff. So how does the brain do the stuff which a computer would do with sequence, repetition and choice?

This is left for the next episode.

Acknowledgement

Michael Jackson and SDM. See, for example, http://mcs.open.ac.uk/mj665/JSPDDevt.pdf.

No comments:

Post a Comment