A Guide to Learning Artificial Intelligence in Two Weeks

Jessica Lee
12 min readFeb 20, 2018

--

This article is the second in the series on learning in two week sprints.

In this sprint, I delved into the vast field of artificial intelligence. The bullet points and links I list are resources that I found to be the most useful while completing my sprint. It is not meant to be an exhaustive list as that would be nearly impossible, but I hope that it can serve as a guide for you to potentially complete a similar sprint on artificial intelligence.

Part I focuses on the detailed process of the sprint while Part II focuses on my specific learnings.

The first overview article for why I completed a series of sprints can be read here.

Part I

Why artificial intelligence?

Over the past few years, I’ve heard numerous organizations say that they are applying “machine learning” (ML) and artificial intelligence (AI) to their products to stay innovative. But what does this actually entail? One of the reasons why I delved more into this topic was to move past those buzzwords. I wanted to focus on the deeper technical details while gaining a general understanding of the bigger picture. Additionally, I had the goal of assessing if this was an area that I could make a bigger commitment towards.

My framework for learning

My outline consisted of questions to answer, individuals and organizations to research or talk to, articles to read, videos to watch, events to attend, and a technical project to complete. I learn best when I’m working on a project, but the readings, videos, and events are important too since they give me foundational knowledge and perspective to begin the project.

First, I began writing out some of the questions to answer:

Bigger picture

  • What are the categories and top applications of AI?
  • How is AI currently being utilized in different organizations?
  • Where is the field headed in the next 5 years?
  • What does the day to day look like for someone who is a machine learning researcher?
  • What sort of background is most commonly found in this field? How easy is it to break into without a PhD?
  • How does the field of computational neuroscience relate?

Technical

  • What is a neural net composed of?
  • What are the different types of neural networks? What are their limitations?
  • What are the mathematical concepts to know in order to learn machine learning and deep learning?
  • How do I train a dataset? What kinds of datasets do I need?
  • What machine learning open source projects can I contribute to?

Individuals in artificial intelligence

Next, I outlined the individuals in the field to keep track of during the sprint. These were individuals that either have contributed to the field significantly or have written high quality content. I also had conversations with various friends in AI/ML roles.

  • Hod Lipson (Professor at Columbia and director of Creative Machines Lab)
  • Fei Fei Li (Stanford AI professor)
  • Andrew Ng (Stanford AI professor, Coursera co-founder, former Baidu Chief Scientist)
  • Yann LeCun (founding father of convolutional nets, director of Facebook AI Research)
  • Ian Goodfellow (Research Scientist at Google Brain)
  • Andrej Karpathy (Formerly at OpenAI, now Director of AI at Tesla)
  • Delip Rao (founder of Joostware, referenced in a16z)
  • Shivon Zilis (VC at Bloomberg Beta, written a lot on MI)
  • Sam DeBrule (voice of Machine Learnings)
  • Nathan Benaich (investor and AI technologist writer)
  • Siraj Raval (developer evangelist and Youtuber who makes AI education videos)

Key organizations

There are numerous organizations dedicated to artificial intelligence research, applications, ethics, etc. I’ve highlighted a few below:

  • Google Brain (deep learning AI research team at Google)
  • OpenAI (nonprofit dedicated to researching and creating safe general AI)
  • Machine Intelligence Research Institute (MIRI)
  • DeepMind (AI research company acquired by Google)
  • Future of Humanity Institute
  • Asimov Institute (check out their blog)
  • NYAI (NYC speaker series meet-up)

Potential projects to complete

There were a variety of potential projects to pursue in this two week timeframe. Each of the three below touches upon a different aspect of artificial intelligence.

  • Twitter sentiment analysis using Python utilizing natural language processing
  • Image classification AI utilizing computer vision
  • Handwriting recognition AI with Tensorflow library

I decided to work on implementing a handwriting recognition AI using Tensorflow and the MNIST handwritten digits dataset. MNIST has been called the “hello world” of deep learning and contains 60,000 images of handwritten digits to train a model.

With regards to image classification, I was also able to use the Clarifai API to easily train a neural net to recognize various objects, such as a plane, wing, or shirt. According to Crunchbase, Clarifai is “a startup that provides advanced image recognition systems for customers to detect near-duplicates and visual searches.” Their value add is that they abstract away much of the complexity that comes with building your own image classification models.

