Thursday, August 28, 2014

"Well duh!" When sheepdog 'robots' fail

I always like having a bit of media coverage of what I do. Part of it is the purely narcissistic enjoyment of lots of other people simultaneously taking an interest in our work. But there is also a genuine insight to be had from reading what the wider world thinks about research.

Tracks of a simulated sheep dog (blue line) 'driving'
and 'collecting' sheep (black lines/ red dots)
Yesterday, Daniel Strömbom and Andrew King, together with myself and several other co-authors, published our paper on sheepdog and sheep interactions. The paper proposes a model for how a dog rounds up sheep. The basic idea behind the model is that in order to drive the sheep forward, the dog gets behind the flock and moves towards it. Then, if the herd becomes too wide it goes to a point which drives the furthest out sheep back towards the group. The result is a zigzagging motion as the
dog takes the sheep towards the pen.

The elegance, I think, of the result lies in the simplicity of the algorithm. Previous work had proposed more elaborate rounding up schemes, which were not as good at collecting large numbers of flocking individuals. And Daniel's algorithm also nicely matches the data which Andy had collected. The dogs use the same simple algorithm as we show works so well in computer simulations.

The media were also pretty interested in our results. Andy was on BBC radio, Daniel and Andy were quoted repeatedly in different newspapers and Jose Halloy stepped in did an interview for French radio. The reports were enthusiastic, talking about the possible development of autonomous robots inspired by our research. But looking at the comment sections of some of the newspaper articles, not all readers were completely convinced. One of the main points can be summarised by the following quote on the Guardian's website

"This is one of those "Well duh!" is discoveries, isn't it? I just don't know how farmers have managed for centuries without this research." 

Why the hell are scientists wasting time telling us something we have known for years?

The answer to this critique lies in the details. It is one thing to know that dogs go back and forward behind sheep, another to show that a simple 'collect' and 'drive' mechanism works properly. This is what is done in the paper, by showing when the algorithm works and when it doesn't. And it is when it fails that the insight are might be greatest. One thing not covered by the media is that when trying to round up very big groups of sheep our 'robot' sheepdog sometimes got confused. This is shown in the video below. The simulated dog gets caught between two groups and can't continue.
So we don't fully understand how sheepdogs solve large scale herding problems, and we still don't know how and to what extent real dogs can solve these problems. I can think of some plausible answers, such as dogs giving up and repositioning themselves after a time, but testing these requires more work and more experiments. In fact, there are lots of things neither scientists nor anyone else understands about flocking and herding in general, and there is certainly nothing obvious about the answers.

Saturday, August 16, 2014

Hamilton's rule as a tautology.

Wilson and Nowak have published a new 'perspective' on the evolution of sociality in ants. It combines "palaeontology, phylogeny, and the study of contemporary life histories" to try to give more insight in to this question. This is their latest addition to a long running debate, between these two Harvard professors and (it seems) almost everyone else in evolutionary biology, on whether Hamilton's rule explains social evolution. After earlier attempts to provide mathematical models of the evolution of sociality in ants, bees and wasps, Wilson and Nowak seem to have returned to a more natural history based description. However, as Iain Couzin pointed out on Twitter they "argue for the need for a mathematical description, but provide no mathematical description".

I have a love/hate relationship with literature on the 'evolution of co-operation'. It usually involves nice mathematics and undergraduate maths students enjoy doing projects on it. But my main problem is that it does not produce empirically testable predictions. In the past, many of the papers by Nowak, his co-workers and other mathematical biologists working on the evolution of co-operation problem don't really specify what type of biological system they are trying to represent. With the exception of the current paper, Nowak's group appear to have settled on humans and this is fine, but prior to this he proposed various abstract rules of co-operation that were fun, but lacked experimental prediction.

It was slightly ironic then that Nowak et al. (2010) decided to so forcefully attack Hamilton's rule on failing to make empirical predictions. Hamilton's papers are full of empirical predictions, and as the 100+ authors who replied to the 2010 paper point out, it is helpful in settings ranging from sex allocation to parasite vigilance.

BUT, and this is a capital letters 'but', the paper by Nowak et al. (2010) was not about these other settings, it was about the evolution of eusociality, as defined by Wilson himself. Explaining eusociality has to be done in terms of the social interactions of animals or other organisms. And Nowak et al. (2010) are correct in their key point. Hamilton's rule is not a general equation for evolution of mechanisms. It is the other way round. Once we have described the mechanism for gene flow and social interactions it is possible to find a Hamilton's rule that gives the condition for the evolution of co-operation.

