Friday, January 24, 2014

Explaining things with flow

This week our group’s first full paper on modelling socio-economic systems came out in PLoS One. The idea for this article came up when I saw Hans Rosling’s presentations of Gapminder. When you see how Rosling's bubbles representing countries float up from poverty and low life expectancy towards a better world you can’t help be inspired by the power of data.

Watching Rolsing’s videos, I also thought about fish movements! We have been using dynamical systems and Bayesian model selection to identify the models which best fit the rules of motion of fish. If we can think of countries as fish then we could use the same methods to find the rules of motion of countries in a socio-economic space, rather than a fish tank.


There turned out to be quite a lot of differences, as well as similarities, between fish and countries. But keeping this initial analogy in mind, Shyam Ranganathan and Viktoria Spaiser have developed a toolbox in R for finding the best set of differential equation models that describe socio-economic change. In the paper, we apply these methods to democracy and economic growth. You can see more about this in the video on the right. Not quite up to Rosling enthusiastic standard of simplifying things, but I hope it illustrates the idea behind the paper.

We are now applying this method to look at the demographic transition, the changes in cultural values across the world, as well as segregation in schools. Most of these projects are based at the Futures Institute in Stockholm. The idea in the paper is to present the tools, rather than make predictions. But we hope that future work will lead to useful insights in to how the world is changing and what we should do about it. 

Please contact us if you have data that you think can be analysed using this method. 



Monday, January 20, 2014

Anti-social extinction

During a recent trip to New Zealand, I visited a couple of bird conservation projects. One was for the rarest of thefour species of Kiwi birds, the other for yellow-eyed penguins. Both these conservation projects are doing an amazing job keeping the animals living in their natural environment, while allowing tourists like me to get a look atthem and develop some insight in to conservation issues.

A yellow-eyed penguin couple and baby penguin.
My wife commented that it was ironic that, given I prefer group-living animals, we were visiting two anti-social species. Kiwis pair for life and jointly care for one egg at a time. But when the egg hatches they first ignore the newly hatched bird, and when it they gets bigger they just chase it away. The yellow-eyed penguins also form long-standing couples (although homosexuality, divorce and season long infidelities do occur) and invest in joint parental care. But once their offspring is big enough to fend for itself, it has to find its own territory.

A group of blue-eyed penguins
This anti-social behaviour makes conservation difficult, simply because more space is required for a sustainable population. I was struck most by this when we saw a colony of blue-eyed penguins on a nearby cliff. These birds also form breeding pairs, but are happy to live in close proximity to other blue-eyes and a vast array of seagulls. Blue-eye penguins are more numerous and wide spread in New Zealand and, although we shouldn’t become blasé, they are not endangered.

What I hadn’t thought of before is that the difficulty of conserving solitary-living species could help explain the evolution of sociality. Animals that are difficult to conserve are prone to extinction when their environment changes. Penguins that tolerate each other have to share local nesting resources, but if space suddenly becomes limited they don’t waste time and energy fighting with each other. Territorial penguins might be able to chase off more tolerant penguins and dominate the best nests, but if their territory comes under attack by a predator, for example, they are not welcome at their neighbours place.

Developing an argument about evolution of territoriality requires a model defined in terms of selfish individuals, not species success. My evolutionary penguins are playing some form of a ‘tragedy of the commons’ game, where in a stable environment selective pressure acts to make them more territorial. In an unstable environment, where territories can suddenly become unusable, selection may favour greater tolerance. When danger arises penguins that tolerate each other can congregate in the few available sites. Provided that penguins can only migrate locally, then local extinctions of territorial penguins who start fighting over the few available resources can lead to the evolution of greater tolerance for neighbors. 

The penguin model I sketch above is related to the idea of r and K selection popular in the 1970s and 80s, and now replaced by more general life history models. In environments where everything is stable (limited by the carrying capacity K) it is better to defend your territory. When territories are shifting (growth rate r is more important) then defense of these territories is less important and it is more important to do well in the space that can be found. I have to admit I don't know much about the literature that links together evolution of co-operation with life history strategies. I found one review of co-operation (a bigger step than just tolerating each other). Maybe people working on the evolution of co-operation should stop bickering over nothing and get a bit more biological detail in their models.

Disclaimer: I don't think my penguin model is necessarily a good description of what actually happened in real penguins. It turns out that modern yellow-eyed penguins may well have arrived with humans in New Zealand.

