LEO: Learning Energy-based Models in Graph Optimization

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

Abstract

We address the problem of learning observation models end-to-end for estimation. Robots operating in partially observable environments must infer latent states from multiple sensory inputs using observation models that capture the joint distribution between latent states and observations. This inference problem can be formulated as an objective over a graph that optimizes for the most likely sequence of states using all previous measurements. Prior work uses observation models that are either known a-priori or trained on surrogate losses independent of the graph optimizer. In this paper, we propose a method to directly optimize end-to-end tracking performance by learning observation models with the graph optimizer in the loop. This direct approach may appear, however, to require the inference algorithm to be fully differentiable, which many state-of-the-art graph optimizers are not. Our key insight is to instead formulate the problem as that of energy-based learning. We propose a novel approach, LEO, for learning observation models end-to-end with graph optimizers that may be non-differentiable. LEO alternates between sampling trajectories from the graph posterior and updating the model to match these samples to ground truth trajectories. We propose a way to generate such samples efficiently using incremental Gauss-Newton solvers. We compare LEO against baselines on datasets drawn from two distinct tasks: navigation and real-world planar pushing. We show that LEO is able to learn complex observation models with lower errors and fewer samples.

Introduction

In robotics, state estimation is a fundamental challenge. Whether a robot is navigating a room or manipulating an object, it must transform noisy sensor data—such as tactile images or camera feeds—into a precise estimate of its state. Traditionally, this is handled via factor graphs, which optimize a trajectory to best fit all available measurements.

Overview of the LEO framework, showing the real-world tactile pushing task (left), the inference process via factor graph optimization (middle), and the energy-based learning update (right).

A major goal in the field is to train these observation models end-to-end, ensuring the sensor processing components are optimized specifically for the downstream tracking task. However, high-performance graph optimizers (like iSAM2) often involve non-differentiable logic, creating a "differentiability wall" for standard backpropagation. LEO (Learning Energy-based Models) overcomes this by treating the factor graph cost as an energy function, allowing for end-to-end learning without requiring a differentiable solver.

Methodology: Shaping the Energy Landscape

LEO shifts the focus from differentiating through the optimizer to shaping the energy landscape that the optimizer explores. The factor graph's cost function is viewed as an energy $E(\theta, x; z)$. A well-trained model should exhibit low energy at the ground-truth trajectory ($x_{gt}$) and high energy elsewhere.

Contrastive Learning and Efficient Sampling

LEO employs a contrastive loss to update model parameters $\theta$. In each training iteration, the algorithm pushes down the energy of the ground-truth trajectory while pulling up the energy of trajectories sampled from the current model's posterior.

The LEO training pipeline: a graph optimizer provides a Gaussian approximation of the posterior, which is sampled to compute contrastive gradients for updating the model parameters.

While sampling from energy-based models typically requires computationally expensive Markov Chain Monte Carlo (MCMC) methods, LEO leverages a key insight: incremental Gauss-Newton solvers already produce a Gaussian approximation of the posterior as a byproduct of optimization. By sampling from this approximation, LEO achieves high efficiency, making the "optimizer-in-the-loop" training feasible.

Experimental Evaluation

The authors evaluated LEO across two primary domains:

  1. Synthetic Navigation: Testing the ability to learn noise covariances for odometry and GPS sensors in varying environments.
  2. Real-world Planar Pushing: Using a robot arm equipped with a DIGIT tactile sensor to push objects. This task required learning complex mappings from high-dimensional tactile images to object poses.

Key Results

  • Superior Accuracy: LEO consistently outperformed LSTMs and models trained on surrogate losses (which often produce "un-physical" energy landscapes that confuse optimizers).
  • Sample Efficiency: Compared to black-box optimization methods like CMA-ES, LEO required orders of magnitude fewer calls to the graph optimizer to reach convergence.
  • Tactile Performance: In real-world pushing, LEO learned tactile-to-pose mappings that outperformed previous state-of-the-art hand-tuned models.

Conclusion and Future Work

LEO demonstrates that end-to-end learning for robotics estimation is possible even with non-differentiable optimizers. By reimagining the optimizer as an efficient proposal distribution for energy-based learning, LEO bridges the gap between classical robotics and modern deep learning. Future work aims to scale this approach to full 3D object tracking and more complex raw-image-to-state models.

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 Graph Optimization}},
  booktitle = {Conference on Robot Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=mqHyBB46CPp},
}
Figure