.ND "NOT SO MUCH DESIGNED AS CONGEALED" --------------------------------- The Darwinian approach to neural-net building --------------------------------------------- Iain Stewart Centre for Cognitive and Computational Neuroscience Departments of Computing Science and Psychology University of Stirling Stirling FK9 4LA U.K. Tel. +44 786 73171 x2377 May 1988 1. INTRODUCTION --------------- The central thesis explored in the Darwinian approach is twofold. Let me first state the two points in their most dramatic and radical form: (1) no neural net, biological, electronic or otherwise, is "intelligent", and (2) no-one will ever design intelligence. Well! Perhaps I should clarify. At bottom, point (1) expresses my belief that in talking about "intelligence" (or "adaptiveness" or "flexibility" or other good things---which are not as synonymous as some would have you believe) as a property of neural nets, the connectionist community has taken a terrible wrong turning. The net's ENVIRONMENT has been forgotten. There's no intelligence IN an object; rather, an environment can interact with a net in such a way as to bring out behaviour labelled intelligent (adaptive, etc), and then when observers come to talk about this, they're used to the environment being a fairly constant part of the proceedings, so they can't help ignoring it and referring to the "intelligence of the neural net". Point (1) is much more profound than the quibble it sounds like---see section 2 below. Point (2) hinges on the word "design". The idea is that intelligent behaviour in a given environment will be not so much designed as congealed. For simple behavioural patterns, no doubt designing a net to carry them out is feasible enough, but I contend that only a kind of Darwinian process will get us beyond that. Neural nets will have to be put in a given environment and allowed to reproduce, mutate, evolve and die according to their performance. And if and when a net with good performance does turn up, there will, I suspect, be literally NO EXPLANATION of how it does it---unless a trace dump weighing half a ton be allowed as an "explanation". Its behaviour, in short, will be irreducibly complex in a fundamental way. 2. THE IMPORTANCE OF THE ENVIRONMENT ------------------------------------ The environment's importance is shown clearly by Valentino Braitenberg's so-called "vehicles" [described in Braitenberg 1984]. Vehicles are entities (hardware or software) which live and reproduce in a world with its own rewards and dangers. The vehicles have various sensor and motor organs, and possibly a neural net in between. Let's take the task of heading straight for a food pellet whenever one comes within sensory range. Sounds quite adaptive eh? Must need a pretty complicated brain to work that one out! In fact this basic adaptive behaviour is achieved by a vehicle without a brain at all! It has two sensors and two motor organs, with crossed connections between them as shown below. Now when food is over to the left, the right motor will fire most vigorously, steering the vehicle leftwards. And similarly for when the food is over to the right. (When the food is straight ahead the motors fire evenly and the vehicle homes in successfully.) A trivial example? Not at all---it contains the essence of my point (1). If you want to know why two wires cause such adaptive behaviour, don't stare harder and harder at the two wires! Look instead at the geometry of 2-space (the vehicles' world---note the SAME vehicle wouldn't do so well in 3-space), the nature of motion in a medium with friction effects, the equations of force, impulse and momentum, the law saying just how the signal strength of the food source on a sensor goes down with distance, ie inverse square or whatnot---and so on. Look to the environment. When you do this, it becomes obvious that the reason for the adaptive behaviour is more in the environment than in the vehicle; or better yet, that it's unhelpful to try to apportion credit at all. Best just to say the vehicle-plus-environment unfolds in time in such a way as to cause any human observers to gasp at the "adaptive behaviour of the vehicle". They would have done better to gasp elsewhere. 3. CONGEALING A BETTER CLASS OF NET ----------------------------------- Notice how in the above example, a system of two neurons achieves behaviour (in a GIVEN environment.....) which one might have tried to design with a thousand neurons if one ignored the possibility of exploiting the properties of the environment "for free". The environment is (so it seems) the ultimate free lunch. So to obtain desired behaviour of a net, let it interact fully with its environment---and use nature's own technique of picking winners, namely evolution by mutation and natural selection. This is the idea of point (2). It is my hope, which will have to be empirically tested, that the same sort of dramatic economy of structural complexity will continue to be achievable for much more complex tasks than the small example above: tasks, in fact, like visual pattern discrimination, fast motor response to highly specific sensory input, and reliable learning of past experiences of great relevance to future sensible action. The penalty for these achievements will be in the method, ie, one must refrain from the impossible task of trying to "design" them, instead relying on the Darwinian evolution process to run long enough that such nets congeal out of the environment. But what do I mean by "impossible"? Surely if my optimism is indeed empirically confirmed and a net with say 100 neurons congeals that's capable of behaviour previously only designed into 10 000-neuron systems; surely if all this comes true, it's still true someone COULD have sat down and happened to design the 100 neurons just as they actually congealed out to be like? I suspect this is like "designing" the momentum vectors for a bucket of water so that, when the molecules are initialized with those vectors, a set time later the top half boils while the bottom half freezes. This is "possible" in the sense that there are indeed choices which lead to this effect. But as is well known from the theory of chaotic dynamic systems, the phase space is so chopped up that the only way known (with currently available mathematical tools) to actually achieve the right set of vectors is, as it were, to sneakily simulate the unfolding IN TIME of the system until one hits on the desired part of the phase space. (And of course you have to know the environment very accurately too. The position of an electron on the other side of the Galaxy 100 000 years ago makes a macroscopic difference to your chances within a few seconds. See Crutchfield et al 1986.) If neural nets in their environment display similar latent chaotic complexity which can ONLY be brought out by explicit unfolding of time, then your chances of designing the kind of net that congeals are comparable to your chances of specifying the boiling/freezing momentum vectors by tossing coins. In short, for practical purposes: nil. 4. A DARWINIAN MICROCOSM IN SIMULA ---------------------------------- I chose Simula for the initial foray into Darwinian net-building for two reasons. First, it's a good, clear, structured object-oriented language, allowing objects (including the competing vehicles) to be spawned and to evolve in parallel; and second, it uses an analogue representation of time, at least in the sense that events can be scheduled for times labelled by real numbers, not just in discrete "clock ticks". Analogue time is likely to be more conducive to the efficient unfolding of robust adaptive behaviour than a language where spurious "coincidences" are generated solely in virtue of the rounding-off of every event to the nearest clock tick. The microcosm consists of a two-dimensional arena, rectangular in shape (this is not vital---it makes Cartesian coordinate manipulations faster, that's all), wherein the vehicles dwell, with their motion constrained by a viscous fluid that gives rise to a certain coefficient of friction for each vehicle. All this emphasis on physics is important if one wants the model to speak to at least some aspects of the real world of sensory-motor control. Upon this land rains down an endless random stream of food pellets of random, but bounded mass. These pellets are generated by a simulated stochastic process which gives a distribution uniform in 2-space and Poisson in arrival rate through time. Initially, vehicles of specified mass, food requirements and genetic constitution are injected with random position and orientation into this land. It is their lot to try to seek out the food pellets on the basis of their sensory data, for even at rest they consume energy at a predetermined (genetically influenced) rate, and without food they will eventually die. These vehicles are all on the SAME arena, hence they compete for a limited resource (food). Fast response is adaptive, since in times of scarcity, every time one new food pellet appears there is a race to see who eats it and who starves. If a vehicle eats enough food over and above its operating requirements, it can reproduce by splitting in two. At this point, mutations occur in the genes of the offspring. These genes control the expression of the phenotype in ways like: sensitivity of the sensors, firing speed and resting time of the neurons, impulse and orientation of the motors, and size, connectivity and energy consumption of the net. The mutation rate itself is currently globally set in the model, but doubtless it too could come under the wing of the genes, as happens in real creatures. This world is full of trade-offs. There are the obvious ones such as: do I maintain high food stores in case of emergency, or do I go lean (which allows faster acceleration and turning) and run a bigger risk of starvation in bad times? Do I seek out quiet areas while food is absent, in the hope of having no nearby competition if a pellet lands close at hand, or do I conserve food stocks by staying where I am even if this is sub-optimum? More subtle trade-offs are, say, between chasing everything, even though it might be another vehicle and not food, versus discriminating first at the cost of consuming valuable reaction time and energy. These questions are hard, but fortunately our creatures do not trouble themselves solving them. They just solve them. Or they don't, as the case may be. As time unfolds, creatures which do solve such problems come to predominate over creatures which don't. Inertia and friction, elastic and inelastic collisions, the ingestion of a food pellet and its effects on mass and velocity, are handled by a suite of "physics procedures" which are tolerably realistic, though not excessively so. (Full realism would require the sort of supercomputer that tracks simulated aircraft through simulated wind tunnels!) As the microcosm unfolds, a trace dump runs in parallel, building up a fossil record and a diary of significant events---eating, reproducing, etc---plus regular snapshots of the state. The model runs forever, there being no end to nature's ingenuity. The only exception is if all the vehicles die---luck is as much a feature of the microcosm as of real life---in which case the model stops, sparing us from news of the food mountain which undoubtedly builds up as food continues to rain down on the empty world. 5. PROBLEMS AND PROSPECTS ------------------------- Only one problem emerges, but it's devastating: it is, surprise surprise, computing time. Simula is a sequential language, with all parallelism achieved by time-sharing; and even on the Edinburgh EMAS-3 machine, the powerful vehicle used to run the Simula system (it runs floating-point trig functions in a few microseconds), the longest concatenated overnight batch runs have barely been enough to see a few dozen generations of the simplest vehicle, the one with the crossed connections used as an example in section 2 above, come and go in turn. In section 3, I referred to the environment as the ultimate free lunch. This may be true of the real world, but it's certainly not true in simulations! It seems there is no escape from that famous principle, "there is no free lunch". (At first the real-world environment, which runs "for us", does seem to be a free lunch---but alas, this too is an illusion, since one would lose the control facilities uniquely conferred by computer simulations, for example stopping and starting time, "measuring" the state with zero interference, etc.) Valentino Braitenberg [1984] discusses the merits of the vehicles-based approach in terms of his "principle of uphill analysis and downhill synthesis". The idea is, briefly, that analysing why a given vehicle does something is an uphill task. (In fact possibly a Herculean task; it's analogous to finding the momentum vectors to boil and freeze the bucket of water, explained earlier.) By contrast, synthesizing a vehicle is pleasantly "downhill"---you let "selection, the impersonal engineer" work its magic. [Or in the simpler vehicles, you might manage to design them in the traditional sense.] This is a good, and illuminating, principle, but I would add that the downhill road can be a long one indeed! With current hardware capabilities, worthwhile results are so far "downhill" that it's tempting to ask if one can FORCE the downhill path, as it were---ie, skimp on the details of the unfolding of time in order to unfold it faster. Although this is tempting, I think it should be resisted. The whole idea of congealing out good neural nets by evolution is that "good" comes to be DEFINED by the details of the downhill unfolding. For example, in the model with the simplest creatures (with the crossed connections), "good" gets manifested in choices of say friction coefficients and firing impulses, which are not good a priori but rather precisely because the trajectories they lead to are adaptive for the vehicle. Even if the vehicle is passively floating along a trajectory, with NO internal activity at all, one must simulate this trajectory in order that its presence at each point in space-time can react back on the environment (eg, by causing input to other vehicles' sensors). This is a fundamental consequence of the very tight integration of all subsystems into a common environment. There is a possible form of "skimping". If (and only if) one could pre-compute mathematical guarantees that, say, between times t and t' there will be no interaction between model elements (because the vehicles' sensors were all facing into empty darkness and they had plenty of food, or something), could one compute the state at time t' directly from t by Newtonian trajectory extrapolation and skimp on the intermediate states. Such guarantees do occasionally come up. They could be worth testing for in a model if they're likely to save a great deal of intermediate calculations each. But otherwise, I strongly suspect from experience with the execution speed of the current Simula system that the mere act of testing for such guarantees would create more computational overhead than it saved! The Darwinian approach is QUINTESSENTIALLY computationally complex, this being an inevitable consequence of its "intellectual honesty" if you like. Truly, there is no free lunch. What's needed most of all to continue this approach is an efficient way of running DYNAMIC parallelism (preferably with ANALOGUE time) on true massively parallel hardware. By massively parallel, I mean tens to hundreds of individually powerful processors, each with floating-point capability and enough local memory to take on responsibiliuty for a significant chunk of the model. Barring a dedicated machine, the options from the point of view of easy access from Stirling reduce in practice to the Meiko Supercomputer at Edinburgh. The trouble is, of course, occam is just about the opposite kind of parallel control language to what's wanted. It has only static parallelism; its processes can't "die" flexibly, since a transputer whose process "dies" might as well have been yanked out of its socket and thrown away; and the casual interaction of everything with everything else achieved by global variables in Simula would have to be replaced by some kind of hideously complex and computationally-intensive "vehicle operating system" in occam, involving a great deal of communications overhead. Last but not least, analogue time, although not of transcendent importance, is a great aid to realism, and I would be sorry to see it go as a consequence of the switch to occam. The prospects therefore depend on the availability of a Simula-like language for a massively parallel machine. Either this becomes commercially available, and the Darwinian net-building project can go full steam ahead---or else it doesn't, and the project effectively metamorphoses into writing such a language. At the time of writing, there's no sign of the required kind of language becoming commercially available, and so the project does indeed so metamorphose. On a more upbeat note, such a metamorphosis is not to be regarded as an unmitigated setback. Obviously, it will be interesting and challenging in its own ways. Furthermore, the successful implementation of a dynamic discrete-event simulation language for massively parallel hardware would be beneficial not just to the Darwinian net-building enterprise, but to a host of other simulation applications as well. ACKNOWLEDGEMENTS ---------------- I am indebted to Leslie Smith for providing essential background material and for urging me to explore an explicitly time-based approach to neural net dynamics, and to SERC for funding the project. REFERENCES ---------- [Braitenberg 1984]: "Vehicles: Experiments in Synthetic Psychology", by Valentino Braitenberg. The MIT Press, 1984. [Crutchfield et al 1986]: "Chaos", by James P. Crutchfield, J. Doyne Farmer, Norman H. Packard and Robert S. Shaw. Scientific American, December 1986.