MNIST dataset sample from Savio Rajan

Articles, videos, and textbook

I’ve curated a list of articles and a textbook to parse through. There is an endless amount of information online, but I found the ones below to be the most insightful.

On the technical side, I spent about a week reading the first five chapters of a friend’s textbook, Fundamentals of Deep Learning. I found some parts difficult to grasp at first, and it wasn’t until I started reinforcing it with online videos and other instructional content that it began making more sense. Specifically, Siraj Raval’s Youtube videos were highly engaging to watch and easy to understand. It helps to have the content explained from different perspectives.

I had read the book Superintelligence before I started this sprint, but I also recommend it to get a sense of the potential dangers of artificial intelligence development.

Bigger picture articles

Technical articles and textbook

Videos

In-person classes and workshops

In addition to the firehose of online information, there are also in person classes and workshops to learn the technical details of machine learning. They usually require some coding background. Although the classes are expensive, I can see them being useful because you are surrounded by other engineers learning the same material and a teacher to guide you through the process in real time. I attended a free two hour workshop in San Francisco but haven’t attended any of the daylong ones. I also haven’t seen any classes yet outside of San Francisco.

  • Lukas Biewald’s technical introduction classes on machine learning in San Francisco. You can find the materials he uses for his classes here.
  • Andrew Ng announced a two day Bay Area Deep Learning School in 2016, but the website seems to have been deprecated. You can still watch the videos here.

If you are looking for online courses instead, below are a few options for different budgets. If you’re looking for mini courses that you can go through in a week or two, then I recommend Zenva’s courses.

  • Guide to Siraj Raval’s Youtube videos. His Youtube channel can be found here.
  • Deep learning nanodegree by Siraj Raval and Udacity
  • Artificial intelligence nanodegree by Udacity
  • Zenva’s Python and AI mini courses

Part II

The purpose of this section is to provide a shortened overview of what I learned in the two weeks after following the framework I outlined.

Terminology

To start off, it’d be helpful to know what some of the basic terminology means.

Artificial intelligence is a broad sub-field of computer science. According to the Oxford dictionary, it is “the theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages.”

There are two main categories of AI. Artificial narrow intelligence (ANI), or “weak AI,” is an AI system that can only specialize in one area, such as beating the best Go player in the world. This technology exists today in our smartphones, apps, etc.

Artificial general intelligence (AGI), or “strong AI,” is building systems that think and reason exactly like humans can. This doesn’t exist yet.

There is a third category of artificial intelligence, artificial superintelligence (ASI), that is described by Nick Bostrom in his book Superintelligence. This supersedes artificial general intelligence in that an ASI system, according to Bostrom, “is an intellect that is much smarter than the best human brains in practically every field, including scientific creativity, general wisdom, and social skills.”

There are several subdomains of research within weak AI:

  1. Machine learning
  2. Computer vision
  3. Natural language processing

Machine learning is an application of AI, and is used to implement aspects of computer vision, speech recognition, and natural language processing. It is based on learning from example with a set of data rather than giving a machine a set of rules to follow.

Deep learning is an extension of machine learning that takes advantage of the more powerful computational power and larger datasets of today to create complex neural networks.

Computer vision has the goal of mimicking human visual capabilities, processing and identifying images and producing appropriate output.

Natural language processing (NLP) is the area of computers understanding, interpreting, and manipulating human language.

Startups and trends

There are numerous startups applying machine learning and deep learning algorithms to their products. I’ve highlighted a few below.

There are self-driving trucks and cars, but what about other transportation systems? To protect security and SWAT teams, Shield.ai is building a drone that will enter an unknown building to map it out first so that the SWAT team can minimize danger to themselves. Zipline is a company that uses drone technologies to deliver blood safely in Rwanda.

In the word of computer vision, image classification is becoming increasingly accurate with the advent of more complex neural networks. Competitions such as the prestigious ImageNet have teams compete to see which can produce the highest accuracy. Companies such as Pinterest has a feature to allow you to use your own camera to create input from, say, your house. Pinterest will then classify the images in real time and suggest similar products. In agriculture, Blue River Technologies uses cameras mounted on tractors to take pictures of lettuce to determine the precise amount of fertilizer to apply to each lettuce head.

