LEO: Learning Energy-based Models in Factor Graph Optimization

Paloma Sodhi, Eric Dexheimer, Mustafa Mukadam, Stuart Anderson, Michael Kaess

Abstract

Robots operating in partially observable environments must infer latent states from multiple sensory inputs using observation models. We address the problem of learning these models end-to-end for estimation. LEO (Learning Energy-based Models in Factor Graph Optimization) is a novel framework for training robot observation models end-to-end, even when the underlying graph optimizer is non-differentiable. By framing factor graph optimization as energy-based learning, LEO shapes the cost landscape to ensure ground-truth trajectories are at the global minimum, leading to superior tracking accuracy and sample efficiency in complex tasks like tactile manipulation.

Introduction

Robots rely on factor graphs to fuse noisy sensor data (like GPS, cameras, or tactile sensors) into a coherent estimate of their state. These graphs use "observation models" to map raw measurements to physical states. Traditionally, these models are either hand-tuned by experts or trained using "surrogate losses"—for example, training a neural network to predict a pose from an image in isolation.

The problem is that surrogate losses do not account for the full optimization process. A model might look good on paper but perform poorly when plugged into a graph with other constraints. Ideally, we would train these models end-to-end to minimize the final tracking error. However, many state-of-the-art optimizers (like iSAM2) use non-differentiable tricks like dynamic re-linearization, which breaks standard gradient-based training (like "unrolling" the optimizer). LEO bridges this gap, allowing us to learn complex models without needing a differentiable optimizer.

The LEO Framework

The core innovation of LEO is treating the factor graph's cost function as an Energy-Based Model (EBM). Instead of trying to differentiate through the optimizer's steps, LEO focuses on the shape of the cost function (the "energy"). It aims to make the energy low at the ground-truth trajectory and high everywhere else.

The LEO framework integrates robot observations into a factor graph for state inference, while the learning process updates model parameters by shaping the energy landscape.

The training process alternates between two primary steps:

  1. Inference (Sampling): Use a standard, non-differentiable optimizer to find the most likely trajectory. Because these optimizers often produce a Gaussian approximation of the posterior, LEO can efficiently sample "incorrect" trajectories from the model's current belief.
  2. Learning (Update): Use a contrastive loss to "push down" the energy of the ground-truth trajectory and "pull up" the energy of the sampled trajectories.

Because LEO only needs the gradients of the individual factors (the energy components) and not the gradients of the optimization process, the optimizer itself can remain a non-differentiable black box. This avoids the numerical instabilities and memory overhead associated with "unrolling" long sequences of optimization steps.

Datasets and Evaluation

The authors evaluated LEO on two distinct domains:

  • Synthetic Navigation: Estimating a robot's 2D pose from odometry and GPS. These datasets tested LEO's ability to learn both fixed and measurement-dependent noise models (covariances).
  • Real-world Planar Pushing: A robot arm pushes objects while receiving feedback from a DIGIT tactile sensor. This task is highly non-linear and difficult to model analytically, requiring the system to learn a mapping from raw tactile images to object pose transformations.
The learning process in LEO shapes the energy landscape $E(\theta, x; z)$ to ensure the ground-truth trajectory $x_{gt}$ is at the global minimum compared to the estimated trajectory $\hat{x}$.

Key Insights and Results

LEO consistently outperformed LSTMs and black-box optimizers in navigation tasks, especially as the complexity of the noise model increased. In the planar pushing task, LEO successfully learned to interpret tactile images, achieving lower translational and rotational errors than models trained on surrogate losses.

Key takeaways include:

  • Optimizer as a Sampler: LEO re-envisions the optimizer as an efficient way to sample from a complex, high-dimensional probability distribution.
  • Sample Efficiency: Unlike black-box search methods that require thousands of guesses, LEO uses the gradient of the energy to move directly toward a better model, making it much faster to train.

Conclusion

LEO provides a robust framework for end-to-end learning in factor graphs. While it assumes the ground truth is "realizable" and requires differentiable factors, it significantly improves tracking performance and efficiency. Future work will explore more complex models, such as those operating on raw camera images, and extend the framework to 3D object tracking.

Summary updated

BibTeX
@inproceedings{sodhi2021leo,
  author = {Paloma Sodhi and Eric Dexheimer and Mustafa Mukadam and Stuart Anderson and Michael Kaess},
  title = {{LEO: Learning Energy-based Models in Factor Graph Optimization}},
  booktitle = {Conference on Robot Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=mqHyBB46CPp},
}
Figure