Title: DISCRIMINATIVE PARTICLE FILTER REINFORCEMENT LEARNING FOR COMPLEX PARTIAL OBSERVATIONS

Abstract: Deep reinforcement learning is successful in decision making for sophisticated games, such as Atari, Go, etc. However, real-world decision making often requires reasoning with partial information extracted from complex visual observations. This paper presents Discriminative Particle Filter Reinforcement Learning (DPFRL), a new reinforcement learning framework for complex partial observations. DPFRL encodes a differentiable particle filter in the neural network policy for explicit reasoning with partial observations over time. The particle filter maintains a belief using learned discriminative update, which is trained end-to-end for decision making. We show that using the discriminative update instead of standard generative models results in significantly improved performance, especially for tasks with complex visual observations, because they circumvent the difficulty of modeling complex observations that are irrelevant to decision making. In addition, to extract features from the particle belief, we propose a new type of belief feature based on the moment generating function. DPFRL outperforms state-of-the-art POMDP RL models in Flickering Atari Games, an existing POMDP RL benchmark, and in Natural Flickering Atari Games, a new, more challenging POMDP RL benchmark introduced in this paper. Further, DPFRL performs well for visual navigation with real-world data in the Habitat environment. The code is available online 1 .

1. INTRODUCTION:

Deep Reinforcement Learning (DRL) has attracted significant interest, with applications ranging from game playing (Mnih et al., 2013; Silver et al., 2017) to robot control and visual navigation (Levine et al., 2016; Kahn et al., 2018; Savva et al., 2019) . However, natural real-world environments remain challenging for current DRL methods (Arulkumaran et al., 2017) , in part because they require (i) reasoning in a partially observable environment and (ii) reasoning with complex observations, such as visually rich images. Consider, for example, a robot, navigating in an indoor environment, with a camera for visual perception. To determine its own location and a traversable path, the robot must extract from image pixels relevant geometric features, which often coexist with irrelevant visual features, such as wall textures, shadows, etc. Further, the task is partially observable: a single image at the current time does not provide sufficient features for localization, and the robot must integrate information from the history of visual inputs received.

The partially observable Markov decision process (POMDP) provides a principled general framework for decision making under partial observability. Solving POMDPs requires tracking a sufficient statistic of the action-observation history, e.g., the posterior distribution of the states, called the belief. Most POMDP reinforcement learning (RL) methods summarize the history into a vector using a recurrent neural network (RNN) (Hausknecht & Stone, 2015; Zhu et al., 2018) . RNNs are model-free generic function approximators. Without appropriate structural priors, they need large amounts of training data to learn to track a complex belief well.

Model-based DRL methods aim to reduce the sample complexity by learning a model together with a policy. In particular, to deal with partial observability, Igl et al. (2018) recently proposed DVRL, which learns a generative observation model embedded into the policy through a Bayes filter. Since DPFRL ot at b t ⇡ {(h i t , w i t )} K i=1 < l a t e x i t s h a 1 _ b a s e 6 4 = " j A z f / A T X S B L A y X h S / v q w d H o 2 t C U = " > A A A C A 3 i c b V D L S s N A F J 3 U V 6 2 v q D v d D B a h g p S k C r o R i m 4 E N x X s A 5 o 0 T K a T d u j k w c x E K S H g x l 9 x 4 0 I R t / 6 E O / / G S Z u F t h 6 4 3 M M 5 9 z J z j x s x K q R h f G u F h c W l 5 Z X i a m l t f W N z S 9 / e a Y k w 5 p g 0 c c h C 3 n G R I I w G p C m p Z K Q T c Y J 8 l 5 G 2 O 7 r K / P Y 9 4 Y K G w Z 0 c R 8 T 2 0 S C g H s V I K s n R 9 6 y k M n R k j x 7 D h 6 w d W a m T 0 A s z 7 d 0 4 e t m o G h P A e W L m p A x y N B z 9 y + q H O P Z J I D F D Q n R N I 5 J 2 g r i k m J G 0 Z M W C R A i P 0 I B 0 F Q 2 Q T 4 S d T G 5 I 4 a F S + t A L u a p A w o n 6 e y N B v h B j 3 1 W T P p J D M e t l 4 n 9 e N 5 b e u Z 3 Q I I o l C f D 0 I S 9 m U I Y w C w T 2 K S d Y s r E i C H O q / g r x E H G E p Y q t p E I w Z 0 + e J 6 1 a 1 T y p 1 m 5 P y / X L P I 4 i 2 A c H o A J M c A b q 4 B o 0 Q B N g 8 A i e w S t 4 0 5 6 0 F + 1 d + 5 i O F r R 8 Z x f 8 g f b 5 A 7 M F l u o = < / l a t e x i t >

V (bt)

< l a t e x i t s h a 1 _ b a s e 6 4 = " r o 4 2 6 D H M J G U u G 8 x G G s K s G W z i 0 / s = " > A A A B 7 X i c b Z B N S w M x E I Z n 6 1 e t X 1 W P X o J F q J e y K 4 I e i 1 4 8 V r D b Q r u U b J p t Y 7 P Z J Z k V S u l / 8 O J B E a / + H 2 / + G 9 N 2 D 9 r 6 Q u D h n R k y 8 4 a p F A Z d 9 9 s p r K 1 v b G 4 V t 0 s 7 u 3 v 7 B + X D I 9 8 k m W a 8 y R K Z 6 H Z I D Z d C 8 S Y K l L y d a k 7 j U P J W O L q d 1 V t P X B u R q A c c p z y I 6 U C J S D C K 1 v L 9 a t j D 8 1 6 5 4 t b c u c g q e D l U I F e j V / 7 q 9 h O W x V w h k 9 S Y j u e m G E y o R s E k n 5 a 6 m e E p Z S M 6 4 B 2 L i s b c B J P 5 t l N y Z p 0 + i R J t n 0 I y d 3 9 P T G h s z D g O b W d M c W i W a z P z v 1 o n w + g 6 m A i V Z s g V W 3 w U Z Z J g Q m a n k 7 7 Q n K E c W 6 B M C 7 s r Y U O q K U M b U M m G 4 C 2 f v A r + R c 2 z f H 9 Z q d / k c R T h B E 6 h C h 5 c Q R 3 u o A F N Y P A I z / A K b 0 7 i v D j v z s e i t e D k M 8 f w R 8 7 n D 7 8 m j p I = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " r o 4 2 6 D H M J G U u G 8 x G G s K s G W z i 0 / s = " > A A A B 7 X i c b Z B N S w M x E I Z n 6 1 e t X 1 W P X o J F q J e y K 4 I e i 1 4 8 V r D b Q r u U b J p t Y 7 P Z J Z k V S u l / 8 O J B E a / + H 2 / + G 9 N 2 D 9 r 6 Q u D h n R k y 8 4 a p F A Z d 9 9 s p r K 1 v b G 4 V t 0 s 7 u 3 v 7 B + X D I 9 8 k m W a 8 y R K Z 6 H Z I D Z d C 8 S Y K l L y d a k 7 j U P J W O L q d 1 V t P X B u R q A c c p z y I 6 U C J S D C K 1 v L 9 a t j D 8 1 6 5 4 t b c u c g q e D l U I F e j V / 7 q 9 h O W x V w h k 9 S Y j u e m G E y o R s E k n 5 a 6 m e E p Z S M 6 4 B 2 L i s b c B J P 5 t l N y Z p 0 + i R J t n 0 I y d 3 9 P T G h s z D g O b W d M c W i W a z P z v 1 o n w + g 6 m A i V Z s g V W 3 w U Z Z J g Q m a n k 7 7 Q n K E c W 6 B M C 7 s r Y U O q K U M b U M m G 4 C 2 f v A r + R c 2 z f H 9 Z q d / k c R T h B E 6 h C h 5 c Q R 3 u o A F N Y P A I z / A K b 0 7 i v D j v z s e i t e D k M 8 f w R 8 7 n D 7 8 m j p I = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " r o 4 2 6 D H M J G U u G 8 x G G s K s G W z i 0 / s = " > A A A B 7 X i c b Z B N S w M x E I Z n 6 1 e t X 1 W P X o J F q J e y K 4 I e i 1 4 8 V r D b Q r u U b J p t Y 7 P Z J Z k V S u l / 8 O J B E a / + H 2 / + G 9 N 2 D 9 r 6 Q u D h n R k y 8 4 a p F A Z d 9 9 s p r K 1 v b G 4 V t 0 s 7 u 3 v 7 B + X D I 9 8 k m W a 8 y R K Z 6 H Z I D Z d C 8 S Y K l L y d a k 7 j U P J W O L q d 1 V t P X B u R q A c c p z y I 6 U C J S D C K 1 v L 9 a t j D 8 1 6 5 4 t b c u c g q e D l U I F e j V / 7 q 9 h O W x V w h k 9 S Y j u e m G E y o R s E k n 5 a 6 m e E p Z S M 6 4 B 2 L i s b c B J P 5 t l N y Z p 0 + i R J t n 0 I y d 3

