AI Everything

These days it seems like businesses are trying to use AI to do everything. At least for startups, that isn’t far off. Anywhere there is a dataset remotely large enough and an answer that is vaguely definable, companies are putting together a business model to use machine learning to solve the problem. With some incredible successes in areas like image classification and defeating humans at video games, its hard not to be impressed.

One of the best channels for following recent breakthroughs in AI is the 2 Minute Papers YouTube Channel, started by Károly Zsolnai-Fehér, a professor at the Vienna University of Technology in Austria. Károly’s videos combine interesting clips of the programs in action with well-delivered summaries of recent papers illustrating advances in artificial intelligence.

In one of his latest videos, he covers an AI that not only can copy the most successful actions that humans take in video games but can actually improve on those actions to be better than the best human players. So does that mean that AI will be displacing office workers once it learns how to do their jobs better than them? Probably, yes. But maybe not quite how you think it might.

As much of a ‘black-box‘ as AI has been in the past, modern systems are becoming better and better at explaining how they arrived at an answer. This gives human operators predictive capabilities that we didn’t have with systems of the past that could spit out an answer but gave us no indication of how that answer was formulated.

This Forbes article on Human-Centric AI provides some examples of how modern AI systems can be implemented to train employees to do their jobs better and even enjoy their jobs more while doing it! If that doesn’t sound incredible to you, you may be a machine who is only reading this page to improve your search algorithm.

So what does this all mean? A lot of research is showing that AI is actually creating many more jobs than it destroys. So, as long as you’re willing to try and understand the systems that will one day be our overlords, you should be able to upgrade your career and stay employed.

Whether you still want the job that remains is another question entirely.

Turning Your Selfie Into a DaVinci

Transfer learning. It’s a branch of AI that allows for the style transfer from one image to another. It seems like a straightforward concept: take my selfie and make it look like a Michelangelo painting. However, it is a fairly recent innovation in Deep Neural Networks that has allowed us to separate the content of an image from its style. And in doing so, to combine multiple images in ways that were previously impossible. For example, taking a long-dead artist’s style and applying it to your weekend selfie.

Just to prove that this is pretty cool, I’m going to take my newly built style transfer algorithm and apply it to a ‘selfie’ of my good dog, Lawrence. Here’s the original:

And here’s the image that I’m going to apply the style of:

That’s right, it’s Davinci’s Mona Lisa, one of the most iconic paintings of all time. I’m going to use machine learning to apply Davinci’s characteristic style to my iPhone X photo of my, admittedly very handsome, pupper.

If you’re interested, here’s a link to the original paper describing how to use Convolutional Neural Networks or CNNs to accomplish image style transfer. It’s written in relatively understandable language for such a technical paper so I do recommend you check it out, given you’re already reading a fairly technical blog.

So what is image content and style and how can we separate out the two? Well, neural networks are built in many layers, and the way it works out, some of the layers end up being responsible for detecting shapes and lines, as well as the arrangement of objects. These layers are responsible for understanding the ‘content’ of an image. Other layers, further down in the network are responsible for the style, colors and textures

Here’s the final result next to the original.

Pretty striking, if I do say so myself.

Using a pre-trained Neural Network called VGG19 and a few lines of my own code to pull the figures and what’s called a Gram Matrix I choose my style weights (how much I want each layer to apply). Then using a simple loss function to push us in the right direction we apply the usual gradient descent algorithm and poof. Lawrence is forever immortalized as a Davinci masterpiece.

Impressed? Not Impressed? Let me know in the comments below. If you have anything to add, or you think I could do better please chime in! This is a learning process for me and I’m just excited to share my newfound knowledge.

Here’s a link to my code in a Google Colab Notebook if you want to try it out for yourself!

How Data Will Be Used To Decide Your Future

Welcome to 2019! Let’s start the year off by discussing how your ability to exercise your free will could be directly impacted by who you follow on social media, or who you pass by on the street.