At first sight, this might appear to make Hamilton's rule extremely powerful. Hamilton's rule shows us that properly calculating costs, benefits and relatedness between individuals tells us the course natural selection takes. Hamilton’s rule can then be thought of as a fundamental accounting rule that must hold in order for a particular behaviour to evolve. But the same thinking shows a serious weakness. Hamilton’s rule becomes a tautology, a statement of necessary truth. By summing up costs and benefits in the right way we can find a Hamilton’s rule for every biological system. Instead of producing fundamental understanding, discussing Hamilton’s rule becomes an argument like whether we should add the rows or columns first when summing all entries on an Excel spreadsheet.  Different methods give the same answer, and there is no reason to call either method fundamental.

To illustrate this, Nowak et al. reformulated Hamilton's rule as

'something' b>c

where the ‘something’ was whatever came out of making the world fit in to Hamilton’s rule. I think this equation makes the point extremely well. Relatedness is of course important in evolution, but Hamilton's rule is a meaningless equation.

Together with two Laurents (Lehmann and Keller) a few years ago, we showed that one of Nowak and co-workers much touted 'new' rules for co-operation was just

relatedness > 'something c'/'something b'

where we could find the 'something c' and 'something b' from the underlying social interaction. At that point, we were stressing that there can't be 5 or whatever number of rules for co-opertation that Nowak was promoting at the time. Depending on how you want to look at it, there is only one (Hamilton's rule) or infinitely many. In hindsight I would have laid more stress on the "infinitely many" part than we did then, and this is what Wilson and Nowak's new paper stresses (although I don't quite know how Nowak reconciles his current position with the 5 rules he found earlier). Hamilton's rule (used in the context of population genetics) is the ring that binds all these different explanations of co-operation together, but only because it always applies. There is no such thing as magic.

I should point out that, while the 'something' equation in the Nowak et al. (2010) is interesting, the rest of the paper seems to me to be hyperbole mixed with a standard group selection model. The reply by Boomsma et al. highlights a serious problem with the explanation provided: relatedness is high in clades that have evolved to be social. High relatedness gives a simple and convincing explanation consistent with the reasoning Hamilton may have offered. This is good empirically grounded science. I will now have to study Wlison & Nowak's latest perspective in more detail to see if they can adress this point.

Wednesday, August 6, 2014

Super fluid starlings and other physical analogies.

Last week a new article on starling flocks was published by the  COBBS group in Rome. This research group, led by physicist couple Irene Giardina and Andrea Cavagna, are a great example of the varied background of researchers working in collective behavior. They started as theoretical physicists, but wondered how their skills could be applied elsewhere. Such interdisciplinary thinking by physicists isn't uncommon. Physicists often think that their models and tools will be useful for a whole range of things, from voting and elections, to the structure of the brain and, of course, animal groups.

Droplet of super fluid helium.
Taken from talk by Adam Hokkanen.
The idea in the current study is that mathematical models are used to draw an analogy between starling flocks and liquid fluid helium. Waves of turning propagate through the whole group very quickly. So quickly that it can appear they change direction in unison. What the Rome physicists found out was that there is a clear ordering in the turning, with individuals successively copying the direction of their neighbours. The analogy between super fluidity and starlings can be found in a relation between alignment and speed of turning. The higher the alignment of the group, the faster turning propagates through it.
physics and biology.

How are we meant to interpret analogies like this? Should we take them seriously and think that helium and starlings are just the same types of particles? Or should we see the similarity as just a loose rhetoric device? A way of getting the readers attention? These are the sorts of questions that are important if our aim is to apply mathematical models to make analogies. But the answer you get if you ask a theoretical physicists and mathematicians can vary greatly. They can also vary if you ask the same person on different days of the week.

Some physicists take these analogies very seriously indeed. I have been told on quite a few occasions that an experiment on ants or fish is unnecessary because it is "already proved by trivial symmetries in the system". Other times the analogies are made too loosely. No-one could be expected to believe that what is true for magnets is equally true for opinions about upcoming elections, yet this pretty much the assumption in many 'voter' models. The argument is sometimes made that the two systems have "deep parallels" and that the differences between iron filings and people are surface properties!
Other times, the argument is made that these analogies "capture the public's imagination" and are useful for communication.

I wouldn't argue that there is more than one correct way to make an analogy.  However, there is a rule which I think should be followed and it is this:

Modelling analogies between a physical and biological systems should be based on empirical observations from both of the systems.

Flow of starlings in a murmuration.
From Cavagna & Giardina (2014)
This is where Andrea, Irene and the Rome team have excelled. Their starling and midge data has set new standards in 3D reconstruction of movement of animal groups. They aren't satisfied with just speculating on similarities, but check the details. And they have made big steps in collective animal behaviour along the way. They are very clear about the importance of statistical mechanics tools in the way they work, and use analogies like the superfluity and phase transitions, but always couple back to the biology.

This is when physical analogies are at there best. When we use mathematical tools, careful experiment and lateral thinking all mixed together.