> ML SERIES :: 01 what is AI & ML

Page 01 of 14 · Foundations

What is AI, and where does machine learning fit?

For most of computing history, a person wrote every rule a program followed. Machine learning flips that around: you give the computer examples, and it works out the rules for itself.

traditional programming
rules+data→answers

You write if subject contains "FREE" then spam. Spammers write "FR3E" and your rule breaks.

machine learning
data+answers→rules

You give it 50,000 emails already marked spam or not spam. It finds the patterns, including ones you never thought to look for.

The learned "rules" are called a model. Once trained, the model answers new questions it has never seen.

Model: a mathematical function with adjustable numbers (parameters) inside it. Training tunes those numbers until the function's outputs match the known answers as closely as possible.

AI, ML, and deep learning are nested

Select a ring to see what belongs inside it.

People use these three terms as if they mean the same thing. They don't. Each one is a subset of the one around it, so all deep learning is machine learning, and all machine learning is AI, but not the other way around.

Artificial intelligence search & planning expert systems Machine learning linear regression k-means Deep learning CNNs · RNNs transformers · LLMs

Words you will see on every page

Select a term to see its definition.

Most of this course fits in one line of notation. A model f with parameters θ takes features x and predicts a label:

ŷ=fθ(x)

Read it as "y-hat equals f of x." The hat means "predicted," so ŷ is the model's guess and y is the true answer. Training adjusts θ to shrink the gap between them.

Three ways a machine can learn

Machine learning splits by what kind of feedback the model gets during training.

supervised

Every example comes with the right answer (a label). The model learns to predict the label. Predicting a number is regression; predicting a category is classification.

unsupervised

No labels at all. The model looks for structure on its own, such as groups of similar items or points that don't fit anywhere.

reinforcement

An agent takes actions and gets a reward or penalty. Over many tries it learns which actions pay off.

Which kind of learning?

Read each scenario and choose the type of learning it describes.

How we got here

AI is older than most people think. The ideas behind today's neural networks date to the 1950s; what changed recently is the amount of data and computing power available to train them.

1950Alan Turing asks "Can machines think?" and proposes the imitation game.
1956The Dartmouth workshop gives the field the name "artificial intelligence."
1958Frank Rosenblatt's perceptron, a single artificial neuron that learns from examples. You will build one on page 11.
1970s–80s"AI winters" as funding dries up; hand-built expert systems have a commercial run.
1986Rumelhart, Hinton, and Williams popularize backpropagation for training multi-layer networks.
1997IBM's Deep Blue defeats chess champion Garry Kasparov.
2012AlexNet, a convolutional network, wins the ImageNet challenge by a wide margin and sets off the deep learning boom (page 12).
2017"Attention Is All You Need" introduces the transformer (page 13).
2022ChatGPT brings large language models to the general public.

Why this matters in cybersecurity

Machine learning already sits inside many of the tools you will use: spam and phishing filters, intrusion detection systems that flag unusual traffic, malware classifiers, and fraud detection on payment networks. Attackers use it too, to write convincing phishing messages and to find weaknesses faster.

Keep in mind: a model is only as good as its data. If an attacker can influence the training data or craft inputs the model has never seen, the model can be fooled. Page 14 shows how.