AI for everyone

AI for everyone

This is a summary of the course AI For Everyone by Andrew Ng, an entrepreneur, computer scientist, and professor at Stanford University.

It is designed for anyone who's interested in acquiring a basic understanding of Artificial Intelligence (AI) and what it can or cannot do. It also provides an overview of and some advice on how to approach AI projects.

Week 1

What is AI?

AI basically refers to the simulation of human intelligence.

We can further distinguish between

  • ANI (artificial narrow intelligence) - only does one task, e.g. smart speaker, self-driving car, web search. There has been a lot of advancement in this area in recent years.

  • AGI (artificial general intelligence) - can do anything humans can do. There has been almost no progress in this area, and there probably won't be for decades, or even centuries.

Machine Learning (ML) is a subset of AI, and deep learning is a subset of ML. Technically, deep learning employs several layers of neural networks, but the two terms are often used interchangeably. Neural networks consist of input, output and a hidden layer in between. That means, you only need to figure out the input and the output and everything in between is handled by itself.

  • Supervised Learning is the most common form of ML. It maps labelled input to output. Examples include spam filtering where emails are the input and the output is the categorisation of whether or not it is spam.

Data Science (DS) can be viewed as a cross-cutting subset of all these tools. Unlike ML, it is used to drive business insights from data and does not result in a running AI system. However, the terms DS and ML are not used consistently.

This is an illustration of the previous explanation of the difference between AI, ML, DL/NN and Data Science. You can see four circles. Three of them are stacked. One says AI. Inside AI, there is a circle that says ML. Inside the ML circle there is one that says DL/NN. The DS circle touches all of them, but is outside the AI circle.

How do you acquire and use data for ML?

To do any form of ML, you need a dataset. You can download it from websites, acquire it through partnerships, observe behaviours in an existing dataset, or manually label data.

The two most common mistakes companies make when it comes to data is

  1. Spending too much time collecting data before talking to the AI team

  2. Assuming that more data is always better

Andrew suggests that IT departments provide AI teams with data early on to receive feedback that can guide the development of the IT infrastructure. For example, the AI team might suggest that a factory collects data every minute instead of every 10 minutes, so as to build a preventative maintenance system.

If the data is messy, the output will be too. Common data problems include incorrect labels, missing values, and multiple types of data, e.g. images, audio and text. The latter is also called unstructured data. Data that lives in a spreadsheet is called structured data.

What can ML do?

As a simple rule of thumb, anything you can do with one second of thought can probably now or soon be automated. Examples include speech to text conversion and the visual inspection of defects.

What it cannot do is analyse a market and write a 50-page report or empathise with people.

However, the rules for what ML can or cannot do are not hard and fast. Sometimes engineering teams have to conduct a deep technical due diligence for a few weeks to see if something is feasible or not.

What makes ML easier is a "simple" concept and lots of available data.


Week 2

How do you build AI projects?

ML algorithms can learn input to output or A to B mappings.

The key steps of an ML project are:

  1. Collecting data (e.g. samples of people talking for a smart speaker)

  2. Training the model, which requires iterations until it is good enough

  3. Deploying the model (e.g. putting the model in a smart speaker and shipping it)

After deploying the model, you will collect new data, which can then be used to maintain or update the model.

The key steps of a DS project are:

  1. Collecting data

  2. Analysing the data with iterations to get good insights

  3. Suggesting hypotheses or actions

Once the changes are deployed, new data is re-analysed periodically.

How do you choose an AI project?

Ideally, you select a project at the intersection of what AI can do and what is valuable for the business. This usually involves a cross-functional team of AI experts and domain experts that conduct due diligence.

The technical diligence involves questions such as

  • Can an AI system meet the desired performance?

  • How much data is needed? (depends on the problem)

  • What is the engineering timeline?

The business diligence involves questions such as

  • How can costs be lowered or revenue increased in the current business?

  • Does it make sense to launch a new product or business?

Andrew also recommends conducting ethical diligence, as some projects make sense from a business perspective, but are not good for society.

A brainstorming framework that has been effective in the past focuses on

  • Automating tasks rather than automating jobs

  • The main drivers of business value

  • The main pain points of the business

When do you build or buy AI?

While ML projects can be in-house or outsourced, DS projects are commonly done in-house, as it often requires deep day-to-day knowledge of the business.

A general rule of thumb is to buy things that will be industry standard, and to build things that are specialised to you and allow you to gain a defensible advantage. This is because industry standards will eventually catch up and be built anyways.

How do you work with an AI team?

To work with an AI team, you need to

  1. Specify an acceptance criteria (e.g. 95% accuracy)

  2. Provide AI teams a dataset on which to measure the performance

Since the amount of data required depends on the problem, you should ask your technical team how much data is needed. AI teams distinguish between a training set that is used to teach the model, and one or more test sets to check the existing model and its accuracy.

A pitfall to avoid is to expect 100% accuracy, as there are limitations to ML. Problems include insufficient data, mislabeled data, or ambiguous labels. Some of these can be ameliorated, some can't.


Week 3

What makes an AI company?

Not every company that uses AI can be called an AI company. Based on Andrew's definition, AI companies engage in strategic data acquisition. They actively think about how to acquire the data, and might even launch products solely for that purpose. They also invest in a unified data warehouse, apply automation pervasively, and have new roles such as ML engineers and new ways of dividing tasks among team members.