Robotics companies such as Knightscope and Cobalt Robotics are creating security guard robots to monitor buildings. Orchard Supply Hardware, based in San Jose, uses a robot called Oshbot to guide customers to the item that they are seeking in the store.

Reading about the technologies built to predict the future excited me the most. In healthcare, companies such as Freenome is working on diagnosing cancer more inexpensively and quickly through reading DNA that free floats in your bloodstream. This is much quicker than doing a tissue biopsy to send to a lab to analyze. In the media space, Buzzfeed has built a tool that will predict whether or not a video that’s performing well in one country will also gain traction in another. UnifyID aims to not have users need to type in a password and instead use how you swipe, type, etc. to recognize you automatically for authentication. You can watch a video of their demo here.

When it comes to natural language processing, artificial intelligence has made some exciting progress as well. In trial law, Everlaw is working to more efficiently pore over large numbers of documents during the discovery process by automatically categorizing documents for attorneys to review. The Google Inbox team’s smart responses feature now powers 10% of all mobile email responses.

Photo of the Oshbot store robot from Fellow Robots

Tensorflow

There are several well known libraries that engineers use for machine learning: Tensorflow by Google, Keras, Caffe, Scikit-learn, Theano, and Torch. I decided to try Tensorflow because of the large number of resources I found on it and its popularity with engineers. Additionally, I was able to find tutorials on how to implement the handwriting recognition tool using Tensorflow.

Tensorflow was released in late 2015 as a deep learning open source project to great fanfare. The name Tensorflow came from how it completes computations, which are done on data flow graphs. The nodes of the graphs are mathematical computations, while the edges are the data, which are represented by multidimensional data arrays, or “tensors.”

With the help of a Zenva Tensorflow tutorial and some debugging, I was able to train a model to recognize handwritten digits. The graph below shows the increase in accuracy over time as the neural network model is trained on more data.

Changes in accuracy of Tensorflow neural network model

Theoretical technical learnings

There are several similarities in AI to neuroscience. Parts of AI are inspired from the biological brain. For example, the fundamental unit of a model, a perceptron, is inspired from a biological neuron and translated into its mathematical expression. Perceptrons constitute a neural network, and neural network models are trained to provide an output. Neural network models are created in order to teach a machine how to learn from example.

A neural network consists of various layers of n depth. A basic network has an input layer and an output learning, but deep learning models can have many hidden layers in between the input and output layers.

A perceptron takes in several inputs, denoted as x, as well as weights, w, and is modeled as the sum of all (x * w) + b, which b is known as the bias. The bias is a quantity that is tweaked and added to the model to get to the proper output.

An activation function g is applied to this weighted sum to produce an output. The most commonly used activation function is ReLU, but there is also tanh and sigmoid and others (I didn’t delve into the details of their composition). The output is then passed onto another perceptron that is one layer deeper.

We minimize our error and maximize accuracy by training a neural network. This is done by utilizing a math concept known as gradient descent. We measure the error with a cost function, and we reduce it by minimizing the function. The idea behind gradient descent is changing the cost function with partial derivatives to attribute changes in cost function changes in a particular weight or bias. We can then update those accordingly to get a more desired output.

Backpropagation of errors is measuring exactly how much gradient descent is changing, this rate of change. It works due to the chain rule of partial derivatives. We take the error that we find at the end for the output and propagate that error backwards through the neural network. It might be easier to look in the visual notes to see this visually.

NYAI meetup

During the sprint, I also attended a New York Artificial Intelligence (NYAI) meet-up where I listened to Hod Lipson of Columbia University speak about his work on soft robots. He directs the Creative Machines Lab, which is “interested in robots that create and are creative. [They] explore novel autonomous systems that can design and make other machines automatically.” His TED talk on self-aware machines is one of the most viewed TED videos on AI.

He gave a technical talk about his latest projects around the topic of discovering whether or not machines can discover scientific laws automatically from data. It’s a lab whose work I’ll continue to follow.

Next steps

After two weeks, I gained a better grasp on some concepts in AI, but since it is a vast field, I also felt like I had barely scratched the surface. Overall, it was thoroughly enjoyable to deep dive into the details of artificial intelligence and build a mini project. I’ve learned that artificial intelligence can be a powerful tool, and I would like to continue to apply these learnings in various capacities, whether it’s through open source contributions, meet ups, or a more formal role.

--

--