Relative Margin Machines

Pannagadatta K. Shivaswamy, Tony JebaraNeurIPS 2008

Support Vector Machines (SVMs) have long been a gold standard for classification tasks because they maximize the margin—the distance between the decision boundary and the nearest data points. However, standard SVMs have a fundamental vulnerability: they maximize this margin in an absolute sense, making them highly sensitive to the scale and spread of the data.

The Relative Margin Machine (RMM) addresses this flaw by maximizing the margin relative to the data's spread. By bounding the projections of data points, RMM becomes robust to affine transformations and scaling, leading to significant accuracy gains on high-dimensional tasks like digit recognition.

The Problem with Standard SVMs

Because SVMs rely on absolute distances, simply stretching the data along one axis (an affine transformation) can drastically alter the resulting decision boundary.

In high-dimensional spaces, a highly discriminative feature might exist in a dimension where the data is very tightly packed. A standard SVM might ignore this excellent feature in favor of a dimension with a massive spread, simply because the absolute margin appears larger there. This makes SVMs vulnerable to noisy features with high variance and susceptible to adversarial data scaling.

Geometric intuition comparing absolute margin (red) vs. relative margin (green).

Introducing the Relative Margin Machine

The core innovation of the RMM is coupling margin maximization with a regularizer that minimizes the spread of the projected data.

While a standard SVM only cares that points are at least a certain distance away from the boundary, RMM adds a constraint ensuring they are also not too far away. Specifically, it forces all training points to lie within a "corridor" of width $B$ around the decision boundary: $\frac{1}{2}(w^\top x_i + b)^2 \leq \frac{B^2}{2}$.

This forces the algorithm to find a direction where the classes are well-separated relative to how much they scatter. Geometrically, in the projection space, RMM tries to "clump" the classes together while keeping the gap between them as wide as possible.

The Fast Algorithm

The initial formulation of this problem is a Quadratically Constrained Quadratic Program (QCQP), which is computationally expensive. To make RMM practical, the authors simplify the spread constraint into two linear constraints: $|w^\top x_i + b| \leq B$. This allows RMM to be solved using standard Quadratic Programming (QP) solvers, making it nearly as fast as a standard SVM. Like SVMs, RMM can also be kernelized to handle non-linear decision boundaries.

Key Insights

  • Joint Optimization: Unlike previous methods that normalize variance (whiten data) as a separate preprocessing step, RMM learns the shape of the data and the classifier simultaneously.
  • Invariance: RMM is designed to be translation-invariant and tends toward affine invariance, making the classifier much more robust to how features are scaled or shifted.
  • The $B$ Parameter: The corridor width $B$ acts as a trade-off dial. If $B$ is very large, RMM behaves exactly like a standard SVM. As $B$ decreases, the machine is forced to find directions with a tighter data spread.

Experimental Results

The researchers evaluated RMM on classic handwritten digit benchmarks: UCI Optical Digits, USPS Digits, and MNIST Digits. RMM consistently outperformed standard SVMs and other variants (like $\Sigma$-SVM and KLDA) across almost all tested kernels and datasets.

Classification errors on benchmark digit datasets.
  • MNIST Performance: On a subset of 1,000 MNIST samples using a degree-2 polynomial kernel, the standard SVM had 511 errors, while RMM achieved only 342 errors—a massive reduction.
  • Full MNIST: When trained on the entire 60,000-example MNIST dataset, RMM maintained its lead. With an RBF kernel, RMM had 129 errors compared to the SVM's 146.
  • Efficiency: Despite the extra constraints, the "Fast RMM" algorithm showed nearly identical asymptotic runtime behavior to standard SVM solvers, proving its scalability to large datasets.

Limitations and Future Work

While highly effective, RMM introduces an additional hyperparameter ($B$) that must be tuned via cross-validation, adding to the experimental overhead.

Interestingly, the constraints bounding the projection are "unsupervised"—they do not require class labels. The authors note this makes RMM a natural candidate for extension into semi-supervised or transductive learning, where unlabeled test data could help define the spread of the data corridor. Further exploration into the theoretical generalization bounds of relative margins also remains an open and promising area of research.

Summary updated

BibTeX
@inproceedings{shivaswamy2008relative,
  author = {Pannagadatta K. Shivaswamy and Tony Jebara},
  title = {{Relative Margin Machines}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2008},
}
Figure