What are some common roles in a large AI team?

  • AI Product Managers and traditional Software Engineers

  • ML Engineers that train and review the model

  • ML Researchers that keep up with literature and sometimes publish

  • Applied ML Scientists that are between an ML Engineer and Researcher

  • Data Scientists that usually provides business insights from data

  • Data Engineers who help organise data and ensure it is saved in an easily accessible, secure and cost-effective way

How can you help your company become good at AI?

Based on his experience leading AI teams, Andrew has developed an AI Transformation Playbook to help companies on this journey.

Andrew suggests the following steps for a company to become good at AI:

  1. Execute pilot projects to gain momentum: start with an initial project that can succeed and show traction within 6–12 months. It doesn't have to be the most valuable and can be built in-house or outsourced.

  2. Build an in-house AI team: create a centralised AI team and have members work across business units, so they can develop interesting AI projects together. They could also develop company-wide platforms that can help multiple business units. The new AI function can be under the CTO, CIO, CDO, or a new CAIO.

  3. Provide broad AI training: not just to engineers, but also managers, division leaders, and executives to learn how to think about AI.

  4. Develop an AI strategy: this is not the first step, as companies who define the strategy before trying out AI tend to end up with very academic strategies. The goal is to leverage AI to create an advantage specific to the sector. Ideally, the strategy is aligned with the "virtuous cycle of AI". This means that better products lead to more users and more data, which is used to improve the model and product, and creates defensibility over time. Andrew also suggests creating a data strategy and taking into account network effects and platform advantages.

  5. Develop internal and external communications: this includes investor relations, government relations, user education, recruitment, and internal communication around the use of AI and potential worries.

What are some common pitfalls to avoid?

Some common pitfalls include:

  • Expecting AI to solve everything: instead, be realistic about the limitations of technology, data and engineering resources.

  • Hiring 2–3 ML engineers and rely on them for use cases: instead, pair engineering talent with business talent to work cross-functionally to find feasible and valuable projects.

  • Expecting the AI project to work the first time: instead, plan for the development process to be an iterative one.

  • Expecting traditional planning processes to apply without changes: instead, work with an AI team to establish a process.

  • Thinking you need superstar AI engineers to start: instead, keep building the team, but start with the one you have.

What are some common AI application areas and techniques?

Major application areas include Computer Vision, Natural Language Processing, Robotics and General ML with structured and unstructured data. Since structured data tends to be more specific to a single company, the media tends to cover AI progress in unstructured data (images, audio, text) more. But both are creating tremendous economic value today.

Major AI techniques include Unsupervised Learning, Transfer Learning, Reinforcement Learning, Generative Adversarial Networks (GANs), and Knowledge Graphs.


Week 4

What are some social and ethical implications of AI?

Andrew rightly points out that the topic of AI and Ethics could be a standalone course. Many of these topics can be discussed in great depth. This is just a quick overview of some considerations and concerns:

  • Hype around AI: when discussing AI, there are usually some people who are overly optimistic and believe in superintelligent AI and others who are too pessimistic and think an AI winter is coming. Truth is that AI cannot do everything but it will transform industries.

  • Performance imitations and explainability: apart from the limitations mentioned earlier (e.g. lack of data), the explainability of some high-performing AI systems is still work in progress.

  • Discrimination and biases: AI is biased through the data it receives. Some AI tools apply unhealthy stereotypes and discriminate against groups of people. For example, some hiring tools discriminate against women and some facial recognition software work better for light-skinned than dark-skinned people. There are some technical solutions to this such as using more inclusive data. Some companies have also started introducing auditing processes and focusing on creating more diverse teams to address this.

  • Adversarial attacks: since AI works differently from humans, almost imperceptible changes to images and other data can confuse the model. This can lead to false results and other undesired effects. Even something as simple as drawing graffiti on a stop sign can lead to it no longer being recognised by AI. There are some defences, but they incur some costs, and we might end up in an arms race to build them.

  • Adverse uses: some people are using DeepFakes, AI-generated images or videos, and fake comments for malicious purposes, and some governments are using AI for oppressive surveillance.

  • AI and developing countries: the question is how to ensure that AI creates wealth and uplifts all countries. Some suggestions include contributing to AI communities, focusing on AI to strengthen a country's vertical industries, public-private partnerships to accelerate development, and investment in education. This is because AI is still so immature, which provides plenty of opportunity for new learnings and effective leadership.

  • AI and jobs: a McKinsey report estimates that 400–800 million jobs will be displaced and 555–890 million created by 2030. The question is how to navigate the impact of AI on jobs. Some suggestions include introducing a conditional basic income that incentivises learning, building a lifelong learning society, and exploring further political solutions. In response to the question of whether or not to switch jobs, Andrew suggests learning and applying AI on top of one's existing expertise to make oneself more uniquely qualified to do valuable work.


And that's it. A summary of Andrew Ng's course AI For Everyone. I hope you learnt a thing or two, and that you will continue learning about AI. I certainly will. I wish you happy learning! ✨

Cover image by Possessed Photography on Unsplash

Did you find this article valuable?

Support J.H. by becoming a sponsor. Any amount is appreciated!