Bayesian Incremental Inference Update by Re-using Calculations from Belief Space Planning: A New Paradigm

Inference and decision making under uncertainty are key processes in every autonomous system and numerous robotic problems. In recent years, the similarities between inference and decision making triggered much work, from developing unified computational frameworks to pondering about the duality between the two. In spite of these efforts, inference and control, as well as inference and belief space planning (BSP) are still treated as two separate processes. In this paper we propose a paradigm shift, a novel approach which deviates from conventional Bayesian inference and utilizes the similarities between inference and BSP. We make the key observation that inference can be efficiently updated using predictions made during the decision making stage, even in light of inconsistent data association between the two. We developed a two staged process that implements our novel approach and updates inference using calculations from the precursory planning phase. Using autonomous navigation in an unknown environment along with iSAM2 efficient methodologies as a test case, we benchmarked our novel approach against standard Bayesian inference, both with synthetic and real-world data (KITTI dataset). Results indicate that not only our approach improves running time by at least a factor of two while providing the same estimation accuracy, but it also alleviates the computational burden of state dimensionality and loop closures.

Introduction
Real life scenarios in autonomous systems and artificial intelligence involve agent(s) that are expected to reliably and efficiently operate under different sources of uncertainty, often with limited knowledge regarding the environment; e.g. autonomous navigation and simultaneous localization and mapping (SLAM), search and rescue scenarios, object manipulation and robot-assisted surgery. These settings necessitate probabilistic reasoning regarding high dimensional problem-specific states. For instance, in SLAM, the state typically represents robot poses and mapped static or dynamic landmarks, while in environmental monitoring and other sensor deployment related problems the state corresponds to an environmental field to be monitored (e.g. temperature as a function of position and perhaps time).
Attaining these levels of autonomy involves two key processes, inference and decision making under uncertainty. The former maintains a belief regarding the high-dimensional state given available information thus far, while the latter, also often referred to as belief space planning (BSP), is entrusted with determining the next best action(s).
The inference problem, has been addressed by the research community extensively over the past decades. In particular, focus was given to inference over high-dimensional state spaces, with SLAM being a representative problem, and to computational efficiency to facilitate online operation, as required in numerous robotics systems. Over the years, the solution paradigm for the inference problem has evolved. From EKF based methods (Davison et al., 2007;Haykin et al., 2001), through information form recursive (Thrun et al., 2004) and smoothing methods (Dellaert and Kaess, 2006;Eustice et al., 2006), and in recent years up to incremental smoothing approaches, such as iSAM (Kaess et al., 2008) and iSAM2 (Kaess et al., 2012).
Given the posterior belief from the inference stage, decision making under uncertainty and belief space planning approaches are entrusted with providing the next optimal action sequence given a certain objective. The aforementioned is accomplished by reasoning about belief evolution for different candidate actions while taking into account different sources of uncertainty. The corresponding problem is an instantiation of a partially observable Markov decision process (POMDP) problem, which is known to be computationally intractable (Bernstein et al., 2002) for all but the smallest problems, i.e. no more than few dozen states (Kaelbling et al., 1998 Figure 1: High level algorithm for joint inference and BSP presented in a block diagram: (a) presents a standard plan-act-infer framework with Bayesian inference and BSP treated as separate processes; (b) presents our novel approach for inference update using precursory planning. Instead of updating the belief from precursory inference with new information we propose to update the belief from a precursory planning phase. Since the only difference between (a) and (b) manifests in computation time within the inference block, it is timed for comparison.
In contrast to the notion of joint inference and control, which considers an MDP setting, we consider a partially observable setting (POMDP). Through the symbiotic relation enabled by considering the joint inference and BSP problems we make the following key research hypothesis: Inference can be efficiently updated using a precursory planning stage. This paper investigates this novel concept for inference update, considering operation in uncertain or unknown environments and compares it against the current state of the art in both simulated and real-life environments.
Updating inference with a precursory planning stage can be considered as a deviation from conventional Bayesian inference. Rather than updating the belief from the previous time instant with new incoming information (e.g. measurements), we propose to exploit the fact that similar calculations have already been performed within planning, in order to appropriately update the belief in inference more efficiently. We denote this novel approach by Re-Use BSP inference, or RUB inference in short.
The standard plan-act-infer framework of a typical autonomous system with conventional Bayesian approach for inference update is presented in Figure 1a. First, BSP determines the next best action(s) given the posterior belief at current time; the robot performs this action(s); information is gathered and the former belief from the precursory inference is updated with new information (sensor measurements); the new posterior belief is then transferred back to the planning block in order to propagate it into future beliefs and provide again with the next action(s).
Our proposed concept, RUB inference, is presented in Figure 1b. RUB inference differs from the conventional Bayesian inference in two aspects: The output of the BSP process and the procedure of inference update. As opposed to standard Bayesian inference, in RUB inference, BSP output includes the next action(s) as well as the corresponding propagated future beliefs. These beliefs are used to update inference while potentially taking care of data association aspects, rather than using the belief from precursory inference as conventionally done under Bayesian inference. As can be seen in Figure 1b, the inference block contains data association (DA) update before the actual inference update. There are a lot of elements that can cause the DA in planning to be partially different than the DA established in the successive inference, e.g. estimation errors, disturbances, and dynamic or un-modeled unseen environments.
We start investigating this novel concept under a simplifying assumption that the DA considered in planning is consistent to that acquired during the succeeding inference, e.g. we predicted an association to a specific known or previously mapped landmark and later indeed observed that landmark. Since data association only relates to connections between variables and not to the measurement value, we are left with replacing the (potentially) incorrect measurement values, used within planning, with the actual values. Under this assumption, we provide four exact methods to efficiently update inference using the belief calculated by the precursory planning phase. As will be seen, these methods provide with the same estimation accuracy as the conventional Bayesian inference approach, with a significantly shorter computation time.
We later relax the simplifying assumption mentioned above, and show inference can be efficiently updated using the precursory planning stage even when the DA considered in the two processes is partially different. Figure 2 illustrates such a case of inconsistent DA. Figure 2a presents the factor graph (FG) obtained from the precursory planning stage, where in the figure current time is bolded, and dotted lines are used for all future factors. After performing the (sub)optimal action calculated in the planning phase, new measurements are obtained, and the corresponding DA is determined. Figure 2b presents the FG corresponding to the successive inference stage. Due to the aforementioned differences the DA predicted in planning is inconsistent to the actual DA related to the new measurements. In our example, instead of viewing a certain previously mapped landmark as assumed in planning, we viewed a different mapped landmark along with a new one, while only association to the next pose remained the same.
In such a case, merely updating the measurement values will not resolve the difference between the aforementioned FGs; instead the DA should be updated to match the acquired data, before updating the measurement values. We provide a novel paradigm to update inconsistent DA, leveraging iSAM2 graphical model based methodologies, thus setting the conditions for complete inference update via BSP regardless of DA consistency.
To summarize, our contributions in this paper 1 are as follows: (a) We introduce RUB inference, a novel approach for saving computation time during the inference stage by reusing calculations made during the precursory planning stage; (b) We provide four exact methods, that utilize our concept under the assumption of consistent DA. We evaluate these four methods and compare them to the state of the art in simulation. (c) We provide a paradigm for incrementally updating inconsistent DA, thereby relaxing the afore-mentioned assumption; (d) We evaluate our complete paradigm and compare it to the state of the art both in simulation and on real-world data, considering the problem of autonomous navigation in unknown environments. ], respectively, which differ due to incorrect association considered in the planning phase -l j was predicted to be observed within planning, while in practice l i and l r were observed at time instant k + 1. In (a), current-time robot pose is bolded, horizon factors and states are dotted. Involved variables from DA comparison are marked in red in (a) and green in (b). The belief b[X k+1|k ], represented by a Bayes tree shown in (d), is divided in two: sub Bayes tree containing all involved variables and parent cliques up to the root (marked in blue) and the rest of the Bayes tree in white. The former sub Bayes tree is re-eliminated by (i) forming the corresponding portion of the factor graph, as shown in the left figure of (c); (ii) removing incorrect DA and adding correct DA factors, which yields the factor graph shown in the right figure of (c); (iii) re-eliminating that factor graph into a sub Bayes tree, marked blue in (e), and re-attaching the rest of the Bayes tree. While the obtained Bayes tree now has a correct DA, it is conditioned on (potentially) incorrect measurement values for consistent-DA factors, which therefore need to be updated (as detailed in Section 3.4), to recover the posterior belief b[X k+1|k+1 ].
This paper is organized as follows. Section 2 formulates the discussed problem. Section 3 presents the suggested approach and its mathematical formulation. Section 4 presents a thorough analysis of the suggested approach and a comparison to related work. Section 5 captivates the conclusions of our work along with possible extensions and usage. To improve coherency, several aspects are covered in the Appendix.

