際際滷

際際滷Share 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	C
exploration	of	hypothesis	(models)
? Advances	in	inference	techniques	C application	
with	large	models	(i.e.,	a	large	number	of	RVs)
5
Confidential
センスタイムジャパンRecent	advances	in	probabilistic	inference
? Traditional	techniques
′ MCMC	C slow	for	models	with	many	RVs
′ VI	for	conjugate	models	C limitation	on	models,	
derivation	and	implementation	of	inference
? Advanced	techniques
′ VI	with	stochastic	gradient	[1]	C arbitrary	models
′ Automated	inference	(ADVI)	[2]	C without	
derivation/implementation	of	inference
′ Auto-encoding	VB	(VAE)	[3]	C latent	variables
′ Normalizing	flows	[4],	GAN	[5]	C 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

20171025 pp-in-robotics