In the dystopian Netflix series Black Mirror, there is an episode called Nosedive where a person’s ability to ride a plane, work at their job or even be served food at a restaurant is decided by a crowd-sourced rating system. Much like you rate your Uber driver at the end of your trip (and your Uber driver rates you), in this episode, every social interaction is followed by both parties giving each other a star-rating with an app on their phone. Everyone’s rating is public and it seems like you can downvote someone at any time. People with higher overall scores have more influence on the scores of people that they interact with. Inevitably, the episode’s main character encounters a string of bad luck and unfortunate encounters that lead to her score tumbling to almost nothing. She ends up losing her job, her home and her ability to travel in a matter of days based on nothing more than a few left swipes from some strangers and a co-worker.

Image result for black mirror rating episode

Everyone has bad days, so it really hits home when you see the protagonist lose her life over a few social mishaps. She doesn’t actually die, but she is locked in a plastic box because of her low social score.

How far are we from experiencing this kind of scenario in our lives?

The Chinese government has announced plans to implement a Social Credit Score for its citizens, that tracks all online and in-person activity, including who your friends are, who you talk to and who your acquaintances talk to. This score will decide if you can get a loan on a house, similar to a credit score in the United States or Canada, but it will also decide what schools you can go to, what businesses you can shop at and even whether or not you can leave the country. Going live in 2020, literally next year, all 1.6 billion Chinese residents will be subject to this Social Credit System; a system that is eerily similar to the one described in the Black Mirror episode.

I live in North America. Calgary, Alberta, Canada, specifically, so this won’t affect me, right?

All around the world, people have free and easy access to instant global communication networks, the wealth of human knowledge at their fingertips, up-to-the-minute information from across the earth, and unlimited usage of the most remarkable software and technology, built by private companies, paid for by adverts. That was the deal that we made. Free technology in return for your data and the ability to use it to influence and profit from you. The best and worst of capitalism in one simple swap. We might decide we’re happy with that deal. And that’s perfectly fine. But if we do, it’s important to be aware of the dangers of collecting this data in the first place. We need to consider where these datasets could lead – even beyond the issues of privacy and the potential to undermine democracy (as if they weren’t bad enough). There is another twist in this dystopian tale. An application for these rich, interconnected datasets that belongs in the popular Netflix show Black Mirror, but exists in reality. It’s known as Sesame Credit, a citizen scoring system used by the Chinese government. Imagine every piece of information that a data broker might have on you collapsed down into a single score. Everything goes into it. Your credit history, your mobile phone number, your address – the usual stuff. But all your day-to-day behaviour, too. Your social media posts, the data from your ride-hailing app, even records from your online matchmaking service. The result is a single number between 350 and 950 points. Sesame Credit doesn’t disclose the details of its ‘complex’ scoring algorithm. But Li Yingyun, the company’s technology director, did share some examples of what might be inferred from its results in an interview with the Beijing-based Caixin Media. ‘Someone who plays video games for ten hours a day, for example, would be considered an idle person. Someone who frequently buys diapers would be considered as probably a parent, who on balance is more likely to have a sense of responsibility.’ If you’re Chinese, these scores matter. If your rating is over 600 points, you can take out a special credit card. Above 666 and you’ll be rewarded with a higher credit limit. Those with scores above 650 can hire a car without a deposit and use a VIP lane at Beijing airport. Anyone over 750 can apply for a fast-tracked visa to Europe. It’s all fun and games now while the scheme is voluntary. But when the citizen scoring system becomes mandatory in 2020, people with low scores stand to feel the repercussions in every aspect of their lives. The government’s own document on the system outlines examples of punishments that could be meted out to anyone deemed disobedient: ‘Restrictions on leaving the borders, restrictions on the purchase of . . . property, travelling on aircraft, on tourism and holidays or staying in star-ranked hotels.’ It also warns that in the case of ‘gravely trust breaking subjects’ it will ‘guide commercial banks . . . to limit their provision of loans, sales insurance and other such services’. Loyalty is praised. Breaking trust is punished.

Fry, Hannah. Hello World: Being Human in the Age of Algorithms (pp. 44-46). W. W. Norton & Company. Kindle Edition.

Science fiction mirrors reality and reality reflects science fiction. While this type of system is only going live in China, it is unclear how long we have before something similar arrives in the West.