BA on Graph Processor

Ortiz 2020 · Paper

One-line summary — First demonstration (CVPR 2020) that bundle adjustment can be solved extremely fast with Gaussian Belief Propagation on a graph processor (Graphcore IPU), validating the algorithm-hardware co-design vision of FutureMapping.

Problem

Bundle adjustment is a central computational bottleneck of SLAM and SfM. Classical solvers compute a point estimate of the MAP solution with Levenberg-Marquardt — an inherently centralized batch computation — and even tree-based incremental methods like iSAM2 require periodic centralized restructuring of the graph. Meanwhile, low-power embodied Spatial AI demands massively parallel, in-place computation with minimal data transfer. This paper shows that GBP, which had barely been used for geometric vision, maps naturally onto Graphcore’s IPU — 1216 independent cores (“tiles”), each with 256KB local memory and 6 hardware threads, all-to-all interconnect, on-chip accesses costing about 1pJ per byte versus hundreds of pJ per byte for GPU/CPU DRAM.

Method & architecture

BA as a factor graph. Variables are keyframe poses XX and landmarks LL; factors are Gaussian priors ϕi(xi)\phi_i(\mathbf{x}_i), θj(lj)\theta_j(\mathbf{l}_j) (needed to set monocular scale and condition 2-DOF reprojection messages; auto-generated 100x weaker than the measurement terms) and reprojection factors ψkm\psi_{km} with measurement model h(xk,lm)=π(Rklm+tk)\mathbf{h}(\mathbf{x}_k,\mathbf{l}_m) = \pi(R_k\mathbf{l}_m + \mathbf{t}_k). MAP inference minimizes the sum of squared Mahalanobis residuals over priors and reprojections. Linearising about (xk,0,lm,0)(\mathbf{x}_{k,0},\mathbf{l}_{m,0}) with the 2×92\times 9 Jacobian J\mathrm{J} gives each measurement factor in information form:

ηkm=JΣM1(J[xk,0lm,0]+zkmh(xk,0,lm,0)),Λkm=JΣM1J.\eta_{km} = \mathrm{J}^{\top}\Sigma_M^{-1}\left( \mathrm{J}\begin{bmatrix}\mathbf{x}_{k,0}\\ \mathbf{l}_{m,0}\end{bmatrix} + \mathbf{z}_{km} - \mathbf{h}(\mathbf{x}_{k,0},\mathbf{l}_{m,0}) \right), \qquad \Lambda_{km} = \mathrm{J}^{\top}\Sigma_M^{-1}\mathrm{J}.

GBP message passing. Each variable node stores a belief bit(vi)=N1(vi;ηbit,Λbit)b_i^t(\mathbf{v}_i)=\mathcal{N}^{-1}(\mathbf{v}_i;\eta_{b_i}^t,\Lambda_{b_i}^t). A pairwise factor ψij\psi_{ij} with partitioned parameters sends to variable vi\mathbf{v}_i:

ηjit+1=ηiijΛijij(Λjjij+ΛbjtΛijt)1(ηjij+ηbjtηijt),\eta_{j\to i}^{t+1} = \eta_i^{ij} - \Lambda_{ij}^{ij}\left( \Lambda_{jj}^{ij} + \Lambda_{b_j}^{t} - \Lambda_{i\to j}^{t} \right)^{-1} \left( \eta_j^{ij} + \eta_{b_j}^{t} - \eta_{i\to j}^{t} \right),

Λjit+1=ΛiiijΛijij(Λjjij+ΛbjtΛijt)1Λjiij,\Lambda_{j\to i}^{t+1} = \Lambda_{ii}^{ij} - \Lambda_{ij}^{ij}\left( \Lambda_{jj}^{ij} + \Lambda_{b_j}^{t} - \Lambda_{i\to j}^{t} \right)^{-1} \Lambda_{ji}^{ij},

and each variable updates its belief by summing its prior and incoming messages: ηbit+1=ηpi+jηjit\eta_{b_i}^{t+1} = \eta_{p_i} + \sum_j \eta_{j\to i}^{t}, likewise for Λ\Lambda. Messages from factors are damped, ηt+1(1d)ηt+1+dηt\eta^{t+1} \leftarrow (1-d)\,\eta^{t+1} + d\,\eta^{t} with d=0.4d=0.4. Relinearisation is entirely local: a factor relinearises when its variables’ beliefs drift more than β=0.01\beta = 0.01 from the linearisation point (at most every 10 iterations). Robust cost: a Huber kernel is folded in by rescaling the factor’s Gaussian when the Mahalanobis distance MkmM_{km} exceeds NσN_\sigma, down-weighting messages from suspected-outlier measurements.

IPU mapping. Each factor/variable node maps to a tile (multiple nodes per tile via the 6 threads for larger graphs), running under the IPU’s bulk-synchronous parallel model: all factors relinearise and compute messages, exchange, all variables update beliefs, exchange — a full GBP iteration takes under 125 microseconds. The whole implementation is about 1000 lines of Poplar C++; since the IPU handles halves/floats but not doubles, priors are initially set at measurement-constraint scale and gradually weakened 100x over 10 iterations for numerical stability.

Results

Evaluation uses sections of TUM and KITTI sequences with ORB-SLAM as front-end (keyframes, ORB features, correspondences), against Ceres on a 6-core i7-8700K (18 threads, LM with dense Schur, Huber kernel, analytic derivatives):

Why it matters for SLAM

This paper turned the speculative FutureMapping essays into concrete evidence that rethinking SLAM computation around graphs, local storage, and message passing can yield order-of-magnitude speedups. The authors argue the real prize is not static BA speed but “flexible in-place optimisation of general, dynamically changing factor graphs representing Spatial AI problems” — heterogeneous factors, priors from recognition, arbitrary incremental updates. As SLAM moves onto heterogeneous edge hardware and multi-robot systems, GBP’s purely local computation model is one of the few back-end designs that scales naturally with core count.