9 P T G h s z D g O b W d M c W i W a z P z v 1 o n w + g 6 m A i V Z s g V W 3 w U Z Z J g Q m a n k 7 7 Q n K E c W 6 B M C 7 s r Y U O q K U M b U M m G 4 C 2 f v A r + R c 2 z f H 9 Z q d / k c R T h B E 6 h C h 5 c Q R 3 u o A F N Y P A I z / A K b 0 7 i v D j v z s e i t e D k M 8 f w R 8 7 n D 7 8 m j p I = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " r o 4 2 6 D H M J G U u G 8 x G G s K s G W z i 0 / s = " > A A A B 7 X i c b Z B N S w M x E I Z n 6 1 e t X 1 W P X o J F q J e y K 4 I e i 1 4 8 V r D b Q r u U b J p t Y 7 P Z J Z k V S u l / 8 O J B E a / + H 2 / + G 9 N 2 D 9 r 6 Q u D h n R k y 8 4 a p F A Z d 9 9 s p r K 1 v b G 4 V t 0 s 7 u 3 v 7 B + X D I 9 8 k m W a 8 y R K Z 6 H Z I D Z d C 8 S Y K l L y d a k 7 j U P J W O L q d 1 V t P X B u R q A c c p z y I 6 U C J S D C K 1 v L 9 a t j D 8 1 6 5 4 t b c u c g q e D l U I F e j V / 7 q 9 h O W x V w h k 9 S Y j u e m G E y o R s E k n 5 a 6 m e E p Z S M 6 4 B 2 L i s b c B J P 5 t l N y Z p 0 + i R J t n 0 I y d 3 9 P T G h s z D g O b W d M c W i W a z P z v 1 o n w + g 6 m A i V Z s g V W 3 w U Z Z J g Q m a n k 7 7 Q n K E c W 6 B M C 7 s r Y U O q K U M b U M m G 4 C 2 f v A r + R c 2 z f H 9 Z q d / k c R T h B E 6 h C h 5 c Q R 3 u o A F N Y P A I z / A K b 0 7 i v D j v z s e i t e D k M 8 f w R 8 7 n D 7 8 m j p I = < / l a t e x i t > ⇡(b t ) < l a t e x i t s h a 1 _ b a s e 6 4 = " d M D G r E g / u U t R q i s D I A Z M / + 5 R W i g = " > A A A B 7 3 i c b Z B N S 8 N A E I Y n 9 a v W r 6 p H L 4 t F q J e S i K D H o h e P F e w H t K F s t p t 2 6 W Y T d y d C C f 0 T X j w o 4 t W / 4 8 1 / 4 7 b N Q V t f W H h 4 Z 4 a d e Y N E C o O u + + 0 U 1 t Y 3 N r e K 2 6 W d 3 b 3 9 g / L h U c v E q W a 8 y W I Z 6 0 5 A D Z d C 8 S Y K l L y T a E 6 j Q P J 2 M L 6 d 1 d t P X B s R q w e c J N y P 6 F C J U D C K 1 u r 0 E l E N + n j e L 1 f c m j s X W Q U v h w r k a v T L X 7 1 B z N K I K 2 S S G t P 1 3 A T 9 j G o U T P J p q Z c a n l A 2 p k P e t a h o x I 2 f z f e d k j P r D E g Y a / s U k r n 7 e y K j k T G T K L C d E c W R W a 7 N z P 9 q 3 R T D a z 8 T K k m R K 7 b 4 K E w l w Z j M j i c D o T l D O b F A m R Z 2 V 8 J G V F O G N q K S D c F b P n k V W h c 1 z / L 9 Z a V + k 8 d R h B M 4 h S p 4 c A V 1 u I M G N I G B h G d 4 h T f n 0 X l x 3 p 2 P R W v B y W e O 4 Y + c z x 9 g o Y + F < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " d M D G r E g / u U t R q i s D I A Z M / + 5 R W i g = " > A A A B 7 3 i c b Z B N S 8 N A E I Y n 9 a v W r 6 p H L 4 t F q J e S i K D H o h e P F e w H t K F s t p t 2 6 W Y T d y d C C f 0 T X j w o 4 t W / 4 8 1 / 4 7 b N Q V t f W H h 4 Z 4 a d e Y N E C o O u + + 0 U 1 t Y 3 N r e K 2 6 W d 3 b 3 9 g / L h U c v E q W a 8 y W I Z 6 0 5 A D Z d C 8 S Y K l L y T a E 6 j Q P J 2 M L 6 d 1 d t P X B s R q w e c J N y P 6 F C J U D C K 1 u r 0 E l E N + n j e L 1 f c m j s X W Q U v h w r k a v T L X 7 1 B z N K I K 2 S S G t P 1 3 A T 9 j G o U T P J p q Z c a n l A 2 p k P e t a h o x I 2 f z f e d k j P r D E g Y a / s U k r n 7 e y K j k T G T K L C d E c W R W a 7 N z P 9 q 3 R T D a z 8 T K k m R K 7 b 4 K E w l w Z j M j i c D o T l D O b F A m R Z 2 V 8 J G V F O G N q K S D c F b P n k V W h c 1 z / L 9 Z a V + k 8 d R h B M 4 h S p 4 c A V 1 u I M G N I G B h G d 4 h T f n 0 X l x 3 p 2 P R W v B y W e O 4 Y + c z x 9 g o Y + F < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " d M D G r E g / u U t R q i s D I A Z M / + 5 R W i g = " > A A A B 7 3 i c b Z B N S 8 N A E I Y n 9 a v W r 6 p H L 4 t F q J e S i K D H o h e P F e w H t K F s t p t 2 6 W Y T d y d C C f 0 T X j w o 4 t W / 4 8 1 / 4 7 b N Q V t f W H h 4 Z 4 a d e Y N E C o O u + + 0 U 1 t Y 3 N r e K 2 6 W d 3 b 3 9 g / L h U c v E q W a 8 y W I Z 6 0 5 A D Z d C 8 S Y K l L y T a E 6 j Q P J 2 M L 6 d 1 d t P X B s R q w e c J N y P 6 F C J U D C K 1 u r 0 E l E N + n j e L 1 f c m j s X W Q U v h w r k a v T L X 7 1 B z N K I K 2 S S G t P 1 3 A T 9 j G o U T P J p q Z c a n l A 2 p k P e t a h o x I 2 f z f e d k j P r D E g Y a / s U k r n 7 e y K j k T G T K L C d E c W R W a 7 N z P 9 q 3 R T D a z 8 T K k m R K 7 b 4 K E w l w Z j M j i c D o T l D O b F A m R Z 2 V 8 J G V F O G N q K S D c F b P n k V W h c 1 z / L 9 Z a V + k 8 d R h B M 4 h S p 4 c A V 1 u I M G N I G B h G d 4 h T f n 0 X l x 3 p 2 P R W v B y W e O 4 Y + c z x 9 g o Y + F < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " d M D G r E g / u U t R q i s D I A Z M / + 5 R W i g = " > A A A B 7 3 i c b Z B N S 8 N A E I Y n 9 a v W r 6 p H L 4 t F q J e S i K D H o h e P F e w H t K F s t p t 2 6 W Y T d y d C C f 0 T X j w o 4 t W / 4 8 1 / 4 7 b N Q V t f W H h 4 Z 4 a d e Y N E C o O u + + 0 U 1 t Y 3 N r e K 2 6 W d 3 b 3 9 g / L h U c v E q W a 8 y W I Z 6 0 5 A D Z d C 8 S Y K l L y T a E 6 j Q P J 2 M L 6 d 1 d t P X B s R q w e c J N y P 6 F C J U D C K 1 u r 0 E l E N + n j e L 1 f c m j s X W Q U v h w r k a v T L X 7 1 B z N K I K 2 S S G t P 1 3 A T 9 j G o U T P J p q Z c a n l A 2 p k P e t a h o x I 2 f z f e d k j P r D E g Y a / s U k r n 7 e y K j k T G T K L C d E c W R W a 7 N z P 9 q 3 R T D a z 8 T K k m R K 7 b 4 K E w l w Z j M j i c D o T l D O b F A m R Z 2 V 8 J G V F O G N q K S D c F b P n k V W h c 1 z / L 9 Z a V + k 8 d R h B M 4 h S p 4 c A V 1 u I M G N I G B h G d 4 h T f n 0 X l x 3 p 2 P R W v B y W e O 4 Y + c z x 9 g o Y + F < / l a t e x i t > RL Loss Discriminative training Generative Function evaluate p(o | h t )

