NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Pairwise Learning Using Kernel Ridge Regression: an Exact Two-Step Method

Michiel Stock, Tapio Pahikkala, Antti Airola, Bernard De Baets, Willem WaegemanarXiv 2016

Abstract

Pairwise learning, or dyadic prediction, is a fundamental task in machine learning with applications ranging from bioinformatics to recommender systems. While Kronecker-based Kernel Ridge Regression (KRR) is a standard approach, its computational cost often prohibits extensive model selection and scaling to large datasets. This paper introduces an exact "two-step" KRR method that decomposes the pairwise problem into two sequential ridge regression tasks. We demonstrate that this approach is theoretically equivalent to traditional Kronecker KRR while offering significant computational advantages. Specifically, we derive closed-form shortcuts for leave-one-out cross-validation across four distinct generalization settings and provide a primal-form update for online learning. Experimental results on drug-target interaction and text classification benchmarks show that our method achieves state-of-the-art performance with speedups of several orders of magnitude.

Introduction

Many real-world problems involve predicting properties for pairs of objects, such as whether a specific drug will bind to a particular protein or if a user will enjoy a given movie. This is known as dyadic prediction. A significant challenge in this field is evaluating how well a model generalizes to unseen data. Depending on whether the objects in a test pair were seen during training, we categorize the problem into four settings:

Generalization settings in dyadic prediction: Setting A (in-sample), Settings B & C (one new object), and Setting D (zero-shot).
  • Setting A: Both objects in the pair were present in the training set (imputation).
  • Settings B & C: One object is new, while the other was seen during training (transfer learning).
  • Setting D: Both objects are entirely new to the model (zero-shot learning).

Traditional methods using the Kronecker product kernel are powerful but computationally expensive, making hyperparameter tuning via cross-validation nearly impossible for large datasets.

Methodology

The proposed Two-Step Kernel Ridge Regression (KRR) method simplifies the learning process by decomposing it into two stages:

  1. Step One: A KRR model is trained on the first set of objects (e.g., drugs) to predict labels for the auxiliary tasks.
  2. Step Two: These predictions serve as "virtual labels" to train a second KRR model on the second set of objects (e.g., proteins).

Theoretical Contributions

The authors prove that this two-step approach is a special case of Kronecker KRR utilizing a "decomposable spectral filter." This allows for separate regularization parameters ($\lambda_d$ and $\lambda_t$) for each object type, which often leads to better performance in practice as noise levels may vary between the two domains.

Furthermore, the paper derives algebraic shortcuts for Leave-One-Out Cross-Validation (LOO-CV). Once an initial eigenvalue decomposition is performed, the error for all four settings (A, B, C, and D) can be calculated almost instantaneously. This enables exhaustive grid searches for hyperparameters that were previously computationally prohibitive.

Experimental Results

The method was evaluated on several benchmarks, including drug-target interaction datasets (Enzymes, GPCRs, Ion Channels, and Nuclear Receptors) and the Davis kinase inhibitor selectivity dataset.

Predictive Performance and Efficiency

The two-step method matched or exceeded the predictive accuracy of traditional Kronecker KRR. The most dramatic result was the improvement in computational efficiency. For the "Enzyme" dataset, a standard grid search for hyperparameters in Setting D (zero-shot) took over 3 days. Using the two-step method's shortcuts, the same task was completed in just 66 seconds.

Scalability and Online Learning

To test scalability, the authors applied an online version of the algorithm to the Wikipedia Hierarchy dataset (LSHTC challenge), involving over 380,000 articles. The model successfully processed data in mini-batches, showing consistent performance improvements and demonstrating its viability for "big data" applications where the full kernel matrix cannot be stored in memory.

Discussion and Conclusion

The two-step KRR method provides a theoretically grounded and highly efficient framework for pairwise learning. By allowing for separate regularization and providing fast cross-validation shortcuts, it addresses the primary bottlenecks of Kronecker-based methods. While the 2D hyperparameter search space is larger than the traditional 1D space, the speed of the new algorithm makes this a non-issue. Future work may explore hybrid models combining KRR with other techniques like Random Forests or different spectral filters to further enhance predictive power in sparse data scenarios.

Summary updated

BibTeX
@misc{stock2016efficient,
  author = {Michiel Stock and Tapio Pahikkala and Antti Airola and Bernard De Baets and Willem Waegeman},
  title = {{Efficient Pairwise Learning Using Kernel Ridge Regression: an Exact Two-Step Method}},
  year = {2016},
  eprint = {1606.04275},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.04275},
}
Figure