Sunday, May 18, 2014

The future of automation

Depending on your perspective, technological development has been saving us from drudgery, or destroying our livelihoods, for centuries. From the very first domestication of animals we’ve been finding ways to perform tasks with less human action since civilisation began.

Last week Dr. Michael Osborne from the University of Oxford gave a presentation at the Institute for Futures Studies showing his predictions about which of us will be losing our jobs in the century to come. Michael, as an expert in Machine Learning, is interested in which jobs will be automated as a result of increasing artificial intelligence in the Big Data era. He and his colleagues have been impressed at the rapid pace with which tasks that were seen as impossible for computers to perform, such as driving a car or translating accurately between different languages have become almost routine.

Machine Learning itself can be used to predict which tasks are ripe for automation. First they gathered data on the skills necessary to perform over 700 different jobs, such as social sensitivity, manual dexterity and creativity. A panel of experts was then asked to predict which of 70 specific jobs would be automatable in the near future. Using Gaussian process regression, Michael and his colleagues learned a relationship between the skills a job requires and the probability that a computer will be able to perform, and extrapolated this relationship to the 700 jobs the panel had not evaluated. Their results give us a view on which sectors of the economy will be most affected by the continued rise of artificial intelligence. The graph below shows, by sector, what proportion of jobs are at low, medium or high risk of being automated. In general, those jobs requiring the most necessary social interactions and/or high level creativity appear to be safest from the coming tide of job losses, but none of us can rest too easy!

However, we shouldn’t be too distressed at this imminent redundancy. As Michael pointed out for example, while technological progress has reduced the workforce in agriculture from almost 40% of employment in 1900 to around 2% today, the total unemployment rate has barely changed. Technology has allowed society to move human labour to more productive areas. The results of Michael’s analysis also show that it is generally lower paid, lower skilled jobs that will be destroyed, giving hope that people will be able to move into better employment, if society provides them with the necessary skills.
Nonetheless, Michael also showed examples of resistance to change, such as the guilds of Tudor England blocking the development of machines for making textiles in fear of their members livelihoods. The ever increasing rate of automation, and the subsequent need for people to continually adapt to new careers and find new skills presents society with a powerful challenge, that may require new social contracts, such as a guaranteed citizen’s income and much more investment in public education to solve. It will be exciting to see where this process takes us!


Tuesday, May 13, 2014

Three days of separation

The idea that we are only six introductions away from any other person on this planet is both beautiful and compelling. It has inspired research, provided inspiration to a film starring Will Smith and even launched a charity. According to Microsoft researchers it might also be true. They found that the  that the average path length connecting 180 million Messenger users in 2008 was 6.6. That was before Facebook and Twitter took off. By now the path length has probably shrunk further.

Distance of Zurich residents to their friends.
from: Axhausen, K.W. and A. Frei (2008)
And it isn't just the internet that is shrinking the world. On Friday at the Future Institute, Kay Axhausen, showed that road travel times have halved over the last 50 years, that we dedicate up to 40% of our leisure time to visiting friends and meeting new people, and that these friends are spread over the entire world. In one study, Kay and his colleagues looked at the distance from Zurich residents and their friends. It isn't unusual anymore to have friends spread over 5 orders of magnitude.  Kay argues that this effect isn't limited to Europeans and North Americans, citing recent data from Concepcion, Chile where people have similar friend-distance distributions as Europe. There are apparently a few die-hards who refuse to join the global-village, but they are becoming increasingly rare (as well as isolated).



















But the thing that struck me most was the time scale of the links. A recent paper in PNAS looked at bus trips in Singapore. Kay and colleagues drew a line between people if they travelled on the same bus on the same day. In the figure above the red lines show a shared bus trip on Monday, the greens are trips together on Tuesday and a cyan are trips on Wednesday. The last picture are all the weekday trips put together. By Friday, all the people are now connected through shared trips.

It turned out that even by Wednesday all Singapore bus travelers were connected. There are just three days of separation between bus travelers.

