Learning kernels from indefinite similarities

Yihua Chen, Maya R. Gupta, Benjamin RechtICML 2009

Standard kernel methods, such as Support Vector Machines (SVMs), rely heavily on "well-behaved" Positive Semidefinite (PSD) matrices. However, real-world similarity data—whether derived from human perception scores or complex bioinformatics alignments—is often "indefinite," meaning it contains negative eigenvalues. This paper introduces a convex optimization framework that simultaneously learns a valid PSD kernel from indefinite data and trains a classifier, providing a principled alternative to ad-hoc fixes like eigenvalue clipping.

The Problem with Indefinite Similarities

In machine learning, we frequently compare objects using similarity measures. If these similarities satisfy specific mathematical properties, they form a PSD matrix, enabling the use of SVMs and Reproducing Kernel Hilbert Spaces (RKHS). But when real-world measures produce indefinite similarity matrices, plugging them into a standard SVM makes the optimization problem non-convex. The underlying theory breaks down, and performance often plummets.

Traditional "quick fixes" involve manually modifying the matrix's eigenvalues—such as clipping negative ones to zero, flipping their signs, or shifting the entire spectrum. The issue is that there is no universal fix. For instance, using a "shift" fix on protein data can result in a 32% error, while a "clip" fix yields 9%. This paper seeks a way to learn the optimal modification automatically.

The Convex Optimization Approach

The authors propose two main approaches based on convex optimization:

  1. Learning the Full Kernel Matrix: They formulate a primal SVM problem where the kernel matrix $K$ itself is a variable. By regularizing $K$ to stay close to the original indefinite similarity matrix $S$ (using the Frobenius norm) and applying the Schur Complement lemma, they transform this into a convex conic program solvable with standard optimizers.
  2. Learning the Spectrum Modification (Simplified Version): To prevent overfitting and reduce computational complexity, the authors restrict $K$ to be a linear transformation of the original similarity matrix's eigenvalues. Instead of learning $n^2$ elements of a matrix, they learn only $n$ parameters (one per eigenvalue). This results in a highly efficient Second-Order Cone Program (SOCP).
  3. Consistent Test Treatment: A critical contribution is the handling of test data. If training similarities are transformed into a new space, raw test similarities cannot be used directly. The authors provide a Quadratically Constrained Quadratic Program (QCQP) to consistently "project" test similarities into the learned kernel space.

Datasets and Visualizing Indefinite Matrices

The authors evaluated their methods on six diverse real-world datasets characterized by indefinite similarities: Amazon (book recommendations), Aural Sonar (human-judged sonar signals), Protein (sequence alignments), Voting (categorical UCI data), and Yeast 5-7 / 5-12 (protein function prediction).

Similarity matrices for the six datasets

A core insight of this work is that indefinite similarities aren't necessarily "broken"; they simply don't fit the standard Hilbert Space model. By learning the modification, we can extract useful signals while satisfying the PSD constraint.

Key Insights and Results

Eigenvalue spectrum of the Protein dataset

The eigenvalue spectrum of datasets like Protein clearly shows the presence of negative eigenvalues (falling below the zero line), which invalidate standard SVMs. The proposed SVM with spectrum modification learning proved to be a top performer across almost all datasets. On the Protein dataset, it achieved a remarkable 2.93% error, significantly outperforming the standard "clip" (9.14%) or "shift" (31.55%) heuristics.

Furthermore, the authors demonstrated that consistency is paramount. If the consistent projection method (QCQP) is not used for test samples, error rates on the Protein dataset jump from ~3% to nearly 40%. The spectrum modification approach acts as a "Goldilocks" zone—flexible enough to outperform simple clipping, but constrained enough to generalize well and avoid the overfitting seen when learning the entire kernel matrix.

Limitations and Future Work

While the SOCP formulation is more efficient than the full matrix version, it still involves $O(n)$ variables, which may pose scalability challenges for datasets with tens of thousands of samples. Additionally, the authors currently suggest using cross-validation to choose the regularizer; a more unified approach without exhaustive search would be beneficial. Finally, the core idea of learning an RKHS from indefinite similarities could be extended beyond SVMs to other kernel-based methods like Kernel PCA or Gaussian Processes.

Summary updated

BibTeX
@inproceedings{chen2009learning,
  author = {Yihua Chen and Maya R. Gupta and Benjamin Recht},
  title = {{Learning kernels from indefinite similarities}},
  booktitle = {International Conference on Machine Learning},
  year = {2009},
  url = {https://openreview.net/forum?id=S14QT5ZubS},
}
Figure