Vous êtes sur la page 1sur 55

Introduction à l’Intelligence Artificielle

pour la Création Artistique


Lucile Sassatelli (UCA, CNRS, I3S and IUF)
lucile.sassatelli@univ-cotedazur.fr

Cours CREATES, 2021

1
AI economic impact

Source: McKinsey Global Institute


2
Outline of the course
1. Introducing AI
• Definition, Demystification, Understanding data, What ML cannot do
2. Deep learning for images
• Convolutional Neural Networks for images, face recognition
3. Deep learning for language
• Automatic translation and speech-to-text
4. Weaknesses of deep learning (of humans?)
• Adversarial attacks, biases, explainability
5. Content generation and manipulation
• Deep fakes, style transfer

3
Outline of this first lecture: Introducing AI
• Definition and demystification
• Machine Learning (ML)
• Major success stories
• What is data
• Your turn!
• AI terminology
• What ML can learn
• Your turn!

4
Sources in this lecture
• Andrew Ng, AI for Everyone, deeplearning.ai
• Frédéric Precioso, Tout ce que vous avez toujours voulu savoir sur
l’intelligence artificielle, cours à Deep Law for Tech, 2021

5
L’Intelligence Artificielle :
Définition et Démystification

6
L’Intelligence Artificielle
On considère que l'intelligence artificielle, en tant que domaine de
recherche, a été créée à la conférence qui s'est tenue sur le campus de
Dartmouth College pendant l'été 1956, même si cette notion a été présente
depuis l’antiquité (Automates et créatures artificielles d’Héphaïstos, ou le
Golem dans la mythologie juive, etc).