< l a t e x i t s h a 1 _ b a s e 6 4 = " w 5 z 4 K e d r N A F Q 2 y i j + r f d u B q p 5 S M = " >

A A A B 8 3 i c b V D L S g N B E J y N r x h f U Y 9 e B o M Q L 2 E 3 C n o M e v E Y w c R A d g m z s 7 P J k H k x M y u E J b / h x Y M i X v 0 Z b / 6 N k 2 Q P m l j Q U F R 1 0 9 0 V K 0 a N 9 f 1 v r 7 S 2 v r G 5 V d 6 u 7 O z u 7 R 9 U D 4 + 6 R m Y a k w 6 W T O p e j A x h V J C O p Z a R n t I E 8 Z i R x 3 h 8 O / M f n 4 g 2 V I o H O 1 E k 4 m g o a E o x s k 4 K V V 2 G n C Z w N L D n g 2 r N b / h z w F U S F K Q G C r Q H 1 a 8 w k T j j R F j M k D H 9 w F c 2 y p G 2 F D M y r Y S Z I Q r h M R q S v q M C c W K i f H 7 z F J 4 5 J Y G p 1 K 6 E h X P 1 9 0 S O u D E T H r t O j u z I L H s z 8 T + v n 9 n 0 O s q p U J k l A i 8 W p R m D V s J Z A D C h m m D L J o 4 g r K m 7 F e I R 0 g h b F 1 P F h R A s v 7 x K u s 1 G c N F o 3 l / W W j d F H G V w A k 5 B H Q T g C r T A H W i D D s B A g W f w C t 6 8 z H v x 3 r 2 P R W v J K 2 a O w R 9 4 n z 8 h 0 5 E X < / l a t e x i t > h t < l a t e x i t s h a 1 _ b a s e 6 4 = " 8 R Y n h a q 9 W W / i 0 F W c T p 1 e j B F w 9 z o = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m q o M e i F 4 8 V 7 Q e 0 o W y 2 m 3 b p Z h N 2 J 0 I J / Q l e P C j i 1 V / k z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E h h 0 H W / n c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q m T j V j D d Z L G P d C a j h U i j e R I G S d x L N a R R I 3 g 7 G t z O / / c S 1 E b F 6 x E n C / Y g O l Q g F o 2 i l h 1 E f + + W K W 3 X n I K v E y 0 k F c j T 6 5 a / e I G Z p x B U y S Y 3 p e m 6 C f k Y 1 C i b 5 t N R L D U 8 o G 9 M h 7 1 q q a M S N n 8 1 P n Z I z q w x I G G t b C s l c / T 2 R 0 c i Y S R T Y z o j i y C x 7 M / E / r 5 t i e O 1 n Q i U p c s U W i 8 J U E o z J 7 G 8 y E J o z l B N L K N P C 3 k r Y i G r K 0 K Z T s i F 4 y y + v k l a t 6 l 1 U a / e X l f p N H k c R T u A U z s G D K 6 j D H T S g C Q y G 8 A y v 8 O Z I 5 8 V 5 d z 4 W r Q U n n z m G P 3 A + f w B a K o 3 X < / l a t e x i t > o t < l a t e x i t s h a 1 _ b a s e 6 4 = " i T Z / J E v T b 3 S B 4 j o Q n i p W l S P k s X 8 = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m q o M e i F 4 8 V 7 Q e 0 o W y 2 m 3 b p Z h N 2 J 0 I J / Q l e P C j i 1 V / k z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E h h 0 H W / n c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q m T j V j D d Z L G P d C a j h U i j e R I G S d x L N a R R I 3 g 7 G t z O / / c S 1 E b F 6 x E n C / Y g O l Q g F o 2 i l h 7 i P / X L F r b p z k F X i 5 a Q C O R r 9 8 l d v E L M 0 4 g q Z p M Z 0 P T d B P 6 M a B Z N 8 W u q l h i e U j e m Q d y 1 V N O L G z + a n T s m Z V Q Y k j L U t h W S u / p 7 I a G T M J A p s Z 0 R x Z J a 9 m f i f 1 0 0 x v P Y z o Z I U u W K L R W E q C c Z k 9 j c Z C M 0 Z y o k l l G l h b y V s R D V l a N M p 2 R C 8 5 Z d X S a t W 9 S 6 q t f v L S v 0 m j 6 M I J 3 A K 5 + D B F d T h D h r Q B A Z D e I Z X e H O k 8 + K 8 O x + L 1 o K T z x z D H z i f P 2 T U j d 4 = < / l a t e x i t >

Compatibility Function h t < l a t e x i t s h a 1 _ b a s e 6 4 = " 8 R Y n h a q 9 W W / i 0 F W c T p 1 e j B F w 9 z o = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m q o M e i F 4 8 the Bayes filter tracks the belief explicitly, DVRL performs much better than generic RNNs under partial observability. However, a Bayes filter normally assumes a generative observation model, that defines the probability p(o | h t ) of receiving an observation o = o t given the latent state h t (Fig. 1b ). Learning this model can be very challenging since it requires modeling all observation features, including features irrelevant for RL. When o is an image, p(o | h t ) is a distribution over all possible images. This means, e.g., to navigate in a previously unseen environment, we need to learn the distribution of all possible environments with their visual appearance, lighting condition, etc. -a much harder task than learning to extract features relevant to navigation, e.g., the traversable space.

V 7 Q e 0 o W y 2 m 3 b p Z h N 2 J 0 I J / Q l e P C j i 1 V / k z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E h h 0 H W / n c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q m T j V j D d Z L G P d C a j h U i j e R I G S d x L N a R R I 3 g 7 G t z O / / c S 1 E b F 6 x E n C / Y g O l Q g F o 2 i l h 1 E f + + W K W 3 X n I K v E y 0 k F c j T 6 5 a / e I G Z p x B U y S Y 3 p e m 6 C f k Y 1 C i b 5 t N R L D U 8 o G 9 M h 7 1 q q a M S N n 8 1 P n Z I z q w x I G G t b C s l c / T 2 R 0 c i Y S R T Y z o j i y C x 7 M / E / r 5 t i e O 1 n Q i U p c s U W i 8 J U E o z J 7 G 8 y E J o z l B N L K N P C 3 k r Y i G r K 0 K Z T s i F 4 y y + v k l a t 6 l 1 U a / e X l f p N H k c R T u A U z s G D K 6 j D H T S g C Q y G 8 A y v 8 O Z I 5 8 V 5 d z 4 W r Q U n n z m G P 3 A + f w B a K o 3 X < / l a t e x i t > o t < l a t e x i t s h a 1 _ b a s e 6 4 = " i T Z / J E v T b 3 S B 4 j o Q n i p W l S P k s X 8 = " > A A A B 6 n i c b V B N S 8 N A E J 3 U r 1 q / q h 6 9 L B b B U 0 m q o M e i F 4 8 V 7 Q e 0 o W y 2 m 3 b p Z h N 2 J 0 I J / Q l e P C j i 1 V / k z X / j t s 1 B W x 8 M P N 6 b Y W Z e k E h h 0 H W / n c L a + s b m V n G 7 t L O 7 t 3 9 Q P j x q m T j V j D d Z L G P d C a j h U i j e R I G S d x L N a R R I 3 g 7 G t z O / / c S 1 E b F 6 x E n C / Y g O l Q g F o 2 i l h 7 i P / X L F r b p z k F X i 5 a Q C O R r 9 8 l d v E L M 0 4 g q Z p M Z 0 P T d B P 6 M a B Z N 8 W u q l h i e U j e m Q d y 1 V N O L G z + a n T s m Z V Q Y k j L U t h W S u / p 7 I a G T M J A p s Z 0 R x Z J a 9 m f i f 1 0 0 x v P Y z o Z I U u W K L R W E q C c Z k 9 j c Z C M 0 Z y o k l l G l h b y V s R D V l a N M p 2 R C 8 5 Z d X S a t W 9 S 6 q t f v L S v 0 m j 6 M I J 3 A K 5 + D B F d T h D h r Q B A Z D e I Z X e H O k 8 + K 8 O x + L 1 o K T z x z D H z i f P 2 T U j d 4 = < / l a t e x i t > f obs (o t , h t ) < l a t e x i t s h a 1 _ b a s e 6 4 = " S O X z 1 c N M f p M X O h w 9 Q B m i + c s n V 7 g = " > A A A C A X i c b V B N S 8 N A E N 3 U r 1 q / o l 4 E L 4 t F q C A l q Y I e i 1 4 8 V r A f 0 J a w 2 W 7 a p Z t s 2 J 0 I J d S L f 8 W L B 0 W 8 + i + 8 + W / c t D l o 9 c H A 4 7 0 Z Z u b 5 s e A a H O f L K i w t r 6 y u F d d L G 5 t b 2 z v 2 7 l 5 L y 0 R R 1 q R S S N X x i W a C R 6 w J H A T r x I q R 0 B e s 7 Y + v M 7 9 9 z 5 T m M r q D S c z 6 I R l G P O C U g J E 8 + y D w e i G B k Q p T 6 e t p R X p w i k c e n H h 2 2 a k 6 M + C / x M 1 J G e V o e P Z n b y B p E r I I q C B a d 1 0 n h n 5 K F H A q 2 L T U S z S L C R 2 T I e s a G p G Q 6 X 4 6 + 2 C K j 4 0 y w I F U p i L A M / X n R E p C r S e h b z q z a / W i l 4 n / e d 0 E g s t + y q M 4 A R b R + a I g E R g k z u L A A 6 4 Y B T E x h F D F z a 2 Y j o g i F E x o J R O C u / j y X 9 K q V d 2 z a u 3 2 v F y / y u M o o k N 0 h C r I R R e o j m 5 Q A z U R R Q / o C b 2 g V + v R e