Friday, January 17, 2014

A picture of two penguins


I have been having a bit of an extended holiday over Christmas till now. Since New Year I have been in Australia and New Zealand. From Monday, I will be in Sydney on sabbatical until the start of April. Visiting Ashley Ward and his growing research group.

And I will be back to blogging soon. We have a paper coming out on Monday on our dynamical systems methods for studying socio-economic systems, I am going to write something inspired by my holiday about why solitary living animals might be more at risk of extinction than those living in groups. I have had a couple of students finish interesting projects, one on evolutionary game theory of poker and one on studying the pop charts, which I want to write about. And I might even do an analysis of my Twitter following (still quite low, but growing).

Photo: Elise Sumpter
In the meantime, here is a picture of a couple of yellow-eyed penguins. Sadly, two of just 4000 left on the planet. 

Wednesday, December 18, 2013

The rationality paradox

Dog-Eat-Dog by Ruth Graham
There are important differences between humans and other animals, and we should account for them when trying to model their respective behaviours. One difference is that humans can understand mathematical models, while there is no known example of this in animals.

In economics, the Lucas critique is a useful piece of advice about modelling human behaviour. It alerts us to the fact that if people are aware of the model we are using to predict their behaviour, they can adjust their behaviour to exploit our naivety. Even if they don’t know the exact model we are using, if we have not accounted for their strategic behaviour, they can still take advantage of us.

One paradox about the Lucas critique goes as follows. Lets take the classic example of a model, called the Philip’s curve, used by central bank managers to set inflation and try to reduce unemployment. This model is subject to exploitation by rational firms who can manipulate their employment patterns given that they know the inflation strategy of the bankers. As a result, the Philip’s curve will fail to make a correct prediction and is thus subject to the Lucas critique.

This is a reasonable observation, but why are the firms assumed to be rational and the central bank managers irrational? Surely, these highly qualified, trained economists would have thought of this possibility and incorporated the reaction of the firms into their model? This is all the more surprising when you consider that firms have many other things to think about than inflation five years in to the future. Apparently, on top of all their immediate concerns about their business model, staffing problems etc. these firms have dedicated their time to finding loopholes in the central bank’s thinking.  Why should the bankers (apart from Lucas, of course) have missed this fact, while the firms are able to work it out?

Any Lucas-inspired model of these bankers behaviour should not allow them to use the Philip’s curve in the first place. The only logical conclusion of this line of reasoning is either that the observations of the economists using Philip’s curves was mistaken or it was some temporary insanity which is replaced by a steady state rationality in the future.  

When we build a mathematical model of human behaviour, the Lucas critique should be taken seriously. Understood properly, it says you should think a few steps ahead when making your model. Does your model make sense? Lucas was pointing out that the Philip’s curve model has a particular type of limitation. We should remember this limitation when we are building models. The Lucas critique is one of many such limitations.

But the paradox tells us that the Lucas critque should not be taken too seriously either. Taken to an extreme, the critique says that the only thing economic models should be used for is studying the outcome of rational interactions. If this were the case, then the paradoxical question is why economics exists at all? The rationality assumption is that people are able to work out the consequences of their actions and therefore we don’t need an economist or anyone else presenting them with a model of what those consequences might be.

This description is typical of paradoxes in mathematics where we want to say something about a model using the model itself to say it. Last month I wrote a blog post about Bertrand Russell spending 20 years doing this to no avail in trying to establish the axioms of mathematics.  It just isn’t possible.


I was prompted to write this after a blog post by Simon Wren-Lewis that Richard Mann tweeted me. Although I find scathing attacks on economics amusing, I find it difficult to believe that economists or anyone else takes the Lucas critique as far as appears to be claimed.  This would be completely irrational. I also doubt whether, as is also claimed, that we can really attribute the economic crisis to models based on rationality.  But it is certainly fun thinking about it.

Tuesday, December 10, 2013

Positive online emotions

Emotions and mathematical models are perhaps polar opposites. Emotions consist of personal opinions, they are unlikely to be rational and they can change in a second. Mathematical models are logical, rational, descriptions of the world that are meant to stand the test of time. But that doesn't mean that we can't model emotions, or at least this is was what Frank Schweitzer claimed in his seminar at the Futures Institute last Friday. Before Frank's talk I was a bit skeptical, but I was interested to find out if he could really build an emotional model.

