Table of Contents
Fetching ...

RANSAC Scoring Functions: Analysis and Reality Check

A. Shekhovtsov

TL;DR

This paper reexamines how RANSAC scoring functions approximate the underlying probabilistic model for robust geometric fitting, extending the classic Gaussian-based error to spherical noise and a uniform outlier component. It formalizes a Gaussian-Uniform (GaU) mixture framework and shows that, for common problems, MAGSAC++ is numerically equivalent to GaU rather than offering a principled improvement, highlighting issues in its derivation. By disentangling likelihood-based and M-estimator approaches and proposing objective evaluation strategies (large versus small validation sets), the work demonstrates that many scoring functions perform similarly when thresholds are tuned, with no consistent advantage for MAGSAC++ across homography and relative pose tasks. The findings advocate a principled GaU-based baseline, clarify the link between EM and IRLS in this setting, and provide practical guidance for evaluating robust scoring methods in future research. The work thus reinforces the need for rigorous theoretical grounding alongside careful experimental methodology in developing and comparing RANSAC scoring schemes.

Abstract

We revisit the problem of assigning a score (a quality of fit) to candidate geometric models -- one of the key components of RANSAC for robust geometric fitting. In a non-robust setting, the ``gold standard'' scoring function, known as the geometric error, follows from a probabilistic model with Gaussian noises. We extend it to spherical noises. In a robust setting, we consider a mixture with uniformly distributed outliers and show that a threshold-based parameterization leads to a unified view of likelihood-based and robust M-estimators and associated local optimization schemes. Next we analyze MAGSAC++ which stands out for two reasons. First, it achieves the best results according to existing benchmarks. Second, it makes quite different modeling assumptions and derivation steps. We discovered, however that the derivation does not correspond to sound principles and the resulting score function is in fact numerically equivalent to a simple Gaussian-uniform likelihood, a basic model within the proposed framework. Finally, we propose an experimental methodology for evaluating scoring functions: assuming either a large validation set, or a small random validation set in expectation. We find that all scoring functions, including using a learned inlier distribution, perform identically. In particular, MAGSAC++ score is found to be neither better performing than simple contenders nor less sensitive to the choice of the threshold hyperparameter. Our theoretical and experimental analysis thus comprehensively revisit the state-of-the-art, which is critical for any future research seeking to improve the methods or apply them to other robust fitting problems.

RANSAC Scoring Functions: Analysis and Reality Check

TL;DR

This paper reexamines how RANSAC scoring functions approximate the underlying probabilistic model for robust geometric fitting, extending the classic Gaussian-based error to spherical noise and a uniform outlier component. It formalizes a Gaussian-Uniform (GaU) mixture framework and shows that, for common problems, MAGSAC++ is numerically equivalent to GaU rather than offering a principled improvement, highlighting issues in its derivation. By disentangling likelihood-based and M-estimator approaches and proposing objective evaluation strategies (large versus small validation sets), the work demonstrates that many scoring functions perform similarly when thresholds are tuned, with no consistent advantage for MAGSAC++ across homography and relative pose tasks. The findings advocate a principled GaU-based baseline, clarify the link between EM and IRLS in this setting, and provide practical guidance for evaluating robust scoring methods in future research. The work thus reinforces the need for rigorous theoretical grounding alongside careful experimental methodology in developing and comparing RANSAC scoring schemes.

Abstract

We revisit the problem of assigning a score (a quality of fit) to candidate geometric models -- one of the key components of RANSAC for robust geometric fitting. In a non-robust setting, the ``gold standard'' scoring function, known as the geometric error, follows from a probabilistic model with Gaussian noises. We extend it to spherical noises. In a robust setting, we consider a mixture with uniformly distributed outliers and show that a threshold-based parameterization leads to a unified view of likelihood-based and robust M-estimators and associated local optimization schemes. Next we analyze MAGSAC++ which stands out for two reasons. First, it achieves the best results according to existing benchmarks. Second, it makes quite different modeling assumptions and derivation steps. We discovered, however that the derivation does not correspond to sound principles and the resulting score function is in fact numerically equivalent to a simple Gaussian-uniform likelihood, a basic model within the proposed framework. Finally, we propose an experimental methodology for evaluating scoring functions: assuming either a large validation set, or a small random validation set in expectation. We find that all scoring functions, including using a learned inlier distribution, perform identically. In particular, MAGSAC++ score is found to be neither better performing than simple contenders nor less sensitive to the choice of the threshold hyperparameter. Our theoretical and experimental analysis thus comprehensively revisit the state-of-the-art, which is critical for any future research seeking to improve the methods or apply them to other robust fitting problems.
Paper Structure (86 sections, 12 theorems, 51 equations, 15 figures, 2 tables)

This paper contains 86 sections, 12 theorems, 51 equations, 15 figures, 2 tables.

Key Result

Proposition 1

For $r \in [0, T]$, the residual scoring functions in the profile and marginal case can be expressed, up to a constant, as where $\operatorname{smax}$ is the smooth maximum: $\operatorname{smax}(x,y) = \log(e^x + e^y)$.

Figures (15)

  • Figure 1: (a) Correspondences under homography in a plane. (b) Manifold $\mathcal{M}_{\theta}$ is a hyperbola. (c) Knowing the observed correspondence $x$ and marginalizing over true unknown correspondence on the manifold $\bar{x}$, the resulting probability $p(x; \theta)$ is a function of only the distance from $x$ to the manifold $\mathcal{M}_{\theta}$.
  • Figure 2: Examples of different profile functions for a spherical density in 4D: Gaussian, Laplacian and uniform. Their corresponding 1D marginal distribution (blue), integrating 3 dimensions out of 4 is close to Gaussian in all cases. The distribution of distances $\rho = \|x - \bar{x} \|$, considered in MAGSAC++ is cordinally different.
  • Figure 4: Comparison of profile score (equal to MSAC in this case) and marginal score with different scale for the Gaussian-Uniform mixture model. Both scores are shown for the decision threshold $\tau=1$.
  • Figure 5: Left: Normalized weight of MAGSAC++ (blue) for $\nu=4,6,8$ and $\bar{\sigma} = 1$ and the fitted inlier posterior probability function of Gaussian-Uniform mixture model (dashed red). We fit both $\tau$ and $\sigma$ of GaU model. Right: Corresponding normalized score functions. The respective 99'th quantile $\kappa = 3.64, 4.1, 4.45$ and $\tau = \bar{\sigma} \kappa = \kappa$ for MAGSAC++. The fitted parameters $(\tau,\sigma)$ of GaU are, respectively, $(1, 0.96), (2, 1), (2.51, 1.06)$. Fitted threshold parameters $\tau$ of GaU model are visualized by the black dots in this normalized plot.
  • Figure 6: Validation on the homography estimation benchmark (HEB). Left: validation plot. Dotted horizontal lines show score-based oracles: selecting the best threshold per image pair. Shaded areas show $95\%$ confidence intervals with respect to the validation set (here and below by BCA bootstrap). Right: selected scoring functions.
  • ...and 10 more figures

Theorems & Definitions (20)

  • Proposition 1
  • Lemma 1
  • Proposition 2
  • Proposition 3
  • Proposition 4
  • Proposition 5
  • Proposition 6
  • proof
  • Proposition 6
  • proof
  • ...and 10 more