We introduce the Discriminative Particle Filter Reinforcement Learning (DPFRL), a POMDP RL method that learns to explicitly track a belief over the latent state without a generative observation model, and make decisions based on features of the belief (Fig. 1a ). DPFRL approximates the belief by a set of weighted learnable latent particles {(h i t , w i t )} K i=1 , and it tracks this particle belief by a nonparametric Bayes filter algorithm, an importance weighted particle filter, encoded as a differentiable computational graph in the neural network architecture. The importance weighted particle filter applies discriminative update to the belief with an observation-conditioned transition model and a discriminative state-observation compatibility function (serving as the importance weights), both of which are learnable neural networks trained end-to-end. By using these update functions instead of the transition and observation models of the standard particle filter, DPFRL sidesteps the difficulty of learning a generative observation model (Fig. 1b ). The model is discriminative in the sense that the compatibility function, f obs (o t , h t ), as shown in Fig. 1c , while playing an analogue role as p(o t | h t ), is not required to directly represent a normalized distribution over observations; and through end-toend training it only needs to model observation features relevant for the RL task. Finally, to summarize the particle belief for the policy, we introduce novel learnable features based on Moment-Generating Functions (MGFs) (Bulmer, 1979) . MGF features are computationally efficient and permutation invariant, and they can be directly optimized to provide useful higher-order moment information for learning a policy. MGF features could be also used as learned features of any empirical distribution in applications beyond RL.

We evaluate DPFRL on a range of POMDP RL domains: a continuous control task from Igl et al. (2018) , Flickering Atari Games (Hausknecht & Stone, 2015) , Natural Flickering Atari Games, a new domain with more complex observations that we introduce, and the Habitat visual navigation domain using real-world data (Savva et al., 2019) . DPFRL outperforms state-of-the-art POMDP RL methods in most cases. Results show that belief tracking with a particle filter is effective for handling partial observability, and the discriminative update and MGF-based belief features allow for complex observations.

2. RELATED WORK:

Real-world decision-making problems are often formulated as POMDPs. POMDPs are notoriously hard to solve; in the worst case, they are computationally intractable (Papadimitriou & Tsitsiklis, 1987) . Approximate POMDP solvers have made dramatic progress in solving large-scale POMDPs (Kurniawati et al., 2008) . Particle filters have been widely adopted as a belief tracker for POMDP solvers (Silver & Veness, 2010; Somani et al., 2013) having the flexibility to model complex and multi-modal distributions, unlike Gaussian and Kalman filters. However, predefined model and state representations are required for these methods (see e.g. Bai et al. (2015) ).

obs trans { , ℎ } =1 { , ℎ -1 } =1 particle belief update { , ℎ -1 -1 } =1 soft resampling

Discriminative Particle Filter:

Actor Network In DPFRL, latent particles {(h i t , w i t )} K i=1 are maintained by a differentiable particle filter algorithm, which includes observation-conditioned transition function ftrans, discriminative compatibility function f obs , and soft-resampling. The policy and value function is conditioned on the belief, which is summarized by the mean particle ht, and m moment generating function features, M 1:m t .

Given the advances in generative neural network models, various neural models have been proposed for belief tracking (Chung et al., 2015; Maddison et al., 2017; Le et al., 2018; Naesseth et al., 2018) . DVRL (Igl et al., 2018) uses a Variational Sequential Monte-Carlo method (Naesseth et al., 2018) , similar to the particle filter we use, for belief tracking in RL. This gives better belief tracking capabilities, but as we demonstrate in our experiments, generative modeling is not robust in complex observation spaces with high-dimensional irrelevant observation. More powerful generative models, e.g., DRAW (Gregor et al., 2015) , could be considered to improve generative observation modeling; however, evaluating a complex generative model for each particle would significantly increase the computational cost and optimization difficulty.

Learning a robust latent representation and avoiding reconstructing observations are of great interest for RL (Oord et al., 2018; Guo et al., 2018; Hung et al., 2018; Gregor et al., 2019; Gelada et al., 2019) . Discriminative RNNs have also been widely used for belief approximation in partially observable domains (Bakker, 2002; Wierstra et al., 2007; Foerster et al., 2016) . The latent representation is directly optimized for the policy p(a|h t ) that skips observation modeling. For example, Hausknecht & Stone (2015) and Zhu et al. (2018) tackle partially observable Flickering Atari Games by extending DQN (Mnih et al., 2013) with an LSTM memory. Our experiments demonstrate that the additional structure for belief tracking provided by a particle filter can give improved performance in RL.

Embedding algorithms into neural networks to allow end-to-end discriminative training has gained attention recently. For belief tracking, the idea has been used in the differentiable histogram filter (Jonschkowski & Brock, 2016), Kalman filter (Haarnoja et al., 2016) and particle filter (Karkus et al., 2018; Jonschkowski et al., 2018) . Further, Karkus et al. (2017) combined a learnable histogram filter with the Value Iteration Network (Tamar et al., 2016) and introduced a learnable POMDP planner, QMDP-net. However, these methods require a predefined state representation and are limited to relatively small state spaces. Ma et al. (2019) integrated the particle filter with standard RNNs, e.g., the LSTM, and introduced PF-RNNs for sequence prediction. We build on the work of Ma et al. (2019) and demonstrate its advantages for RL with complex partial observations, and extend it with MGF features for improved decision making from particle beliefs. Note that our framework is not specific to PF-RNNs, and could be applied to other differentiable particle filters as well.

3. DISCRIMINATIVE PARTICLE FILTER REINFORCEMENT LEARNING:

We introduce DPFRL for reinforcement learning under partial and complex observations. The DPFRL architecture is shown in Fig. 2 . It has two main components, a discriminatively trained particle filter that tracks a latent belief b t , and an actor network that learns a policy p(a | b t ) given the belief b t .

3.1. PARTICLE FILTER FOR LATENT BELIEF TRACKING:

