SlideShare a Scribd company logo
Probabilistic	programming	in	robotics
ROS	Japan	UG	#13	移動ロボット勉強会
25th October	2017
1
Confidential
センスタイムジャパンAbout	me
• Name:	Taku	Yoshioka
• Interests:	Bayesian	inference,	machine	learning,	
deep	learning	and	robotics
• Robot	and	ROS:	6	months
• Affiliation:	SenseTime	Japan
§ Computer	vision	and	deep	learning
§ https://www.sensetime.jp
§ https://blog.sensetime.jp (lunch	blog)
§ Kyoto,	Tokyo
§ We	are	hiring!
2
Confidential
センスタイムジャパンAgenda
• Probabilistic	programming	(PP)
§ Bayesian	neural	network
§ What	is	PP
§ Recent	advances	in	probabilistic	inference
§ Why	PP	matters	in	robotics
• Example:	SLAM	with	PyMC3
§ https://taku-
y.github.io/notebook/20170919/slam_advi.html
• Technical	issues	for	real	robotics	application
3
Confidential
センスタイムジャパンBayesian	neural	network
4
• Two-class	classification	model	with	PyMC3
• Left:	posterior	mean.	Right:	posterior	standard	
deviation	(uncertainty)
§ http://docs.pymc.io/notebooks/bayesian_neural_ne
twork_advi.html
Confidential
センスタイムジャパンWhat	is	PP
• Programming	of	probabilistic	models	and	
inference	with	high-level	API:
§ Probability	distribution,	random	variables	(RVs)
§ MCMC	(Gibbs,	HMC),	variational	inference	(VI)
§ GLM,	mixture	models,	Gaussian	processes
§ Stan,	PyMC3,	Edward
• Traditional	application:	bioinformatics,	finance	–
exploration	of	hypothesis	(models)
• Advances	in	inference	techniques	– application	
with	large	models	(i.e.,	a	large	number	of	RVs)
5
Confidential
センスタイムジャパンRecent	advances	in	probabilistic	inference
• Traditional	techniques
§ MCMC	– slow	for	models	with	many	RVs
§ VI	for	conjugate	models	– limitation	on	models,	
derivation	and	implementation	of	inference
• Advanced	techniques
§ VI	with	stochastic	gradient	[1]	– arbitrary	models
§ Automated	inference	(ADVI)	[2]	– without	
derivation/implementation	of	inference
§ Auto-encoding	VB	(VAE)	[3]	– latent	variables
§ Normalizing	flows	[4],	GAN	[5]	– arbitrary	posterior
6
Confidential
センスタイムジャパンWhy	PP	matters	in	robotics
• Why	complex	probabilistic	models	matter
§ Low-dimensional	state	representation
§ Incorporation	of	prior	knowledge
§ Composition	of	multiple	models
7
Encoder (VAE) Decoder	(VAE)RL
Deep	predictive	policy	architecture	for	robot	manipulation	task	[6]
Confidential
センスタイムジャパンExample:	SLAM	with	PyMC3
8
• Formulation
• Simulated	data
• Motion	model
• Observation	model
• Inference
• Sampling	from	approximated	posterior
• Result
Confidential
センスタイムジャパンFormulation
9
:	control	signals	(known)U = {ut}T
t=1
Z = {zt}T
t=1 :	observations	(known)
:	car	locations/directions	(unknown)
M = {mi}I
i=1
:	landmark	locations	(unknown)
• 2-D	car,	landmarks
S = {st}T
t=0
p(S, M|Z, U) / p(S, M, Z|U)
=
TY
t=1
p(zt|st, M)p(st|st 1, ut)p(s0)p(M)
Note:	s_0	is	fixed	in	the	example.
Confidential
センスタイムジャパンFormulation
10
Confidential
センスタイムジャパンSimulated	data
11
• Green	trace:	prior	of	the	car	locations	(known)
• Red	dashed	lines:	observations	of	landmarks	(known)
• Blue	trace:	true	locations	of	the	car	(unknown)
• Stars:	landmarks	locations	(unknown)
• Inference	of	unknown	RVs	from	knowns
Confidential
センスタイムジャパンMotion	model
12
Adopted	from	[7]
• Gaussian	fluctuation	with	a	discrete	time	model:
p(st|st 1, ut) = N(f(st 1, ut), ⌃mot)
Confidential
センスタイムジャパンMotion	model
13
Confidential
センスタイムジャパンObservation	model
14
• Range-bearing	measurement
p(zt|st, M) =
Y
i2D(st)
N(h(mi|st), ⌃obs)
D(s) = {i|distance(mi, s) < threshold}
Adopted	from	[7]Note:	D(s_t)	is	known	here.
Confidential
センスタイムジャパンObservation	model
15
Confidential
センスタイムジャパンInference
16
• Mean-field	approximation
• Maximization	of	variational	objective	(evidence	
lower	bound;	ELBO	[1][2][3][4])
q(·):	Normal	distribution
L(✓) = Eq [ln p(S, M, Z|U)] Eq [ln q(S, M)]
p(S, M|Z, U) ⇡ q(S, M) =
TY
t=1
q(st)
IY
i=1
q(mi)
:	(variational)	parameters	of	q(·)✓
Confidential
センスタイムジャパンSampling	from	approximated	posterior
17
• Drawing	samples	from	q(S, M)
Confidential
センスタイムジャパンResult
18
• Red	trace:	posterior	mean	of	states
§ Improvements	from	prior	(green	trace)
• Diamonds:	estimated	locations	of	4	landmarks
Confidential
センスタイムジャパンTechnical	issues	for	real	robot	application
19
• Computational	efficiency	in	prediction
§ No	control	over	computation	on	expression	graph	
with	backend	(Tensorflow,	Theano)	and	Python	
interpreter
§ Desired	solution:	zero-cost	abstraction
• Optimization	in	real	time
• Composition	of	multiple	models
• Standard	format	(e.g.,	JSON)	of	probabilistic	
models	for	reuse
Confidential
センスタイムジャパンReferences
20
[1]	Paisley,	J.,	Blei,	D.	M.,	&	Jordan,	M.	I.	(2012,	June).	Variational	
Bayesian	inference	with	stochastic	search.	ICML	2012.
[2]	Kucukelbir,	A.,	Tran,	D.,	Ranganath,	R.,	Gelman,	A.,	&	Blei,	D.	M.	
(2017).	Automatic	Differentiation	Variational	Inference. JMLR	2017.
[3]	Kingma,	D.	P.,	&	Welling,	M.	(2013).	Auto-encoding	variational	
bayes. ICLR	2014.
[4]	Rezende,	D.,	&	Mohamed,	S.	(2015).	Variational	Inference	with	
Normalizing	Flows.	ICML	2015.
[5]	Goodfellow,	I.,	Pouget-Abadie,	J.,	Mirza,	M.,	Xu,	B.,	Warde-Farley,	D.,	
Ozair,	S.,	&	Bengio,	Y.	(2014).	Generative	adversarial	nets.	NIPS	2014.	
[6]	Ghadirzadeh,	A.,	Maki,	A.,	Kragic,	D.,	&	Björkman,	M.	(2017).	Deep	
Predictive	Policy	Training	using	Reinforcement	Learning. IROS	2017.
[7]	Tim	Bailey	(2009).	Simultaneous	Localisation	and	Mapping:	
Probabilistic	Formulation.	Presentation	slide	at	SLAM	SUMMER	SCHOOL	
2009,	organized	by	Australian	Centre	for	Field	Robotics

