Tuesday, July 29, 2014

Waves of insect sound

On Friday, James "Teddy" Herbert-Read will present our recent work on synchronized cicada calling at ISBE2014. This project started when Teddy's parents invited my family to stay at their house in Port Macquarie, about 4 hours drive north of Sydney. Teddy's parents are brilliant hosts, and each evening Lovisa (my wife), Teddy and myself would find ourselves sitting on their verandah, gin and tonic in hand, looking out on a beautiful sunset. Kangaroos hopped around on the lawn in front of the house.

Then the cicadas starting singing. At first they produced a low background hum, but as the evening went on the volume increased. It didn't increase steadily, but in waves. At first it was low, then it got louder and finally we could hardly hear ourselves speak. Suddenly it stopped again, and for a while the peace and tranquility was restored. But after about ten seconds or so it started up again. And on it went, loud chirping, followed by a pause and chirping again.

Lovisa, Teddy and I set off, gin and tonic in one hand iPhone in the other, to the edge of the bush and set up recording stations 100m apart. We left our phones in the forest and returned to enjoy dinner on the terrace. After dinner and night fall, we returned to look for our phones. After a bit of stumbling about with torches, and one close Kangaroo encounter for Teddy and my son Henry, we recovered them. We downloaded and looked at the sound files. The pattern was immediate and striking. First Lovisa's phone, from the top of the hill, had a peak in volume. A few seconds later, my phone from the middle of the hill peaked, and lastly Teddy's from the bottom of the hill peaked. It looked like a wave of sound was traveling down the hill.

Even for a mathematician like me, microphones placed out after a few evening drinks do not constitute an experiment. Luckily, Teddy volunteered to return to his parents and do the hard work, this time completely sober. He placed out microphones and measuring the waves of cicada sounds over different areas near his parents house. If you are in New York on Friday you can find out more. If not the video below gives a little taster. The size of the circles give the volume at different positions round the forest. Watch how the noise spreads from top to bottom.

Much of our analysis of this data will be inspired by earlier work on synchronized firefly flashing and the models by Steve Strogatz and others on coupled oscillators. You can also read more about these types of synchronization in chapter 6 of my book on Collective Animal Behavior. Teddy's talk is on  Friday at 3:20.

Friday, July 25, 2014

In memory of Dave Broomhead

I found out yesterday that my PhD supervisor Dave Broomhead has died.

Dave was an amazing person and academic. For me, the thing that summed up Dave was his enormous faith in the goodness and ability of other people. His belief that everyone was doing their best may seem foreign to the competitive world of academia, where so many of us think our own work is the most important. But Dave's faith in others meant, not only that he was universally liked and respected by everyone he met, but that he could do research in a clear, methodological and honest way. I have many examples of his approach to life and academia, but those I give below are the ones that are most special to me.

When I started my PhD, I couldn't write. I had studied science and computing at school and University and never really got the hang of grammar or style. Dave took one look at the first draft of a paper I wrote and said "This isn't an article, its written like a computer program!". My feeling was that I was doing a PhD in maths, and writing was for journalists. Dave saw it differently. He set in place a Tuesday evening routine. We would go out and eat dinner together. He always paid. Then we would go back to his office. I would sit at his computer and he would lie flat on the floor behind me. He would ask me to read, line after line of the stuff I had written and make suggestions and corrections, not letting me move on until he was happy. The first two paragraphs of the 'Introduction' took about a month to write. I just reread these paragraphs now and see that they sum up much of my research over the next 10 years. Through these evening sessions, Dave taught me not only to write, but to organize my thoughts and solve problems.

It wasn't just his PhD students, to whom Dave gave time and space. He always listened carefully to anyone who talked to him: family, friend, academic, cleaner, or random person in the pub. I once asked him to chair a session at a meeting at the Newton Institute in Cambridge. In many ways, Dave was the worst possible moderator. He never interrupted the speaker, even when they were 10  or 15 minutes over time. By the end of the session we were running 40 minutes late. Dave had asked if there were any last questions for the final speaker. He looked around. No takers. Finally, after a long pause he said the speaker"…..OK, could you put up your 5th slide again….as you said I think there could be an interesting consequence if you took in to account…." and so it went on. When I asked about it afterwards he lightly reprimanded me for my impatience: "if people have come all this way to give a talk then we have to let them tell us everything that is on their mind, otherwise we'll never understand anything."