Latent State Representation. In POMDPs the semantics of states s is typically defined explicitly. State variables may correspond to the position of a robot, configuration of obstacles, etc. In DPFRL, we do not require explicit specification of the state variables, but implicitly represent the state as a vector h of latent variables, that is, the semantics of the state variables are learned instead of being pre-specified. We use a fully differentiable particle filter algorithm to maintain a belief over h. More specifically, we approximate the belief with a set of weighted latent particles b t ≈ {(h i t , w i t )} K i=1 , where {h i t } K i=1 are K latent states learned by policy-oriented training, and {w i t } K i=1 represents the corresponding weights. Each latent state h i t stands for a hypothesis in the belief; the set of latent particles provide an approximate representation for the belief.

Belief Update. In a basic particle filter, there are two key steps to update a particle belief {h i t-1 , w i t-1 } K i=1 to a new particle belief {h i t , w i t } K i=1 upon receiving an observation o t after executing action a t .

EQUATION

EQUATION

The first step, Eq. 1, takes the transition dynamics into account to update each particle. The second step, Eq. 2, takes the observation into account to reweigh the new particles.

Our belief update has a similar structure as the standard particle filter, but we replace the transition model and the observation model with richer functions to make the update more suitable for learning a policy in a partially observable domain. Specifically, the update equations are as follows.

EQUATION

EQUATION

Below, we first explain the intuition behind the above updates and the roles of f trans and f obs as compared to the standard transition and observation models. We then derive that above rules from an importance weighed particle filter in Sect. 3.2.

Observation-conditioned transition update. Eq. 3 takes a form more general than that in Eq. 2: instead of using the transition dynamics p(h | h i t-1 , a t ) to evolve a particle, we use a more general observation-conditioned transition

f trans (h | h i t-1 , a t , o t ).

Incorporating the observation allows alleviating the problem of sampling unlikely particles. In fact, if we take f trans to be p(h | h i t-1 , a t , o t ), then this allows us to skip Eq. 2, and completely avoids sampling particles that are likely considering a t only, but unlikely considering both a t and o t . Of course, in RL we do not have access to p(h | h i t-1 , a t , o t ), and instead f trans is learned. In our implementation, a network first extracts features from o t , they are fed to a gated function following the PF-GRU of Ma et al. (2019) , which outputs the mean and variance of a normal distribution. Details are in the Appendix.

Importance weighting via a compatibility function. Eq. 4 is a relaxed version of Eq. 2: instead of using the observation model p(o t | h i t ) to adjust the particle weights based on their compatibility with the observation, we use a general non-negative compatibility function f obs (h i t , o t ). If the compatibility function is required to satisfy the normalization constraint that o f obs (h, o) is a constant for all h, then it is equivalent to a conditional distribution of o given h. We do not require this, and thus the update loses the probabilistic interpretation in Eq. 2. However, eliminating the need for the normalization constraint allows the compatibility function to be efficiently trained, as we can avoid computing the normalization constant. In addition, since the observation has already been incorporated in Eq. 3, we actually expect that the weights need to be adjusted in a way different from the standard particle filter. In our implementation, f obs (h i t , o t ) is a neural network with a single fully connected layer that takes in a concatenation of h i t and features extracted from o t . The output of the network is interpreted as the log of f obs ; and for numerical stability we perform the weight updates of Eq. 4 in the log-space as well. Note that more complex network architectures could improve the capability of f obs , which we leave to future work.

Soft-resampling. To avoid particle degeneracy, i.e., most of the particles having a near-zero weight, particle filters typically resample particles. We adopt the soft-resampling strategy of Karkus et al. (2018) ; Ma et al. (2019) , that provides approximate gradients for the non-differentiable resampling step. Instead of sampling from p t (i) = w i t , we sample particles {h i t } K i=1 from a softened proposal distribution q(i) = αw i t + (1α)1/K, where α is an trade-off parameter. The new weights are derived using importance sampling:

w i t = w i t αw i t +(1-α)1/K . We can have the final particle belief as {(h i t , w i t )} K i=1 = Soft-Resampling({(h i t , w i t )} K i=1

). As a result, f obs can be optimized with global belief information and model shared useful features across multiple time steps.

Another related concern is that the particle distribution may collapse to particles with the same latent state. This can be avoided by ensuring that the stochastic transition function f trans has a non-zero variance, e.g., by adding a small constant to the learned variance.

End-to-end training. In DPFRL the observation-conditioned transition function f trans and the compatibility function f obs are learned. Instead of training for a modeling objective, they are trained end-to-end for the final RL objective, backpropagating gradients through the belief-conditional policy p(a | b t ) and the update steps of the particle filter algorithm, Eq. 3-5.

3.2. CONNECTION TO IMPORTANCE WEIGHTED PARTICLE FILTER:

Our belief update can be motivated from the following importance weighted particle filter. Learning directly p(h | h, a, o) is generally difficult, but if we have a distribution q(h | h, a, o) that is easy to learn, then we can use importance sampling to update a particle belief.

EQUATION

EQUATION

where f = p/q is the importance weight.

Consider the case that q(h | h, a, o) is the conditional distribution of a joint distribution q(h , h, a, o) of the form p(h | h, a)q(o | h ). That is, p and q share the same transition dynamics p(h | h, a).

Then the importance weight f is a function of h and o only, because

f (h , h, a, o) = p(h | h, a, o) q(h | h, a, o) = p(h | h, a)p(o | h ) p(h | h, a)q(o | h ) = p(o | h ) q(o | h ) .

This simpler form is exactly the form that we used for f obs in our belief update.

3.3. DISCRIMINATIVE VS. GENERATIVE MODELING:

We expect the discriminative compatibility function to be more effective than a generative model for the following reasons. A generative model aims to approximate p(o | h) by learning a function that takes h as input and outputs a parameterized distribution over o. When o is, e.g., an image, this requires approximations, e.g., using pixel-wise Gaussians with learned mean and variance. This model is also agnostic to the RL task and considers all observation features equally, including features irrelevant for filtering and decision making.

In contrast, f obs takes o and h as inputs, and estimates the compatibility of o and h for particle filtering directly. This function avoids forming a parametric distribution over o, and the function can be easier to learn. The same functional form is used for the energy-function of energy-based models (LeCun et al., 2006) and in contrastive predictive coding (Oord et al., 2018) , with similar benefits. For example, f obs may learn unnormalized likelihoods that are only proportionate to p(o | h) up to a o-dependent value, because after the normalization in Eq. 4, they would give the same belief update as the normalized p(o | h). Further, because f obs is trained for the final RL objective instead of a modeling objective, it may learn a compatibility function that is useful for decision making, but that does not model all observation features and has no proper probabilistic interpretation.

While the task-oriented training of discriminative models may improve policy performance for the reasons above, it cannot take advantage of an auxiliary learning signal like the reconstruction objective of a generative model. An interesting line of future work may combine generative models with a compatibility function to simultaneously benefit from both formulations.

3.4. BELIEF-CONDITIONAL ACTOR NETWORK:

Conditioning a policy directly onto a particle belief is non-trivial. To feed it to the networks, we need to summarize it into a single vector.

We introduce a novel feature extraction method for empirical distributions based on Moment-Generating Functions (MGFs). The MGF of an n-dimensional random variable X is given by

M X (v) = E[e v X ], v ∈ R n .

In statistics, MGF is an alternative specification of its probability distribution (Bulmer, 1979) . Since particle belief b t is an empirical distribution, the moment generating function of b t can be denoted as

M bt (v) = K i=1 w i t e v h i t . A more detailed background on MGFs is in Appendix A.2.

In DPFRL, we use the values of the MGF at m learned locations v 1:m as the feature vector of the MGF. The j-th MGF feature is given by M j bt (v j ). For a clean notation, we use M j t in place of M j bt (v j ). We use ht , M 1:m t as features for belief b t , where ht = K i=1 w i t h i t is the mean particle. The mean particle ht , as the first-order moment, and m additional MGF features, give a summary of the belief characteristics. The number of MGF features, m, controls how much additional information we extract from the belief. We empirically study the influence of MGF features in ablation studies.

Compared to Ma et al. (2019) that uses the mean as the belief estimate, MGF features provide additional features from the empirical distribution. Compared to DVRL (Igl et al., 2018) that treats the Monte-Carlo samples as a sequence and merges them by an RNN, MGF features are permutationinvariant, computationally efficient and easy to optimize, especially when the particle set is large.

Given the features ht , M 1:m t for b t , we compute the policy p(a | b t ) with a policy network π(b t ). We trained with an actor-critic RL algorithm, A2C (Mnih et al., 2016) , where a value network V (b t ) is introduced to assist learning. We use small fully-connected networks for π(b t ) and V (b t ) that share the same input b t .

