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

Sequence and Tree Kernels with Statistical Feature Mining

Jun Suzuki, Hideki Isozaki

Introduction: The Curse of Dimensionality in NLP

In Natural Language Processing (NLP), data is frequently represented as discrete structures, such as sequences of words or dependency trees. Convolution kernels (like sequence and tree kernels) are highly effective tools for these representations because they can automatically count all possible sub-structures (sub-sequences or sub-trees) to determine the similarity between two pieces of text.

However, these kernels face a significant hurdle: the curse of dimensionality. Because natural language boasts a massive vocabulary, the number of possible sub-structures grows exponentially. Most large sub-structures appear only once in a dataset. Consequently, the kernel begins to behave like a strict "nearest neighbor" rule—it recognizes exact matches but fails to generalize to new data. This leads to high precision but severely low recall.

Traditionally, researchers combat this by "choking" the kernel, artificially limiting it to very small sub-structures (e.g., only looking at pairs or triplets of words). While this prevents overfitting, it discards the rich structural complexity that makes these kernels useful in the first place. This paper introduces a method to make sequence and tree kernels more effective by using statistical feature mining, replacing arbitrary size limits with a statistical significance test.

Proposed Methodology

The authors propose a "Statistical Feature Mining" approach that identifies and retains only statistically significant sub-structures, allowing the model to leverage complex patterns without performance-degrading noise.

1. Statistical Selection

Instead of a hard size limit, the authors use the chi-squared ($\chi^2$) test to evaluate every sub-structure. A sub-structure is only included in the kernel calculation if its distribution across classes (e.g., positive vs. negative sentiment) is statistically significant beyond a predefined threshold $\tau$.

2. Efficient Mining via Pruning

Calculating $\chi^2$ for every possible sub-structure naively is computationally impossible. To solve this, the authors integrate PrefixSpan (a sequential pattern mining algorithm) with Statistical Metric Pruning (SMP).

Prefix tree and pruning logic based on chi-squared evaluation

This integration allows the algorithm to "prune" the search space efficiently. By calculating an upper bound for the $\chi^2$ value, if a small prefix isn't promising, the algorithm guarantees that any longer sequence starting with that prefix will not be significant either, allowing it to safely discard vast swaths of the feature space.

3. Tree-to-Sequence Encoding

To apply these sequential mining techniques to hierarchical tree structures, the authors utilize a string encoding method based on postorder traversal.

Tree-to-sequence encoding using postorder traversal

This clever encoding allows tree structures to be treated as flat sequences while perfectly preserving their hierarchical relationships, using brackets to denote nesting depth.

4. Dynamic Programming Integration

Finally, the feature selection mechanism is embedded directly into the Dynamic Programming (DP) process used to calculate the kernels, ensuring the overall method remains computationally viable for real-world applications.

Experimental Setup and Key Findings

The authors evaluated their feature-mined kernels (SK+FS for sequences and TK+FS for trees) against standard Sequence Kernels (SK), Tree Kernels (TK), and a Bag-of-Words (BOW) baseline across three real-world NLP tasks:

  • English Question Classification (EQC): 5,500 questions categorized into 50 types.
  • Subjectivity Detection (SD): 2,095 sentences labeled as subjective or objective.
  • Polarity Identification (PI): 5,564 sentences labeled with positive or negative opinions.

Significance Over Size

The most critical insight from the experiments is that "large" features are not inherently bad; rather, "insignificant" ones are. By filtering for statistical significance, the model can safely utilize sub-structures of any length ($n=\infty$).

Eliminating the Overfitting Cliff

Standard kernels exhibit a performance "cliff," where accuracy plummets as the sub-structure size increases (typically $n > 3$). The proposed method eliminates this cliff. For example, in the Subjectivity Detection task, the standard Tree Kernel's accuracy dropped from 0.850 (at $n=3$) to 0.755 (at $n=\infty$). In contrast, the proposed TK+FS remained stable and even improved, peaking at 0.856 for $n=\infty$.

Computational Viability

Despite the theoretical complexity of evaluating infinite-length sub-structures, the pruning techniques often make the calculation faster than the original kernel because the algorithm avoids "vain" calculations on statistically insignificant features.

Limitations and Future Work

While highly effective, the approach has a few limitations:

  • Worst-Case Complexity: In the absolute worst-case scenario, the time complexity remains exponential because it fundamentally involves enumerating sub-structures.
  • Binary Focus: The discussion on $\chi^2$ selection is primarily framed around two-class supervised classification. Extending this to multi-class or unsupervised scenarios requires further adaptation.
  • Kernel Smoothing: The paper focuses its comparison primarily on size-restricted kernels. A deeper comparison with advanced kernel smoothing techniques—a conventional alternative to hard size limits—remains an area for future study.

Summary updated

BibTeX
@inproceedings{suzuki2005sequence,
  author = {Jun Suzuki and Hideki Isozaki},
  title = {{Sequence and Tree Kernels with Statistical Feature Mining}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2005},
}
Figure