In order to model something, you first need to measure it. You need to be able to assign a number to an emotion. Since emotions are already either positive or negative, we already have a natural way to assign them values. Most of us can read a text and agree on whether it has a positive or negative tone. But can we automatically assign a number to emotional content on the basis of this assessment? Frank and his colleagues have adapted the software SentiStrength, which claims to be an algorithm to do exactly this. You feed it in a sentence and out pops a ranking. I put in the last sentence of the previous paragraph in to the online version and got negative score -2 for the words 'skeptical' and 'emotional' along with a positive score of 2 for 'interested'. Good to see I was emotionally neutral going in to the seminar.
Review sentiment distribution for
 'Harry Potter and The Deathly Hollows'

In one study, Garcia & Schweitzer looked at book reviews left on the Amazon website. There was a typical distribution of negative and positive emotions in these reviews (pictured on the right) where positive comments were typically extremely positive and negative criticism was varied. The time pattern of review writing varied, with some books building up a review base over time and others (such as Harry Potter) being hyped from the start.

Things get even more interesting when Frank and his colleagues looked at online chat rooms. They examined how long it took between interactions and whether the reactions were positive or negative.  They found a common distribution for the times between posts, which was independent of the topic. They concluded that people were surprisingly positive in their online interactions, even though previous studies had suggested that discussion is generated by negative opposing opinions. When online, people spend a lot of time being nice to each other! Not just pressing the like button, but also in constructive agreement.

Time series of emotions in
an online chat room. 
The team have built up a mathematical model of emotions, which they use to explain the patterns they see. The basic idea of the model is that people change both in how aroused they are and in whether they feel positive or negative emotions. Positive inputs provide positive expressions, while negative inputs enforce negative expressions. The arousal depends on the intensity of the inputs. This model can reproduce many of the properties of the Amazon data and the online chat rooms.

In another part of their work, Frank and his colleagues argue that “positive words carry less information than negative words”, so I better be a bit critical.  In the presentation, and the papers I have looked at since, I think a model comparison to the dynamics of the conversations and exchanges is missing. The model proposed captures the rate at which people comment and the positive/negative content of what they say. But the comparison to data is mainly at the level of time between posts or overall distribution of sentiment, rather than looking at the positive/negative interactions. I would like to see something down the lines of James Murray and co-workers on the Mathematics of Marriage. Here there is a description of how couples get in to negative/positive spirals and  predictions to how this bodes for the futures of the relationships of the couples involved. Murray’s work lacks thorough validation against data, and maybe it becomes too complicated once the fast amount of chat room data is put in to a model, but I would like to see more of these interaction dynamics. Maybe this is in some of the work and I have just missed it? Or maybe it is just too difficult at present? But I would be interested to see what can be done.

Friday, November 29, 2013

How and when do we discriminate?


After sending off 50 unsuccessful letters applying for apartments in a suburb of Zurich, Nikola Jovanovic (pictured on the right) had had enough. He contacted Blick newspaper and said he was considering changing his name. If he had a Swiss sounding name, he claimed, he would not have had any trouble finding a place to live.

Today, Dr. Katrin Ausprung, presented a more systematic approach to the same problem. When adverts came out for houses and apartments, she sent two emails from different addresses enquiring about availability. In one of the emails she gave the enquiring person a German name and the other email a Turkish name. She then waited to see whether or not they got back to her. In one study in Munich, 70.3% of landlords replied to emails of Germans, while 61.5% replied to Turks. A moderate, but highly significant, difference. Other studies throughout Germany show a similar pattern.

This type of study, where researchers apply for jobs or accommodation using false identifications, differing in terms of ethnicity or gender, have recently become a popular tool for detecting discrimination. They are useful for getting at the mechanisms. For example, Katrin identified overpriced properties in her study and found that landlords of these were less discriminatory.  You can avoid being discriminated against, but you have to pay for it.

In other situations, even being better than your competitors isn’t enough. In a study of the Swedish job market, Moa Bursell and co-workers showed that when African and Arabic men apply for a job with CVs containing one to three more years of relevant work experience than their Swedish counterparts, the Swedes are still 2.6 times more likely to get a call back.