4. EXPERIMENTS:

We evaluate DPFRL in a range of POMDP RL domains with increasing belief tracking and observation modeling complexity. We first use benchmark domains from the literature, Mountain Hike, and 10 different Flickering Atari Games. We then introduce a new, more challenging domain, Natural Flickering Atari Games, that uses a random video stream as the background. Finally we apply DPFRL to a challenging visual navigation domain with RGB-D observations rendered from real-world data.

We compare DPFRL with a GRU network, a state-of-the-art POMDP RL method, DVRL, and ablations of the DPFRL architecture. As a brief conclusion, we show that: 1) DPFRL significantly outperforms GRU in most cases because of its explicit structure for belief tracking; 2) DPFRL outperforms the state-of-the-art DVRL in most cases even with simple observations, and its benefit increases dramatically with more complex observations because of DPFRL's discriminative update; 3) MGF features are more effective for summarizing the latent particle belief than alternatives. An agent navigates on the map from the start position (white dot) to the goal (green dot with the shaded area as the threshold). Partial observation is introduced by a Gaussian noise and appended with a long noise vector of length l. The reward r(x, y) for position (x, y) is given by the heat map.

4.1. EXPERIMENTAL SETUP:

We train DPFRL and baselines with the same A2C algorithm, and use a similar network architecture and hyperparameters as the original DVRL implementation. DPFRL and DVRL differ in the particle belief update structure, but they use the same latent particle size dim(h) and the same number of particles K as in the DVRL paper (dim(h) = 128 and K = 30 for Mountain Hike, dim(h) = 256 and K = 15 for Atari games and visual navigation). The effect of the number of particles is discussed in Sect. 4.5. We train all models for the same number of iterations using the RMSProp optimizer (Tieleman & Hinton, 2012). Learning rates and gradient clipping values are chosen based on a search in the BeamRider Atari game independently for each model. Further details are in the Appendix. We have not performed additional searches for the network architecture and other hyper-parameters, nor tried other RL algorithm, such as PPO (Schulman et al., 2017) , which may all improve our results.

All reported results are averages over 3 different random seeds. We plot rewards accumulated in an episode, same as DVRL (Igl et al., 2018) . The curves are smoothed over time and averaged over parallel environment executions. Flickering Atari Games Natural Flickering Atari Games In the original task, partial observability is introduced by disturbing the agent observation with an additive Gaussian noise. To illustrate the effect of observation complexity in natural environments, we concatenate the original observation vector with a random noise vector. The complexity of the optimal policy remains unchanged, but the relevant information is now coupled with irrelevant observation features. More specifically, the state space and action space in Mountain Hike are defined as S = A = R 2 , where s t = [x t , y t ] and a t = [δx t , δy t ]. Transitions of the agent are stochastic with an additive Gaussian noise: s t+1 = s t + a t + a , where a ∼ N (0, 0.25). The observation space is O = R 2+l , where l is a predefined constant and l = 0 corresponds to the original setting.

Observations are

o t = [o s t , o n t ],

where o s t = s t + s , s ∼ N (0, 1), and o n t ∈ R l is sampled from a uniform distribution U(-10, 10). The reward for each step is given by r t = r(x t , y t ) -0.01||a t || where r(x t , y t ) is shown in Fig. 3 . Episodes end after 75 steps. We train models for different settings of the noise vector length l, from l = 0 to l = 100. Results are shown in Fig. 4 . We observe that DPFRL learns faster than the DVRL and GRU in all cases, including the original setting l = 0. Importantly, as the noise vector length increases, the performance of DVRL and GRU degrades, while DPFRL is unaffected. This demonstrates the ability of DPFRL to track a latent belief without having to explicitly model complex observations.

4.3. ATARI GAMES WITH PARTIAL OBSERVABILITY:

Atari games are one of the most popular benchmark domains for RL methods (Mnih et al., 2013) . Their partially observable variants, Flickering Atari Games, have been used to benchmark POMDP RL methods (Hausknecht & Stone, 2015; Zhu et al., 2018; Igl et al., 2018) . Here image observations are single frames randomly replaced by a blank frame with a probability of 0.5. The flickering observations introduce a simple form of partial observability. Another variant, Natural Atari Games (Zhang et al., 2018) , replaces the simple black background of the frames of an Atari game with a randomly sampled video stream. This modification brings the Atari domain one step closer to the visually rich real-world, in that the relevant information is now encoded in complex observations. As shown by Zhang et al. (2018) , this poses a significant challenge for RL.

We propose a new RL domain, Natural Flickering Atari Games, that involves both challenges: partial observability simulated by flickering frames, and complex observations simulated by random background videos. The background videos increase observation complexity without affecting the decision making complexity, making this a suitable domain for evaluating RL methods with complex observations. We sample the background video from the ILSVRC dataset (Russakovsky et al., 2015) . Examples for the BeamRider game are shown in Fig. 5 . Details are in Appendix B.

Table 1: Results for Flickering Atari Games and Natural Flickering Atari Games Flickering Atari Games:

Natural Flickering Atari Games DPFRL DVRL (Igl et al., 2018) GRU (Igl et al., 2018) DPFRL DVRL GRU

We evaluate DPFRL for both Flickering Atari Games and Natural Flickering Atari Games. We use the same set of games as Igl et al. (2018) . To ensure a fair comparison, we take the GRU and DVRL results from the paper for Flickering Atari Games, use the same training iterations as in Igl et al. (2018) , and we use the official DVRL open source code to train for Natural Flickering Atari Games.

Results are summarized in Table 1 . We highlight the best performance in bold where the difference is statistically significant (p = 0.05). Detailed training curves are in Appendix E.

We observe that DPFRL significantly outperforms GRU in almost all games, which indicates the importance of explicit belief tracking, and shows that DPFRL can learn a useful latent belief representation. Despite the simpler observations, DPFRL significantly outperforms DVRL and achieves state-of-the-art results on 5 out of 10 standard Flickering Atari Games (ChopperCommand, MsPacman, BeamRider, Bowling, Asteroids), and it performs comparably in 3 other games (Centipede, Frostbite, IceHockey). The strength of DFPRL shows even more clearly in the Natural Flickering Atari Games, where it significantly outperforms DVRL on 7 out of 10 games and performs similarly in the rest. In some games, e.g. in Pong, DPFRL performs similarly with and without videos in the background (15.65 vs. 15.40), while the DVRL performance degrades substantially (-19.78 vs. 18.17) . These results show that while the architecture of DPFRL and DVRL are similar, the policy-oriented discriminative update of DPFRL is much more effective for handling complex observations, and the MGF features provide a more powerful summary of the particle belief for decision making. However, on some games, e.g. on ChopperCommand, even DPFRL performance drops significantly when adding background videos. This shows that irrelevant features can make a task much harder, even for a discriminative approach, as also observed by Zhang et al. (2018) . (Savva et al., 2019) 0.70 0.80 -Visual navigation poses a great challenge for deep RL (Mirowski et al., 2016; Zhu et al., 2017; Lample & Chaplot, 2017) . We evaluate DPFRL for visual navigation in the Habitat Environment (Savva et al., 2019) , using the real-world Gibson dataset (Xia et al., 2018) . In this domain, a robot needs to navigate to goals in previously unseen environments. In each time step, it receives a first-person RGB-D camera image and its distance and relative orientation to the goal. The main challenge lies in the partial and complex observations: first-person view images only provide partial information about the unknown environment; and the relevant information for navigation, traversability, is encoded in rich RGB-D observations along with many irrelevant features, e.g., the texture of the wall. We use the Gibson dataset with the training and validation split provided by the Habitat challenge.

4.4. VISUAL NAVIGATION:

We train models with the same architecture as for the Atari games, except for the observation encoder that accounts for the different observation format. We evaluate models in unseen environments from We note that submissions to the recently organized Habitat Challenge 2019 (Savva et al., 2019) , such as (Chaplot et al., 2019) , have demonstrated better performance than the PPO baseline (while our results are not directly comparable because of the closed test set of the competition). However, these approaches rely on highly specialized structures, such as 2D mapping and 2D path planning, while we use the same generic network as for Atari games. Future work may further improve our results by adding a task-specific structure to DPFRL or training with PPO instead of A2C.

4.5. ABLATION STUDY:

We conduct an extensive ablation study on the Natural Flickering Atari Games to understand the influence of each DPFRL component. The results are presented in Table 3 .

