Fast and effective kernels for relational learning from texts

Alessandro Moschitti, Fabio Massimo ZanzottoICML 2007

Overview

This paper introduces a highly optimized family of syntactic tree kernels designed to identify complex relations between pairs of sentences. By employing a clever dynamic programming approach that reuses redundant computations, the authors achieve a 10-12x speedup in processing time while reaching state-of-the-art accuracy on Textual Entailment and Question Answering tasks.

The Challenge of Relational Learning

Traditional Natural Language Processing (NLP) often struggles with "relational learning"—determining how two different text fragments relate to one another. For example, in Textual Entailment, a system must determine if Sentence A logically implies Sentence B. In Question Answering, it must verify if a specific text fragment actually answers a given question.

Simple "bag-of-words" models frequently fail in these scenarios because they ignore structural context; they cannot distinguish between "The dog bit the man" and "The man bit the dog." While syntactic tree kernels (which compare the structure of parse trees) offer a more powerful alternative, applying them to pairs of sentences creates a combinatorial explosion. Comparing every possible alignment of two trees is computationally expensive, historically making these models too slow for practical use in large-scale learning.

Methods: Syntactic Tree Kernels and Fast Computation

The authors build upon the concept of Cross-Pair Similarity. They represent sentence pairs as syntactic parse trees enriched with "placeholders" (variables like $x$ and $y$) that link related entities across the two sentences.

Figure 1: A relational representation showing two syntactic trees ($T_1$ and $T_2$) enriched with placeholders ($x$ and $y$) to link related entities.

The core contribution of the paper is a Fast Computation (FC) algorithm for the kernel function ($K_\Lambda$). This optimization relies on three main techniques:

  1. Placeholder Projection: The authors realized that many sub-computations in the tree kernel are identical across different potential alignments. By "projecting" the set of correspondences onto specific subtrees, they can easily identify when a calculation has already been performed.
  2. Dynamic Programming Optimization: They refined the standard tree kernel's dynamic programming algorithm to factor out these redundant steps. Instead of re-evaluating the similarity for every possible mapping of placeholders, the algorithm only computes it when the local placeholder context actually changes.
  3. Beam Search: For the "Max" version of their kernel (which seeks the single best alignment rather than summing all alignments), they implemented a beam search to prune the search space further. This trades a negligible amount of accuracy for significant computational speed.

Key Insights: Syntax as a Template

By using placeholders in parse trees, the model effectively learns "relational templates" (e.g., "All NP(X) VP(Y)" entails "All NP(Z) VP(Y)"). This allows the model to generalize across different vocabulary words as long as the underlying structural relationship remains consistent.

In combinatorial problems like tree matching, redundancy is the primary bottleneck; the same sub-structures are compared thousands of times. The breakthrough in this paper is formally defining exactly when two sub-problems are identical based on the placeholders they contain, allowing the algorithm to skip vast amounts of redundant work.

Interestingly, the $K_{max}$ kernel—which isn't technically a "valid" kernel in the strict mathematical sense required by Support Vector Machines (SVMs)—performed the best. This suggests that for these specific NLP tasks, finding the single best structural alignment is more informative than summing over all possible alignments.

Results and Performance

The researchers evaluated their approach on three major benchmarks: RTE1 & RTE2 (Recognizing Textual Entailment) and AVE (Answer Validation Exercise).

  • Efficiency: The optimized FC algorithm reduced the number of iterations required for the core $\Delta$ function by approximately 10x during training and 12x during testing compared to a naive approach.
  • Accuracy: The $K_{max}$ model significantly outperformed standard lexical baselines. It improved average results by 9% on RTE1 (0.63 vs 0.54), 5% on RTE2 (0.64 vs 0.59), and 8% on AVE (0.43 vs 0.35).
  • State-of-the-Art: The system achieved results competitive with the top-performing systems of its time, despite relying primarily on a standard parser and WordNet rather than massive external linguistic resources.

Limitations and Future Work

While highly effective, the system's performance is heavily tied to the quality of the initial syntactic parser; errors in parsing or semantic labeling will inevitably propagate through the kernel. Additionally, while beam search speeds up the $K_{max}$ computation, it does lead to a slight decrease in accuracy compared to an exhaustive search.

Even with a 10x speedup, tree kernels remain more computationally expensive than simple linear models. The authors suggest that future work for web-scale Question Answering should look at using these kernels to re-rank the "top N" results retrieved by a faster, simpler system. Finally, they propose applying these optimized kernels to other structured data formats, such as XML documents, where relational learning is equally critical.

Summary updated

BibTeX
@inproceedings{moschitti2007fast,
  author = {Alessandro Moschitti and Fabio Massimo Zanzotto},
  title = {{Fast and effective kernels for relational learning from texts}},
  booktitle = {International Conference on Machine Learning},
  year = {2007},
  doi = {10.1145/1273496.1273578},
}
Figure