Lipschitz Continuity of Mahalanobis Distances and Bilinear Forms

Valentina Zantedeschi, Rémi Emonet, Marc SebbanarXiv 2016 · OpenReview

Abstract

Many theoretical results in the machine learning domain stand only for functions that are Lipschitz continuous. Lipschitz continuity is a strong form of continuity that linearly bounds the variations of a function. In this paper, we derive tight Lipschitz constants for two families of metrics: Mahalanobis distances and bounded-space bilinear forms. To our knowledge, this is the first time the Mahalanobis distance is formally proved to be Lipschitz continuous and that such tight Lipschitz constants are derived.

Introduction

In machine learning theory, establishing the stability and generalization capabilities of algorithms often requires functions to satisfy the property of Lipschitz continuity. A function is Lipschitz continuous if the ratio of the change in its output to the change in its input is bounded by a constant $k$. This property ensures that small perturbations in input data do not result in disproportionately large changes in the model's output, a prerequisite for proofs involving uniform stability and generalization bounds.

While Mahalanobis distances and bilinear forms are ubiquitous in metric learning and similarity measurement, their specific Lipschitz constants have historically been overlooked or approximated with loose estimates. This paper addresses this gap by providing the first formal proof of Lipschitz continuity for these metrics and deriving the tightest possible constants for the $\ell_2$ norm.

Methodology

The derivation of these constants utilizes a calculus-based approach. For any differentiable function defined over a convex space, the Lipschitz constant $k$ is equivalent to the supremum of the norm of its gradient. The authors follow a structured three-step process for both Mahalanobis distances and bilinear forms:

  1. Gradient Calculation: The partial derivatives of the distance or similarity functions are computed with respect to the input vectors $x_1$ and $x_2$.
  2. Matrix Decomposition: To simplify the Mahalanobis distance expression, the authors employ the Cholesky decomposition, where the positive semi-definite matrix $M$ is represented as $M = L^T L$.
  3. Bounding the Gradient: By applying the Cauchy-Schwarz inequality and leveraging the properties of normalized vectors, the authors identify the upper bound of the gradient's norm, which serves as the tight Lipschitz constant $k$.

Theoretical Insights

The Square Root Dependency

A significant finding is that the Lipschitz constant for the Mahalanobis distance does not scale directly with the norm of the matrix $M$. Instead, it depends on the norm of its "square root" matrix $L$ (from the Cholesky decomposition). This distinction is vital for researchers looking to optimize metric learning parameters, as it provides a more precise understanding of how the matrix $M$ influences function stability.

Bounded Space Requirement for Bilinear Forms

The study distinguishes between the global continuity of Mahalanobis distances and the conditional continuity of bilinear forms ($x_1^T M x_2$). While the former is Lipschitz continuous across the entire space, the latter is only Lipschitz continuous if the input space is bounded (i.e., all points reside within a sphere of radius $R$). Because the gradient of a bilinear form increases as one moves further from the origin, a bound on the input space is necessary to prevent the Lipschitz constant from becoming infinite.

Key Results

The paper establishes two primary lemmas defining the tight Lipschitz constants:

1. Mahalanobis Distance

The function $d_M(x_1, x_2) = \sqrt{(x_1 - x_2)^T M (x_1 - x_2)}$ is $k$-Lipschitz with: $$k = \sqrt{2} \|L\|_2$$ where $M = L^T L$.

2. Bilinear Forms

The similarity function $d_M(x_1, x_2) = x_1^T M x_2$ is $k$-Lipschitz with: $$k = \sqrt{2} \|M\|_2 R$$ where $R$ represents the maximum norm of any point within the input space.

Conclusion and Limitations

These derivations provide the machine learning community with the mathematical tools necessary to refine stability-based proofs. By using these tight constants, theorists can produce more accurate generalization bounds for metric learning algorithms.

However, certain limitations remain. The current proofs are specific to the $\ell_2$ norm; different Minkowski distances (such as $\ell_1$ or $\ell_\infty$) may yield different constants. Additionally, the derivation assumes the function is defined over a convex space. Future work may involve extending these proofs to non-convex domains or alternative norm spaces to further broaden the applicability of these theoretical guarantees.

Summary updated

Abstract

Many theoretical results in the machine learning domain stand only for functions that are Lipschitz continuous. Lipschitz continuity is a strong form of continuity that linearly bounds the variations of a function. In this paper, we derive tight Lipschitz constants for two families of metrics: Mahalanobis distances and bounded-space bilinear forms. To our knowledge, this is the first time the Mahalanobis distance is formally proved to be Lipschitz continuous and that such tight Lipschitz constants are derived.
BibTeX
@misc{zantedeschi2016lipschitz,
  author = {Valentina Zantedeschi and Rémi Emonet and Marc Sebban},
  title = {{Lipschitz Continuity of Mahalanobis Distances and Bilinear Forms}},
  year = {2016},
  eprint = {1604.01376},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1604.01376},
}
Figure