The discriminative compatibility function is more effective than a generative observation function. DPFRL-generative replaces the discriminative compatibility function of DPFRL with a generative observation function, where grayscale image observations are modeled by pixel-wise Gaussian distributions with learned mean and variance. Unlike DVRL, DPFRL-generative only differs from DPFRL in the parameterization of the observation function, the rest of the architecture and training loss remains the same. In most cases, the performance for DPFRL-generative degrades significantly compared to DPFRL. These results are aligned with our earlier observations, and indicate that the compatibility function is capable of extracting the relevant information from complex observations without having to learn a more complex generative model.

More particles perform better. DPFRL with 1 particle performs poorly on most of the tasks (DPFRLL-P1). This indicates that a single latent state is insufficient to represent a complex latent distribution that is required for the task, and that more particles may improve performance.

MGF features are useful. We compare DPFRL using MGF features with DPFRL-mean, that only uses the mean particle; and with DPFRL-GRUmerge, that uses a separate RNN to summarize the belief, similar to DVRL. Results show that DPFRL-mean does not work as well as the standard DPFRL, especially for tasks that may need complex belief tracking, e.g., Pong. This can be attributed to the more rich belief statistics provided by MGF features, and that they do not constrain the learned belief representation to be always meaningful when averaged. Comparing to DPFRL-GRUmerge shows that MGF features generally perform better. While an RNN may learn to extract useful features from the latent belief, optimizing the RNN parameters is harder, because they are not permutation invariant to the set of particles and they result in a long backpropagation chain.

5. CONCLUSION:

We have introduced DPFRL, a framework for POMDP RL in natural environments. DPFRL combines the strength of Bayesian filtering and end-to-end RL: it performs explicit belief tracking with learnable particle filters optimized directly for the RL policy. DPFRL achieved state-of-the-art results on POMDP RL benchmarks from prior work, Mountain Hike and a number of Flickering Atari Games. Further, it significantly outperformed alternative methods in a new, more challenging domain, Natural Flickering Atari Games, as well as for visual navigation using real-world data. We have proposed a novel MGF feature for extracting statistics from an empirical distribution. MGF feature extraction could be applied beyond RL, e.g., for general sequence prediction.

DPFRL does not perform well in some particular cases, e.g., DoubleDunk. While our task-oriented discriminative update are less susceptible to complex and noisy observations than a generative model, they do not benefit from an additional learning signal that could improve sample efficiency, e.g., through a reconstruction loss. Future work may combine a generative observation model with the discriminative update in the DPFRL framework.

A BACKGROUND:

A.1 PARTICLE FILTER ALGORITHM Particle filter is an approximate Bayes filter algorithm for belief tracking. Bayes filters estimate the belief b t , i.e., a posterior distribution of the state s t , given the history of actions a 1:t and observations o 1:t . Instead of explicitly modeling the posterior distribution, particle filter approximates the posterior with a set of weighted particles, b t ≈ {(s i t , w i t )} K i=1 , and update the particles in a Bayesian manner. Importantly, the particle set could approximate arbitrary distributions, e.g., Gaussians, continuous multi-modal distributions, etc. The mean state can be estimated as the mean particle st = K i=1 w i t s i t . The particle updates include three steps: transition update, measurement update, and resampling.

Transition update. We first update the particles by a given motion model. More specifically, we sample the next state s i t+1 from a generative transition function

EQUATION

where p(s | s i t , a t ) is the transition function. Measurement update. The particle weights are updated again using the observation likelihoods

EQUATION

)

where η is a normalization factor and p(o t | s i t+1 ) is the observation likelihood computed by evaluating observation o t in a generative observation function p(o | s i t+1 ). Resampling. The particle filter algorithm can suffer from particle degeneracy, where after some update steps only a few particles have non-zero weights. This would prevent particle filter to approximate the posterior distribution effectively. Particle degeneracy is typically addressed by performing resampling, where new particles are sampled with repetition proportional to its weight. Specifically, we sample particles from a categorical distribution p parameterized by the particle weights {w i t } K i=1 p(i) = w i t (10) where p(i) is the probability for the i-th category, i.e., the i-th particle. The new particles approximate the same distribution, but they assign more representation capacity to the relevant regions of the state space.

A.2 MOMENT-GENERATING FUNCTIONS:

In probability theory, the moment-generating function (MGF) is an alternative specification of the probability distribution of a real-valued random variable (Bulmer, 1979) . As its name suggests, MGF of a random variable could be used to generate any order of its moments, which characterize its probability distribution.

Mathematically, the MGF of a random variable X with dimension m is defined by

EQUATION

)

where v ∈ R m and we could consider the MGF of random variable X is the expectation of the random variable e v X .

Consider the series expansion of e v X

EQUATION

This leads to the well-known fact that the j-th order moment M j (j-way tensor) is the j-th order derivative of the MGF at v = 0.

EQUATION

In DPFRL, we use MGFs as additional features to provide moment information of the particle distribution. DPFRL learns to extract useful moment features for decision making by directly optimizing for policy p(a | b t ).

B EXPERIMENT DETAILS B.1 IMPLEMENTATION DETAILS:

Observation Encoders: For the observation encoders, we used the same structure with DVRL (Igl et al., 2018) for a fair comparison. For Mountain Hike, we use two fully connected layers with batch normalization and ReLU activation as the encoder. The dimension for both layers is 64. For the rest of the domains, we first down-sample the image size to 84×84, then we process images with 3 2D-convolution layers with channel number (32, 64, 32) , kernel sizes (8, 4, 3) and stride (4, 2, 1), without padding. The compass and goal information are a vector of length 2; they are appended after the image encoding as the input.

Observation Decoders: Both DVRL and PFGRU-generative need observation decoders. For the Mountain Hike, we use the same structure as the encoder with a reversed order. The transposed 2D-convolutional network of the decoder has a reversed structure. The decoder is processed by an additional fully connected layer which outputs the required dimension (1568 for Atari and Habitat Navigation, both of which have 84 × 84 observations).

Observation-conditioned transition network: We directly use the transition function in PF-GRU (Ma et al., 2019) for f trans (h i t-1 , a t , o t ), which is a stochastic function with GRU gated structure. Action a t is first encoded by a fully connected layer with batch normalization and ReLU activation. The encoding dimension for Mountain Hike is 64 and 128 for all the rest tasks. The mean and variance of the normal distribution are learned again by two additional fully connected layers; for the variance, we use Softplus as the activation function.

State-observation compatibility network: f obs is implemented by a single fully connected layer without activation. In DVRL, the observation function is parameterized over the full observation space o and p(o | h i t-1 , a i t ) is assumed as a multivariate independent Bernoulli distribution whose parameters are again determined by a neural network (Igl et al., 2018) . For numerical stability, all the probabilities are stored and computed in the log space and the particle weights are always normalized after each weight update.

Soft-resampling::

The soft-resampling hyperparameter α is set to be 0.9 for Mountain Hike and 0.5 for the rest of the domains. Note that the soft-resampling is used only for DPFRL, not including DVRL. DVRL averages the particle weights to 1/K after each resampling step, which makes the resampling step cannot be trained by the RL.

Belief Summary: The GRU used in DVRL and DPFRL-GRUmerge is a single layer GRU with input dimension equals the dimension of the latent vector plus 1, which is the corresponding particle weight. The dimension of this GRU is exactly the dimension of the latent vector. For the MGF features, we use fully connected layers with feature dimensions as the number of MGF features. The activation function used is the exponential function. We could potentially explore the other activation functions to test the generalized-MGF features, e.g., ReLU.

Actor Network and Policy Network: The actor network and policy network are two fully connected layers, which take in the belief summary b t = ht , M 1:m t as input. The output dimension of these two networks are chosen according to the RL tasks.

Model Learning: For RL, we use an A2C algorithm with 16 parallel environments for both Mountain Hike and Atari games; for Habitat Navigation, we only use 6 parallel environments due to the GPU memory constraints. The loss function for DPFRL and GRU-based policy is just the standard A2C loss,

L A2C t = L A t + λ V L V t + λ H L H t ,

where L A t is the policy loss, L V t is the value loss, L H t is the entropy loss for encouraging exploration, and λ V and λ H are two hyperparameters. For all experiments, we use λ V = 0.5 and λ H = 0.01. For DVRL, an additional encoding loss L E t is used to train the sequential VAE, which gives a loss function

