CS480 Lecture November 28th
CS480 Lecture November 28th
2
Plan for Today
AI: Recent Developments
AI: Concerns and Future
3
ChatGPT and Large Language
Models
4
Language Models: Application
5
(Statistical) Language Model
A (statistical) language model is a probability
distribution over words or word sequences.
In practice, a language model gives the
probability of a certain word sequence being
“valid”.
Validity in this context does not need to mean
grammatical validity at all.
7
Embeddings as Input Features
Assumption:
“3-word sentences”
8
Neural Language Model
9
Recurrent Neural Networks (RNN)
Recurrent Neural Networks (RNNs) allow cycles in the computational graph
(network). A network node (unit) can take its own output from an earlier step as
input (with delay introduced).
Enables having internal state / memory inputs received earlier affect the RNN
response to current input.
10
Long Short-Term Memory (LSTM)
Long short-term memory (LSTM) is an artificial neural network. Unlike standard
feedforward neural networks, LSTM has feedback connections. Such a recurrent
neural network (RNN) can process not only single data points (such as images), but
also entire sequences of data (such as speech or video). This characteristic makes
LSTM networks ideal for processing and predicting data.
Source: https://towardsdatascience.com/lstm-networks-a-detailed-explanation-8fae6aefc7f9
11
Voice Assistant: Alexa
Your home Amazon Alexa Cloud Service
Transcription:
“Play Two Steps Behind by Def Leppard”
Extracted meaning:
Intent: PlayMusic | Artist: Def Leppard | Song: Two Steps Behind
12
Large Language Model (LLM)
A large language model (LLM) is a language model
consisting of a neural network with many
parameters (typically billions of weights or more),
trained on large quantities of unlabeled text using
self-supervised learning.
Source: Wikipedia
13
Language Modeling Example: GPT-2
Source: https://transformer.huggingface.co/doc/distil-gpt2
14
Generative Pre-trained Transformer 3
What is it?
Generative Pre-trained Transformer 3 (GPT-3) is an
autoregressive language model that uses deep learning
to produce human-like text. It is the third-generation
language prediction model in the GPT-n series (and the
successor to GPT-2) created by OpenAI, a San Francisco-
based artificial intelligence research laboratory.
Size:
175 billion machine learning parameters
~45 GB
Source: Wikipedia
15
Parameters? What Are Those?
features weights weights output
j
i
16
Transformer Architecture
17
Self-Attention
In artificial neural networks, attention is a technique that is meant to mimic
cognitive attention. The effect enhances some parts of the input data while
diminishing other parts — the motivation being that the network should devote
more focus to the important parts of the data, even though they may be small.
Learning which part of the data is more important than another depends on the
context, and this is trained by gradient descent.
Source: Park et al. – “SANVis: Visual Analytics for Understanding Self-Attention Networks”
18
Generative Pre-trained Transformer 4
What is it?
Generative Pre-trained Transformer 4 (GPT-4) is a
multimodal large language model created by OpenAI. As a
transformer, GPT-4 was pretrained to predict the next
token (using both public data and "data licensed from
third-party providers"), and was then fine-tuned with
reinforcement learning from human and AI feedback for
human alignment and policy compliance.
Size:
1 trillion machine learning parameters
~45 GB
Source: Wikipedia
19
GPT-3.5 / 4 Exam Taking Performance
Source: https://openai.com/research/gpt-4
20
GPT Takes The Bar Exam
Source: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4314839
21
GPT-4 MMLU Performance
MMLU – Massive
Multitask Language
Understanding
(benchmark)
3-shot accuracy:
Few-shot (k-shot)
learning is a type of
supervised learning
that is intended to
rapidly generalize to
new tasks containing
only a few samples of
supervised
information based on
prior knowledge
Sources: https://openai.com/research/gpt-4 and https://paperswithcode.com/dataset/mmlu
22
GPT-4 Architecture
Source: TheAiEdge.io
23
>10 GB Large Language Models
24
Large Language Models Data Sources
25
LLM Data Pre-Processing Pipeline
26
ChatGPT
What is it?
ChatGPT is a chatbot developed by OpenAI and released in
November 2022. It is built on top of OpenAI's GPT-3.5 and
GPT-4 families of large language models (LLMs) and has
been fine-tuned (an approach to transfer learning) using
both supervised and reinforcement learning techniques.
Source: Wikipedia
27
Transfer Learning
In transfer learning, experience with one
learning task helps an agent learn better on
another task.
28
ChatGPT: Learning From Feedback
Source: TheAiEdge.io
29
Tesla Deep Learning
Source: https://www.youtube.com/watch?v=Ucp0TTmvqOE
30
AI: (Fairly) Recent Technological
Developments
31
Dall-E 3 and Others
Source: https://www.youtube.com/watch?v=sqQrN0iZBs0
32
DALL-E 3 and Others
Source: https://www.youtube.com/watch?v=LfjwO5RKkZg
33
GitHub Copilot
Source: https://copilot.github.com/
34
DeepMind AlphaFold 2.0 Open Source
Source: https://deepmind.com/research/open-source/alphafold
35
Toshiba Visual Question Answering AI
Source: https://www.global.toshiba/ww/technology/corporate/rdc/rd/topics/21/2109-02.html
36
Nvidia’s AI
Source: https://www.youtube.com/watch?v=5LL6z1Ganbw
37
38
Generative Deep Learning
39
Generative Deep Learning
Source: https://www.toptal.com/machine-learning/generative-adversarial-networks
40
Deep Fakes
Source: https://www.youtube.com/watch?v=bPhUhypV27w
41
GPT-3 Scripted Movie
Source: https://www.youtube.com/watch?v=AmX3GDJ47wo
42
AI Remasters Max Payne (2001) Game
Source: https://medium.com/syncedreview/enhanced-super-resolution-gan-remasters-max-payne-1feb0ebb0c81
43
Exercise: Text-to-Image
https://stablediffusionweb.com/
44
How AI Image Generators Work?
Source: https://www.youtube.com/watch?v=1CIpzeNxIhU
45
Diffusion Models
Source: TheAIEdge.io
46
Deep Learning: All Roses?
47
Computational Limits: Deep Learning
Source: https://arxiv.org/pdf/2007.05558.pdf
48
Costs of Model Training
Source: https://arxiv.org/pdf/2004.08900.pdf
49
Costs of Model Training
Source: https://arxiv.org/pdf/1906.02243.pdf
50
The Limits of AI
51
Turing Test: Does it Work Well?
In 1950, English computer
scientists Alan Turing
suggested that if a computer
behaves the same way as a
human, we might as well call
it intelligent. A Turing Test is a
test where a machine and
human respond, in text, to
typed questions of human
judges who cannot see who is
responding.
Source: https://en.wikipedia.org/wiki/Alan_Turing
52
Gödel’s Incompleteness Theorems
First incompleteness
theorem:
Source: https://en.wikipedia.org/wiki/Kurt_G%C3%B6del
53
Gödel’s Incompleteness Theorems
Second incompleteness
theorem:
Source: https://en.wikipedia.org/wiki/Kurt_G%C3%B6del
54
Narrow / Strong / Super AI
Narrow / Weak AI:
AI solutions programmed / dedicated to solve
specific, “narrow” problems.
Super AI:
AI that surpasses human intelligence.
55
Can machines really think?
56
Selected AI Blunders
and Serious Failures
57
Microsoft Tay
Source: https://spectrum.ieee.org/tech-talk/artificial-intelligence/machine-learning/in-2016-microsofts-racist-chatbot-revealed-the-
dangers-of-online-conversation
58
AI Ball Tracking
Source: https://ictfc.com/icttv-live-streaming-from-caledonian-stadium
59
Tesla Autopilot
Source: https://www.tesla.com/blog/tragic-loss
60
GPT3-Based Medical Chatbot
Source: https://www.theregister.com/2020/10/28/gpt3_medical_chatbot_experiment/
61
Dangerous Chatbot
Source: https://www.vice.com/en/article/pkadgm/man-dies-by-suicide-after-talking-with-ai-chatbot-widow-says
62
AI and Warfare
Source: https://www.newscientist.com/article/2397389-ukrainian-ai-attack-drones-may-be-killing-without-human-oversight/
63
AI and Universities
Source: https://www.theatlantic.com/technology/archive/2023/05/chatbot-cheating-college-campuses/674073/
64
AI Can Be Fooled
65
Object Recognition
Source: https://medium.com/swlh/how-to-fool-artificial-intelligence-fcf230bf37e
66
Fooling Object Recognition
Source: https://www.youtube.com/watch?v=MIbFvK2S9g8
67
Fooling Object Recognition
Source: https://www.youtube.com/watch?v=Exd6CLAYOh0
68
Fooling Object Recognition
Source: https://newatlas.com/good-thinking/facial-recognition-clothes/
69
Object Recognition
Source: https://towardsdatascience.com/how-to-systematically-fool-an-image-recognition-neural-network-7b2ac157375d
70
Hmmm….
71
AI Ethics
All technology use can have negative consequences
72
Dangerous and Biased AI
Source: https://www.wired.com/story/algorithm-predicts-criminality-based-face-sparks-furor/
73
Dangerous and Biased AI
Source: https://thefederalist.com/2023/02/28/chatgpts-leftist-bias-accents-societys-hunger-for-free-thinkers/
74
Dangerous and Biased AI
Source: https://www.universiteitleiden.nl/en/news/2023/03/chatgpt-has-left-wing-bias-in-stemwijzer-voting-quiz
75
Dangerous and Biased AI
Source: https://www.youtube.com/watch?v=UG_X_7g63rY
76
Amazon AI Recruiting
Source: https://www.theguardian.com/technology/2018/oct/10/amazon-hiring-ai-gender-bias-recruiting-engine
77
Cambridge Analytica Scandal
Source: https://www.nytimes.com/2018/04/04/us/politics/cambridge-analytica-scandal-fallout.html
78
AI Ethics: Common Principles
Ensure safety and fairness
Establish accountability
Provide transparency
Respect privacy
Promote collaboration
Limit harmful use of AI
Uphold human rights and values
Reflect diversity / inclusion
Avoid concentration of power
Acknowledge legal implications
79
Fairness Concepts
Individual fairness
Group fairness
Fairness through unawareness
Equal outcome
Equal opportunity
Equal impact
80
Global Ethics of AI Agreement
Source: https://news.un.org/en/story/2021/11/1106612
81
EU AI Regulation Proposal
Source: https://eur-lex.europa.eu/legal-content/EN/TXT/?qid=1623335154975&uri=CELEX%3A52021PC0206
82
Algorithmic Accountability Act 2019
Source: https://www.wyden.senate.gov/imo/media/doc/Algorithmic%20Accountability%20Act%20of%202019%20Bill%20Text.pdf
83
If You Want More on Bias in AI...
84
AI Future / Concerns
85
Stephen Hawking on AI
On artificial intelligence ending the human race
The development of full artificial intelligence could spell the end of the
human race….It would take off on its own, and re-design itself at an ever-
increasing rate. Humans, who are limited by slow biological evolution,
couldn’t compete and would be superseded.
86
Stephen Hawking on AI
On making artificial intelligence benefit humanity
Perhaps we should all stop for a moment and focus not only on making our
AI better and more successful but also on the benefit of humanity.
On AI replacing humans
The genie is out of the bottle. We need to move forward on artificial
intelligence development but we also need to be mindful of its very real
dangers. I fear that AI may replace humans altogether. If people design
computer viruses, someone will design AI that replicates itself. This will be a
new form of life that will outperform humans.
87
Elon Musk on AI
“If AI has a goal and humanity just happens to be in
the way, it will destroy humanity as a matter of course
without even thinking about it…It’s just like, if we’re
building a road and an anthill just happens to be in
the way, we don’t hate ants, we’re just building a
road”
88
How AI Will Impact the Future?
Source: https://www.youtube.com/watch?v=uz8PSSOB-4E
89
Is AI a Threat to Our Future?
Source: https://www.youtube.com/watch?v=91TRVubKcEM
90
Selected AI Concerns
• Will AI replace human workers?
• Will AI deepen inequalities?
• Disinformation: will AI worsen it?
• No access to AI for evil people?
• Is AI the new Big Brother?
• Should intelligent machines have rights?
• Transparent AI
• AI-based weaponry
• Reliable AI
• Explainable AI
91
Jobs: Effect of Automation
Source: https://www.nber.org/papers/w28920
92
Thank you!
93
What Next?
• Download the list of resources I compiled
• Install and learn Python
(https://www.anaconda.com/products/individual)
• Familiarize yourself with machine learning / scientific
/ computer vision Python packages (pandas, scikit-
learn, tensorflow, pytorch, numpy, openCV)
• Get data sets and start building AI models
• Don’t be afraid of math
• Don’t be afraid to fail - you will always learn
something
• Ask questions and challenge yourself!
94
The Illustrated Machine Learning
95
“Easy Reading”
Source: https://www.nber.org/papers/w28920
96