Abstract
Mapping and localization, preferably from a small number of observations, are fundamental tasks in robotics. We address these tasks by combining spatial structure (differentiable mapping) and end-to-end learning in a novel neural network architecture: the Differentiable Mapping Network (DMN). The DMN constructs a spatially structured view-embedding map and uses it for subsequent visual localization with a particle filter. Since the DMN architecture is end-to-end differentiable, we can jointly learn the map representation and localization using gradient descent. We apply the DMN to sparse visual localization, where a robot needs to localize in a new environment with respect to a small number of images from known viewpoints. We evaluate the DMN using simulated environments and a challenging real-world Street View dataset. We find that the DMN learns effective map representations for visual localization. The benefit of spatial structure increases with larger environments, more viewpoints for mapping, and when training data is scarce.
Sparse Visual Localization
Localization—knowing where you are—is a cornerstone of robotics. Traditionally, this involves building a map (like a point cloud or occupancy grid) and matching sensor data against it. While effective, these "classic" maps are rigid and don't always capture the high-level visual features needed for robust matching.
Deep learning models can learn rich, task-specific representations. However, many "end-to-end" localization models use unstructured memory (like a single latent vector), which struggles to scale to large environments or generalize from very few observations (the "sparse" setting). The Differentiable Mapping Network (DMN) tackles the challenge of sparse visual localization: building a useful map from a handful of images and then localizing within that map, even when the environment's appearance has changed.
The Differentiable Mapping Network (DMN)
The DMN bridges the gap between structured classical mapping and flexible deep learning by integrating spatial priors directly into the neural architecture.
Key Components
- Structured Map Representation: Instead of a single vector, the DMN represents a map as a set of pairs: a learned image embedding (extracted via CNN) and its corresponding known viewpoint coordinates.
- Egocentric Spatial Attention: To "read" the map, the model uses an attention mechanism. This attention is egocentric: it transforms the coordinates of the map's viewpoints into the coordinate frame of a "candidate pose" (a particle). This allows the network to focus on map features that should be visible from where the robot thinks it is.
- Differentiable Particle Filter (DPF): The entire localization process is implemented as a particle filter where every step—updating weights based on observations and transitioning particles based on motion—is differentiable.
- End-to-End Training: Because the whole pipeline is differentiable, the model can be trained via gradient descent. The map representation is optimized specifically to minimize the error in the final pose estimate.
Experimental Evaluation
The DMN was evaluated on three distinct benchmarks: 3D Simulated Rooms, 3D Simulated Mazes, and a real-world StreetView (StreetLearn) dataset. The StreetView dataset is particularly difficult because the "context" images and "query" images might have been taken years apart, featuring different lighting, cars, and pedestrians.
Key Results
The DMN significantly outperformed unstructured baselines and standard regression models:
- Street View Success: In the real-world Street View dataset, the DMN achieved a 73.2% success rate for sequential localization, compared to just 37.8% for the best unstructured baseline (Latent Image PF).
- Scaling with Data: The benefit of the DMN's spatial structure was most pronounced when training data was scarce. It reached high performance with only 10% of the training set, whereas unstructured models failed to catch up even with 100% of the data.
- Environment Size: In larger environments (the "Mazes" domain), the DMN maintained high accuracy (75.9% success) while regression-based models plummeted to 39.9%.
Insights and Future Work
The core innovation is that baking spatial structure (geometry) into the network architecture reduces the data requirement and improves generalization. By transforming map data into the robot's local frame, the network doesn't have to learn the concept of "relative position" from scratch. Furthermore, the DMN works discriminatively—evaluating the likelihood of a query image given a pose—which is more efficient than generative reconstruction for localization.
Current limitations include a focus on 2D planar poses ($x, y$ and yaw). Extending this to full 6-DOF (3D) poses would be necessary for aerial or underwater robotics. Additionally, the model assumes perfectly known poses for initial "context" images. Future work could address uncertainty in these initial poses, moving closer to a full SLAM (Simultaneous Localization and Mapping) scenario.
Summary updated