Background and Problem Formulation
In this work, we consider the joint inference and belief space planning problem in a model predictive control (MPC) setting, i.e. BSP is performed after each inference phase. This problem can be roughly divided into two successive and recursive stages, namely inference and planning. The former performs inference given all information up to current time, updating the belief over the state with incoming information (e.g. sensor measurements). The latter produces the next control action(s), given the belief from the former inference stage and a user defined objective function.
Let x t denote the robot's state at time instant t and L represent the world state if the latter is uncertain or unknown. For example, for SLAM problem, it could represent objects or 3D landmarks. The joint state, up to time k, is defined as X k = {x 0 , ..., x k , L} ∈ R n . We shall be using the notation t|k to refer to some time instant t while considering information up to time k; as will be shown in the sequel, this notation will allow to refer to sequential inference and planning phases in a unified manner.
Let z t|k and u t|k denote, respectively, the obtained measurements and the applied control action at time t, while the current time is k. For example, z k+1|k represents measurements from a future time instant k + 1 while z k−1|k represents measurements from a past time instant k − 1, with the present time being k in both cases. Representing the measurements and controls up to time t, given current time k, as the posterior probability density function (pdf) over the joint state, denoted as the belief, is given by For t = k, Eq.
(2) represents the posterior at current time k, while for t > k it represents planning stage posterior for a specific sequence of future actions and observations. Using Bayes rule, Eq.
(2) can be rewritten as where P(X 0 ) is the prior on the initial joint state, P(x i |x i−1 , u i−1|k ) and P(z j i|k |x i , l j ) denote, respectively, the motion and measurement likelihood models. The set M i|k contains all landmark indices observed at time i, i.e. it denotes data association (DA). The measurement of some landmark j at time i is denoted by z j i|k ∈ z i|k . Under graphical representation of the belief, the conditional probabilities of the motion and observation models as well as the prior, can be denoted as factors (see Appendix-A). Eq. (3) can also be represented by a multiplication of these factors where {f j } i|k represents all factors added at time i while current time is k. The motion and measurement models are conventionally modeled with additive zero-mean Gaussian noise where f and h are known possibly non-linear functions, Σ w and Σ v are the process and measurement noise covariance matrices, respectively.

Inference
For the inference problem, t ≤ k, i.e time instances that are equal or smaller than current time. The maximum a posteriori (MAP) estimate of the joint state X k is given by The MAP estimate from Eq. (7) is referred to as the inference solution, in which, all controls and observations until time instant k are known.

Planning in the Belief Space
As mentioned, the purpose of planning is to determine the next optimal action(s). Finite horizon belief space planning for L look ahead steps involves inference over the beliefs b[X k+l|k ] = P(X k+l |z 1:k+l|k , u 0:k+l−1|k ) , l ∈ [k + 1, k + L] where we use the same notation as in Eq.
(2) to denote the current time is k. The belief (8) can be written recursively as a function of the belief b[X k|k ] from the inference phase as for the considered action sequence u k:k+l−1|k at planning time k, and observations z k+1:k+l|k that are expected to be obtained upon execution of these actions. The set M i|k denotes landmark indices that are expected to be observed at a future time instant i.
One can now define a general objective function with immediate costs (or rewards) c i and where the expectation considers all the possible realizations of the future observations z k+1:k+L|k . Conceptually, one could also reason whether these observations will actually be obtained, e.g. by considering also different realizations of M i|k . Note that for information-theoretic costs (e.g. entropy) and Gaussian distributions considered herein, it can be shown that the expectation operator can be omitted under maximum-likelihood observations assumption (Indelman et al., 2015), while another alternative is to simulate future observations via sampling (Pathak et al., 2016), if such a simulator is available. The optimal control can now be defined as u k:k+L−1|k = arg min Evaluating the objective function (10) for a candidate action sequence involves calculating belief evolution for the latter, i.e. solving the inference problem for each candidate action using predicted future associations and measurements.

Problem Statement
Our key observation is that inference and BSP share similar calculations. Despite the similarities between them, they are treated as separate processes, thus duplicating costly calculations and increasing valuable computation time. This observation is impervious to any specific paradigms used for inference or planning and constitutes the difference between the use of RUB inference as opposed to conventional Bayesian inference. Our goal is to salvage valuable computation time in the inference update stage by exploiting the similarities between inference and precursory planning, thus without affecting solution accuracy or introducing new assumptions.

Approach
Calculating the next optimal action u k|k ∈ u k:k+L−1|k within BSP necessarily involves inference over the belief b[X k+1|k ] conditioned on the same action u k|k . As we discuss in the sequel, this belief b[X k+1|k ] can be different than b[X k+1|k+1 ] (the posterior at current time k + 1) due to partially inconsistent data association and difference between measurement values considered in planning and those obtained in practice in inference. Our approach for RUB inference, takes care of both of these aspects, thereby enabling to obtain b[X k+1|k+1 ] from b[X k+1|k ].
In the following, we first analyze the similarities between inference and BSP (Sections 3.1 and 3.2), and use these insights in Section 3.4 to develop methods for inference update under a simplifying assumption of consistent DA. We then relax this assumption, by analyzing the possible scenarios for inconsistent DA between inference and precursory planning (Section 3.5.1), and deriving a method for updating inconsistent DA (Section 3.5.2).
It is worth stressing that the only thing needed to be changed in any BSP algorithm in order to support our paradigm for RUB inference, is just adding more information to its output. More specifically, outputting not only the (sub)optimal action u k|k , but also the corresponding future belief b[X k+1|k ] (e.g. the difference between Figures 1a and 1b).

