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

A Dependency-based Word Subsequence Kernel

Rohit J. KateEMNLP 2008

Introduction: Bridging the Semantic Gap

Measuring sentence similarity is a fundamental task in Natural Language Processing (NLP). Traditionally, researchers have relied on "kernels"—mathematical functions that quantify similarity without requiring explicit feature engineering. Two dominant approaches have been Word Subsequence Kernels (WSK), which count common word sequences, and Syntactic Tree Kernels (STK), which match sub-structures in phrase-structure trees.

However, both suffer from a "semantic gap." WSKs often capture nonsensical sequences (e.g., "cat was by") and struggle with long-distance dependencies due to gap penalties. Conversely, STKs focus on abstract grammatical labels (like NP or VP) that may not reflect the actual meaning of a sentence. This paper introduces a Dependency-based Word Subsequence Kernel designed to capture meaningful word relationships by leveraging the structural properties of dependency trees.

Methodology: Leveraging Dependency Structures

Unlike linear sequences or phrase-structure trees, dependency trees represent functional relationships between words (e.g., a subject modifying a verb). By counting shared paths within these trees, the proposed kernel focuses on linguistically grounded relationships.

Figure 4: Dependency tree representation of a complex sentence, highlighting direct links between semantically related words.

As shown in the dependency structure above, related words are linked directly regardless of their linear distance in the sentence. For example, the relationship between "cat" and "chased" remains clear despite the intervening prepositional phrase "with a red collar." This structural robustness allows the kernel to ignore "noise" and focus on the core "who did what to whom" semantics.

The Algorithm

The kernel employs an efficient $O(|T_1||T_2|)$ algorithm to count common paths. It operates through two recursive steps:

  1. Common Downward Paths (CDP): Counts paths starting at a node and descending toward leaves.
  2. Common Peak Paths (CPP): Uses CDP values to count all paths that "peak" at a specific pair of nodes.

A decay factor ($\alpha$) is applied to downweight longer paths, preventing them from disproportionately influencing the similarity score.

Experimental Evaluation

The kernel was evaluated on the GEOQUERY dataset—a benchmark of 880 US geography questions—using the KRISP semantic parsing system. To isolate the kernel's performance from parsing errors, gold-standard syntactic trees were converted into dependency trees.

Figure 5: Comparison of F-measure performance across different training set sizes for Dependency, Word, and Syntactic kernels.

The results demonstrate that the dependency-based kernel consistently outperforms both WSK and STK. The advantage is most pronounced when training data is scarce. As seen in the table above, with only 160 examples, the Dependency Kernel achieved an F-measure of 63.78, significantly higher than the Word Kernel (61.22) and the Syntactic Kernel (59.66). Even at the maximum training size of 792 examples, the Dependency Kernel maintained its lead with a score of 79.79.

Conclusion and Future Directions

By combining the word-centric nature of subsequence kernels with the structural insights of dependency grammar, this approach provides a more robust measure of semantic similarity. While the current model requires exact word matching, future work could incorporate "soft" matching using word classes or synsets (e.g., WordNet) to handle synonyms like "cat" and "kitten." Additionally, testing the kernel on tasks such as paraphrasing and text classification will be crucial to establishing its broader utility in NLP.

Summary updated

BibTeX
@inproceedings{kate2008dependency,
  author = {Rohit J. Kate},
  title = {{A Dependency-based Word Subsequence Kernel}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2008},
}
Figure