SlideShare ist ein Scribd-Unternehmen logo
1 von 57
Downloaden Sie, um offline zu lesen
Les réseaux
de capsules
Aurélien Géron, Mars 2017
Aurélien Géron, 2017
Article NIPS 2017
Dynamic Routing Between Capsules
(Routage dynamique entre capsules)
de Sara Sabour, Nicholas Frosst, Geoffrey E. Hinton
Octobre 2017: https://arxiv.org/abs/1710.09829
Aurélien Géron, 2017
Infographie
Rectangle
x=20
y=30
angle=16°
Triangle
x=24
y=25
angle=-65°
Paramètres d’instanciation ImageRendu
Aurélien Géron, 2017
Analyse d’image
Image
Rectangle
x=20
y=30
angle=16°
Triangle
x=24
y=25
angle=-65°
Analyse d’imageParamètres d’instanciation
Aurélien Géron, 2017
Capsules
Image
=
=
Analyse d’imageParamètres d’instanciation
Aurélien Géron, 2017
Vecteur d’activation:
Capsules
Longueur = estimation de la probabilité de présence
Orientation = estimation des paramètres d’instanciation
=
=
Aurélien Géron, 2017
Squash(u) =
Capsules
=
=
Couches de convolution
+ Redimensionnement
+ Squash
||u||2
1 + ||u||2
u
||u||
Aurélien Géron, 2017
Equivariance
=
=
Aurélien Géron, 2017
Equivariance
=
=
Aurélien Géron, 2017
Une hiérarchie de composants
Bateau
x=22
y=28
angle=16°
Aurélien Géron, 2017
Une hiérarchie de composants
Rectangle
x=20
y=30
angle=16°
Triangle
x=24
y=25
angle=-65°
Bateau
x=22
y=28
angle=16°
Aurélien Géron, 2017
Une hiérarchie de composants
Rectangle
x=20
y=30
angle=-5°
Triangle
x=26
y=31
angle=137°
Maison
x=22
y=28
angle=-5°
Aurélien Géron, 2017
Capsules primaires
=
=
Capsules primaires
Aurélien Géron, 2017
=
=
Capsules primaires
Prédire la sortie de
la couche suivante
Aurélien Géron, 2017
=
=
Capsules primaires
Prédire la sortie de
la couche suivante
Aurélien Géron, 2017
=
=
Une matrice de transformation Wi,j
par paire partie/objet (i, j).
ûj|i
= Wi,j
ui
Capsules primaires
Prédire la sortie de
la couche suivante
Aurélien Géron, 2017
=
=
Capsules primaires
Prédire la sortie de
la couche suivante
Aurélien Géron, 2017
=
=
Capsules primaires
Prédire la sortie de
la couche suivante
Aurélien Géron, 2017
=
=
Sorties prédites
Capsules primaires
Prédire la sortie de
la couche suivante
Aurélien Géron, 2017
Routage par accord
=
=
Bon accord!
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
La capsule-rectangle et la
capsule-triangle seront routées
vers la capsule-bateau.
=
=
Capsules primaires
Sorties prédites
Routage par accord
Bon accord!
Aurélien Géron, 2017
Rechercher les groupes
de concordance
Aurélien Géron, 2017
Moyenne
Rechercher les groupes
de concordance
Aurélien Géron, 2017
Moyenne
Rechercher les groupes
de concordance
Aurélien Géron, 2017
Moyenne
Rechercher les groupes
de concordance
Aurélien Géron, 2017
Moyenne
Rechercher les groupes
de concordance
Aurélien Géron, 2017
Moyenne
Rechercher les groupes
de concordance
Aurélien Géron, 2017
Poids de routage
=
=
bi,j
=0 pour tout i, j
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Poids de routage
=
=
0.5
0.5
0.5
0.5
bi,j
=0 pour tout i, j
ci
= softmax(bi
)
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Calculer la sortie de
la couche suivante
=
=
sj
= somme pondérée
0.5
0.5
0.5
0.5
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
=
=
0.5
0.5
0.5
0.5
sj
= somme pondérée
vj
= squash(sj
)
Capsules primaires
Sorties prédites
Calculer la sortie de
la couche suivante
Aurélien Géron, 2017
Sorties réelles des
capsules de la couche
suivante (fin du 1er
tour)
=
=
0.5
0.5
0.5
0.5
sj
= somme pondérée
vj
= squash(sj
)
Calculer la sortie de
la couche suivante
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Sorties réelles des
capsules de la couche
suivante (fin du 1er
tour)
Mettre à jour les
poids de routage
=
=
Accord
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Sorties réelles des
capsules de la couche
suivante (fin du 1er
tour)
Mettre à jour les
poids de routage
=
=
Accord bi,j
+= ûj|i
. vj
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Sorties réelles des
capsules de la couche
suivante (fin du 1er
tour)
Mettre à jour les
poids de routage
=
=
Accord bi,j
+= ûj|i
. vj
Grand
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Sorties réelles des
capsules de la couche
suivante (fin du 1er
tour)
Mettre à jour les
poids de routage
=
=
Désaccord bi,j
+= ûj|i
. vj
Petit
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Calculer la sortie de
la couche suivante
=
=
0.2
0.1
0.8
0.9
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Calculer la sortie de
la couche suivante
=
=
sj
= somme pondérée
0.2
0.1
0.8
0.9
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Calculer la sortie de
la couche suivante
=
=
sj
= somme pondérée
vj
= squash(sj
)0.2
0.1
0.8
0.9
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Sorties réelles des
capsules de la couche
suivante (fin du 2ème
tour)
Calculer la sortie de
la couche suivante
=
=
0.2
0.1
0.8
0.9
Capsules primaires
Sorties prédites
Aurélien Géron, 2017
Handling Crowded
Scenes
=
=
=
=
Aurélien Géron, 2017
Handling Crowded
Scenes
=
=
=
=
Est-ce une
maison à
l’envers?
Aurélien Géron, 2017
Handling Crowded
Scenes
=
=
=
=
Maison
Grâce au routage par accord,
l’ambiguïté est vite levée (par
élimination progressive des
composants expliqués).
Bateau
Aurélien Géron, 2017
CapsNet de
classification
|| ℓ2
|| Estimation de la probabilité
d’appartenance à chaque classe
Aurélien Géron, 2017
Perte marginale
|| ℓ2
|| Pour prédire plusieurs
classes, minimiser la perte
marginale suivante :
Lk
= Tk
max(0, m+
- ||vk
||)2
+ λ (1 - Tk
) max(0, ||vk
|| - m-
)2
Tk
= 1 si et seulement si la
classe k est présente
Dans l’article :
m-
= 0.1
m+
= 0.9
λ = 0.5
Estimation de la probabilité
d’appartenance à chaque classe
Aurélien Géron, 2017
En clair:
Si un objet de la classe
k est présent dans
l’image, alors ||vk
||
devrait être supérieur à
0,9. Sinon, il devrait
être inférieur à 0,1.
Perte marginale
|| ℓ2
|| Pour prédire plusieurs
classes, minimiser la perte
marginale suivante :
Lk
= Tk
max(0, m+
- ||vk
||)2
+ λ (1 - Tk
) max(0, ||vk
|| - m-
)2
Tk
= 1 si et seulement si la
classe k est présente
Dans l’article :
m-
= 0.1
m+
= 0.9
λ = 0.5
Estimation de la probabilité
d’appartenance à chaque classe
Aurélien Géron, 2017
Régularisation par
reconstruction
|| ℓ2
||
Réseau neuronal à
propagation avant
Décodeur
Reconstruction
Aurélien Géron, 2017
Régularisation par
reconstruction
|| ℓ2
|| Reconstruction
Perte = perte marginale + α perte de reconstruction
La perte de reconstruction est le carré de différence
entre l’image reconstruite et l’image d’entrée.
Dans l’article, α = 0.0005.
Réseau neuronal à
propagation avant
Décodeur
Aurélien Géron, 2017
Un CapsNet pour
MNIST
(Figure 1 de l’article)
Aurélien Géron, 2017
Un CapsNet pour
MNIST – Décodeur
(Figure 2 de l’article)
Aurélien Géron, 2017
Des vecteurs
d’activation
interprétables
(Figure 4 de l’article)
Aurélien Géron, 2017
Avantages
● Haute précision sur MNIST, et prometteur sur CIFAR10
● Requiert moins de données qu’un réseau neuronal de convolution
● La position et l’aspect des objets sont préservés (équivariance)
● Ceci est prometteur pour de la segmentation d’image et la détection d’objets
● Le routage par accord gère bien les scènes ambiguës
● Les activations des capsules indiquent la hiérarchie des composants
● L’algorithme est robuste face aux transformations linéaires
● Les vecteurs d’activation sont souvent interprétables (rotation, épaisseur…)
● C’est une idée de Hinton! ;-)
Aurélien Géron, 2017
● Pas encore au niveau des réseaux de convolution sur CIFAR10
● Pas encore au niveau sur de grandes images
● L’algorithme est lent, du fait de la boucle du routage par accord
● Un CapsNet ne sait pas distinguer deux objets identiques et très proches
○ Ce phénomène s’appelle le surpeuplement (crowding), et il existe également chez l’Homme.
Inconvénients
Aurélien Géron, 2017
Implémentations
● TensorFlow simplifié: https://github.com/ageron/handson-ml
○ Dans extra_capsnets.ipynb
● TensorFlow : https://github.com/naturomics/CapsNet-Tensorflow
● Keras sur TensorFlow : https://github.com/XifengGuo/CapsNet-Keras
● PyTorch : https://github.com/gram-ai/capsule-networks
Aurélien Géron, 2017
Article ICLR 2018
Matrix capsules with EM routing
(Capsules matricielles avec routage EM)
de Geoffrey E. Hinton, Sara Sabour, Nicholas Frosst
Février 2018: https://openreview.net/pdf?id=HJWLfGWRb
Aurélien Géron, 2017
Article ICLR 2018
Matrix capsules with EM routing
(Capsules matricielles avec routage EM)
de Geoffrey E. Hinton, Sara Sabour, Nicholas Frosst
Février 2018: https://openreview.net/pdf?id=HJWLfGWRb
45% d’erreurs en moins sur le jeu de données
smallNORB par rapport à l’état de l’art
Amazon: https://goo.gl/sGsR6C
Twitter: @aureliengeron
github.com/ageron
...

Weitere ähnliche Inhalte

Empfohlen

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Réseaux de capsules (CapsNets)