A bus trip isn't enough time to make friends. But it is enough time to check out what other people are wearing, what mobile they are using, what newspaper they are reading and even to overhear a few opions about the world. It is enough time for all sorts of interesting social information to spread. This result would have appealed to Stanley Milgram, whose small-world study first led to the 6-degrees idea. Cities fundamentally change the individual's social world in many different ways, not least in the time it takes for us to connect to each other.

Tuesday, May 6, 2014

Science hasn't ended yet….

Twenty years ago the journalist John Horgan wrote a book called the ‘End of Science’. This must be one of the best popular science book ever written. Instead of the usual sycophantic interviews and hyped up description what scientists do, Horgan employed a more investigative style of journalism. He met with scientist after scientist and argued with them that all they were doing was either pointless tying up of loose ends or applied engineering. The big scientific questions were all already answered by Darwin, Einstein, Feynman etc.

Picture from Robert Laughlin's
collection of cartoons illustrating his ideas.
It was this accusation that science is over, which Robert Laughlin addressed in his Ångström lecture in Uppsala. His hand drawn image shown on the right illustrated his main point. If you look in to the distance, like the character pointing towards the fantastic “frontier”, then it seems that all questions are answered. All the important things are answered by the beautiful view. On the other hand, if you ignore the view, like the other two characters in his drawing, and you instead look down at the detail of things nearby, then everything is a lot more difficult to comprehend. Science is just starting

Laughlin's presentation built on a point first made in Philip Anderson's seminal paper that 'more is different'. The idea is that at all levels of physical, chemical, biological and social organization, we cannot expect to use simple extrapolations of observations from the level of organization below to understand the level above. For example, the rigidity of ice isn't found in a description of a single water molecule. Similarly, we can’t claim to understand the internet just because we know how to program a computer. The combination of applications and content is more than the sum of the individual lines of code.

Laughlin goes one step further in this argument. He claims that "all laws of physics are discovered, and none are derived from first principles”. He argues that we can't sit down and reason our way to physical relationships from what we know already at the level below. Instead, we need to invent new “emergent” ways of describing systems, which combined with experiment allow us to understand things better. Each new law of emergent organisation must be understood in its own terms. This means that even if projects like string theory and grand-unification were to work, they do not provide much additional information about the rest of the Universe.

Some of Laughlin’s argument is common sense to anyone working outside physics (and to many people working inside physics too). No one would seriously claim that we can better understand animal biology using particle physics. But other parts of the argument require serious consideration by all scientists, not just physicists. For example, is genetics really relevant for understanding social behavior? Many biologists would argue that it is the most important tool we have, but maybe it requires us to step up over too many scales?


I think what Laughlin is trying to argue is that Science can’t be thought of as ending, because the so-called great scientific laws of Darwin, Newton etc. are ‘just’ examples of discoveries of useful regularities. While they are great discoveries, they are no more fundamental than finding out that stacking objects makes certain shapes of pyramid or that water freezes in the same way as other chemicals. They are no more fundamental than finding out that connecting up a load of computers results in a massive change in human society. Not every discovery is equal---Laughlin received a Nobel prize in 1998 for his “discovery of a new form of quantum fluid”---but no discovery is more fundamental than any another.

Monday, April 28, 2014

Learning to play.

In 2007, the Swedish gambling agency ran a simple gambling game called LIMBO. Gamblers were invited to stake 10 kronor on a number of their choice between 1 and 99,999. The person choosing the smallest number that no-one else chose is the winner: taking home a prize of around 100,000 kronor. What number would you choose?

Poisson-Nash equilibrium for an average of 53,783 players
When I played the game at Erik Mohlin's interesting and engaging seminar at the Institute for Futures Studies last Friday, I chose '1'. A bit naive, maybe, and quite a few others thought the same way. The winning number in an audience of about twenty of us was '5'. While the game is not straightforward, it is possible to determine a probabilistic equilibrium strategy. If all players pick numbers according to the distribution on the right, then no player can improve their performance by changing away from this distribution. Note that the probability of choosing large numbers is not zero, but it is very very small. 

The question Erik asked was how people learn to play the game. It is unlikely that everyone worked out the best strategy using stochastic game theory. Indeed, in the first week in Sweden people didn't play so well. Like me, they clustered around very low numbers, maybe not realizing that everyone else would do the same. But over time the distribution stretched out and they collectively took a strategy close to the optimal. Winning numbers after two months of play were between 162 and 3590.  