Looking into Inference
To better understand the similarities between inference and precursory planning, let us break down the inference solution to its components. Introducing Eqs. (3-6) into Eq. (7) and taking the negative logarithm yields the following non-linear least squares problem (NLS) where a 2 Σ . = a T Σ −1 a is the squared Mahalanobis norm. Linearizing each of the terms in Eq. (12) and performing standard algebraic manipulations (see, e.g., Indelman et al. (2015)) yields ∆X k|k = arg min where A k|k ∈ R m×n is the Jacobian matrix and b k|k ∈ R m is the right hand side (RHS) vector. In a more elaborated representation where F 1:k|k , H 1:k|k ,b F 1:k|k andb H 1:k|k (Indelman et al., 2015) denote the Jacobian matrices and RHS vectors of all motion and observation terms accordingly, for time instances 1 : k when the current time is k. These Jacobians, along with the corresponding RHS can be referred to by While there are a few methods to solve Eq. (13), we choose QR factorization as presented, e.g., in Kaess et al. (2008). The QR factorization of the Jacobian matrix A k|k is given by the orthonormal rotation matrix Q k|k and the upper triangular matrix R k|k A k|k = Q k|k R k|k .
Eq. (16) is introduced into Eq. (13), thus producing where R k|k is un upper triangular matrix and d k|k is the corresponding RHS vector, given by the original RHS vector and the orthonormal rotation matrix Q k|k d k|k .
We can now solve Eq. (17) for ∆X k via back substitution, update the linearization point, and repeat the process until convergence. Eq. (17) can also be presented using a Bayes tree (BT) (Kaess et al., 2010). A BT is a graphical representation of a factorized Jacobian matrix (the square root information matrix) R and the corresponding RHS vector d, in the form of a directed tree. More on the formulation of inference using graphical models can be found in Appendix A. One can substantially reduce running time by exploiting sparsity and updating the QR factorization from the previous step with new information instead of calculating a factorization from scratch, see e.g. iSAM2 algorithm (Kaess et al., 2012).
To summarize this section, the belief b[X k|k ] can be represented as the Gaussian while the information matrix is given by and the factorized Jacobian matrix R k|k along with the corresponding RHS vector d k|k can be used to update the linearization point and to recover the MAP estimate. In other words, the factorized Jacobian matrix R k|k and the corresponding RHS vector d k|k are sufficient for performing a single iteration within Gaussian belief inference.

Looking into Planning
An interesting insight, that will be exploited in the sequel, is that the underlying equations of BSP are similar to those seen in Section 3.1. In particular, evaluating the belief at the Lth look ahead step, b[X k+L|k ], involves MAP inference over a certain action sequence u k:k+l−1|k and future measurements z k+1:k+l|k , which in turn, as in Section 3.1, can be described as an NLS problem For i > k, the set M i|k contains predicted associations for future time instant i; hence, we can write where ♦ is an operator taken from Modal-Logic which stands for "Possibly". In other words, it is possible that associations from the planning stage, M k+1|k , would be partially different than the associations from the corresponding inference stage M k+1|k+1 . Moreover, the likelihood for inconsistent DA between planning and the corresponding inference rises as we look further into the future, i.e. with the distance i − k increasing; e.g. M k+j|k and M k+j|k+j are less likely to be identical for j = 10 than they are for j = 1. Predicting the unknown measurements z k+1:k+L|k in terms of both association and values can be done in various ways. In this paper the DA is predicted using current state estimation, and measurement values are obtained using the maximum-likelihood (ML) assumption, i.e. assuming zero innovation (Dellaert and Kaess, 2006). The robot pose is first propagated using the motion model (5). All landmark estimations are then transformed to the robot's new camera frame. Once in the robot camera frame, all landmarks that are within the robot's field of view are considered to be seen by the robot (predicted DA). The estimated position of each landmark, that is considered as visible by the robot, is being projected to the camera image plane (Hartley and Zisserman, 2004), thus generating measurements. It is worth mentioning that the aforementioned methodology is not able to predict occurrences of new landmarks, since it is based solely on the map the robot built thus far, i.e. current joint state estimation. The ability to predict occurrences of new landmarks would increase the advantage of RUB inference over conventional Bayesian inference (as discussed in the sequel), hence is left for future work.
Once the predicted measurements are acquired, by following a similar procedure to the one presented in Section 3.1, for each action sequence we get The Jacobian matrix A k+L|k and RHS vector b k+L|k are defined as where A k|k and b k|k are taken from inference, see Eq. (13), and A k+1:k+L|k andb k+1:k+L|k correspond to the new terms obtained at the first L look ahead steps (e.g. see Eq. (15)). Note that although A k+1:k+L|k is not a function of the (unknown) measurements z k+1:k+L|k , it is a function of the predicted DA, M k+1:k+L|k (Indelman et al., 2015). Performing QR factorization, yields from which the information matrix, required in the information-theoretic cost, can be calculated. Using Eq. (24) the belief that correlates to the specific action sequence can be estimated, enabling evaluating the objective function (10). Determining the best action via Eq. (11) involves repeating this process for different candidate actions.