L DVRL t = L A2C t + λ E L E t .

We follow the default setting provided by Igl et al. (2018) and set λ E = 0.1. The rest of the hyperparameters, including learning rate, gradient clipping value and α in soft-resampling are tuned according to the BeamRider and directly applied to all domains due to the highly expensive experiment setups. The learning rate for all the networks are searched among the following values: (3 × 10 -5 , 5 × 10 -5 , 1 × 10 -4 , 2 × 10 -4 , 3 × 10 -4 ); the gradient clipping value are searched among {0.5, 1.0}; the soft-resampling α is searched among {0.5, 0.9}. The best performing learning rates were 1 -4 for DPFRL and GRU, and 2 -4 for DVRL; the gradient clipping value for all models was 0.5; the soft-resampling α is set to be 0.9 for Mountain Hike and 0.5 for Atari games.

B.2 EXPERIMENTAL SETUP:

Natural Flickering Atari games We follow the setting of the prior works (Zhu et al., 2018; Igl et al., 2018) : 1) 50% of the frames are randomly dropped 2) a frameskip of 4 is used 3) there is a 0.25 chance of repeating an action twice. In our experiments, we sample background videos from the ILSVRC dataset (Russakovsky et al., 2015) . Only the videos with the length longer than 500 frames are sampled to make sure the video length is long enough to introduce variability. For each new episode, we first sample a new video from the dataset, and a random starting pointer is sampled in this video. Once the video finishes, the pointer is reset to the first frame (not the starting pointer we sampled) and continues from there. Experiment platform: We implement all the models using PyTorch (Paszke et al., 2017) with CUDA 9.2 and CuDNN 7.1.2. Flickering Atari environments are modified based on OpenAI Gym (Brockman et al., 2016) and we directly use Habitat APIs for visual navigation. Collecting experience and performing gradient updates are done on a single computation node with access to one GPU. For Mountain Hike and Atari games we use NVidia GTX1080Ti GPUs. For Habitat visual navigation we use NVidia RTX2080Ti GPUs.

C PF-GRU NETWORK ARCHITECTURE:

We implement DPFRL with gated transition and observation functions for particle filtering similar to PF-GRU (Ma et al., 2019) .

In standard GRU, the memory update is implemented by a gated function:

EQUATION

where W n and b n are the corresponding weights and biases, and z t r t are the learned gates. PF-GRU introduces stochastic cell update by assuming the update to the memory, n i t , follows a parameterized Gaussian distribution E ADDITIONAL RESULTS

EQUATION

E.1 FLICKEIRNG ATARI GAMES PLOTS:

We provide the accumulated reward curves for Atari experiments in this section.

Standard Flickering Atari Games. For the standard Flickering Atari Games we provide the training curves below. Results for DVRL and GRU are directly taken from Igl et al. (2018) . given only the model-free belief tracker, it struggles to achieve higher reward after a certain point.

We only provide the reward curve here as SPL and success rate are only evaluated after the training is finished. We further visualize the latent particles by principal component analysis (PCA) and choose the first 2 components. We choose a trajectory in the Habitat Visual Navigation experiment, where 15 particles are used. We observe that particles initially spread across the space (t = 0). As the robot only receive partial information in the visual navigation task, particles gradually form a distribution with two clusters (t = 56), which represent two major hypotheses of its current state. After more information is incorporated into the belief, they begin to converge and finally become a single cluster (t = 81). We did not observe particle depletion and posterior collapse in our experiment. This could be better avoided by adding an entropy loss to the learned variance of f trans and we will leave it for future study. 

:

https://github.com/Yusufma03/DPFRL

Figures and Tables:

Figure 1: (a) DPFRL tracks a learned latent belief with a differentiable particle filter and learns a policy conditioned on the particle belief. (b) Generative models learn p(o | ht), the distribution of observations o given the latent state ht. The particle filter then evaluates the probability of an observed ot to get a compatibility measure of ot and ht. (c) The compatibility function directly predicts a compatibility measure of ot and ht using a learned neural network f obs (ot, ht).

Figure 2: DPFRL Network. In DPFRL, latent particles {(h i

Figure 3: Mountain Hike Task.

MOUNTAIN HIKEMountain Hike was introduced byIgl et al. (2018) to demonstrate the benefit of belief tracking for POMDP RL. It is a continuous control problem where an agent navigates on a fixed 20 × 20 map.

Figure 4: Results for Mountain Hike where useful observations are concatenated with a noise vector of length l.

Figure 5: Partially Observable Atari Games. In Flickering Atari Games frames are randomly dropped and replaced with a blank frame. In Natural Flickering Atari Games the background is replaced with a random video stream and the Atari components of the image are randomly dropped.

Figure 6: RGB-D Habitat Observations

Games. For Natural Flickering Atari Games we report results for a separate validation set, where the background videos are different from the training set. The validation environment steps once after every 100 training iterations. reward curve for the Habitat visual navigation task below. DPFRL outperforms both GRU-based policy and DVRL given the same training time. DVRL struggles with training the observation model and fails during the first half of the training time. GRU based policy learns fast;

Figure 7: Habitat Visual Navigation Reward

t = 56 (e) t = 74 (f) t = 81

Visual Navigation Results

Table content: <table><tr><td/><td>SPL</td><td>Success Rate</td><td>Reward</td></tr><tr><td>DPFRL</td><td>0.79</td><td>0.88</td><td>12.82±5.82</td></tr><tr><td>DVRL</td><td>0.09</td><td>0.11</td><td>5.22±2.24</td></tr><tr><td>GRU</td><td>0.63</td><td>0.74</td><td>10.14±2.82</td></tr><tr><td>PPO</td><td/><td/><td/></tr></table>

Ablation Study Results for the Natural Flickering Atari Games GRUmerge the validation split and compute the same metrics as in the literature: SPL, success rate, and average rewards. Results are shown in Table2. Further details and results are in Appendix B and E.DPFRL significantly outperforms both DVRL and GRU in this challenging domain. DVRL performs especially poorly, demonstrating the difficulty of learning a generative observation model in realistic, visually rich domains. DPFRL also outperforms the PPO baseline fromSavva et al. (2019).

Table content: <table><tr><td>Envs</td><td>DPFRL</td><td>DPFRL-generative</td><td>DPFRL-P1</td><td>DPFRL-mean DPFRL-</td></tr></table>

we implement the transition function h i t+1 ∼ f trans (h i t , o t , a t ), where f o enc is the encoding network for observation and f a enc is the encoding network for the actions. For the observation function, we directly use a fully connected layer f obs (h i t , o t ) = W o h i t , o t + b o , where W o and b o are the corresponding weights and biases.

Table content: <table><tr><td colspan="3">D DPFRL ALGORITHM</td><td/></tr><tr><td colspan="3">Algorithm 1: DPFRL</td><td/></tr><tr><td colspan="4">Input: Previous belief b t-1 ≈ {(h i t-1 , w i t-1 )} K i=1 , observation o t , action a t x o t ← Encoder(o t ) (encode the raw observation) h i t-1 , a t , u t (x o t )) (transition update) t ∼ f trans (h i w i t ← ηf obs (x o t , h i t )w i t-1 , η = 1/ K w i (observation update) t i=1 {(h i t , w i t )} K i=1 ← Soft-Resampling({(h i t , w i t )} K (soft-resampling) i=1 ) ht ← K i=1 w i t h i t (compute the mean)</td></tr><tr><td colspan="3">for j = 1 : m do</td><td/></tr><tr><td>M j t ←</td><td>K i=1</td><td>w i t exp(v j h i t )</td><td>(compute MGF features)</td></tr></table>

Peer review (iclr2020):
This is a well written paper. It introduces a principled method for POMDP RL: Discriminative Particle Filter Reinforcement Learning (DPFRL). It combines the strength of Bayesian filtering and policy-oriented discriminative modeling. DPFRL encodes a differentiable particle filter with learned transition & observation models in a neural network, allowing for reasoning with partial observations over multiple time steps. It performs explicit belief tracking with discriminative learnable particle filters optimized directly for the RL policy. Experimental results show that DPFRL achieves state-of-the-art on POMDP RL benchmarks. I especially like the paper covers a diverse set of applications, including Mountain Hike, the classic Atari games, and visual navigation (Habitat). Improved performance is reported. Results show that the particle filter structure is effective for handling partial observations, and the discriminative parameterization allows for complex observations.