Nonlinear Pairwise Layer and Its Training for Kernel Learning

Fanghui Liu, Xiaolin Huang, Chen Gong, Jie Yang, Li Li

Abstract

Kernel-based methods, such as Support Vector Machines (SVMs), have long relied on "shallow" kernel functions that often fail to capture complex, local data statistics. While deep kernel learning offers a potential solution, it introduces significant optimization challenges and lacks convergence guarantees. This paper introduces the Kernel with Nonlinear Pairwise Layer (KNPL), a novel architecture that bridges the gap between traditional kernels and deep networks. By incorporating a learnable, nonlinear pairwise layer, KNPL enhances model flexibility while remaining mathematically tractable. We present an iterative training approach based on the Alternating Direction Method of Multipliers (ADMM) and demonstrate superior performance across 15 real-world datasets.

Introduction

Traditional kernel methods utilize fixed functions (e.g., Gaussian or Sigmoid) to map data into high-dimensional spaces. These functions are typically "global," applying a uniform smoothness constraint across the entire input space. This rigidity often prevents the model from adapting to local nuances or complex decision boundaries. Deep Kernel Learning attempts to address this by nesting multiple kernel layers, but these structures are notoriously difficult to train and often lack clear convergence properties.

KNPL aims to provide the representational power of deep networks with the mathematical elegance and reliability of standard kernel methods. By adding a learnable layer that captures pairwise interactions, the model can adapt its smoothness locally, effectively handling outliers and intricate data distributions.

Methodology

The Nonlinear Pairwise Layer

The core innovation of this work is the composite kernel $\tilde{K}(x_i, x_j)$, defined as: $$\tilde{K}(x_i, x_j) = g(x_i, x_j) \cdot K(x_i, x_j)$$ where $K(x_i, x_j)$ is a standard base kernel and $g(x_i, x_j)$ is a nonlinear function represented by a learnable pairwise matrix $G$. This architecture, illustrated in Figure 1, allows the model to learn specific data statistics through the $G$ matrix.

Figure 1: Architecture of the Kernel with Nonlinear Pairwise Layer (KNPL), showing the integration of the nonlinear pairwise layer with standard kernel mapping.

Optimization via ADMM

Training is formulated as a joint max-min optimization problem. The "outer" loop optimizes standard SVM parameters ($\alpha$), while the "inner" loop learns the pairwise matrix $G$. To ensure the resulting kernel remains positive semi-definite (PSD) and shift-invariant, the authors employ the Alternating Direction Method of Multipliers (ADMM).

Crucially, the authors provide a theoretical proof that their objective function is gradient-Lipschitz continuous. This justification allows for the use of accelerated optimization techniques, such as Nesterov’s acceleration, which are common in deep learning but often lack theoretical backing in traditional kernel methods.

Experimental Results

Performance Benchmarks

The KNPL model was evaluated on 15 real-world datasets from the UCI Machine Learning Repository, including medical (e.g., heart, breast-cancer), physical (sonar, ionosphere), and synthetic datasets. KNPL achieved the highest accuracy on 8 out of 15 datasets and ranked second on 4 others. Notably, on challenging datasets like diabetic and haberman, KNPL improved accuracy by 9% and 12%, respectively, compared to standard SVMs.

Visualization and Insights

A key advantage of KNPL is its ability to handle local data complexities. As shown in Figure 2, KNPL can create "isolated boundaries" or small classification "islands" around outliers without distorting the global decision boundary. This flexibility allows the model to capture complex patterns that traditional SVMs would either overfit or ignore.

Figure 2: Visualization of the decision boundary (left) and the learned pairwise matrix G (right). The black line shows KNPL's ability to create isolated boundaries around specific data points compared to the smoother SVM-CV boundary (blue dashed line).

Conclusion and Future Work

KNPL offers a powerful alternative to both shallow kernels and complex deep networks by providing a learnable pairwise layer that is both flexible and efficient to train. While the model shows significant gains in accuracy, current limitations include the use of a nearest-neighbor approximation for test-data classification and potential scalability issues with very large datasets. Future research will focus on more sophisticated out-of-sample extension methods and further optimizing the ADMM solver for big data applications.

Summary updated

BibTeX
@inproceedings{liu2018nonlinear,
  author = {Fanghui Liu and Xiaolin Huang and Chen Gong and Jie Yang and Li Li},
  title = {{Nonlinear Pairwise Layer and Its Training for Kernel Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11622},
}
Figure