This faith in others pervaded his thinking about how academia should be run. He was opposed to all the forms of evaluations, rankings and assessment exercises that went on during his time in Manchester. His basic assumption was that anyone working in academia was doing it because they loved it as much as he did. If his colleagues failed to publish anything, it was because they hadn't yet found something worth telling other people about. Why publish a paper unless you really has something worthwhile to say? Better to wait until you had really solved the problem, and no point harassing those who hadn't got there yet.

His own research was grounded in a patient respect for what others had done combined with an extremely deep thinking of his own.  He invented a whole new field of radial basis neural networks, because he was carefully going through  and "spotted a simplification which the authors seemed to have missed". His influential work on time series analysis, took an abstract part of topology, in the form of Taken's embedding theory, and solved problems in detecting and understanding chaotic signals. Last time I saw him present his research he was using abstract algebra to solving computer communication timing problems. He used to joke that it didn't matter how 'pure' a mathematician thought their work was, he could take their work and make a useful application.

I last saw Dave three years ago, at home in Malvern with his wife Eleanor. I have seldom met two people with so much love and compassion for one another. I felt so much at home sitting in their house, talking to them both about their time as PhD students together in Oxford and their pride in their son Nathan. It is difficult for everyone when such an amazing person as Dave is lost, but his wonderful way of seeing life will never disappear.

Drawing by Dave, stolen by me from his Facebook page.

Sunday, July 13, 2014

The mystery of nothingness

Yesterday evening, arriving home from a few days away, my wife found I package addressed to me. I don't get real post very often so this was quite exciting. I opened it up to find two identical gift wrapped packages. Opening them up I found two almost  identical books, entitled 'Being or Nothingness'. I say almost identical, because one of the books had a wax seal and string round it, and came in a box with my name and the number 1260 on it. The other could be opened easily, and had number 0027 and name Alvar Ellegård on it.

I opened the unsealed book this morning and read it through. It consisted of 21 pages of quotations and mysteries relating to Sherlock Holmes, Douglas Hofstadter,  Satre, Hermann Hesse, Kafka. the Bible, various philosophers, Hitchhikers Guide to the Galaxy and other literature. It claimed to be a riddle that could only be solved through careful study. I couldn't really see the answer, but it was written down the lines of Hofstedter's other work (he wrote Gödel, Esher and Bach), and I concluded that it could be some kind of part of his work. I heard Hofstedter talk in Uppsala a few years ago about the importance of analogy, and thought he could be trying to experiment down those lines.

I thought it might be a birthday present and I should solve it myself, so I didn't look it up on the Internet. But when I got nowhere my wife Lovisa looked it up. Apparently this is the second time it has come out. The first was in 2008 and there were various theories, from viral marketing, Christians trying to convince scientists of the error of their ways to it being the work of a mad psychiatrist from Gothenburg (where the package was sent from). Lovisa thinks its an art project. Jon Ronson apparently wrote about the mystery in a book on psychopaths. There is also a strange video about a student's encounter with Hofstadter that relates to the book. But no real answers. It appears that in the latest release it has been sent to Swedish media people and academics, and they have now made a Facebook group (in Swedish) to document what is known.

What is remarkable about the whole thing is the quality of the book. I get emails every day telling me that the sender has shown that pi is a rational number or solved the mystery of quantum physics or something. But his book is of extremely high quality print, with a very professional feel that gives no clear indication of what it is trying to achieve. You can see it online here, but this doesn't capture the way the whole package was constructed. It also gives the aura of a genuine mystery, with clues going in different directions. The small number of details on the internet also seem to lead in very diverse directions. I don't know the answer to the mystery, but it was certainly a fun thing to get in the post.


Monday, June 30, 2014

Despite emotions, Facebook is not contagious

I am not one of those researchers who are "outraged" by Facebook's emotional manipulation study. Facebook, Google and Twitter make their living by manipulating our emotions. These companies continually manipulate  what we see when we go online, usually so we keep coming back for more. In this context, it doesn't seem so terrible that they sometimes use their power to make new interesting scientific findings.