How do people get collectively better at games line LIMBO? This question was tested on data from a lab experiment, where smaller numbers of people played a similar game. Erik and his co-workers found that the explanation that best fit the data was a form of imitative learning, where the players would look at previous winners' numbers, and increase their probability of choosing a number the same or near to the winners.  Through this learning they eventually arrive at the equilibrium shown above, both in the model and in the data. Imitative learning is quick way of finding out how to play a game well.

The fact that imitative learning works so well for game playing is an important insight for basic economic theory. Economist often argue about if and when the equilibrium of a game is useful for predicting the behavior of real people. In this case it seems to be very useful. The equilibrium is quickly reached through a simple process of imitation. 

But…….. The Swedish gambling agency closed LIMBO about 3 months after it started because they believed people were using syndicates to cheat. It isn't hard to see why. The winning numbers were usually in an interval 1000 to 3500. So an investment of 25,000 kronor by a consortium was almost guaranteed to win the 100,000 kronor first prize. If there was more than one consortium then this would drive the winning numbers up and maybe the consortiums would start to lose. But it is clear that the game becomes unfair for honest, single players. If you can read Swedish, it is quite amusing to read the press releases from Svenska Spel as they first introduce the game as the result of 5 years research, then provide some tips on how to pick your numbers, then finally admit that the game was against gaming laws all along.   

I think this real-life outcome raises just as many interesting economic questions as the original game. As soon as the game was introduced, independent gamblers built a syndicate to make sure they took home a profit. This is where the collective behavior comes in. Groups of independent actors quickly self-organizing to manipulate the market. Understanding how groups form and manipulate these games is a much harder problem to study scientifically. But if related to the behavior of economic agents such as banks and other financial institutions over the last few years, it is certainly a no less important a question to answer. 

Tuesday, April 22, 2014

Ants are just as clever (and stupid) as people.

Last week I found out that Takao Sasaki was one of the winners of this year's Glushko prize for cognitive science. The prize is awarded by the Cognitive Science Society, whose overall aim is to further understanding of the human mind. Given this, it was very gracious of them to give the prize to Takao. His PhD thesis wasn't really about the human mind. Instead, it was dedicated to showing that rock ants are just as smart as humans. Or, when working as a colony, possibly even smarter.

One ant carries another to her new home
Takao started with rationality. Over the last decade economists have been gradually discovering, what any bloke in the pub could have told them for free, that humans are not rational. For example, one thing retailers often do to fool us irrational mortals is place out a number of unattractive decoy products which make the product they want you to buy seem like a better deal. Takao did the same with his ants. He found that individual ants changed their preferences for the nest they would like to live in when offered an additional option. Ants are just as malleable as we are. But it turned out that the ant colony as a whole was not swayed by irrelevant options. A bit like when you come home from a shopping trip and your family asks you "why the hell did you buy that?", the colony is a whole is more sensible than any of the individuals in it.


Individual ants can choose between a good and a bad nest
site, but have difficulty with eight. Colonies have no
problems with either set up. 
One explanation for irrationality in individual ants may lie in differences in cognitive capacity between groups and individuals. In his next experiment, Takao tested how individuals and colonies performed when offered large numbers of potential homes, some good and some bad. The colonies seldom chose a bad nest, but the individuals did so nearly 50% of the time. When compared to groups, individuals are not only irrational but downright bad decision-makers.

So groups are better than individuals? The crowd is always wise? Well, not always. Next Takao looked at how decision-making difficulty affects the ability of colonies to choose the best of two nests. He showed that, as in his earlier work, the colony was better than the individual at choosing when a difficult decision had to be made. But when the decision was straightforward, and one of the potential homes was a lot better than the other, the colonies got it wrong more often than the individuals.

Takao's latest paper is on learning. When ants repeatedly experience, for example, very light nests (which they like), then they put a premium on very dark nests. On the other hand, if they experience, nests with large entrances (again something they don't line), then they put a premium on narrow entrances. Again the ants are a bit like us.