(sources: Wikipedia, https://www.greeklegendsandmyths.com/automatons.html , © Frédéric Precioso


http://www.alanturing.net/turing_archive/pages/Reference%20Articles/what_is_AI/What%20is%20AI02.html 7
Stanford Encyclopedia of Philosophy: https://plato.stanford.edu/entries/artificial-intelligence/)
L’Intelligence Artificielle
• Par exemple dans le premier manifeste de l’Intelligence artificielle,
« Intelligent Machinery », en 1948, Alan Turing distingue deux
approches différentes de l’IA, qui pourrait être qualifié de « top-
down » ou knowledge-driven AI et « bottom-up » ou data-driven AI

(sources: Wikipedia, https://www.greeklegendsandmyths.com/automatons.html , © Frédéric Precioso


http://www.alanturing.net/turing_archive/pages/Reference%20Articles/what_is_AI/What%20is%20AI02.html 8
Stanford Encyclopedia of Philosophy: https://plato.stanford.edu/entries/artificial-intelligence/)
L’intelligence artificelle, top-down
• "top-down“ ou knowledge-driven AI
• On fait une hypothèse du monde, on écrit une règle / équation, on calcule une sortie
à partir d’une entrée
• cognition = connaissance des neurones biologiques dans les années 50, premier neurone (1943),
première machine à réseau de neurones (1950), neocognitron (1975, mais pas d’algorithme
d’optimisation)
• Observation = Algorithmes Evolutionnaires (1954,1957, 1960), Raisonnement (1959,1970),
Logique, Systèmes Experts (1970), Systèmes Multi-Agents (1990)…

Machines Hypothético-déductives
© Frédéric Precioso
(Figure de : “La revanche des neurones”, D. Cardon, J.-P. Cointet, A. Mazières, Réseaux Volume 211, Issue 5, 2018, pages 173-220, 9
https://hal.archives-ouvertes.fr/hal-01925644/file/RevancheNeurones_Reseaux.pdf )
L’intelligence artificelle, top-down
• Exemple d’un système expert :

© Frédéric Precioso

10
L’intelligence artificelle, top-down
• Quelques échecs récents:

© Frédéric Precioso
https://www.theverge.com/2018/7/26/17619382/ibms-watson-cancer-ai-healthcare-science
https://www.roboticsbusinessreview.com/rbr/a_cyclists_encounter_with_an_indecisive_google_self_driving_car/ 11
L’intelligence artificelle
• "bottom-up“ ou data-driven AI
• Les équations/algorithmes pour prendre les décisions sont modifiés par d’autres
calculs pour s’adapter aux données observées.
• Apprentissage Automatique (Machine learning), Arbres décision (1983), Backpropagation (1984-
1986), Forêt Aléatoire (1995), Support Vector Machine (1995), Boosting (1995), Deep Learning
(1998…2006)…

Machines Inductives
© Frédéric Precioso
(Figure de : “La revanche des neurones”, D. Cardon, J.-P. Cointet, A. Mazières, Réseaux Volume 211, Issue 5, 2018, pages 173-220, 12
https://hal.archives-ouvertes.fr/hal-01925644/file/RevancheNeurones_Reseaux.pdf )
L’Intelligence Artificielle, définition
En 1956, le terme intelligence artificielle est défini comme :

« la construction de programmes informatiques qui s’adonnent à des


tâches qui sont, pour l’instant, accomplies de façon plus satisfaisante
par des êtres humains car elles demandent des processus mentaux de
haut niveau tels que : l’apprentissage perceptuel, l’organisation de la
mémoire et le raisonnement critique ». (traduction de la définition par
Marvin Lee Minsky)

(sources: Wikipedia, https://www.greeklegendsandmyths.com/automatons.html , © Frédéric Precioso


http://www.alanturing.net/turing_archive/pages/Reference%20Articles/what_is_AI/What%20is%20AI02.html 13
Stanford Encyclopedia of Philosophy: https://plato.stanford.edu/entries/artificial-intelligence/)
AI vs Machine Learning vs Deep Learning

© Frédéric Precioso

14
Demystifying AI
AI

ANI AGI
Artificial Narrow Intelligence Artificial General Intelligence

e.g, smart speakers, self driving cars, face do anything a human can do
recognition, web search, AI in farming and
factories

© Adrew Ng

15
L’intelligence artificelle forte/générale
• Intelligence artificielle forte :
• machine capable non seulement de produire un comportement intelligent, mais
aussi d'éprouver un sentiment d'un vrai sens d'elle-même
• "vrais sentiments" (quoi qu'on puisse mettre derrière ces mots)
• "une compréhension de ses propres arguments".

(sources: Wikipedia, https://www.greeklegendsandmyths.com/automatons.html , © Frédéric Precioso


http://www.alanturing.net/turing_archive/pages/Reference%20Articles/what_is_AI/What%20is%20AI02.html 16
Stanford Encyclopedia of Philosophy: https://plato.stanford.edu/entries/artificial-intelligence/)
L’intelligence artificelle faible/étroite
• Intelligence artificielle faible (Machine Learning) :
• approche pragmatique des ingénieur·es, des mathématicien·nes
• construire des systèmes plus autonomes (pour réduire le coût de leur supervision)
• des algorithmes capables de résoudre des problèmes d'une certaine classe
Mais cette fois, la machine simule l'intelligence, elle semble agir comme si elle était
intelligente.

(sources: Wikipedia, https://www.greeklegendsandmyths.com/automatons.html , © Frédéric Precioso


http://www.alanturing.net/turing_archive/pages/Reference%20Articles/what_is_AI/What%20is%20AI02.html 17
Stanford Encyclopedia of Philosophy: https://plato.stanford.edu/entries/artificial-intelligence/)
Conclusions partielles
• L’IA c’est défini mais la définition est floue !

• Toutes les approches partielles (top-down vs bottom-up) de prises de


décisions sont vues comme DES Intelligences artificielles plurielles

• Rien à voire avec de la magie ! En particulier pas de connaissance


propre de soi, ni de « ses décisions », de « ses actions », qui sont
définies par le ou la conceptrice humaine.

© Frédéric Precioso

18
Conclusions partielles
• L’IA c’est défini mais la définition est floue !

• Toutes les approches partielles (top-down vs bottom-up) de prises de


décisions sont vues comme DES Intelligences artificielles plurielles

• Rien à voire avec de la Magie ! En particulier


« Alors faut-il
pasrenoncer à la désignation même de
de connaissance
la discipline ? Je suis sans illusions : le terme IA
propre de soi, ni de « ses décisions », est
detellement
« ses actions », qui
sexy, comment sont ?
y renoncer
définies par le ou la conceptrice humaine.
Je crois qu’il continuera, longtemps encore, à jeter
le trouble dans le public, les médias et l’industrie,
faisant prendre des calculs pour de l’intelligence,
des algorithmes pour des terminators. » © Frédéric Precioso
19
L’effet IA
• Souvent, quand une technique atteint une utilisation grand public, elle
n’est plus considérée comme intelligence artificielle ; ce phénomène est
décrit comme l’effet IA : « l’IA, c’est tout ce qui n’a pas encore été fait »
(Théorème de Larry Tesler)
• “As soon as it works, no one calls it AI any more.” (John McCarthy)

• Comme par exemple, trouver un chemin sous contraintes (GPS), jeu


d’échecs électronique, Alpha Go...

• Par conséquent, le domaine de l’IA est en constante évolution et est donc


difficile à appréhender.
© Frédéric Precioso

20
This is the family of bottom-up approaches.
They have improved significantly from the 1990’s, and all
major successes of AI in the last decade are made in the
family of ML approaches, addressing ANI tasks with Deep
Learning, i.e., deep artificial neural networks.

Machine Learning (ML)


The bottom-up approach, no strong assumption on a world model

21
The problem of supervised learning
• A machine learning model is a mathematical function that is
determined automatically (learnt) from the data.
• Supervised learning: the function has to match input A to output B

A B
ML model
Input Output

© Adrew Ng

22
Supervised learning: examples
Input A Output B Application
email spam? (0/1) Spam filtering
audio text transcript Speech recognition
English Chinese Machine translation
ad, user info Click? (0/1) Online advertising
image, radar info positions of other cars Self-driving car
human face name Face recognition

© Adrew Ng

23
Why such a success of AI now?

Large neural nets


Performance at the task

Medium neural nets

Small neural nets

Traditional AI

Amount of data
Big data © Adrew Ng

24
Major applications of AI today

25
Computer vision
• Image classification, object recognition cat

• Face recognition

• Object detection

• Image segmentation

• Tracking
© Adrew Ng

26
Natural Language Processing
• Text classification
• Sentiment analysis

• Information retrieval
• E.g., web search

• Name entity recognition

• Machine translation
© Adrew Ng

27
Natural Language Processing
• Others: part-of-speech tagging, parsing

The cat is on the mat

Determiner Noun Verb Preposition Determiner Noun

© Adrew Ng

28
Speech

• Speech recognition (speech-to-text)


• Trigger word/wakeword detection
• Speaker ID
• Speech synthesis (text-to-speech)
The quick brown fox jumps over the lazy dog.

© Adrew Ng

29
Robotics
• Perception
• Figuring out what is in the world around
you
• Motion planning
• Finding a path for the robot to follow
• Control
• Sending commands to the motors to
follow a path

© Adrew Ng

30
These next 3 examples are
examples of ML-based approaches
for more prospective/research
objectives.

31
Sentiment analysis of IMDB movie Distinguishing French presidents from
review their speech?

32
33
Types of data processed by ML approaches
• Unstructured data (images, audio, text)

• Structured data

34
What is data

35
Example of a table of data (dataset)

© Adrew Ng

36
Acquiring data
• Manual labeling

• From observing behaviors

• Download from websites/partnerships


• Our case (Amazon reviews, IMDB reviews, Celeb dataset, google-speech-dataset)
© Adrew Ng

37
Your turn!
• To understand data what
actually is in a computer, before
we work with it to perform some
ML tasks (sentiment analysis in
part 2).

• https://colab.research.google.co
m/drive/1IaRN7kn6IRtSZUvhM9
gkW_4xjbSDJ8CC?usp=sharing

38
AI terminology

39
Machine learning vs. data science

Home
prices

• ML: find B from A • Data science: extract knowledge from


(e.g., websites, mobile apps, etc.) the data
Homes with 3 bedrooms are more expansive than
homes with 2 bedrooms of a similar size.
Newly renovated homes have a 15% premium.
© Adrew Ng

40
Machine learning vs. data science

Machine learning Data science

“Field of study that gives


computers the ability to learn Science of extracting knowledge
without being explicitly and insights from data.
programmed.”
- Arthur Samuel, 1959

© Adrew Ng

41
A peek into Deep learning (non-technical example)
• Assume a prediction problem where we want to predict t-shirt sales

price demand
x
demand

x x “neuron”
x
x
x x
x
x

price
© Adrew Ng

42
A peek into Deep learning (non-technical example)
• Broadening our view: from a single neuron to a network of neurons

price

shipping cost
awareness
demand
marketing

material

© Adrew Ng

43
A peek into Deep learning (non-technical example)
• The above architecture stems from assumptions we make on features determining
demand → we may have missed some some!
• Idea: Do not make any assumption to make the prediction model, and instead let us
learn the best model, i.e., optimize a general neural network, a “deep neural network”
(Artificial) Neural Network
a big mathematical equation
price

shipping cost

demand
marketing
Neural networks were originally
material inspired by the brain, but the
details of how they work are
almost completely unrelated to
how biological brains work.
44
AI vs Machine Learning vs Deep Learning
ARTIFICIAL INTELLIGENCE
A program that can sense, reason, act,
and adapt

MACHINE LEARNING
Algorithms whose performance improve as
they are exposed to more data over time

DEEP LEARNING
Subset of machine
learning in which
multilayered neural
networks learn from
vast amount of data

45
AI has many tools
ARTIFICIAL INTELLIGENCE
• Machine learning and data science A program that can sense, reason, act,
and adapt

• Deep learning / neural networks


• Other buzzwords: unsupervised MACHINE LEARNING
Algorithms whose performance improve as
learning, reinforcement learning, they are exposed to more data over time
graphical models, planning,
knowledge graphs, … DEEP LEARNING
Subset of machine
learning in which
multilayered neural
networks learn from
vast amount of data

46
What ML can learn

47
Supervised learning
Anything you can do with 1 second of thought, we can probably now or
soon automate it.

Input A Output B Application


email spam? (0/1) Spam filtering
audio text transcript Speech recognition
English Chinese Machine translation
ad, user info Click? (0/1) Online advertising
image, radar info positions of other cars Self-driving car
human face name Face recognition

© Adrew Ng

48
What Machine learning today can and cannot
do
The toy arrived two days late, so I wasn’t able
to give it to my niece for her birthday.
Can I return it? Determining the type of request can be
done (left), but generating a perspective
(understand the temporality of a birthday
event-gift offering) and empathy-driven
response to an uncommon situation (right) is
not possible yet.

Refund request Oh, sorry to hear that.


I hope your niece had a good birthday.
Yes, we can help….

Input text refund/shipping/other


© Adrew Ng

49
It is not possible yet to learn an answer:
- which is relatively long
- which is perspective- and empathy-
What happens if you try? drive
- with a little amount of data

Input (A) Output (B)


User email 2-3 sentence response (empathetic and
appropriate response)
1000 examples

My box was damaged.


Thank you for your email.
Were do I write a review?
Thank you for your email.
What’s the return policy?
Thank you for your email.
When is my box arriving?
Thank yes now your….
© Adrew Ng

50
What makes an ML problem easier
1. Learning a simple concept
≤ 1 sec

2. Lots of data available


with: Input A, desired output B

© Adrew Ng

51
ML models (“AI”) can detect a car, but it
can hardly distinguish between the
Self-driving car different intentions and situations
represented by similar images of humans
holding up their arm.

Can do Cannot do

Too difficult because:


1. Data has ambiguity (requires world knowledge to infer
intentions)
2. Need high accuracy (distinguish between stopping,
hitchhiking, bicycle turning)
© Adrew Ng

52
X-ray diagnosis

Can do Cannot do

Diagnose pneumonia from ~10000 images Diagnose pneumonia from 10 images of a


medical textbook chapter explaining
pneumonia
© Adrew Ng

53
Strengths and weaknesses of Machine learning
• ML tends to work well when:
1. Learning a “simple” concept
2. There is a lot of data available
• ML tends to work poorly when:
1. Learning complex concepts from small amount of data
2. It is asked to perform on new types of data

© Adrew Ng

54
Your turn!
• To program a ML task: rate
sentiment of written reviews
(Amazon products and films
from IMDB).

• https://colab.research.google.co
m/drive/1IaRN7kn6IRtSZUvhM9
gkW_4xjbSDJ8CC?usp=sharing

55

Vous aimerez peut-être aussi