A strength of these studies is that they are easy to relate to from our own experiences. By coincidence, at the mathematics department staff meeting on Tuesday, we discussed a study in which scientific researchers were sent CVs to assess for a position as a lab assistant. The only difference between the CVs was that on half of them the name was ‘Jenny’, on the other half the name was ‘John’. The academics replied in the questionnaire that John deserved to be paid about $30,000, while Jenny should start on $26,000. John was apparently more competent and hireable than Jenny. This made uncomfortable reading for the members of our extremely male-dominated department. Without this type of scientific study it is easy to attribute all sorts of factors to explain the gender make-up of a workplace. Using a scientific study we can see that discrimination occurs right at the start of an academic career.

A question that mathematical modelling can help to answer is whether the effects discrimination measured at the individual-level are sufficient to account for the segregation seen in society. Individuals with Turkish background tend to live in certain suburbs of German cities and not in others. Can this be explained by discrimination when looking for a new apartment? It appears that in Katrin’s study the answer is ‘no’, the difference just wasn’t strong enough. Other differences, such as discrimination against high-immigrant areas by renters, are likely to play a more important role. More work is needed to get to the bottom of how the different actions and interactions of individuals produce segregation patterns.

We all have to be careful how we discriminate. Next week's IFFS seminar guest is Frank Schweitzer from Jovanovic's new home town of Zurich. I hope I would still have invited him if his name ended in 'ic' instead.

Monday, November 25, 2013

Linking social behavior to the brain

Tomorrow I am going to Stockholm to visit Niclas Kolm's new lab in Stockholm and start thinking about our project 'Linking social behavior to the brain'. We have received a rather large amount of money from the Wallenberg foundation to do this research (a popular science description in Swedish can be found here). My research group has recently published a rather nice series of papers on quantifying social interactions in fish and other animals, while Niclas' group has done some groundbreaking research on artificial selection in guppies. Combining these two ideas, going from social behavior to the brain, was an attractive combination. Adding to this some new perspectives in machine learning from Kristiaan Pelckmans and genomics from Judith Mank we have our very own social brain research dream team.

Section of the brain of a guppy artificially
selected for increased brain size
(photo by Laura Vossen).
O.K. I'll give the self-promotion a rest for now. We already got the research grant, so I don't need to go on about it! But I thought I'd write a little bit about what we are going to do. If society trusts us with a research grant, we should be able to explain what we are going to use the money for.

The starting point for our project is the social brain hypothesis: that humans and other primates have big brains because they have complex social lives. It takes a lot of brain power to keep track of all our friends and enemies. Just think about how much of your thoughts during today were dedicated to sorting out interpersonal relationships. You soon realize that you may well possess a social brain. And that brain costs you, not only through the time spent worrying about what other people think about you, but also because of the large amount of energy it consumes.

Our research will look at fish and their brains. Of course, fish do not have as complex brains as we do, but there is good reason to believe that the structure and capacity of the brain will effect social behavior, and visa-versa. Are fish bred for big brains more social than those with small brains? Are fish that are bred on the basis of their social interactions more likely to have smaller or larger brains? These are some of the things we aim to find out.

Turning response of a guppy as a function
of the position of its nearest neighbor
(image by Andrea Perna) 
It is important in this type of research to think clearly about what we mean by social interactions.  Interpersonal relationships are very different from many of the interactions seen in fish, where they follow each other and organize in to shoals. It is this latter type of interactions that we have been working on most recently (as in the image to the left). But guppies, the fish we will work on, have both the complicated interpersonal interactions where they 'recognize' each other and the simple behavioral interactions that determine their movements. We expect both of these to be important and will examine them in different ways.

Recent debate about the interpretation of Niclas and his co-workers results make my distinction between simple and complicated sociality all the more important. Sue Healy and Candy Rowe argued that differences in the ability of big and small brained fish to learn in a numerical task could be explained by changes in the motivation and stimulation of fish, instead of genuine intelligence differences. The suggestion is that simple behavioral rules can explain apparently complex outcomes. Naturally, Niclas is not convinced by their argument and their team gave a robust response. Our approach should allow us to get to the bottom of exactly these types of details. It will hopefully reveal some of the subtleties of the social brain.

This is a big project, and guppy breeding experiments are just part of it. We will develop better data analysis methods, make more accurate models of fish interactions, and look at in-silico evolution of fish shoaling (hence my recent revived interest in artificial life).  The project starts properly in July 2014, once Niclas has totally renovated his lab. We will be recruiting both theoretical and experimental Postdocs in the spring and there should be a possible PhD project too. Watch this space for more details.