Wednesday, October 05, 2016

Century of AI in the movies. Can you name one that is not dystopian?

Art can be a bit misleading and no more misleading than in its treatment of technology. AI (Artificial Intelligence) has been shown to us largely through dystopian movies, endless replays of the Frankenstein myth. Can you think of a non-dystopian movie about AI? So how have the movies informed and shaped our views of AI?
Robota
We can go back to the Prometheus Myth in Hesiod and in art, the play by Aeschylus, where Zeus has Prometheus chained to a rock while an eagle pecks at his liver, which grows again. His crime was to give mankind fire, but also writing, mathematics, metallurgy, agriculture, astronomy and architecture. The play prophetically sets up the tension between man and God that is still present in the AI debate. Later Romantic writers such as Goethe and Shelley were also write poems on the subject but it is probably with Mary Shelley's Frankenstein: The Modern Prometheus, that the Prometheun creation of a monstrous force takes hold of the popular imagination. Although, curiously, the monster is not called Frankenstein, only its creator. Subsequent films moved the name across to the monster. Not for the first time, would the movies exaggerate with monstrous propositions.
But the modern Frankenstein is, of course, shown in The Incredible Hulk and more often in technology, as the robot. The English word Robot came from a sci-fi play from 1920 called RUR (Rossum’s Universal Robots) by Robert Capek. It comes from the Czech word robota which means forced labour. The play features robots, which turn on their creators in a robot rebellion and destroy the human race. In a second play, War with the Newts, Capek reverses the plot and the robots become a servant class, thus setting up the current debate: AI – good or evil, dystopia or utopia.
Fears
Over the last 100 years, in the cinema at least, AI has largely been portrayed as dystopian and evil. AI has, in film, reflected our fears, often representing the fear of technology but also of the ‘other’, whatever that ‘other’ was at the time – cold war, crime, violence, helplessness, corporate greed, climate change and so on. There have been glimpses of a more sophisticated and subtler dynamic around AI, in Bladerunner, the Alien series and more recently a rush of movies around AI, as it takes hold on our lives through the internet. So let’s take a journey through these movies to unpack its impact.
Robots first arose in the magnificently designed, Art Deco inspired Metropolis (1927). It is a rather turgid film, but the Robot became its iconic representation. This early representation of a robot set the dystopic tone for decades to come. The robot causes death, drowning and destruction. Class war (the Communist threat was looming) is the underlying theme, with mechanisation of labour also seen as a threat. What fascinates is the representation of the robot as Maria, a sexual, fetishized representation of a woman. Robot women have played a rather odd and often sexualised, fantasy role in movies from The Stepford Wives to Ex Machina. Yet overall, the dominant role has been the male robot as a macho and malevolent killer. Another ‘between the wars’ movie was the German Master of the World (Der Herr der Welt) (1934) which featured robots, again as a threat to the world. An interesting film as it drives on with the usual robots as threat to humanity but resolves itself with robots doing menial jobs while the workers gain from more leisure time – an odd and rare, utopian vision. No other movie has come to this utopian conclusion to my knowledge.
Cold war
The cold war brought with it the fear that the earth may be doomed and other planets sought as refuge. The Day the Earth Stood Still (1951) is a black and white, cold war, flying saucer movie with a Christ complex. Gort the threatening robot protects and even resurrects its extra-terrestrial master. The film censors objected to Gort’s God-like power over life and death and demanded that a reference to the actual Almighty be put in the film, to dilute the message. Those were the days!
The Forbidden Planet (1956), which I first saw in an all-night, sci-fi fest in Brighton, is regarded as a ground-breaking film, setting the tone for a lot of later sci-fi. It was the first film to be set on another planet, the first to have an electronic score and the first to feature faster than light space travel. It also features Robby the Robot, not only a key character in the story but an intelligent being. Robby is a force for good, programmed not to harm humans and plays a significant role in the plot - AI with a heart. It was to be some time before AI revealed itself again, as the 60s took hold and tech took a back seat.
Rise of the robot bad guys
Robots were back however with Terminator (1984) and its sequels, which are action movies, where AI is a threat to humanity, even from the future, through morphing assassins. In fact the Terminator image has become the poster boy for the whole ‘AI as a future threat’ idea. Of course, Skynet is the more general AI that lies behind the Terminator.
In the same vein, the RoboCop (1987) series was cops go cyber-crazy, set against fears of rising crime. It is also anti-corporate at a time when greed and large corporations were seen as getting out of control. The whole issue of who controls AI if it is owned by large companies, is a contemporary issue, raised in this movie 30 years ago. RoboCop redeems himself by exposing the evil corporate plot and saves the company from that fate. In the end it’s a sympathetic view of AI, as a moral agent. The RoboCop franchise continued, the latest being a movie in 2014 with the same 'good cop-bad cop' theme. They raises the spectre of AI being used for law enforcement and military uses, although drones turned out to be the most powerful application, not robot soldiers.
But let’s go back to robots in Alien (1979) again, as super-smart, but Machiavellian presence. Ash, who is there to return the Alien, even at the expense of the humans on board, after being decapitated, questions their chances of survival and is literally turned to ash by a flamethrower. In the sequel to Alien, Aliens (1986), Bishop is treated with disgust by Ripley but eventually pays the role of saviour, saving them and, despite being ripped asunder by the Alien Queen, redeems AI by being on the side of humans. This was a turning point for AI in movies. It pivots from Ripley’s hatred of robots and technology, to be being her companion. It wins her round. Bishop is clearly a reflective and all-too-human character., an altogether more sophisticated character than Ash. Bishop is reactivated in Alien 3 (1992), when he awakes from a cryogenic sleep with Ripley but the Alien is with them, which Bishop confirms. We pivot back to dystopian AI, when an identical Bishop arrives, who wants to operate on Ripley to get hold of a specimen. She commits suicide and throws herself into furnace to kill her and the Alien. Alien Resurrection (1997) solves the Ripley suicide script problem, through cloning. The military use of alien technology forms the narrative backdrop and, you guessed it, one of the mercenaries, Call, is a female robot. The Alien movies are interesting also for their female heroes. This time Ripley saves the female robot Call. They kill The Newborn alien and Ripley and Call are compadres. So the Alien franchise pivots back and forth on whether AI is dystopian or acceptable.
Turning point
As the movies tussled with technology, more often than not, they defaulted to the deficit view. Occasionally, however, something is created that it is wondrously exhilarating, when art transcends the technophobia and something beautiful is born. That film is Bladerunner. Non-dystopian AI movies are very rare. Bladerunner (1982), easily my favourite, was not only a masterpiece in terms of art direction, but also sympathetic to the created intelligences. The future world is dystopian, Los Angeles is a smog laden mess, and four replicants are on Earth trying to extend their fixed, four year lives. Banned on Earth, they are hunted down and ‘retired’ or killed. But the replicants play a complex role, sometimes more compassionate than humans and the theme is one of ambiguity. It explores the age-old theme of what it is to be human. Rutger Hauer (Roy), after showing mercy and forgiveness to the man who killed his partner, delivers one of the greatest ever tragic monologues in film. On the rooftop, in the rain, he looks up and says,
"I've seen things you people wouldn't believe. 
Attack ships on fire off the shoulder of Orion. 
I watched C-beams glitter in the dark near the Tannhäuser Gate.
All those moments will be lost in time, like tears in rain. 
Time to die."
Disembodied intelligence
2001: Space Odyssey (1968), with HAL, was a breakthrough film. Here we had the human voice, slightly creepy, but not a robot in sight – just a deep, red light. You could hear and feel the calculating menace. Interestingly, HAL (Heuristically programmed ALgorithmic computer), in the script, was created in the future - 1997, about the time that the internet actually took off and intelligence could be networked and use networked data. HAL has many of the characteristic we now experience through AI, face & speech recognition, speech, reason and game playing. As they try to shut down HAL, it reads their lips and decides to kill them. So, in the end we return to the dystopian theme. AI is a killer and has to be killed. (My favourite film robot trivia piece is that HAL is a one letter shift from IBM.) Things get interesting in the sequel 2010 (1984), where the internal contradictions within HAL are seen as causing it to malfunction. This notion of moral conflict has come back into AI, especially with self-driving cars, where they may well have to make such choices. In this same uer, however, the rise of the killer robot was upon us.In the last 90s, what we did get as the internet started to take hold, were movies that moved beyond robots, more HAL-like, dealing with he intricacies of networked intelligence, prediction, viruses and so on.
The Matrix (1999) creates an altogether more philosophical vision. It introduces the idea of a simulated reality, created by AI to fool and entrap humans. Once again, a dystopian vision, but with a dose of philosophy, with references to Plato and Baudrilard. It poses a more general proposition that reality is actually a simulation created by machines, that echo Descartes Evil Demon. We are starting to see the rise of movies that have the invisible internet, rather than mechanical and visible machines and robots as their inspiration.
Non-dystopian interludes
Star Wars (1977) had fairly benign droids, but dystopian military robots still abound. Short Circuit (1986) has a robot that gains sentience and despite all efforst to destroy him, survives. It is an optimistic view of robot intelligence as helpfu, human and benign. The Iron Man (1999) is another non-dystopian robot. Bicentennial Man (1999) features a domestic robot Andrew and explores the isssues ofmimmortality in robots, along with love and the relationship between man and machines. It is free from the dystopian tendency of the robot movies that were to come to dominate. But my favourite in this type of movie is Robot and Frank (2012) as it deals with the ethics of memory, age and dementia - absolutely unique movie that does one thing but does it exceptionally well.
Spielberg’s more retro AI (2001) is an extremely sophisticated film, where David, the robot goes through trials and tribulations that reflect the problems we fear around mistaking the robot for a human child, as well as climate change and fear of the future and our fate and potential extinction. It is ultimately optimistic and here we see a softening of the old dystopian interpretations.
Dystopia bounces back
But not for long, as the dystopian robot view bounces back with Terminator 3: The Rise of the machines (2003). Here we learn that Skynet is actually the internet. Terminator Genisys (2015) expands on the internet theme with the launch of a new operating system ‘Genisys’ but its loyal to its dystopian vision of man against the machine.
We return to a subtler view with I Robot (2004). This is a complex movie, as suspicions about the role of robots in a murder are exposed by a central artificial intelligence computer, VIKI (Virtual Interactive Kinetic Intelligence). It turns out that Sonny (a robot) has been created beyond the three laws that limit robot functions. In a complex plot, it is the deep networked intelligence VIKI that creates and controls the robots and has to be destroyed. There is recognition here that robots are not the core issue but a vast networked, artificial intelligence. We had by now entered the age of the internet where intelligence was seen as lying behind robots. In a touching and optimistic end, the friendly Sonny becomes the leader of the disenabled and conformist robots.
In Minority report (2002) once again the fear of crime is the back story bit the vision is still although dystopian, it is a complex and informed movie. One area of AI that features heavily is iris and face recognition, so much so that the hero has to undergo an eye transplant. The PreCrime system predicts the future and therefore future crime events, such as murder. The fatal flaw with PreCrime is that once people become aware of the future they can change it. The film is famous for having been prescient about future technology. This was no accident, as Spielberg summoned a three day event for tech experts that informed the movie’s technology ideas – retina scanners, cloud computing, multi-touch devices, insect robots and so on.
Age of algorithms
A rack of movies over the last few years moved on to tackle a more networked view of AI, sensitive to the rise of the internet and the more recent rise in interest in AI. These movies are starting to delve into more intellectual themes. AI features, such as machine learning, bots and Turing tests are coming to the fore.
Her (2013) is an intensely personal film as it follows a divorced man’s obsession with his online girlfriend, only to discover that she has millions of other boyfriends. It’s a Turing test movie that fools us into thinking she’s real. It also introduces the interesting idea of sex surrogates – already a reality through VR. LINK Apart from being an excellent film, it addresses the idea that bots are coming and that we may find it difficult to distinguish between AI personas and the real. The web is already teeming with bots. You are quite likely to have been fooled already, as Twitter has tons of them. It also touches upon the idea that AI may transcend human capabilities and get bored by us, moving beyond the human into its own realm.
Chappie (2015) is a subtler RoboCop, that uses a law enforcement robot that shows a unique feature for AI movies. Its premise is that machine learning often relies on the need for eth AI to be trained. Chappie starts in a childlike state but is trained by some undesirables into becoming a streetwise gangster. It has other AI themes, such as AI being used to destroy other forms of AI, mind uploads, all set against the backdrop of fear about crime and the role of large corporations in control of such powerful tech.
Interstellar (2014) has two benign robots TARS and case, that do the legwork, a rare example of tech that simply works as robot assistants. What makes them interesting is their appearance, four jointed blocks, that unusually, are not anthropomorphic. Neither is the film dystopian in terms of technology.
Transcendence (2014) is a greatly underrated piece, with a range of interesting ideas around the idea that future terrorism may include an anti-AI group, We have always invented Gods and in this case, a supercomputer. It’s a post-internet AI movie that sees AI in terms of the internet, networks, viruses, nano-technology, uploading and hybrid humans. It deals with some of the moral issues around AI, in relation to future options – technological dystopia or will technology save us? An interesting hybrid between AI movie and love story.
Ex Machina (2015) comes from the phrase deus ex machina, meaning 'god from the machine'. This movie literally gets under the skin of AI and plays with the Turing test, pushing its limits. The test is to see what you communiccate with as a machine but still think of it as having human qualities, even being human. At the same time it explores the role of gender in AI. Ultimately it is about human frailty and the robot, Ava, leaves without showing gratitude or emotion to the person, Nathan, who helped her. This is a fine film, that plays with many contemporary themes in the philosophy and ethics of AI. Full of referennces to Wittgenstsin, who had lots to say about these issues in relation to the language we use, it is intellectually powerful, and sets aside special effects for ideas. It is the true Frankenstein movie in our age of algorithms.
Uncanny (2015) is another Turing test movie. An academic prodigy produces a robot indistinguishable from a human. A journalist is invited to write a story on the created Ai, Adam and relationships form. It has a studding twist. Film treatment of AI suddenly tackles the key issues of identity and consciousness.
Conclusion
The idea of a dystopian intelligence goes back to Descartes and his evil demon, the basic idea behind The Matrix. But most of us get our ideas about AI from the movies. When it comes to technology, art tends to err on the side of dystopia, but in the case of the movies, has sometimes pivoted towards a more benign or accepting perspective. When it does head for the Utopian, it's usually a bait and switch, for a later dystopian angle. 
There are several themes that have shaped the common perception of AI:
AI = Robots
AI will lead to robots that will turn on us and kill us all
AI will take over the internet and kill us all
AI will fool us into thinking it’s good but it’s bad
These have been the dominant themes. Yet throughout the last century in film, lots of avenues and issues have been explored, especially the political and ethical issues. We’ve had complex movies that really do explore issues, such as the Turing test, autonomy, networked intelligence, consciousness and emotion.

