Learning Continuous Environment Fields via Implicit Functions

1 INTRODUCTION . Scene understanding aims to analyze and interpret a given environment . The past few years have witnessed tremendous success in scene representation learning for semantic segmentation ( Long et al. , 2015 ; Li et al. , 2017 ) , 3D scene reconstruction ( Sitzmann et al. , 2020 ; 2019 ) , and depth estimation ( Godard et al. , 2019 ) . The learned representations can be used as inputs for training embodied tasks including visual navigation ( Sax et al. , 2018 ; Zhou et al. , 2019 ) and robotic manipulation ( Chen et al. , 2020 ; Yen-Chen et al. , 2020 ) . This overall process falls into a two-step paradigm , which first learns a static scene representation , and then trains an agent to interact with the scene . While this progress is exciting , we ask for exploring an alternative research direction : Can the scene representation itself be dynamically interactive ? That is , instead of training a Reinforcement Learning agent on top of the scene , we encode the dynamic functioning ( i.e. , the ability to control and guide the agent ’ s interactions ) in the scene representation in one-step training . Specifically , we study a representation that guides an embodied agent to navigate inside the scene . We propose a scene representation dubbed as the environment field that encodes the reaching distance – distance from any position to a given goal location along a feasible and plausible trajectory . Such an environment field needs to be continuous and densely covering the entire scene . With this continuous scene representation , given an agent in any locations in the scene , we can perform iterative optimization ( e.g. , gradient descent ) over the continuous field to move the agent to a goal . The optimization objective is to minimize the reaching distance , and the agent reaches a given goal when the reaching distance equals to zero . Compared to search-based algorithms ( Sethian , 1996 ; LaValle , 1998 ; Kavraki et al. , 1996 ) , the proposed environment field enjoys two key advantages : a ) Continuity . Search-based methods ( Sethian , 1996 ) assume a discrete searching space , while the proposed environment field is continuous and can easily generalize to continuous scenes such as a 3D indoor environment . b ) Efficiency . Instead of applying the time-consuming searching algorithm to every new environment or goal position , a single neural network is learned to efficiently produce different environment fields for different scenes or goal positions , with a forward pass . How to learn this continuous environment field ? Naively learning such a dense field in a supervised matter requires ground truth reaching distance annotation at all possible locations in the scene , which are infinitely many and thus impossible to collect . In this paper , we leverage neural implicit functions ( Park et al. , 2019 ; Xu et al. , 2019 ; Sitzmann et al. , 2020 ; Xu et al. , 2019 ; Mescheder et al. , 2019 ) that can learn a continuous field using discretely sampled training data . Specifically , we design an implicit neural network that takes the coordinates of a position in the scene as input and outputs its reaching distance to a given goal location . Even though this implicit neural network is trained using discretely sampled position and reaching distance pairs , yet it produces a dense environment field of a scene . During inference , the reaching distance between any position in the scene and the goal can be efficiently queried via a fast network forward pass and used to navigate an agent towards the goal . We showcase the application of the proposed environment field in both human trajectory modeling in 3D indoor environments as well as agent navigation in 2D mazes and observe comparable if not better results than state-of-the-art methods . Specially , when applying the environment field to human trajectory modeling , we additionally propose and learn an accessible region – plausible regions for humans to appear in the scene via a variational auto-encoder ( VAE ) . This accessible region can be implicitly encoded into the environment field so that it can guide humans to avoid locations that do not conform to common human behaviors ( e.g. , navigate a human to travel around rather than under a desk ) . The main contributions of this work are : • We propose the environment field – a novel scene representation that facilitates direct guid- ance of dynamic agent behaviors in a scene . • We learn dense environment fields via implicit functions using discretely sampled training pairs . • We apply the environment fields to human trajectory prediction in 3D indoor environments and agent navigation in 2D mazes , where both feasible and plausible trajectories can be produced efficiently and accurately . 2 RELATED WORK . Scene representations . Scene understanding aims at parsing and interpreting an environment . Prior approaches learn various scene representations comprising of semantic segmentation ( Long et al. , 2015 ; Li et al. , 2017 ) , depth ( Godard et al. , 2019 ) and meshes ( Sitzmann et al. , 2020 ) . Nevertheless , these representations only capture static scene attributes while the proposed environment field aims to encode the dynamic functioning of a scene . Path planning . Classical path planning algorithms including Breath First Searching ( BFS ) , Dijkstra ’ s algorithm ( Dijkstra , 1959 ) and the Fast Marching Method ( FMM ) ( Sethian , 1996 ; ValeroGomez et al. , 2015 ) require applying the searching algorithm to every new environment or goal position , and hence are not suitable for dynamically changing environments . On the contrary , our environment field generalizes to changing goals and environments during inference and is thus computationally efficient . Instead of solving path planning numerically , sampling-based methods such as Rapidly Exploring Random Tree ( RRT ) ( LaValle , 1998 ; LaValle et al. , 2001 ; Bry & Roy , 2011 ) or Probabilistic Roadmaps ( PRM ) ( Kavraki et al. , 1996 ; 1998 ) grow and search a tree by sampling feasible locations in the scene . However , the efficiency and performance of such methods depend on the sampling density and algorithm . In contrast , we learn a continuous environment field that predicts the next optimal move instantly for any location in the scene . The potential field algorithm manually computes and combines an attractive and repulsive field and is prone to local minimas , while our algorithm learns a single field in a data-driven way . The proposed environment field can also be considered as a value function used in learning-based path planning methods ( Tamar et al. , 2016 ; Campero et al. , 2020 ; Al-Shedivat et al. , 2018 ; Chaplot et al. , 2021 ) . The reaching distance at each location is essentially the reward the agent gets while trying to reach the goal . However , compared to other learning-based path planning algorithms ( Tamar et al. , 2016 ; Campero et al. , 2020 ; Al-Shedivat et al. , 2018 ) , the environment field enjoys two major benefits . First , it produces the environment field for all locations in the scene with a single network forward pass ( in discrete cases such as 2D mazes ) , instead of predicting optimal steps sequentially , which requires multiple network forward passes . Second , it utilizes implicit functions instead of convolution neural networks and is thus more flexible to generalize to continuous scenarios such as human navigation in 3D scenes . Implicit neural representations . Implicit neural representations have recently attracted much attention in computer vision due to their continuity , memory-efficiency , and capacity to capture complex object details . Numerous implicit neural representations have been proposed to reconstruct 3D objects ( Park et al. , 2019 ; Xu et al. , 2019 ; Michalkiewicz et al. , 2019 ; Tulsiani et al. , 2020 ; Mescheder et al. , 2019 ) , scenes ( Sitzmann et al. , 2019 ; Jiang et al. , 2020 ; Peng et al. , 2020 ; Mildenhall et al. , 2020 ) , humans ( Atzmon & Lipman , 2020 ; Saito et al. , 2019 ; 2020 ) or even audio and video signals ( Sitzmann et al. , 2020 ) . Instead of reconstruction , in this work , we use an implicit neural function to encode a continuous environment field and target at agent navigation . A more detailed overview of implicit neural networks can be found in Section 3.1 . Affordance prediction . Affordance prediction models the interactions between humans and objects or scenes ( Koppula & Saxena , 2014 ; Chuang et al. , 2018 ; Zhu et al. , 2014 ; Koppula et al. , 2013 ; Li et al. , 2019 ; Karunratanakul et al. , 2020 ) . One line of work describes static human-scene interactions by generating human poses ( Wang et al. , 2017 ; Li et al. , 2019 ) or human body meshes ( Zhang et al. , 2020b ; a ) given scene images or point clouds . Another line of work ( Cao et al. , 2020 ; Monszpart et al. , 2019 ) models dynamic human-scene interactions by predicting a sequence of future human poses given pose history . The proposed method falls into the second category , where we predict plausible human motion sequences containing different actions ( e.g. , walking and sitting down ) while avoiding collisions in 3D scenes . The proposed approach enjoys two major advantages compared to existing work ( Cao et al. , 2020 ; Monszpart et al. , 2019 ) : a ) Our work does not require any past human motion history as a reference . Once the environment field of a scene is encoded by an implicit function , an agent can be navigated from any position to the goal position . b ) Our work can generate much longer navigation paths than existing work thanks to the learned environment field that covers the entire scene . 3 ENVIRONMENT FIELD . We first introduce the environment field using agent navigation in 2D mazes as a toy example . A real-world application in human trajectory modeling is discussed in Section 4 . 3.1 OVERVIEW OF IMPLICIT NEURAL NETWORKS . Implicit neural networks have been widely used to represent a 3D object or scene as a signed distance function ( SDF ) . The input to an implicit neural network is the coordinates of a 3D point ( x ∈ R3 ) and the output is the signed distance ( s ∈ R ) from this point to the nearest object surface : s = SDF ( x ) , where s > 0 point is inside the object surface and s < 0 when the point is outside the object surface . A desirable property of an implicit neural network is that it learns a continuous surface of an object given discretely sampled training pairs X : = ( x , s ) , i.e. , it is able to predict the SDF value for points not in the training set X once trained . During inference , a continuous object surface can be explicitly recovered by extracting an arbitrarily number of points with zero SDF values , i.e. , points on the object surface ( Lorensen & Cline , 1987 ) . 3.2 ENVIRONMENT FIELD LEARNING VIA NEURAL IMPLICIT NETWORKS . In this work , we take advantage of the continuity property of implicit neural networks described above and learn a continuous environment field from discretely sampled location and reaching dis- tance pairs . Specifically , we represent the environment field as a mapping from location coordinates x ∈ R2 to its reaching distance u ( x ) ∈ R towards a given goal and learn an implicit neural network fθ ( see Fig . 3 ( a ) ) such that : û ( x ) = fθ ( x ) . ( 1 ) To collect a set of training pairs X : = { x , u ( x ) } , we resort to an analytical method , e.g. , fast marching method ( FMM ) ( Sethian , 1996 ) , that solves u ( x ) for each cell x in a discrete grid . We then train the implicit function fθ to regress the reaching distance u ( x ) computed by the FMM for each cell x ∈ X using the L1 loss function : L ( fθ ( x ) , u ( x ) ) = |fθ ( x ) − u ( x ) | . ( 2 ) Thanks to the continuity of implicit functions , the learned implicit neural network is able to predict the reaching distance even for points outside the training set X , enabling us to query the reaching distance for any location in the scene during inference . 3.3 TRAJECTORY SEARCH USING ENVIRONMENT FIELD Given the learned implicit function in Section 3.2 , we now describe how to search a trajectory from a starting position xs to the goal position xe . Since the learned implicit neural network is continuous , one intuitive solution for navigation is through a gradient descent method ( see Fig . 2 ( c ) ) . We first feed the current location xc of an agent into the learned implicit function . Then , by minimizing the output reaching distance , the agent can be nudged by the gradients ∆xc back-propagated from the implicit function to a new position xc−∆xc , where the reaching distance is smaller , i.e. , closer to the goal . Starting at xs , we repeat the above pro- cess and gradually decrease the reaching distance from the current position to the goal until the agent reaches the goal at xe . The gradient descent method computes the direction at each move based on the function values within an infinitesimal area surrounding the current location , and thus the agent can only take an infinitesimally small step at each move . However , in 2D maze , an agent usually takes a fixed , much larger step , e.g. , one grid cell at each move . Therefore , we constrain that an agent moves by one grid cell along one of 23 = 8 possible directions at each time , as shown in Fig . 2 ( a ) . We then query the learned implicit function for the reaching distance values at all possible positions that the agent can reach in one time step and move the agent to the position with the smallest reaching distance . We keep updating the agent ’ s position until it reaches the goal ( see Fig . 2 ( b ) ) .

Summary: This work introduces a novel scene representation for agent navigation in 2D and 3D environments. At the core of the method is an implicit neural representation of environment - implicit environment field (IEF) - which is a neural net that maps location coordinates to its reaching distance. Several conditional variants of IEFs are proposed to allow for generalization to novel environments and goal locations. Navigation can the be achieved by gradient descent on the reaching function or a discretized greedy algorithm.  Experimental evaluation is conducted on 2D maze navigation and 3D human motion prediction, and indicate that the proposed representation performs favorably to the baselines.