Figure from Kramer et al. showing effects
measured in 'social contagion' study.
I am however doubtful about aspects of the result presented in the new PNAS article. The authors claim to provide "experimental evidence for massive-scale contagion via social networks" and "first experimental evidence to support the controversial claims that emotions can spread throughout a network". What is actually provided is a rather weak effect. In the experiment, the authors removed between 10% and 90% of positive posts from people's news feed and found that the percentage of positive words used dropped from around 5.25% to just over 5.1%. I show the results figure from the paper on the right so you can see the results yourself.

So what does this result mean in terms of social contagion?  Imagine I have 100 friends on Facebook and 50 of them stop writing positive things online. If I write 100 words a day on Facebook, then according to the experimental results, during one week I will write a total of one less positive word. Maybe on Wednesday I'll write 'OK' instead of 'Good'. This lost 'good' will have almost no effect on my friends. Of the 70000 words they might read in a week (assuming everyone is like me and writes 100 words a day and has 100 friends)  one of them will be less positive. There is no way that this type of effect will turn in to a "contagion". My potential 'good' will be lost in a noise of 'likes' and smiley faces. Quite quickly everyone will recover from negative thinking and the balance of happy and sad words will return to normal levels.

The authors partially acknowledge my point saying that "the effect sizes from the manipulations are small" but claim that "the massive scale of social networks such as Facebook, even small effects can have large aggregated consequences". While this statement is true, my argument above shows that the aggregation works against contagion, not in favor of it. I could make this argument more thorough, accounting for interactions between individuals and calculating R0, but the result will be the same. The Kramer et al. study show that emotions are negligibly contagious on Facebook.

Overall, the Facebook study is a useful contribution to the literature and I am glad to see it published. What concerns me is how quickly an idea like 'online emotions are contagious' can spread without anyone checking the basics. Scientific ideas are contagious and often spread unchecked (although maybe I should check how strong this effect actually is before I make such claims :-) ).

Thursday, June 26, 2014

The Collective Machine

Ants solve the Towers of Hanoi maze.
Image and experiments by Chris Reid
Often when  'collective behavior' researchers write grant proposals we highlight the possibility of our research inspiring future computing. The idea is that if we can better understand how ants, amoeba and fish solve problems in groups we can inspire new computer design. Everyone, from the grant writers, the reviewers, and the funding bodies take these claims with a small pinch of salt. Yes, one day we might build swarm computers, but it is a bit difficult to see how ants solving mazes really provides insights that are useful today.

A few years ago I led a research project on "Optimization in natural systems: ants, bees and slime moulds", funded by the Human Frontiers Science Programme. The team consisted of myself, social insect biologist Madeleine Beekman, slime mould expert Toshi Nakagaki, and computer scientist Martin Middendorf. Our research was very successful and we learned lots about the organisms involved. But, if I am honest, we never got close to translating our results in to real progress in computing.

Or so I thought…… A couple of weeks ago I read about Hewlet Packard's new computer, called The Machine. According to the HP press release the machine will vastly increase the speed of computing. From the news articles alone, it is difficult to work out exactly what revolution is contained within The Machine, but the word that comes up repeatedly is memristor. It is here that there is a link to collective behavior in biology.

The memristor is an electronic component which changes its resistance as an electric current passes through it. This change in resistance gives the memristor its memory. It also provides an exact analogy to slime moulds and pheromone-laying ants. Slime moulds connect food sources with tubes that increase in size with flow of nutrients and ants build trails which  become more attractive as the flow on them increases. In a recent paper we showed exactly how the analogy between electrical networks, slime moulds and ants are explained through current re-enforced random walks (the video on the right shows this algorithm solving a non-linear transport optimisation problem). Slime moulds, ants and The Machine compute in the same way.

The way these systems compute is fundamentally different from traditional computers. In a traditional computer the processor fetches from memory, performs an action, and updates memory. In memristor-based systems, memory and processing update simultaneously. This allows for massive parallel computation. One of the researchers working on our project in Uppsala, Anders Johansson, has proved that these systems can solve linear programming problems in a completely decentralized way. A small adjustment to the method can give fast approximate solutions to NP-hard problems. Anders has put some of his results written together with Toshi's group on the ArXiv and published a paper with James Zhou on the linear programming proof. But I haven't managed to get him to write up a whole load of other nice results he has on these systems. Maybe 'The Machine' will inspire him to get going.