Sci-fi is a genre that is not as hidebound by the past as other genres and has, perhaps, more room to breath and create its own imagiative realities. These movies are by no means a definitive list. They just happen to be the one’s I watched, that I thought had some real value. Nevertheless, among these films are some of my favourite films and some are masterpieces. Nothing beats real research, deep reading, research and analysis when it comes to looking at the role of AI in the world but the movies are certainly the next best thing. I have found some of these films transformative experiences, really illuminating issues and informing the debate around AI. I hope you do also.

Tuesday, October 04, 2016

Amazon’s amazing algorithms – what can we learn from them?

When you use Amazon, you may not realise it, but that screen is actually a set of ‘tiles’ and what you see at any time (recently revamped) is finely tuned to your needs. What you don’t see, is what lies beneath the surface, a powerful AI engine that decides what you are seeing. This invisible hand not only determines what you see, it plays a role in what you do. It nudges you, in realtime, in one direction or another.
Amazon excel in making it easy to buy their product, they are also good at recommending what you buy and cross-selling other products. Their algorithms have been honed over many years taking inputs, such as what you’ve bought before, viewing history, repeat clicks, dwell time. your past search patterns, recently reviewed items, what’s in your cart, what site you were referred from, demographic data (where you live and what type of person you’re likely to be), user segmentation (if you bought books on photography, sell you cameras and accessories) and so on (Your Recently Viewed Items and Recommendations).
This is supplemented by aggregated data from other customers to produce differents sets of recommendations:

What Other Items Do Customers Buy After Viewing This Item?
Customers who bought this item also bought this’.
‘Customers who shopped for Equality and Partiality also shopped for…’
‘Recommended for You Based on…’
‘Customers also Bought these Highly-rated Items’
Aggregated data from other similar customers and so on to nudge you towards the ‘Frequently Bought Together’ technique or a range of related items in terms of brands, function, colour and size.  Best sellers are also pushed. They also recommend newer products, such as Kindle versions. Packages of products, such as item plus carrying case, are also pushed. Reductions on postage and discounts also boost sales. The bottom line is that this is a bottom line result, as you buy more. Their conversion rate from website recommendations is very high.
How do they do this?
They do all of this through their own collaborative filtering algorithm, that has the goal of increasing the average order price. Note that this may not be the ideal goal, as some customers may order more through lots of smaller orders, rather than the occasional large one. They do this through A/B testing (trying different things out and measuring the effects), data mining, affinity analysis and collaborative filtering. This is not easy. Algorithms are sensitive things and one technique may require too much data to be practical, take too long, or have odd (weird pricing) sparse or low quality outputs. Performance and scaling problems are big issues. You can reduce the data size by sampling or partitioning, by product or category, but this reduces the quality of the recommendation. It’s all about trade offs. Clustering into groups that are similar is another technique but difficult to scale. What Amazon actually does, is rely on item data i.e. the similarity or relationships between products, not just buyers. It looks for correlated or most popular items. This is called ‘item-to-item collaborative filtering’. This emphasis on item data means their recommendation engine is super fast.
Remember also, they are the biggest online retailer in the word, so they have the biggest data sets. This gives them a real market advantage as their algorithms have more to work with, can be tested on larger groups and use more aggregated data.
Human reviewers a problem?
One of the things that screws algorithms up is bad data. If the reviews are positive but they’ve been fixed by humans, that skews the recommendations. Publishers have been paying people to review by offering discount product, so Amazon has just banned incentivised reviews. In other words, slowly but surely, the human factor is being squeezed out and this is to our benefit.
Algorithmic bias?
One could argue that this is not in itself a good thing, as the algorithms are written by humans and may contain bias. I think this is a red herring. Compare this approach with the average bookstore employee. It outguns them. The algorithm is far less likely to contain bias on gender, race and social background, as it doesn’t make judgements on these. Neither will it have the vast array of cognitive biases that we humans all have. It is ruthlessly objective.
One thing that does screw up this ‘perfect’ market through algorithms is promotion. Amazon will promote products that they get a better margin on. You never know what the behind the scenes deal is with certain suppliers in terms of promotional intent and pricing. You may very well be getting recommendations based on their margins, than your preferences. On the whole, however, their prices tend to be better than physical retail outlets.
Serendipity lost?
Another argument could be that it eradicates serendipity – those chance encounters in bookshops where you find a gem. I have some sympathy with this view, but suspect that when you actually compare browsing in a bookshop with browsing online, that factor is exaggerated by the bookstore supporters (biased towards past behaviour, nostalgia and neophobia). The bottom line is that Amazon has a larger collection of books than any bookshop. Indeed, many small bookshops now survive on Amazon sales. Its recommendation engine also promotes the sort of ‘impulse’ buying you see in bookstores through last minute cart recommendations. Nevertheless, the stronger a recommendation engine becomes, one could argue, the narrower the browsing and buying behaviour, This is a trade off, a common problem when designing algorithms.
It learns
One final point, is that, with machine learning, these algorithms simply get better and better. They are learning from their own generated data and can adapt, sometimes on their own to improve. This is way smarter than any human approach to recommended sales. Remember also that Amazon is increasingly automating its distribution through AI, as people are replaced by robot pickers and loaders. Beyond this AI driven drones may well deliver to your doorstep.
What can we learn from this?
What do we have to learn about learning from all of this. First, that recommendation algorithms will certainly play an increasing role in the learning game. They already have. Google is arguably the number one technology used by learners. We use it to search for things we want to know. That is a fundamental piece of pedagogic technology that has revolutionised the learning process, whether you’re searching for knowledge, instruction on a process or skill on YouTube (owned by Google), or on Google Scholar for research. Beyond this we have tools that use AI to create learning content and experiences, in realtime, such as WildFire. Then we have adaptive learning systems that use AI to navigate learners through courses. On top of this there’s advances on online assessment through digital ID, face recognition and automated answer and essay marking. This is the one area, AI, where significant advances are being made, quickly. These advances promise to do what they’ve done for Amazon and others, offer a massively scalable solution to the problem of teaching and learning through realtime learning design, personalised recommendations, less linear teaching and better assessment. All of this, of course, driven by machine learning, which makes these systems learn as they go. The scalable online teacher is a fast learner that learns as it goes. It just gets better and better.
Above all
Above all, what we can learn from Amazon is that you, the learner, are a valued customer and that they tailor their service to your actual needs, in realtime. Without getting too angsty about the use of the word ‘customer’, which seems to trigger all sorts of people into surface criticism, what education badly needs is this approach to learning, not the blind, batch process we currently have. Let's not over-romantisie batched lectures to hundreds in raked lecture-hall or classrooms of 30+ kids struggling with the intricacies of maths or French. There's plenty of headroom for improvement here, and some of the techniques have already been put to the test over decades with proven efficacy in target groups of the tens and hundreds of millions.