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.

Sunday, November 17, 2013

Mathematics: a beauty warm and near

In a week when Daniel Strömbom showed us how beautiful mathematical models can be, Teddy Herbert-Read emailed me the above link. It’s a great video, but has a quote by Bertrand Russell that I’m not so keen on. So I thought I’d write about it.

"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, without the gorgeous trappings of painting or music, without appeal to any part of our weaker nature..." —Bertrand Russell

I know what Russell was getting at with his analogy, there is a purity in equations that distinguishes them from the mess of the natural world.  Mathematics can seem superior, in a way that rises above our everyday problems. But I think this is the wrong analogy, and so too did Russell later in his life.

The quote is taken from an essay he wrote in 1902, when he was thirty, on the The Study of Mathematics”. At the time he was in the midst of a twenty year long mission, together with Alfred Whitehead, to capture this mathematical purity. They tried to provide an infallible logical basis to mathematics, which would ensure that everything that could be proved in mathematics could be derived from a small set of axioms. This was a doomed exercise. Although Russell and Whitehead published their results in three volumes of Principia Mathematica, Russell was not fully convinced that they had succeeded.  Then in 1931, Gödel’s Incompleteness Theory showed that any such set of axioms could not be used to prove their own consistency. Every piece of austere beauty ends up, in some way, contradicting itself. Often in an embarrassingly obvious way.

Gödel’s proof was the nail in the coffin for Russell and Whiteheads project, but I think the problems of trying to ground mathematics in truth went even deeper. Russell wrote much later in his life that “I wanted certainty in the kind of way in which people want religious faith……but as the work proceeded, I was continually reminded of the fable about the elephant and the tortoise. Having constructed an elephant upon which the mathematical world could rest, I found the elephant tottering, and proceeded to construct a tortoise to keep the elephant from falling. But the tortoise was no more secure than the elephant, and after some twenty years of very arduous toil, I came to the conclusion that there was nothing more that I could do in the way of making mathematical knowledge indubitable.” There is nothing we can do to make mathematical models completely stable. The bigger the elephant, the harder it will fall.

Mathematics is not cold and austere artist with some higher purpose. It is a warm and friendly workman who arrives at your door with a few ideas about how to fix your boiler. Mathematics helps you tidy up, it helps you put things in order and to fix those awkward little problems. It can help you understand all sorts of little things: light waves, backgammon strategies, fractal snowflakes, spinning toys, magnetic fields, tomorrow’s weather, tree growth, spiraling DNA, stock prices, aerodynamics and electrical circuits. It’s the ultimate Mr-Fix-It.

Mathematics certainly shows you how to think clearly and sometimes you wonder at its incredible efficiency. But mathematics knows nothing more about the nature of reality than anyone else, and it would have no right to set itself above the real world. But that’s OK. Because used properly mathematics has no such pretentions. Mathematics rightly viewed, possesses a supreme beauty — a beauty warm and near, that appeals to every part of our nature.

Sunday, November 10, 2013

Attraction based models of collective motion

Daniel Strömbom will present his Phd thesis on this Thursday at 15:15 in Polhemsalen, Ångström, Uppsala. The defense is open to the public, so please come along and watch.  The opponent Andreas Deutsch will first present background to Daniel's research and then Daniel will present his work, before the floor is opened to questions. 

Daniel’s thesis revolves around one very simple yet far-reaching idea. Daniel had the idea during the first year of his PhD. It started during a course I gave on self-propelled particle models. These (I thought at the time) the simplest set of models for how bird flocks and fish schools can move together collectively. They define a set of rules for how the ‘particles’ interact with their local neighbours. Usually, these interactions include rules for repulsion (so that particles don’t crash in to each other) , attraction (so that particles form a group) and alignment (so that the group moves in the same direction). Daniel’s idea was to take away alignment and repulsion, and see what happens with attraction alone.

At first I was sceptical. After all, we are interested in collective motion, and this means groups should move together in the same direction. But Daniel showed that if the particles have a blind angle then collective motion can be generated by attraction alone. Instead of always forming a ring or a clump, as they would without a blind angle, the particles could form a figure of eight. Remarkably, the 8 then moves collectively, sucking up all particles in its way.

You can watch the 8 form in one of the videos on Daniel's webpage, along with a lot of other examples of exotic attraction-only structures. One particular favourite of mine is his synchronised particle dancing simulation. Without noise, with carefully selected initial conditions and a very narrow blind angle, these particles make beautiful kaleidoscope patterns. This is shown in the video.

Daniel took this simple idea (published in 2011) and in the rest of his thesis he thoroughly investigates its consequences. In chapter 2, he shows that putting attraction back in to the model produces patterns that look like real bird flocks and fish schools. In chapter 3, he establishes mathematical properties of the model, such as why the eight moves. Then in chapters 4 and 5, working together with biologists, Andy King and Audrey Dussutour,  he applies his models to understanding sheep herding and ant traffic. 

Daniel's weaving of a simple idea through mathematics and applications is both beautiful and powerful. His model doesn't explain all aspects of animal flocking, but it has forced us to rethink some of the ground assumptions about how animals interact. There is always room for things to be simpler than we first believe. 

Thursday, November 7, 2013

Logistic growth in the human world