Similarities between Inference and BSP
In an MPC setting, only the first action from the sequence u k:k+L−1|k is executed, i.e.
In such case the difference between the belief obtained from BSP (for action and the belief from the succeeding inference is rooted in the set of measurements (i.e. z k+1|k+1 vs. z k+1|k ), and the corresponding factors added at time instant k + 1. These factor sets, denoted by {f i } k+1|k and {f j } k+1|k+1 accordingly, can differ from one another in data association and measurement values. Since solving the belief requires linearization (13), it is important to note that both beliefs, b[X k+1|k ] and b[X k+1|k+1 ], make use of the same initial linearization pointX k+1 for the common variables. In particular, as in this work we do not reason within planning about new, unmapped thus far, landmarks, it follows that where L new k+1 represents the new landmarks that were added to the belief for the first time at time instant k + 1. The linearization point for the common variables is [X k|k , f (x k , u k|k )] for planning, and [X k|k , f (x k , u k|k+1 )] for succeeding inference, where f (.) is the motion model (5). Since the (sub)optimal action provided by BSP is the one executed in the succeeding inference i.e. Eq. (26), the motion models are identical hence the same linearization point is used in both inference and precursory planning.
When considering the belief from planning (27), which is propagated with the next action (26) and predicted measurements, with the previously factorized form of A k|k and b k|k , we get Similarly, when considering the a posteriori belief from inference (28), propagated with the next action (26) and acquired measurements, with the previously factorized form of A k|k and b k|k , we get For the same action (26), the difference between Eq. (30) to the equivalent representation of standard Bayesian inference (31) originates from the factors added at time k + 1 Since the aforementioned share the same action sequence, the same linearization point and the same models, the differences remain limited to the DA and measurement values at time k + 1. In planning, DA is based on predicting which landmarks would be observed. This DA could very possibly be different than the actual landmarks the robot observes, as expressed by Eq. (22). This inconsistency in DA manifests in both the Jacobian matrices and the RHS vectors. Even in case of consistent DA, the predicted measurements (if exist) would still be different than the actual measurements due to various reasons, e.g. the predicted position is different than the ground truth of the robot, measurement noise, inaccurate models.
While for consistent DA and the same linearization point Eq. (32) will always be true, the RHS vectors, specifically Eq. (33), would still be different due to the difference in measurement values considered in planning and actually obtained in inference.
It is worth stressing that consistent data association between inference and precursory planning suggests that all predictions for state variable (new or existing) associations were in fact true. In addition to the new robot state added each time instant, new variables could also manifest in the form of landmarks. Consistent DA implies that the future appearance of all new landmarks has been perfectly predicted during planning. Since for the purpose of this work, we use a simple prediction mechanism unable to predict new landmarks (see Section 3.2), consistent DA would inevitably mean no new landmarks in inference, i.e L new k+1 is an empty set. We start developing our method by assuming consistent DA between inference and precursory planning. In such a case the difference is limited to the RHS vectors. Later we relax this assumption by dealing with possible DA inconsistency prior to the update of the RHS vector, thus addressing the general and complete problem of inference update using RUB inference paradigm.

Inference Update from BSP assuming Consistent Data Association
Let us assume that the DA between inference and precursory planning is consistent, whether the cause is a "lucky guess" during planning or whether the DA inconsistency has been resolved beforehand. Recalling the definition of M i|k (see e.g. Eq. (12)), this assumption is equivalent to writing In other words, landmarks considered to be observed at a future time k + 1, will indeed be observed at that time. Note this does not necessarily imply that actual measurements and robot poses will be as considered within the planning stage, but it does necessarily state that both are considering the same variables and the same associations. We now observe that the motion models in both b[X k+1|k+1 ] and b[X k+1|k ] are evaluated considering the same control (i.e. the optimal control u k ). Moreover, the robot pose x k+1 is initialized to the same value in both cases as f (x k , u k ), see e.g. Indelman et al. (2015), and thus the linearization point of all probabilistic terms in inference and planning is identical. This, together with the aforementioned assumption (i.e. Eq. (34) holds) allows us to write for the first iteration in the inference stage at time k + 1. Hence, in order to solve b[X k+1|k+1 ] we are left to find the RHS vector d k+1|k+1 , while R k+1|k+1 can be entirely re-used.
In the sequel we present four methods that can be used for updating the RHS vector, and examine computational aspects of each. It is worth mentioning that each of these methods results in an algebraically equivalent solution to standard inference update, hence provide with the same estimation accuracy.

The Orthogonal Transformation Matrix Method -OTM
In the OTM method, we obtain d k+1|k+1 following the definition as written in Eq. (18). Recall that at time k + 1 in the inference stage, the posterior should be updated with new terms that correspond, for example, to motion model and obtained measurements. The RHS vector's augmentation, that corresponds to these new terms is denoted by b k+1|k+1 , see Eq. (15). Given R k|k and d k|k from the inference stage at time k, the augmented system at time k + 1 is where As deduced from Eq.

The Downdate Update Method -DU
In the DU method we propose to re-use the d k+1|k vector from the planning stage to calculate d k+1|k+1 .
While not necessarily required within the planning stage, d k+1|k could be calculated at that stage from b k+1|k and Q k+1|k , see Eqs. (24)-(25). However, b k+1|k (unlike A k+1|k ) is a function of the unknown future observations z k+1|k , which would seem to complicate things. Our solution to this issue is as follows: We assume some value for the observations z k+1|k and then calculate d k+1|k within the planning stage. As in inference at time k + 1, the actual measurements z k+1|k+1 will be different, we remove the contribution of z k+1|k to d k+1|k via information downdating (Cunningham et al., 2013), and then appropriately incorporate z k+1|k+1 to get d k+1|k+1 .
More specifically, downdating the measurements z k+1|k from d k+1|k is done via (Cunningham et al., 2013) whereb k+1|k is a function of z k+1|k , see Eqs. (21)-(24), and where R aug k+1|k is the downdated R k+1|k matrix which is given by Interestingly, the above calculations are not really required: Since we already have d k|k from the previous inference stage, we can attain the downdated d aug k+1|k vector more efficiently by augmenting d k|k with zero padding.
While d aug k+1|k is the downdated RHS vector and 0 is a zero padding to match dimensions. Similarly, R aug k+1|k can be calculated as where R k|k is zero padded to match dimensions of R k+1|k . Now, all which is left to get d k+1|k+1 , is to incorporate the new measurements z k+1|k+1 (encoded inb k+1|k+1 ). Following Cunningham et al. (2013), this can be done via where A k+1|k+1 ≡ A k+1|k according to Eq. (34).

The OTM -Only Observations Method -OTM-OO
The OTM-OO method is a variant of the OTM method. OTM-OO aspires to utilize even more information from the planning stage. Since the motion models from inference and the precursory planning first step are identical, i.e. same function f (., .), see Eqs. (12) and (21), and as in both cases the same control is considered -to Eq. (26), there is no reason to change the motion model data from the RHS vector d k+1|k . In order to enable the aforementioned, we require the matching rotation matrix. One way would be to break down the planning stage as described in Section 3.2 into two stages, in which the motion and observation models are updated separately. Such breakdown impose no effect over the computation time or accuracy of the planning stage solution, as will be shown later on. So following Section 3.4.1, we attain from planning the RHS vector already with the motion model (d F k+1|k ), augment it with the new measurements and rotate it with the corresponding rotation matrix obtained from the planning stage.
While the rotation matrix Q H k+1|k is given from the precursory planning stage where As will be seen later on, the OTM-OO method would prove to be the most efficient between the four suggested methods.

The DU -Only Observations Method -DU-OO
The DU-OO method is a variant of the DU method, where, similarly to Section 3.4.3, we utilize the fact that there is no reason to change the motion model data from the RHS vector d k+1|k . Hence we would downdate all data with the exception of the motion model, and then update accordingly. As opposed to Section 3.4.2, now we do need to downdate using Cunningham et al. (2013) where d F k+1|k is the RHS vector, downdated from all new measurements with the exception of the motion model and R F k+1|k is the equivalent downdated R k+1|k matrix which is given by where H k+1|k denotes the portion of the planning stage Jacobian, of the new factors with the exception of the motion model. Now, all which is left, is to update d F k+1|k with the new measurements from the inference stage.

Inconsistent Data Association
In order to address the more general and realistic scenario, the DA might require correction before proceeding to update the new acquired measurements. In the sequel we cover the possible scenarios of inconsistent data association and its graphical materialization, followed by a paradigm to update inconsistent DA from planning stage according to the actual DA attained in the consecutive inference stage. We later examine both the computational aspects and the sensitivity of the paradigm to various parameters both on simulated and real-life data.

Types of inconsistent DA
We would now discuss, without loosing generality, the actual difference between the two aforementioned beliefs b[X k+1|k ] and b[X k+1|k+1 ]. As already presented in Section 3.4, in case of a consistent DA i.e. M k+1|k = M k+1|k+1 , the difference between the two beliefs is narrowed down to the RHS vectors d k+1|k and d k+1|k+1 which encapsulates the measurements z k+1|k and z k+1|k+1 respectively. However, in the real world it is possible that the DA predicted in precursory planning would prove to be inconsistent to the DA attained in inference, i.e. ♦ M k+1|k = M k+1|k+1 . There are six possible scenarios representing the relations between DA in inference and precursory planning: • In planning, association is assumed to either a new or existing variable, while in inference no measurement is received.
• In planning it is assumed there will be no measurement to associate to, while in inference a measurement is received and associated to either a new or existing variable.
• In planning, association is assumed to an existing variable, while in inference it is to a new variable.
• In planning, association is assumed to a new variable, while in inference it is to an existing variable.
• In planning, association is assumed to an existing variable, while in inference it is also to an existing variable (whether the same or not).
• In planning, association is assumed to a new variable, while in inference it is also to a new variable (whether the same or not).
While the first four bullets always describe inconsistent DA situations (e.g. in planning we assumed a known tree would be visible but instead we saw a new bench, or vice versa), the last two bullets may provide consistent DA situations. In case associations in planning and in inference are to the same (un)known variables we would have a consistent DA. While different planning paradigms might diminish occurrences of inconsistent DA, e.g. by better predicting future associations, none can avoid it completely. Methods to better predict future observations/associations will be investigated in future work, potentially leveraging Reinforcement Learning (RL) techniques. As mentioned in Section 3.2, in this paper we do not predict occurrences of new landmarks, hence every new landmark in inference would result in inconsistent DA.
In the following section we provide a method to update inconsistent DA, regardless of a specific inconsistency scenario or a solution paradigm. This method utilizes the incremental methodologies of iSAM2 (Kaess et al., 2012) in order to efficiently update the belief from the planning stage to be with consistent DA to that of the succeeding inference.

Updating Inconsistent DA
Inconsistent DA can be interpreted as disparate connections between variables. As discussed earlier, these connections, denoted as factors, manifest in rows of the Jacobian matrix or in factor nodes of a FG. Two FGs with different DA would thus have different graph topology. We demonstrate the inconsistent DA impact over graph topology using the example presented in Figure 2: Figure 2a represents the belief b[X k+1|k ] from planning stage, and Figure 2b represents the belief b[X k+1|k+1 ] from the inference stage. Even-though the same elimination order is used, the inconsistent DA would also create a different topology between the resulting BTs, e.g. the resulting BTs for the aforementioned FGs are Figure 2d and Figure 2e accordingly.
Performing action u k|k+1 , provides us with new measurements z k+1|k+1 , which are gathered to the factor set {f j } k+1|k+1 (see Appendix A for factor definition). From the precursory planning stage we have the belief b[X k+1|k ] along with the corresponding factor set {f i } k+1|k for time k + 1. Since we performed inference over this belief during the planning stage, we have already eliminated the FG, denoted as FG k+1|k , into a BT denoted as T k+1|k , e.g. see Figure 2a and Figure 2d, respectively.
We would like to update both the FG FG k+1|k and the BT T k+1|k from the planning stage, using the new factors {f j } k+1|k+1 from the inference stage. Without loosing generality we use Figure 2 to demonstrate and explain the DA update process. Let us consider all factors of time k + 1 from both planning {f i } k+1|k and inference {f j } k+1|k+1 . We can divide these factors into three categories: The first category contains factors with consistent DA -Good Factors. These factors originate from only the last two DA scenarios, in which both planning and inference considered either the same existing variable or a new one. Consistent DA factors do not require our attention (other than updating the measurements in the RHS vector). Indices of consistent DA factors can be obtained by intersecting the DA from planning with that of inference: The second category -Wrong Factors, contains factors from planning stage with inconsistent DA to inference, which therefore should be removed from FG k+1|k . These factors can originate from all DA scenarios excluding the second. Indices of inconsistent DA factors from planning, can be obtained by calculating the relative complement of M k+1|k with respect to M k+1|k+1 : The third category -New Factors, contains factors from the inference stage with inconsistent DA to planning; hence, these factors should be added to FG k+1|k . These factors can originate from all DA scenarios excluding the first. Indices of inconsistent DA factors from inference, can be obtained by calculating the relative complement of M k+1|k+1 with respect to M k+1|k : We now use our example from Figure 2 to illustrate these different categories: • The first category -Good Factors, contains all factors from time k + 1 that appear both in Figure 2a and 2b, i.e. the motion model factor between x k to x k+1 .
• The second category -Wrong Factors, contains all factors that appear only in Figure 2a, i.e. the star marked factor in Figure 2a. In this case the inconsistent DA is to an existing variable, landmark l j was considered to be observed in planning but is not seen in the succeeding inference.
• The third category -New Factors, contains all factors that appear only in Figure 2b, i.e. the star marked factors in Figure 2b. In this case the inconsistent DA is both to an existing and a new variable. Instead of landmark l j that was considered to be observed in planning, a different existing landmark l i has been seen, along with a new landmark l r .
Once the three aforementioned categories are determined, we use iSAM2 methodologies, presented in Kaess et al. (2012), to incrementally update FG k+1|k and T k+1|k , see Alg. 1. The involved factors are denoted by all factors from planning needed to be removed (Wrong Factors), and all factors from inference needed to be added (New Factors), return FG upd k+1|k , T upd k+1|k .

15: end function
{f r } add k+1 (Alg. 1, line 6), e.g. the colored variables in Figures 2a and 2b accordingly. In T k+1|k , all cliques between the ones containing {X} inv k+1 up to the root are marked and denoted as the involved cliques, e.g. colored cliques in Figure 2d. The involved cliques are detached and denoted by T inv k+1 ⊂ T k+1|k (line 7). This sub-BT T inv k+1 , contains more variables than just {X} inv k+1 . The involved variable set {X} inv k+1 , is then updated to contain all variables from T inv k+1 and denoted by {X} inv k+1 (line 8). The part of FG k+1|k , that contains all involved variables {X} inv k+1 is detached and denoted by FG inv k+1 (line 9). While T inv k+1 is the corresponding sub-BT to the acquired sub-FG FG inv k+1 . In order to finish updating the DA, all that remains is updating the sub-FG FG inv k+1 with the correct DA and re-eliminate it to get an updated BT. All factors {f r } rmv k+1 are removed from FG inv k+1 , then all factors {f r } add k+1 are added (line 10). The updated sub-FG is denoted by FG upd k+1 , e.g. update illustration in Figure 2c. By re-eliminating FG upd k+1 , a new updated BT, denoted by T upd k+1 , is obtained (line 11), e.g. the colored sub-BT in Figure 2e. This BT is then re-attached back to T k+1|k instead of T inv k+1 , subsequently the new BT is now with consistent DA and is denoted as T upd k+1|k (line 13). In a similar manner FG upd k+1|k is obtained by re-attaching FG upd k+1 instead of FG inv k+1 to FG k+1|k (line 12). At this point the DA in both the FG and the BT is fixed. For example, by completing the aforementioned steps, Figures 2a and 2d will have the same topology as Figures 2b and 2e.
After the DA update, the BT T upd k+1|k has consistent DA to that of M k+1|k+1 . However, it is still not identical to T k+1|k+1 due to difference between measurement values predicted in planning to the values obtained in inference. The DA update dealt with inconsistent DA factors and their counterparts. For these factors the new measurements from inference were updated in the corresponding RHS vector values within the BT. The consistent DA factors, on the other hand, were left untouched; therefore, these factors do not contain the new measurement values from inference but measurement values from the planning stage instead. These inconsistent measurements are thus baked into the RHS vector d k+1|k and in the appropriate cliques of the BT T upd k+1|k . In order to update the RHS vector d k+1|k , or equivalently update the corresponding values within relevant cliques of the BT, one can use any of the methods presented in Section 3.4.

Results
In this section we present an extensive analysis of the proposed paradigm for RUB inference and benchmark it against the standard Bayesian inference approach using iSAM2 efficient methodologies as a proving-ground.
We consider the problem of autonomous navigation and mapping in an unknown environment as a testbed for the proposed paradigm, first in a simulated environment and later-on in a real-world environment (as discussed in the sequel). The robot performs inference to maintain a belief over its current and past poses and the observed landmarks thus far (i.e.full-SLAM), and uses this belief to decide its next actions within the framework of belief space planning. As mentioned earlier, our proposed paradigm is indifferent to a specific method of inference or decision making.
In order to test the computational effort, we compared inference update using iSAM2 efficient methodology, once based on the standard Bayesian inference paradigm (Kaess et al., 2012) (here on denoted as iSAM), and second based on our proposed RUB inference paradigm.
All of our complementary methods (see Section 3.4), required to enable inference update based on the RUB inference paradigm, were implemented in MATLAB and are encased within the inference block. The iSAM approach uses the GTSAM C++ implementation with the supplied MATLAB wrapper (Dellaert, 2012). Considering the general rule of thumb, that MATLAB implementation is at least one order of magnitude slower, the comparison to iSAM as a reference is extremely conservative. All runs were executed on the same Linux machine, with Xeon E3-1241v3 3.5 GHz processor with 32 GB of memory.
In order to get better understanding of the difference between our proposed paradigm and the standard Bayesian inference, we refer to the high-level algorithm diagram given in Figure 1, which depicts a plan-act-infer framework. Figure 1a represents a standard Bayesian inference, where only the first inference update iteration is timed for comparison reasons. Figure 1b shows our novel paradigm RUB inference, while the DA update, along with the first inference update iteration, are being timed for comparison. The computation time comparison is made only over the inference stage, since the rest of the plan-act-infer framework is identical in both cases.
As mentioned, our proposed paradigm does not affect estimation accuracy. We verify that in the following experiments, by comparing the estimation results obtained using our approach and iSAM. Both provide essentially the same results in all cases; we provide an explicit accuracy comparison with real-world data experiment (Section 4.2).

Basic Analysis -Sanity Check
The purpose of this experiment is to provide with a basic comparison between the suggested paradigm for RUB inference and the existing standard Bayesian inference. This simulation preforms a single horizon BSP calculation, followed by an inference step with a single inference update. The simulation provides a basic analysis of running time for each method, denoted by the z axis, for a fully dense information matrix and with no loop closures. The presented running time is a result of an average between 10 3 repetitions per step per method. Although a fully dense matrix does not represent a real-world scenario, it provides a sufficient initial comparison. The simulation analyzes the sensitivity of each method to the initial state vector size, denoted by the y axis, and to the number of new factors, denoted by x axis. Since we perform a single horizon step with a single inference update, no re-linearization is necessary; hence, iSAM comparison is valid. The purpose of this check is to provide a simple sensitivity analysis of our methods to state dimension and number of new factors per step, while compared against standard batch update (denoted as STD) and iSAM paradigm. While both STD and iSAM are based on the standard Bayesian inference paradigm, the rest of the methods are based on the novel RUB inference paradigm. Figure 3a presents average timing results for all methods. After inspecting the results, we found that for all methods, running time is a non linear, positive gradient function of the inference state vector size and a linear function of the number of new measurements. While the running time dependency over the number of new measurements grows with the inference state vector size. For all inspected parameters our methods score the lowest running time with a difference of up to three orders of magnitude comparing to iSAM. Figure 3b  suggested methods. Interestingly, the OTM methodology proves to be more time efficient than the DU methodology, while for both the OO addition improves running time, thus scoring all methods from the fastest to the slowest with a time difference of four orders of magnitude between the opposites:

BSP in Unknown Environment -Consistent DA
The purpose of this experiment is to further examine the suggested paradigm of RUB inference, in a real world scenario, under the simplifying assumption of consistent DA. The second simulation preforms BSP over continuous action space, in an unknown synthetic environment. In contrast to Section 4.1.1, since now the synthetic environment replicates a real world scenario, the obtained information matrix is of course sparse (e.g. Fig. 11). A robot was given five targets (see Figure 4a) while all landmarks were a-priori unknown, and was required to visit all targets whilst not crossing a covariance value threshold. The largest loop closure in the trajectory of the robot, and the first in a series of large loop closures, is denoted by a yellow sign across all relevant graphs. The robot preforms BSP over continuous action space, with a finite horizon of five look ahead steps (Indelman et al., 2015). During the inference update stage each of the aforementioned methods were timed performing the first inference update step. It is worth mentioning that our paradigm is impervious to a specific planning method or whether the action space is discrete or continuous. The presented running time is a result of an average between 10 3 repetitions per step per method. Similarly to Section 4.1.1, as can be seen in Figure 4b, the suggested MATLAB implemented methods are up to two orders of magnitude faster than iSAM used in a MATLAB C++ wrapper. Interestingly, the use of sparse information matrices changed the methods timing hierarchy. While OTM-OO still has the best timing results (3×10 −3 sec), two orders of magnitude faster than iSAM, OTM and DU-OO switched places. So the timing hierarchy from fastest to slowest is:

OTM-OO⇒ DU-OO ⇒ OTM ⇒ DU⇒ iSAM⇒ STD
After demonstrating the use of our novel paradigm drastically reduce cumulative running time, we continue on to showing that in few aspects it is also less sensitive. Figure 5 presents the performance results of each of the methods per simulation step. The upper graphs presents the number of new factors and new states per each step, while the lower graph presents the average running time of each method as a function of the simulation step. The sign, represents the first largest loop closure in a series of large loop closures. While some of the behavior presented in Figure 5 can be related to machine noise, from carefully inspecting Figure 5, alongside the trajectory of the robot in Figure 4a, few interesting observations can still be made. The first observations relates to the "flat line" area  noticeable in the upper graph of Figure 5b between time steps 60 − 90. This time steps range is equivalent to the path between the 3 rd and 4 th targets, were the only factor added to the belief is motion based. As a result, a single new state (the new pose) is presented to the belief, along with a single motion factor. In this range, the timing results of iSAM DU and OTM present a linear behavior with a relatively small gradient. This gradient is attributed to the computational effort of introducing a single factor, containing a new state, to the belief. While the vertical difference between the aforementioned can be attributed to the sensitivity of each method to the number of states and factors in the belief.
From this observation, we can better understand the reason for the substantial time difference between the methods. Basing a method on RUB inference, rather than on standard Bayesian inference, will not change the computational impact of introducing factors or new states to the belief. However, it would reduce the sensitivity of the method to the sizes of the state vector and the belief (attributed to number of factors).
Another interesting observation refers to "pure" loop closures, were there are measurements with no addition of new variables to the state vector, i.e. measurements to previously observed landmarks. For the case of "pure" loop closures, STD, iSAM and the DU based methods (i.e. DU and DU-OO) experienced the largest timing spikes throughout the trajectory while both OTM based methods experienced minor spikes if any.
While both DU and OTM present some sensitivity to different occurrences, i.e. the size of the state vector, new measurements and loop closures, this sensitivity is drastically reduced by introducing the OO methodology, e.g. the once positive gradient line in DU during time steps 60 − 90, turned into a flat line in DU-OO as can easily be seen in Figure 5c.
In conclusion, our methods, based on RUB inference, particularly OTM-OO, seem to be impervious to large loop closures, state vector size, belief size, number of newly added measurements or even the combination of the aforementioned.

BSP in unknown Environment -Relaxing Consistent DA Assumption
The purpose of this experiment is to further examine the suggested paradigm of RUB inference, in a real world scenario, while relaxing the simplifying assumption of consistent DA. The third simulation preforms BSP over continuous action space, in an unknown synthetic environment. A robot was given twelve targets (see Figure 6a) while all landmarks were a-priori unknown, and was required to visit all targets whilst not crossing a covariance value threshold. The experiments, presented in Sections 4.1.1 and 4.1.2, were based on the simplifying assumption of consistent DA between inference and precursory planning, which can often be violated in real world scenarios. In this simulation we relax this restricting assumption and test our novel paradigm under the more general case were DA might be inconsistent.
The main reason for inconsistent data association lies in the perturbations caused by imperfect system and environment models. These perturbations increase the likelihood of inconsistent DA between inference and precursory planning. While the planning paradigm uses the state estimation to decide on future associations, the further it is from the ground truth the more likely for inconsistent DA to be received. This imperfection is modeled by formulating uncertainty in all models (see Section 2) For a more conservative comparison, in addition to the aforementioned, we use a mechanism that would increase the inconsistency of the DA between inference and precursory planning. In contrast to planning paradigms that can provide DA to new variables, in addition to an unknown map, the robot's planning paradigm considers only previously-mapped landmarks. As a result of this limitation, the DA received from the planning stage can not offer new landmarks to the state vector. Consequently, each new landmark would essentially mean facing inconsistent DA, while the single scenario in which a consistent DA is obtained (see Section 3.5.1), occurs when both planning and inference are considering the same known landmark. Both perturbations caused by uncertainty and considering only previously mapped landmarks, resulted in just 50% DA consistency between planning and succeeding inference in this experiment.
Following the findings of Section 4.1.2, out of the four suggested methods we choose to continue the comparison just with the OTM-OO method. While OTM-OO assumed consistent DA, the more general approach deals with inconsistent DA before updating the RHS vector. We denote the complete approach, updating DA followed by OTM-OO, as UD-OTM-OO, were UD stands for Update Data association. It is important to clarify that UD-OTM-OO and for consistent DA also OTM-OO, yield the same estimation accuracy as iSAM, since the inference update using RUB inference results in the same topological graph with the same values. Such comparison will be presented later on using a real-world data in Section 4.2. For that reason, the accuracy aspect will not be discussed further in this section. Figure 6b Figure 6: Simulation layout and results: (a) The Synthetic Environment, where landmarks are marked in green, targets are numbered and marked with red crosses, the ground truth is denoted by a blue line, the estimated trajectory is denoted by a red line while the covariance is visualized by red ellipse. The black dotted square represents the perturbations area (b) Total average running time of inference update for each method, when 50% of the steps were with inconsistent DA.
simulation. Although UD-OTM-OO total running time is larger then OTM-OO due to the need for DA update (as to be expected), it still outperforms iSAM by an order of magnitude.
In addition to the improvement in total computation time of the inference update stage, we continue on analyzing the "per step" behavior of UD-OTM-OO, and demonstrate that in few aspects it is less sensitive than iSAM. Figure 7a presents per step computation time of all three methods, OTM-OO UD-OTM-OO and iSAM. Our suggested paradigm not only outperforms iSAM in the cumulative computation time, but also outperforms it for each individual step. While Figure 7a presents the difference in average computation time per-step, Figure 7b captures the reason for this difference as suggested in Section 4.1.2. Figure 7b lower graph, presents the number of factors and new variables added in iSAM as opposed to UD-OTM-OO. The upper graph presents the number of eliminations made during inference update in both methods. Number of eliminations reflects the number of involved variables in the process of converting FG into a BT (see Appendix A and Algorithm 1 line 11 for the equivalent processes in iSAM and UD-OTM-OO accordingly) After carefully inspecting both figures, alongside the robot's trajectory in Figure 6a, the following observations can be made. Even with the limitation over the planning paradigm, both the number of new factors added and the number of re-eliminations during the inference update stage, are substantially smaller than their iSAM counterparts. These large differences are some of the reasons for UD-OTM-OO better performance. Due to the limitation over the planning paradigm, new observation factors (i.e. new landmarks added each step) in both iSAM and UD-OTM-OO are identical while the latter pose more than half of total factors in the latter. After comparing the re-elimination graph with the timing results, it appears both trends and peaks align, so we assume our method to be mostly sensitive to the amount of re-eliminations (further analysis is required). Both re-elimination amount and amount of added factors, can be further reduced by reordering and relaxing the limitation over the planning paradigm accordingly. For cases of consistent or partially consistent DA, when encountering a loop closure (i.e. observing a previously mapped landmark) our method saves valuable computation time since they are only calculated once, in the planning stage (e.g. see timing response for LC at steps 136 − 159 and 275 − 308 Figure 7a). Our method also seems to be much less sensitive to state dimensionality. Inspecting steps 192 − 208 and 263 − 275 in Figure 7b, using the lower graph we observe there are no new factors, i.e. the computation time is a result of motion factors; inspecting Figure 7a we observe that in spite of the aforementioned, iSAM computation time is much larger than our method. From this comparison we can infer our suggested method is less sensitive to state dimensionality.

Real-World Experiment Using KITTI Dataset
After the promising performance in a simulated environment, we tested our paradigm for inference update via BSP in a real-world environment using KITTI dataset (Geiger et al., 2013). The KITTI dataset, recorded in the city of Karlsruhe, contains stereo images, Laser scans and GPS data. For this work, we used the raw images of the left stereo camera, from the Residential category file: 2011 10 03 drive 0027, as measurements, as well as the supplied ground truth for comparison. In this experiment we consider a robot, equipped with a single monocular camera, performing Active Full-SLAM in the previously unknown streets of Karlsruhe Germany. The robot starts with a prior over its initial pose and with no prior over the environment. At time k the robot executes BSP on the single step action sequence taken in the KITTI dataset at time k + 1. At the end of each BSP session, the robot executes the chosen action, and receives measurements from the KITTI dataset. Inference update is then being performed in two separate approaches, the first following the standard Bayesian inference approach and the second following our proposed RUB inference approach. The inference update following each of which is compared for computation time and accuracy.
The following sections explain in-detail how planning and perception are being executed in this experiment.

Planning using KITTI dataset
Our proposed approach for RUB inference, leverages calculations made in the precursory planning phase to update inference more efficiently. KITTI is a pre-recorded dataset with a single action sequence, i.e. the "future" actions of the robot are pre-determined. Nevertheless, we can still evaluate our approach by appropriately simulating the calculations that would be performed within BSP for that specific (and chosen) single action sequence. In other words, BSP involves belief propagation and objective function evaluations for different candidate actions, followed by identifying the best action via Eq. (11) and its execution. In our case, the performed actions over time are readily available; hence, we only focus on the corresponding future beliefs for such actions given the partial information available to the robot at planning time. Specifically, at each time instant k, we construct the future belief b[X k+1|k ] via Eq. (9) using the supplied visual odometry as motion model and future landmark observations. Future landmark observations are generated by considering only landmarks projected within the camera field of view using MAP estimates for landmark positions and camera pose from the propagated belief b[X k+1|k ]. As in this work the planning phase considers only the already-mapped

Perception using KITTI dataset
After executing the next (sub)optimal action, the robot receives a corresponding raw image from the KITTI dataset. The image is being processed through a standard vision pipeline, which produces features with corresponding descriptors (Lowe, 2004). Landmark triangulation is being made after the same feature has been observed at least twice, while following different conditions designed to filter outliers. Once a feature is triangulated, it is considered as a landmark, and is added as a new state to the belief. Note that the robot has access only to its current joint belief, consisting of the estimated landmark locations, and the robot past and present pose estimations. Once the observation factors (6) are added to the belief, the inference update is being made in two different and separate ways. The first, used for comparison, follows the standard Bayesian inference, by using the efficient methodologies of iSAM2 in order to update inference. The belief of the preceding inference b[X k|k ] is being updated with the new motion and observation factors {f j } k+1|k+1 , thus obtaining b[X k+1|k+1 ].
The second method follows our proposed paradigm for RUB inference. The belief from the preceding planning phase, b[X k+1|k ], which corresponds to u k|k+1 (see (26)), is updated with the new measurements. This update is done using UD-OTM-OO which consists of two stages, first using our DA update method (Section 3.5.2) which updates the predicted DA to the actual DA, followed by the OTM-OO method (Section 3.4.3) which updates measurement values.

Results -KITTI dataset
The robot travels 1400 steps in the unknown streets of Karlsruhe Germany, while relying only on a monocular camera for localization and mapping and without encountering any substantial loop closures. Figure 8a presents the ground truth of the robot's trajectory in blue, the estimated robot's trajectory in dotted red and the estimated location of observed landmarks in green.
Both iSAM and UD-OTM-OO produce the same estimation; therefor, the dotted red-line as well as the green marks represents both iSAM and UD-OTM-OO estimations. Figure 8b presents the total computation time of inference update throughout the experiment, for iSAM, OTM-OO and UD-OTM-OO. The importance of real-world data can be easily noticed by comparing Figures 8b and 6b. While OTM-OO secured its advantage of two orders of magnitude over iSAM, it is not the case with UD-OTM-OO. Although for real-world data, UD-OTM-OO is still faster than iSAM, the difference has decreased from order of magnitude in Figure 6b, to less than half the computation time in Figure 8b. Since the same machine has been used in both cases, the difference must originate from the data itself. As will be seen later, the number of measurements per step is substantially higher when using the real-world data, as well as the occurrences of inconsistent DA. It is worth stressing that iSAM implementation for inference update is C++ based, while UD-OTM-OO implementation consists of a mixture of MATLAB based and C++ based implementation, so for the same platform the computation time difference is expected to be higher.
We continue by discussing the estimation difference, between iSAM and our method UD-OTM-OO. Although our method is algebraically equivalent to estimation via iSAM, for the reader's assurance we also provide estimation error comparison for both mean and covariance. In-spite the algebraic equivalence, we expect to obtain small error values, related to numerical noise, which are different from absolute zero. The estimation comparison results are presented in Figure 9: the translation mean in Figure 9a, the mean rotation of the robot in Figure 9b and the corresponding covariances in Figures 9c and 9d accordingly. The mean translation error is calculated by taking the norm of the difference between the two mean translation vectors. The mean rotation error is calculated by taking the norm of the difference between each of the mean body angles. The covariance error is calculated by taking the norma of the difference between the covariance determinants. As can be seen in Figure 9, the error has a noise like behavior, with values of 10 −14 for translation mean, 10 −11 for mean rotation angles, 10 −18 for translation covariance and 10 −12 for rotation angles covariance. For all practical purposes, these values points to a negligible accuracy difference between the two methods. Figure 10a presents the per-step computation time for inference update of OTM-OO, UD-OTM-OO and iSAM. OTM-OO represents the per-step computation time of inference update through RUB inference for consistent DA, i.e. computation time for updating the RHS with the correct measurement values. UD-OTM-OO represents the per-step computation time of inference update through RUB inference without the assumption of consistent DA. The difference in computational effort between the two, as seen in Figure 10a, originates from the need to deal with inconsistent DA between belief from planning b[X k+1|k ] and succeeding inference b[X k+1|k+1 ]. The difference in computational effort between UD-OTM-OO and iSAM is attributed to the re-use of calculations made during the precursory planning. This calculation re-use manifests in salvaging factors that have already been considered during the precursory planning.
The reason for the considerable computational time differences between UD-OTM-OO and iSAM is better understood when comparing the factors involved in the computations of each method. Figure 10b presents the sum of added factors per-step. In blue, the sum of all factors added at time k + 1|k + 1, as part of standard Bayesian inference update. In red, the sum of factors added at time k + 1|k + 1 involving states which are already part of the belief b[X k|k ]. In yellow, the amount of factors added in time k + 1 and are shared by both beliefs, b[X k+1|k ] and b[X k+1|k+1 ].
The difference between the yellow and blue lines represents the amount of factors "missing" from the belief b[X k+1|k ] in order to match b[X k+1|k+1 ] (see Section 3.5.2). This difference can be divided into factors containing only existing states and factors containing new states. Since the red line represents all factors of existing states, the difference between the red and blue lines represents all factors containing new states per time step. As mentioned earlier in Section 4.2.1, in this experiment the prediction of future factors does not involve new states, apart from the next future pose(s). For that reason, the amount of factors added during planning has an upper bound represented by the red line. Future work can consider a prediction mechanism for new states, such work would set the upper bound somewhere between the red and blue lines.
The difference between the yellow and red lines, both related to factors of existing states, is attributed to the prediction accuracy of the planning stage. Since the factors represented by the red line are already part of the belief in planning time k, a perfect prediction mechanism would have added them all to the belief b[X k+1|k ]. Since the prediction is inherently imperfect (see Section 3.2), there would always be some difference between the two. Reducing the gap between the red and yellow lines is a function of the prediction mechanism, while closing the gap further up to the blue line is a function of predicting new variables during planning.
After better understanding the meaning of Figure 10b, comparing the two graphs in Figure 10, reveals the connection between the added factors and the computation time. As anticipated, the larger the gap between b[X k+1|k ] and b[X k+1|k+1 ], the smaller the difference between RUB inference and standard Bayesian inference.
In contrast to previous experiments over synthetic data, we can better see here some dependency over the size of the belief in the UD-OTM-OO method. This dependency seems to be in correlation with that of iSAM2 although less intense, as can be seen by comparing the two methods in Figure 10a. Since UD-OTM-OO makes use of iSAM2 methodologies in order to update inconsistent DA, as does iSAM2 to update inference, they share similar computational sensitivities, which manifest in similar computation time trends. This similarity sensitivity is attributed in our opinion to the elimination process required in order to introduce new factors into the belief. Future work for reducing eliminations by anticipating required ordering, would break this dependency and provide additional improvement in computation time as well as in reducing the sensitivity to state dimensionality.

Conclusions
Conventional Bayesian inference updates the belief from a previous time step with new incoming information. In this work we introduced an alternative paradigm, utilizing the similarities between inference and planning to efficiently update inference using information from precursory planning phase. Given a future belief from precursory planning and newly acquired data, we appropriately update the former with the latter while taking into consideration data association inconsistencies which might occur. The resulting approach, RUB inference, saves valuable computation time in inference without affecting the estimation accuracy.
We evaluated our approach in simulation and using real-world data from the KITTI dataset, considering active SLAM as application, and compared it against iSAM2, a state-of-the-art incremental Bayesian inference approach. Results from real-world evaluation indicate that our approach is more efficient computationally by at least a factor of two compared to iSAM2, without affecting the solution accuracy. The improvement magnitude is in direct correlation with the quality of the prediction mechanism being used in planning, meaning a better prediction mechanism would increase the approach efficiency. A particular appealing aspect of our method, that we demonstrated using synthetic data, is that loop closures stop being a computational burden, thanks to the utilization of similar calculations already made during precursory planning. When loop closures were correctly predicted during the planning phase, our method utilized these calculations instead of re-calculating them in inference, resulting in reducing computation time by a factor of two orders of magnitude in the shown results.
Although we demonstrated the benefits of using RUB inference approach rather than the standard Bayesian inference, specifically for iSAM2 methodologies, we believe the proposed concept is applicable to other methods as well. Potentially it could benefit any (autonomous) systems with both inference and decision making processes. Based on our findings, we strongly believe this paradigm shift opens new research directions and can be further extended in various ways.

Appendix A: Inference as a Graphical Model
The inference problem can be naturally represented and efficiently solved using graphical models such as factor graph (FG) (Kschischang et al., 2001) and Bayes tree (BT) (Kaess et al., 2010). Since FG and BT graphical models pose key components in the suggested paradigm, the theoretical foundation is supplied next. We use Figure 2 as illustration to belief representation in graphical models. Figures 2a and 2b are FG representations for the beliefs b(X k+1|k ) and b(X k+1|k+1 ), respectively. BT representation of the belief is obtained through an elimination process, Figure 2d presents the BT of b[X k+1|k ] for the elimination order x 0 · · · l i → x k−1 → x k → l j → x k+1 , while Figure 2e presents the BT of b[X k+1|k+1 ] for the elimination order x 0 · · · l i →x k−1 →x k →l j →l r →x k+1 .
A FG is a bipartite graph with two node types, factor nodes {f i } and variable nodes {θ j } ∈ Θ. All nodes are connected through edges {e ij }, which are always between factor nodes to variable nodes. A factor graph defines the factorization of a certain function g(Θ) as where Θ i is the set of variables {θ j } connected to the factor f i through the set of edges {e ij }. After substituting Θ with our joint state X and the factors {f i } with the conditional probabilities from Eq. (3) we receive the definition of the belief b(X t|k ) in a FG representation. Through bipartite elimination game, a FG can be converted into a BN, this elimination is required for solving the Inference problem (as shown in Kaess et al. (2012)). After eliminating all variables the BN pdf can be defined by a product of conditional probabilities, P (Θ) = j P (Θ j |S j ), where S j is addressed as the separator of Θ j , i.e. the set of variables that are directly connected to Θ j . In order to ease optimization and marginalization, a BT can be used (Kaess et al., 2012). By converting the BN to a directed tree, where the nodes represent cliques {C r }, we receive a directed graphical model that encodes a factored pdf. Bayes Tree is defined using a conditional density per each node.
where S r is the separator, defined by the intersection C r Π r of the clique C r and the parent clique Π r . The complement to the variables in the clique C r is denoted as F r , the frontal variables. Each clique is therefor written in the form C r = F r : S r . The correspondence between matrix and graphical representation is conveniently demonstrated in Figure 11. The first rows of R are equivalent to the deepest cliques in the BT, when the last rows of R equivalent to the root of the tree. The elimination order that created the BT is identical to the ordering of R state vector, and fill-ins in R equivalent to the connectivity of the corresponding BT.