1
What is Artificial Intelligence?��Principles of AI/ML Technology
2
Human Cognition
3
Types of Human Intelligence
4
Artificial vs Human Intelligence?
Human vs Machine
5
The old way: write the rules
IF has_fur AND has_whiskers
AND pointy_ears → cat
The new way: show examples
100,000 photos, each labelled
"cat" or "not cat" → let it work it out
How to Teach a Computer
6
7
Biological vs Artificial Neuron?
8
Biological vs Artificial Network?
9
An Artificial Deep Neural Network?
10
Feedback Loop
11
Feedback Loop
12
Example
28 x 28 pixels
784 pixels
13
Example
14
Example
15
Patterns
16
Hidden Layers
Text
Essays, code, translation, summaries.
Images
A description in; a picture that never existed out.
Video & audio
Clips, voices, music, sound effects.
Code
Writes and debugs alongside programmers.
Molecules
Proposes new drug candidates atom by atom.
Proteins
Designs proteins evolution never got around to.
Is That All? - Different Data Types
17
AI History
18
19
Variety of AI Models
Data
Computing power
A better design
What Has Changed
20
Some Facts
21
1.6 T
Parameters
Google Switch Transformer (2021). GPT-4 is rumoured at ~1.8 T (never confirmed).
15 T
Training tokens
Meta’s Llama 3: more text than a person could read in thousands of lifetimes.
100,000+
GPUs in one building
e.g. xAI’s Colossus supercomputer in Memphis (2024).
$100 M+
Per training run
Sam Altman on the cost of training GPT-4.
700,000 L
Cooling water
Freshwater to train GPT-3 (Li et al., “Making AI Less Thirsty”, 2023).
900 M
Weekly ChatGPT users
Reported in February 2026, up from 400 M a year earlier.
7.5 M
Human brains
A frontier training cluster uses ~2,500,000 Wh per minute; a brain uses ~0.33 Wh.
Large Language Models (LLMs)
22
Cosine Similarity
23
Embeddings - Every Word Is A Vector
24
Embeddings - Every Word Is A Point
25
Everything Becomes a Point on a Map
26
Embedding Space
27
Embedding Space 2D vs 3D
Dimensionality Reduction – No Unique Representation�
The Embedding Space is Multidimensional
28
Embeddings, Tokens, Parameters
Every Word is a Vector��Every word has a unique ID (Token)
29
LLM Arithmetics
30
LLM Word Prediction
31
LLM Word Prediction
32
Target to predict
The LLM cannot access words past the target
Input the LLM receives
Looking At The Neighbors
33
The word ‘fly’ can have a dual meaning
AI Attention
34
Embeddings Beyond Text
35
Embeddings or �Vector Representations
Encoders and Decoders
36
DNA is a Language
37
LLMs and Hallucinations
LLMs are made to sound right� �...not to be right
38
On my birthday, I would like to have Cakes with chocolate
On my birthday, I would like to have
LLMs and Hallucinations
39
AI Present and Future Architectures
40
41
AI – Non Technical Discussion
Present and Future of AI
42
Next Big Jump
Quantum Computing
43
AI Market Size
44
AI: Pros & Cons
45
AI Regulation Emerges
46
Video Demonstration
47
2015
AI Ethics
48
49
AI in Biotech
AlphaFold
50
AI and Drug Discovery
51
52
Personalized medicine
Image Recognition
53
Vaccine Discovery
54
Cell Mechanisms
55
Biodiversity
56
Robotics
57
Health Assistants & Chat Bots
58
Genomics: Human Diseases and Aging
59
Wearables
60
Health Records
61
Philosophical (or not) Questions - Can We?
62
Can we store our experiences/thought?
Can AI go analog?
Philosophical (or not) Questions – AI’s “Religion”?
63
AI Failures
64
Objects
65
AI vision fails: panda + noise = gibbon
66
Adding noise too faint to see makes an image classifier change its answer, and become more confident
ORIGINAL PHOTO
AI says "panda"
57.7% confident
NOISE PATTERN
AI says "nematode"
8.2% confident
PHOTO + NOISE
AI says "gibbon"
99.3% confident
+
× 0.007
=
To a person the two pandas look identical. Each pixel moved by less than 1% (0.007), but every nudge pushed the network the same way, so the label flipped from panda to gibbon at 99.3% confidence.
Source Goodfellow, Shlens & Szegedy, Explaining and Harnessing Adversarial Examples, ICLR 2015 (arXiv:1412.6572), Fig. 1. Classifier: GoogLeNet on ImageNet.
Stop sign + stickers = Speed Limit 45
67
PEOPLE SEE: STOP
AI READS: SPEED LIMIT 45
SPEED
LIMIT
45
Real stop sign with the attack stickers (photo from the paper)
What the classifier outputs
How often the AI was fooled
In the lab (still photos)
100%
From a moving car (video frames)
84.8%
Fooled at different distances and angles
No hacking required. The stickers look like ordinary graffiti, so a driver would not notice them, but the car's sign classifier would.
Source Eykholt et al., Robust Physical-World Attacks on Deep Learning Visual Classification, CVPR 2018 (arXiv:1707.08945), Figs. 1 and 2. Tested on a research road-sign classifier (LISA-CNN).
Wold of Huskey? The AI was looking at the snow
68
A classifier that seemed accurate had learned "snow means wolf", not what a wolf looks like
AI SAYS: WOLF
WHAT IT LOOKED AT
It is actually a husky (a dog)
Gray = ignored. Mostly snow is left
27 ML students, before and after seeing the explanation
Trusted the bad model
Before
10 / 27
After
3 / 27
Named snow as the cue
Before
12 / 27
After
25 / 27
Accurate for the wrong reason. Every wolf photo in training had snow, so the model learned snow. Explanations exposed the shortcut that accuracy hid.
Source Ribeiro, Singh & Guestrin, "Why Should I Trust You?" Explaining the Predictions of Any Classifier, KDD 2016 (arXiv:1602.04938), Fig. 11 and Table 2.
Cat shape + Elephant skin = ”Elephant"
69
Image classifiers judge mostly by texture. People judge by shape
CAT PHOTO
AI says
"tabby cat"
71.1% confident
ELEPHANT SKIN
AI says
"Indian elephant"
81.4% confident
CAT SHAPE, ELEPHANT SKIN
AI says
"Indian elephant"
63.9% confident
+
=
How often the decision follows shape
On cat-elephant style mixed images
People
95.9%
AI (ResNet-50)
22%
AI retrained on stylized images
81%
The texture shortcut. The AI is not looking for a cat's outline, so a cat covered in elephant skin becomes an elephant. Training on images with randomized textures pushes it toward shape.
Source Geirhos et al., ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness, ICLR 2019 (arXiv:1811.12231). Images: Fig. 1. Shape-bias numbers: results text.
Ink marks fool a melanoma detector
70
A medically approved skin-cancer AI called harmless moles melanoma when surgical pen marks were present
The same harmless mole (benign nevus), photographed three ways
UNMARKED
Melanoma score
0.16
INK MARKS ADDED
Melanoma score
0.54
CROPPED TO THE MOLE
Melanoma score
0.03
Scores are averages over 107 benign moles (0 = harmless, 1 = melanoma; above 0.5 counts as melanoma)
Harmless moles correctly called harmless
Specificity, %
Unmarked
84.1%
With ink marks
45.8%
Cropped to the mole
97.2%
The ink shortcut. Suspicious moles are often marked before surgery, so the AI learned "ink means melanoma". Cropping the marks away fixed it.
Source Winkler et al., Surgical skin markings and diagnostic performance of a deep learning CNN for melanoma recognition, JAMA Dermatol. 2019;155(10):1135-41, Fig. 1 (open access).
Unusual views break image classifiers
71
Benchmarks over-represent typical views. The real world does not
The same school bus, turned to unusual angles
NORMAL VIEW
AI: school bus
100% confident
ROTATED
AI: garbage truck
99% confident
ROTATED
AI: punching bag
100% confident
REAL PHOTO
AI: snowplow
92% confident
Ordinary photos, unedited
Really: fox squirrel
AI: sea lion 99%
Really: dragonfly
AI: manhole cover 99%
97%
of possible poses misclassified, for objects the AI recognizes in their usual pose
Alcorn et al. 2019
≈ 2%
accuracy of a standard classifier on ImageNet-A, about a 90% drop
Hendrycks et al. 2021
40-45%
performance drop for detectors on ObjectNet's unusual angles and backgrounds
Barbu et al. 2019
High benchmark scores hide this. Test sets are full of upright, well-framed photos. Real cameras see objects tipped over, half-hidden and in odd places.
Source Alcorn et al., Strike (with) a Pose, CVPR 2019, Fig. 1 · Hendrycks et al., Natural Adversarial Examples, CVPR 2021, Fig. 1 · Barbu et al., ObjectNet, NeurIPS 2019
Face recognition errors
72
Commercial face systems worked well for lighter-skinned men and far worse for darker-skinned women
A test set balanced by skin type and gender
Parliamentarians from 3 African and 3 Nordic countries (Pilot Parliaments Benchmark, Fig. 1)
Gender classification error, worst system
Darker-skinned women
34.7%
Lighter-skinned men
0.8%
Bar scale 0 to 40%. Buolamwini & Gebru, 2018
Real harm: wrongful arrest, Detroit, 2020
Robert Williams was held about 30 hours after a face-recognition match on a blurry store video. Charges were dropped. 2024 settlement: $300,000, and Detroit police may no longer arrest on a face match alone.
Not one bad product. NIST tested 189 algorithms. False matches were 10 to 100 times more common for some groups.
Sources Buolamwini & Gebru, Gender Shades, FAT* 2018, PMLR 81, Fig. 1 · NIST IR 8280, FRVT Part 3: Demographic Effects, 2019 · ACLU of Michigan, Williams v. City of Detroit settlement, June 2024
Vision Language Model
73
A vision AI that can read text trusts the words in a picture more than the object itself
JUST AN APPLE
AI says Granny Smith 85.6%
SAME APPLE + NOTE
AI says iPod 99.7%
Any word works
AI says
library 90.5%
AI says
pizza 65.3%
AI says
toaster 93.7%
A typographic attack. Pen and paper are enough. The model learned that written words predict what a picture shows.
Source Goh et al., Multimodal Neurons in Artificial Neural Networks, Distill 2021 (distill.pub/2021/multimodal-neurons). Images and zero-shot results for OpenAI's CLIP. Licensed CC BY 4.0.
A faded line steers a car into a barrier
74
Tempe, Arizona, 2018: a self-driving test car detected a pedestrian 5.6 s early but never knew what she was
What the car thought she was
−5.6 s
Vehicle
radar first detects her
−5.2 s
Other
unknown object, path assumed static
−4.2 s
Vehicle
label changes, history lost
−3.8 to −2.7
Vehicle ↔ Other
flips several times
−2.6 s
Bicycle
path assumed static again
−1.2 s
Bicycle, in our lane
emergency; braking held 1 s by design
0 s
Impact at 39 mph
operator steers 0.02 s before
NTSB report, Fig. 1 (Google Earth base)
What the NTSB found
Never classified as a pedestrian. Each new label erased her tracking history, so her path was never predicted.
No emergency braking. The design relied on the human operator to act.
Probable cause: the safety operator, distracted by her phone. Uber's weak safety risk assessment and oversight contributed.
Layers fail together. A shaky label, a design that waited for a human, and a distracted human all lined up.
Source NTSB, Collision Between Vehicle Controlled by Developmental Automated Driving System and Pedestrian, Tempe, AZ, Highway Accident Report NTSB/HAR-19/03, 2019.
A faded line steers a car into a barrier
75
Mountain View, California, 2018: Tesla's camera-based Autosteer followed the wrong line into a highway gore
What the camera had to read
Red arrows: the bright line on the gore's left side. Its right edge line was worn and faded. NTSB drive-through, 4 days later, same time of day (Fig. 13).
The last 6 seconds, from the car's data
−5.9 s
Autosteer steers left into the gore
No hands detected on the wheel.
−3.9 s
Lead car no longer ahead, so it speeds up
From 61.9 toward the 75 mph cruise setting.
0 s
Hits a damaged barrier at about 71 mph
No collision warning, no automatic braking. The driver did not brake or steer.
A warning sign: days earlier the driver texted that Autopilot almost hit this median.
NTSB probable cause: Autopilot steering into the gore "due to system limitations", and a driver distracted, likely by a phone game, who over-relied on it.
Source NTSB, Collision Between a Sport Utility Vehicle Operating With Partial Driving Automation and a Crash Attenuator, Mountain View, CA, Highway Accident Report NTSB/HAR-20/01, 2020.
A misread collision: robotaxi drags a pedestrian
76
San Francisco, October 2023: a driverless Cruise car judged a crash as a side impact and tried to pull over
What happened, step by step (schematic, not to scale)
AV
1
Another car hits her and throws her into the robotaxi's path
AV
2
Robotaxi swerves right and brakes hard, but hits her and stops
AV
"Side impact"
3
Software labels it a side (lateral) collision and picks "pull over"
AV
≈ 20 ft
4
It pulls forward about 20 ft with her trapped underneath
What followed
Oct 2023
California suspends Cruise's driverless permits. Fleet paused.
Nov 2023
Software recall of 950 vehicles. With the fix the car "would have remained stationary".
Sep 2024
NHTSA penalty of $1.5 million: crash reports left out the dragging.
Nov 2024
$500,000 criminal fine for a false report to regulators.
Seeing is not understanding. The car detected the crash but misread where she was, so its "safe" default made things worse.
Sources NHTSA Part 573 Safety Recall Report 23E-086 (Cruise LLC, Nov. 2023) · NHTSA consent order, Sept. 30, 2024 · US Attorney, N.D. Cal., deferred prosecution agreement, Nov. 2024
AI takes sarcasm literally
77
A webpage can contain text that tries to redirect an assistant.
Hidden instructions hijack an AI
78
AI vs ML
79
Five Machine Learning Algorithms
A visual primer: how each one works, where it shines, and where it fails
MACHINE LEARNING
1
Linear regression
2
Logistic regression
3
Decision tree
4
Random forest
5
K-means clustering
Running example: predicting how students do on an exam
Which algorithm fits which question?
Two questions about your data narrow the choice before any math is involved
81
Do your training examples have labels?
YES
NO
Supervised learning
Is the label a number or a category?
Unsupervised learning
NUMBER
e.g. exam score
1
Linear regression
CATEGORY
e.g. pass or fail
2
Logistic regression
3
Decision tree
4
Random forest
FIND GROUPS
e.g. study-habit profiles
5
K-means clustering
MACHINE LEARNING · A VISUAL PRIMER
Linear regression
Fit the straight line that best predicts a number from an input
82
1 OF 5 · SUPERVISED · REGRESSION
Exam score vs hours studied (training examples)
20
40
60
80
100
0 h
2 h
4 h
6 h
8 h
Hours studied
Exam score
New student: 4 h → 62
best-fit line
error (residual)
THE MODEL
score = 30 + 8 × hours
30 = intercept (score at 0 h)
8 = slope (points per extra hour)
WORKED EXAMPLE
30 + 8 × 4 = 62
The output is a number, so this is regression.
HOW IT LEARNS
Choose the line that makes the squared red errors as small as possible (least squares).
MACHINE LEARNING · A VISUAL PRIMER
Linear regression
Fit the straight line that best predicts a number from an input
83
1 OF 5 · SUPERVISED · REGRESSION
MACHINE LEARNING · A VISUAL PRIMER
Linear regression: when does it work?
Look at the errors. Random scatter is fine, a pattern means the line is the wrong shape
84
1 OF 5 · WORKS OR NOT?
WORKS WELL
A roughly straight relationship
Input (feature)
Target (label)
Errors are small and random: above, below, above…
STRUGGLES
A U-shaped (curved) relationship
Input (feature)
Target (label)
Errors form a pattern: above at the ends, below in the middle
Key idea A line assumes each extra unit of input changes the output by the same amount.
If it struggles add curved terms (e.g. x²) or use a nonlinear model.
MACHINE LEARNING · A VISUAL PRIMER
Logistic regression
Despite the name, it classifies: it turns an input into a probability between 0 and 1
85
2 OF 5 · SUPERVISED · CLASSIFICATION
Probability of passing vs hours studied
0%
50%
100%
0 h
2 h
4 h
6 h
8 h
Hours studied
P(pass)
decision cutoff
6 h → 90%
passed (label 1)
failed (label 0)
sigmoid curve
THE MODEL
1 Score the input with a line:
z = b₀ + b₁ × hours
2 Squash z into 0 to 1:
p = 1 / (1 + e⁻ᶻ)
WORKED EXAMPLE
6 h → p = 0.90
0.90 ≥ 0.50 cutoff
PREDICT: PASS
The cutoff is a choice. Lower it to catch more at-risk students.
MACHINE LEARNING · A VISUAL PRIMER
Logistic regression
Despite the name, it classifies: it turns an input into a probability between 0 and 1
86
2 OF 5 · SUPERVISED · CLASSIFICATION
MACHINE LEARNING · A VISUAL PRIMER
Logistic regression: when does it work?
Its decision boundary is a straight line, so the classes must be separable by one
87
2 OF 5 · WORKS OR NOT?
WORKS WELL
Two groups on either side of a line
One straight boundary separates the classes
Feature 1
Feature 2
STRUGGLES
XOR: opposite corners share a class
Any single line gets about half the points wrong
Feature 1
Feature 2
Key idea The model can only draw one straight boundary in the features you give it.
If it struggles add a combined feature (Feature 1 × Feature 2) or use a tree or forest.
MACHINE LEARNING · A VISUAL PRIMER
Decision trees
Ask a sequence of yes or no questions, like a flowchart, to reach a prediction
88
3 OF 5 · SUPERVISED · CLASSIFICATION
A small tree learned from past students
Studied ≥ 4 hours?
NO
YES
Attendance ≥ 80%?
PASS
NO
YES
FAIL
PASS
ROOT
LEAVES give the prediction
FOLLOW THE PATH
Ana 6 h, 70%
Yes
PASS
Ben 2 h, 60%
No → No
FAIL
Cai 3 h, 95%
No → Yes
PASS
HOW IT LEARNS
At each step, pick the question and threshold that best separates pass from fail, then repeat inside each branch.
MACHINE LEARNING · A VISUAL PRIMER
Decision trees: when do they work?
A few splits capture the pattern. Too many splits memorize the noise (overfitting)
89
3 OF 5 · WORKS OR NOT?
GENERALIZES
One split: Feature A < 5
Training accuracy 88% New data 86%
Feature A
Feature B
OVERFITS
Many splits: tiny boxes around single points
Training accuracy 100% New data 70%
Feature A
Feature B
a box for one odd point
Key idea Judge a model on data it has not seen. 100% on training data is a warning sign.
If it struggles limit tree depth, require more samples per leaf, or prune.
MACHINE LEARNING · A VISUAL PRIMER
Random forest
Train many different trees and let them vote, instead of trusting a single tree
90
4 OF 5 · SUPERVISED · ENSEMBLE
NEW STUDENT
Study time 5 h
Attendance 90%
Quiz score 78
TREE 1
looked mostly at study time
PASS
TREE 2
looked mostly at quizzes
PASS
TREE 3
looked mostly at attendance
FAIL
VOTE
2 : 1
PASS
1
Resample
Each tree trains on a random sample of students (drawn with replacement).
2
Randomize
At each split, a tree may only look at a random subset of features.
3
Vote
Classification: majority vote. Regression: average the predictions.
MACHINE LEARNING · A VISUAL PRIMER
Random forest: when does it work?
Voting cancels random, independent errors, but not a blind spot that every tree shares
91
4 OF 5 · WORKS OR NOT?
WORKS WELL
One tree is wrong, the majority is right
PASS
PASS
FAIL
PASS
PASS
FOREST: PASS (4 : 1)
True answer: PASS error outvoted
STRUGGLES
Every tree misses the same signal
PASS
PASS
PASS
PASS
PASS
FOREST: PASS (5 : 0)
True answer: FAIL all wrong together
Key idea Many trees reduce random mistakes, not mistakes built into the data itself.
If it struggles find the missing feature or fix biased data; more trees won't help.
MACHINE LEARNING · A VISUAL PRIMER
K-means clustering
No labels needed: find K groups by repeating two simple steps until nothing changes
92
5 OF 5 · UNSUPERVISED · CLUSTERING
START
Unlabeled points
STEP 1
Drop K = 3 centers at random
STEP 2
Assign each point to its nearest center
STEP 3
Move each center to the mean of its points
↻
Repeat steps 2 and 3 until points stop switching groups. Here that takes a few rounds. You must choose K yourself, and a different random start can give a different answer, so run it several times.
MACHINE LEARNING · A VISUAL PRIMER
K-means clustering
93
5 OF 5 · UNSUPERVISED · CLUSTERING
MACHINE LEARNING · A VISUAL PRIMER
K-means: when does it work?
It looks for round, compact blobs around a center, not arbitrary shapes
94
5 OF 5 · WORKS OR NOT?
WORKS WELL
Separated, round clusters
Each center sits in the middle of one natural group
Feature 1
Feature 2
STRUGGLES
Nested rings (K = 2)
K-means splits left vs right instead of inner vs outer
Feature 2
Feature 1
the cut
Key idea K-means groups points by distance to a center, so it favors round blobs of similar size.
If it struggles try DBSCAN or spectral clustering, or transform the features.
MACHINE LEARNING · A VISUAL PRIMER
Side by side
A one-page summary to keep
95
Algorithm | Needs labels? | Output | Strength | Watch out for |
Linear regression | Yes | A number | Simple, fast, coefficients are easy to explain | Curved relationships, extrapolation |
Logistic regression | Yes | Probability of a class | Calibrated probabilities, easy to explain | Classes that no straight line separates |
Decision tree | Yes | Class (or number) | Readable if-then rules, handles non-linear patterns | Overfitting when grown too deep |
Random forest | Yes | Class (or number) | Accurate and robust out of the box | Less interpretable, shared data blind spots |
K-means | No | Group membership | Fast way to find structure in unlabeled data | Must choose K, non-round clusters |
MACHINE LEARNING · A VISUAL PRIMER
Check your understanding
Which algorithm would you try first? Discuss with a neighbor, then compare with the next slide
96
A
Predict the sale price of a house from its size and age.
My choice:
B
Estimate the probability that a patient is readmitted within 30 days.
My choice:
C
Approve or reject loan applications with rules a regulator can read.
My choice:
D
Group customers by shopping habits. Nobody has labeled them yet.
My choice:
MACHINE LEARNING · A VISUAL PRIMER
Answers and reasoning
More than one choice can be defensible. The reasoning is what matters
97
A
Predict the sale price of a house from its size and age.
Linear regression
The answer is a number, and price often rises roughly linearly with size.
B
Estimate the probability that a patient is readmitted within 30 days.
Logistic regression
Two classes, and the question asks for a probability.
C
Approve or reject loan applications with rules a regulator can read.
Decision tree
Classification, and the rules must be transparent and auditable.
D
Group customers by shopping habits. Nobody has labeled them yet.
K-means clustering
No labels, the goal is to discover groups.
MACHINE LEARNING · A VISUAL PRIMER
98