Today I presented my research for upper secondary school teachers as part of a day on ‘Mathematics in the human world’ (‘Den mänskliga världens matematik’). This is probably one of the most important messages to get out from applied mathematics. Mathematics isn’t just for physicists, engineers and computer scientists. It is needed everywhere in society, not least in understanding society itself. I am impressed that the Swedish Royal Society (KVA), who organized the day, had the foresight to choose this theme. I hope we gave some inspiration to the 50 or so teachers who gave up there time to came along to listen.

Given the vast subject of ‘humanity and mathematics’, it was interesting that three of the four scientific talks (my own, Tom Britton’s and Kimmo Eriksson’s) all included a detailed description of the logistic growth equation. In modeling three completely different contexts---disease spread, adoption of mobile phone usage and applause after an academic talk---this innocuous little equation plays a central role.

The logistic equation can be derived from simple assumptions about social behavior. Assume you have heard a rumour and you tell 3 randomly chosen people about it during 24 hours. If there are N people and X of them have heard the rumour, then the probability that each of these random people have not already heard the rumour is 1-X/N. On average, you will ‘infect’ 3(1-X/N) people with the rumour. Now, if all the X people who have heard the rumour behave in the same way as you do then the average hourly increase in people knowing the rumour will be

dX = (3/24)X(1-X/N)

which is the logistic growth equation. The growth dX is small when either X is small (no-one has heard the rumour) or X is nearly equal to N (everyone has heard the rumour). The rumour spreads fastest when X=N/2 and half the population know about the rumour. This leads to the sigmoidal growth curve shown here.

We published a paper earlier in the year looking at clapping in a small audience.  First, we showed that both the onset and cessation of applause followed a logistic growth curve. Then we tried to address a problem that Kimmo raised during his talk today: “lots of mechanisms produce logistic growth curves, how do we know that it is ‘social contagion’ in any particular case?” We looked at clapping events, and compared the fit of a social contagion model with various models where individuals chose a randomly distributed number of claps to do irrespective of the behavior of others. Social contagion models were the most important factor in predicting the individual clap patterns seen in the data.

This paper got a lot of media attention, mainly because of our prediction that long applauses can occur not just because a presentation is good, but also because of a failure to co-ordinate stopping. Richard Mann gave a well-balanced interview on BBC about this. Richard also did a fun analysis, again using the logistic curve, of the media contacts he received after publication.

Of course, neither my presentation today nor the others at the humanity mathematics day were limited to logistic growth. I talked about Schelling’s model of segregation and collective motion, Kimmo about popularity of names and cultural evolution, and Tom about disease networks. Klas Markström, who helped plan the day together with Ingvar Isfeldt at KVA, described the mathematics and paradoxes of voting and democracy. There is a diverse mathematics to humanity.

Sunday, November 3, 2013

Is Artificial Life still alive?

Our journal club on Thursday was presented by my new PhD student, Ernest Liu, about a relatively old (1999) paper on the Evolution of Biological Complexity. The authors study what happens when computer programs are forced to compete for access to CPU time and memory. Those programs that work most effectively are able to reproduce and natural selection does its stuff, the fittest programs survive. The framework for these simulations is called Avida has now been around for 20 years.

The paper itself addresses a really fundamental problem in biology: why are there all these complex living forms around us? The answer the authors suggest is that natural selection acts to reduce randomness and make things which are more structured. There is a lot of technical discussion of how to measure randomness and how to define complexity (they define complexity=genome length-genome entropy), but this is the basic result. Natural selection will make genomes less random.

Naturally, the biologists amongst us were not exactly impressed with this revelation. That natural selection eliminates randomness is more or less true by definition. But there are a few additional insights gained in studying evolution of computer programs. For example, there are sudden fitness jumps in the computer simulations, accompanied by decreases in genome randomness. These are reminiscent of 'biological' evolution and are reproduced in the 'artificial' evolution in Avida.

This leads me to my title 'Is Artificial Life still alive?'. It seems to me that research progress since this paper has been pretty slow. Yes, there are Artificial Life conferences and a society with a journal, but the work I have read here is more concerned with engineering challenges and less concerned with the fundamental questions in biology. One nice recent exception to this trend is a paper by Philip Gerlee and Torbjörn Lundh on cross feeding artificial organisms.

One of the reasons for the failure of Aritificial Life to take off in serious biology research is reflected in the reaction of the biologists in our journal club when they read the paper. This research too often looks like Darwin needlessly translated into 'Entroponeese' or some other obscure mathematical language, without providing any new insight. I still think there is potential here, and Philip and Torbjörns' work reflects this potential. I'm interested to hear if anyone else knows of any other signs of life in Artificial Life.

Wednesday, October 30, 2013

Diverse mathematical biology

The last day for registration for the 5th Swedish Math-Biology Meeting is today. The meeting will take place in the first week in December.

What I think is cool when you look at the programme  is the diversity of subjects that will be talked about. The list includes everything from 'in-silico ecology and 'neural fields'', through 'fish stocks' and 'fossil dating' back to 'food webs', 'collective decision-making' and 'human fingers'. There is so much variety in how mathematics can be used to study biology.

Being optimistic, I should talk about the common language of mathematics linking all these diverse subjects together. And to some degree this is true. There are common processes in all these parts of biology that are captured by models. It is fun seeing how your favourite model can be used in a completely different way.

Being realistic, however, I know there are going to be a lot of confused (or sometimes sleepy) looks on our faces as we try (or fail) to understand what each other are doing. But that should never stop us from trying. See you in December.