Takao's PhD supervisor and co-author on the above work is Stephen Pratt, who I have known and worked with for many years. Stephen and my work together focussed more on the mechanisms these ants use to make good group decisions. Takao's thesis really takes a whole new direction by testing ideas from cognitive science on ants, and I think the award is very fitting. Well done!

And don't worry if you happen to be human. One day we will prove that we are smarter than ants, but we are still a long way off.



Thursday, April 10, 2014

What is a complex system?

This week I started teaching the course 'Modelling Complex Systems'. I decided this year to make video lectures for the course. In the first one, I define complex systems. This is not an easy thing to do. There is no real recognized definition, and the wikipedia page is pretty confusing. Complex systems are systems that are, er, well, complicated (although even this obvious statement is often argued against)

My answer is simple, I just show a lot of systems which make complex looking patterns and say "complex" a lot. A similar (but more eloquent) answer is also given by Melanie Mitchell in her excellent complexity explorer course.

I do have one little twist, and that is that a complex system is one in which you can use mathematical modeling to better understand it. This leads me nicely to my second lecture: what is mathematical modeling? This question I have thought about a lot, and I think here I give a reasonably useful and general explanation of why we use mathematical models. Models are used for one of four reasons:

1, Explain data as simply as possible.
2, Link together levels of explanation.
3, To provide detailed descriptions.
4, To predict future outcomes.

Complex systems are most associated with number 2. Have a look at the video and see what you think.

I will hopefully be putting all my lectures up on a webpage in the future. One request I have now is that if anyone can suggest good articles on which the students can base mini-projects please tell me. The students on this course tend to be exceptionally good at modeling and mathematics, and highly motivated. So any 'complex systems' models that can be implemented and tested in 4 weeks would be much appreciated.

Wednesday, April 9, 2014

Why care for your kids when someone else will do it for you?

Its been a while since I wrote a blog post, and this mainly because I have been lost in my own thoughts during my 'sabbatical' in Sydney. But I managed to raise myself from self-indulgence and go to a really nice seminar on Friday by Ros Gloag. Ros is doing a Postdoc in Madeleine and Ben's social insect group in Sydney, after finishing her PhD together with Alex Kacelnik in Oxford.

Ros spent her PhD studying shiny cowbirds and chalk-browed mockingbirds in South America. These cowbirds pose something of an evolutionary puzzle, because they are such blatant parasites. What the cowbirds do is hop in to the mockingbirds nest, lay an egg and then fly away. The mockingbirds don't like this. If they catch the cowbirds (which they often do) they attack them pretty fiercely (see a bird get beaten up but still lay her egg in a video below). This doesn't seem to stop the cowbirds laying an egg, although it does stop the cowbirds damaging any of the mockingbirds own eggs.



A mockingbird nest with three of
 its own turquoise eggs and four parasitic
cowbird eggs. 
But the strange thing is that the egg left by the cowbird looks very different from the mockingbird's own eggs. Why doesn't the mockingbird just destroy it and throw it out? Ros showed that mockingbird eggs in nests containing cowbird eggs were less likely to be damaged or destroyed. This is because when other cowbirds come along and attack the nests, they end up damaging the cowbird eggs which are already there rather than the mockingbird's own eggs.

Once the all the eggs hatch, host birds continue to look after both the cowbird and their own chicks. One clue to why the hosts do this can be found in the vocal recordings of the cowbird chicks. The cowbird appears to mimic the calling of groups of hungry chicks, producing a general enough sound to fool a range of different host species. This causes the parents to collect even more food than they usually would, which the cowbird laps up.

Ros' thesis is a beautiful example of how the behavioral ecology approach helps us understand the evolution of host and parasite interactions. She has nicely combined the cycle of experiment, thinking about what the experiment implies, building a theory, and then testing it with a new experiment.

There is a danger in the behavioral ecology approach that experiments are done until one of them identifies an advantage for the host, at which point we stop and congratulate natural selection on its amazing power of finding a balance. This can make me a bit suspicious.  In Ros' case there are still a few open ends, but I think this is to her credit. Instead of finding a full answer, her research documents the subtleties of hosts and parasite relationships.