Stochastic Learning of Nonstationary Kernels for Natural Language Modeling

Sahil Garg, Greg Ver Steeg, Aram GalstyanarXiv 2018

Abstract

This paper presents a novel framework for making convolution kernels—a traditional tool for comparing structured data—as flexible and learnable as modern neural networks. By introducing a nonstationary model that learns to prioritize task-relevant structural components and a stochastic algorithm leveraging Locality-Sensitive Hashing (LSH), the authors overcome the rigidity and $O(N^2)$ scalability limitations of standard kernel methods. Evaluated on complex biological information extraction tasks, the proposed approach achieves state-of-the-art results, outperforming both traditional kernels and LSTMs on large-scale datasets.

1. Introduction

In Natural Language Processing (NLP), sentences are frequently represented as complex structured objects, such as dependency trees or Abstract Meaning Representation (AMR) graphs. To classify these structures—for instance, identifying protein-protein interactions in medical literature—researchers have traditionally relied on convolution kernels. These functions measure similarity by comparing sub-structures within the graphs.

Abstract Meaning Representation (AMR) graph and extracted sub-structures used for kernel computation.

However, standard convolution kernels face two significant hurdles. First is rigidity: they typically lack tunable parameters, treating all parts of a structure with equal weight. Second is scalability: computing the full pairwise similarity matrix (Gram matrix) scales at $O(N^2)$, making it computationally prohibitive for datasets exceeding a few thousand samples. This work bridges the gap between the structural interpretability of kernels and the high-performance learnability of deep learning.

2. Methodology

2.1 Nonstationary Convolution Kernels

The authors extend the standard kernel by adding a task-dependent parameterization. They introduce a function $\sigma(i)$ for each label (word or edge type) in the vocabulary, resulting in a new kernel function: $$k^{NS}(i, j) = \sigma(i)k(i, j)\sigma(j)$$ By learning these $\sigma$ values—which are kept binary $(\{0, 1\})$ for robustness—the model can effectively "shut off" irrelevant labels. This mechanism acts as a structural attention filter, allowing the kernel to focus exclusively on the most informative sub-structures for a given task.

2.2 Stochastic Learning via k-NN and LSH

To address the $O(N^2)$ scaling problem, the authors move away from the full Gram matrix in favor of a loss function based on a k-Nearest Neighbor (k-NN) graph. They utilize Kernel Locality-Sensitive Hashing (KLSH) to find approximate nearest neighbors in $O(N^{1.5})$ time. During training, the model employs stochastic subsampling, using "inducing points" and their neighbors to estimate the loss, which makes optimization feasible for datasets with over 100,000 samples.

3. Experimental Evaluation

3.1 Datasets and Setup

The approach was evaluated on biomolecular interaction extraction tasks using:

  • BioNLP (2009, 2011, 2013): Standard benchmarks for biological event extraction.
  • PubMed45-ERN: A dataset of 45,000 examples derived from scientific literature.
  • "All" Dataset: A combined dataset containing approximately 100,000 unique labeled discrete structures.

3.2 Key Results

  • Accuracy Improvements: The Nonstationary Path Kernel (NPK) consistently outperformed the standard Path Kernel (PK). On the BioNLP dataset, the F1 score increased from 42.4 to 47.2.
  • Competitive Performance: NPK-kNN outperformed both SVMs and LSTMs. On BioNLP, the NPK's F1 of 47.2 surpassed the LSTM's 46.0.
  • Scalability: The stochastic algorithm enabled training on 100,000 samples in roughly 12 hours on a 16-core machine—a task previously impossible for traditional kernel methods.

4. Discussion and Conclusion

A primary insight of this work is the power of "learning to forget." In biological domains, the model learned to ignore generic labels like arg0 or example, focusing instead on core interaction terms. While LSTMs are standard for NLP, they often struggle with the noisy, long-range dependencies found in scientific text; this structured kernel approach provides a more robust alternative.

Future work may explore continuous weights instead of binary parameters to mimic neural attention more closely. Additionally, while the current framework is optimized for k-NN classifiers, extending this stochastic learning approach to other models, such as Gaussian Processes, remains a promising direction for structured machine learning.

Summary updated

BibTeX
@misc{garg2018stochastic,
  author = {Sahil Garg and Greg Ver Steeg and Aram Galstyan},
  title = {{Stochastic Learning of Nonstationary Kernels for Natural Language Modeling}},
  year = {2018},
  eprint = {1801.03911},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.03911},
}
Figure