In general, despite the skepticism I started this article with, I would encourage more researchers to think in terms of distributed electrical circuits and their links to biology. It is very likely that the human brain has aspects of this type of processing in its design. And whatever The Machine might be able to do, it still can't come close to our own brains.






Wednesday, June 25, 2014

New styles of moshing

In my recent Modeling Complex Systems course, the final project involved implementing a model from an article from the exisiting literature. Most of the models the students could choose from were complex systems 'classics'. For example, Nowak & May's spatial games; Albert, Jeong & Barabasi networks; Couzin et al. leadership of flocks were all included. But for fun I added one of my favourite papers of last year, by Silverberg et al., on mosh pits.

Silverberg and colleagues first analyzed online videos to identify how rock fans behaved when moshing. An example of a 'circle pit' is shown to the left. To explain how these pits are formed, the researchers built a model which assumed two types of concertgoers, those that want to bounce around and those that want to stand still. The active, bouncing moshers were subject to three types of forces. The first force was a tendency to follow in the same direction as those around them, the second was a tendency to mosh around at random and the third was the inevitable force caused by bumping in to others. The passive moshers were subject only to the last force. When active moshers bumped in to passive bystanders they bounced off them. This model was able to reproduce both the circle pit shown in the picture and the traditional random mosh pit.

Two groups of students in my class worked through a complete re-implementation of the model. Both groups were able to reproduce the original results, but they also found that getting a mosh pit going involved quite specific initial conditions. Only if the moshers started in a pit would the pit remain stable. To address this issue they modified the model a bit. Kristoffer Jonsson and Jonas Mirza added a  force that repulsed the passive concertgoers from the centre. The idea here is that the passive individuals want to avoid the centre of the pit. The active moshers then formed a stable mosh circle. This is shown in the video below.



Another group of students, John Svensson and Andreas Gådin, solved the issue by confining the moshers to a fixed area. This is a pretty realistic assumption. Heavy metal concerts do not take place on an infinite donut as is commonly assumed in this type of simulation.  The change led to some new and interesting mosh patterns. The video below shows how these build up, culminating in a collective rush backwards and forwards (see around 2:30 in the video). This is reminiscent of the Wall of Death, where the crowd run at each other like crazy. The striking thing here is that these walls can move backwards and forwards without the band initiating them.


Another pattern to look out for next time you are at a rock concert is the double vortex pit. This is pictured on the right and arises for specific parameter value combinations. The moshers move outwards in two ways, crash in the middle and then move out again.

The striking aspect of all these patterns is the lack of intelligence needed to produce them. Moshers can be as stupid as they like and they will still make pretty patterns! Thinking more broadly, the rules of the model are not unlike those which might govern cells during developmental processes. These models show how simple movements, combined with the right boundary conditions, can produce many different and robust patterns.

Thank you to John, Andreas, Kristoffer and Jonas for working so hard on your projects. It makes teaching more fun when I also learn something new.






Friday, June 13, 2014

Flying insect swarms

I am currently writing a 'Quick Guide' for Current Biology on moving insect swarms. I was inspired to write this by the recent work by the Rome group on midge and mosquito swarms. Their paper on collective motion of these Swarms is already available on arxiv, and will soon appear in a 'real' journal. This work was very nicely presented by Stefania Melillo and  Lorenzo del Castello at the recent Collective Motion 2014 meeting. My quick guide will focus on this work, and on some recent work by Derek Paley's group on mosquitos. And it will also take in honey bee swarms and locusts.

Flying insect swarms come in all shapes and sizes. Last week the USA national weather service found that a grasshopper swarm showed up on their weather radar. The images (on the right) show the sheer scale of the swarm, which was probably flying at 700 meters. This is still relatively small compared to locust swarms, which have been reported to have flown across the Atlantic.


Although the mosquito and midge swarms studied scientifically are lot smaller than locust and grasshopper swarms, in the wild they can still be pretty impressive. The picture on the right is a "mosquito tornado" photographed by Filipa Scarpa. I have no idea what the mosquitos are doing here, but its pretty amazing.

If you have any more insect swarms you think I should cover in the guide, tell me. The deadline is the end of the month.