More Related Content

PDF
20171207 domain-adaptation
PDF
IT and Engineers. Presentation at TEDee x ITmedia on March 9th, 2013
PPTX
課題ドリブン、フルスタックAI開発術 [MOBILITY:dev]
PDF
Why you need to become a Tech Sourcer (even if you don't hire for IT roles).
PDF
Introduction to Python Syntax and Semantics
PPTX
Scaling Face Recognition with Big Data
PPTX
PyCon TW 2017 - Why do projects fail? Let's talk about the story of Sinon.PY
PPTX
ModernWeb 2019: Why we replace TypeScript with Dart
20171207 domain-adaptation
IT and Engineers. Presentation at TEDee x ITmedia on March 9th, 2013
課題ドリブン、フルスタックAI開発術 [MOBILITY:dev]
Why you need to become a Tech Sourcer (even if you don't hire for IT roles).
Introduction to Python Syntax and Semantics
Scaling Face Recognition with Big Data
PyCon TW 2017 - Why do projects fail? Let's talk about the story of Sinon.PY
ModernWeb 2019: Why we replace TypeScript with Dart

Similar to 20171025 pp-in-robotics (20)

PPTX
Why Python is the First Programming Language You Should Learn
PDF
그렇게 커미터가 된다: Python을 통해 오픈소스 생태계 가르치기
PDF
Scaling face recognition with big data - Bogdan Bocse
PDF
Google Developer Day 2010 Japan: 「App Engine 開発者コミュニティ「appengine ja night」とフレ...
PDF
Why should I learn python
PDF
Rental Cars and Industrialized Learning to Rank with Sean Downes
PDF
Building Realtime Access to Data Apps with jOOQ
PPTX
What next after learning python programming basics
PDF
🌟Is Learning Python Your Career Game-Changer? 🚀🐍
PDF
2023-My AI Experience - Colm Dunphy.pdf
PDF
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
PDF
20161006 rsp2016 ohkawa-presen
PDF
CRNCH Rogues Gallery: A Community Core for Novel Computing Platforms
PDF
SIGCOMM '16 Outrageous Opinion by Marco Canini
PPTX
Week1- Introduction.pptx
PDF
Asyncio : Final frontier in python
PPTX
Artificial Intelligence in testing - A STeP-IN Evening Talk Session Speech by...
PDF
Python + NoSQL in Animations
PPTX
Spock the human computer interaction system - synopsis
PDF
How to write a web framework
Why Python is the First Programming Language You Should Learn
그렇게 커미터가 된다: Python을 통해 오픈소스 생태계 가르치기
Scaling face recognition with big data - Bogdan Bocse
Google Developer Day 2010 Japan: 「App Engine 開発者コミュニティ「appengine ja night」とフレ...
Why should I learn python
Rental Cars and Industrialized Learning to Rank with Sean Downes
Building Realtime Access to Data Apps with jOOQ
What next after learning python programming basics
🌟Is Learning Python Your Career Game-Changer? 🚀🐍
2023-My AI Experience - Colm Dunphy.pdf
Hoe een efficiënte Machine of Deep Learning backend ontwikkelen?
20161006 rsp2016 ohkawa-presen
CRNCH Rogues Gallery: A Community Core for Novel Computing Platforms
SIGCOMM '16 Outrageous Opinion by Marco Canini
Week1- Introduction.pptx
Asyncio : Final frontier in python
Artificial Intelligence in testing - A STeP-IN Evening Talk Session Speech by...
Python + NoSQL in Animations
Spock the human computer interaction system - synopsis
How to write a web framework
Ad

More from Taku Yoshioka (8)

PDF
20191123 bayes dl-jp
PDF
20191026 bayes dl
PDF
20191019 sinkhorn
PDF
20181221 q-trader
PDF
20181125 pybullet
PDF
20180722 pyro
PDF
20160611 pymc3-latent
PDF
自動微分変分ベイズ法の紹介
20191123 bayes dl-jp
20191026 bayes dl
20191019 sinkhorn
20181221 q-trader
20181125 pybullet
20180722 pyro
20160611 pymc3-latent
自動微分変分ベイズ法の紹介
Ad

Recently uploaded (20)

PDF
composite construction of structures.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Sustainable Sites - Green Building Construction
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
PPT on Performance Review to get promotions
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Well-logging-methods_new................
PPT
introduction to datamining and warehousing
PDF
Digital Logic Computer Design lecture notes
PPTX
Artificial Intelligence
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
UNIT 4 Total Quality Management .pptx
composite construction of structures.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Sustainable Sites - Green Building Construction
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT on Performance Review to get promotions
Internet of Things (IOT) - A guide to understanding
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Well-logging-methods_new................
introduction to datamining and warehousing
Digital Logic Computer Design lecture notes
Artificial Intelligence
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
UNIT 4 Total Quality Management .pptx

20171025 pp-in-robotics