Hierarchical Directed Acyclic Graph Kernel: Methods for Structured Natural Language Data

Jun Suzuki, Tsutomu Hirao, Yutaka Sasaki, Eisaku Maeda

Abstract

Natural language processing often requires comparing complex structures that involve both nested hierarchies and intricate relational links. Traditional kernel methods, such as string or tree kernels, frequently fail to capture the full breadth of these structures or are too rigid for practical variability. This paper introduces the Hierarchical Directed Acyclic Graph (HDAG) Kernel, a novel framework that represents text as a DAG where nodes can themselves contain nested DAGs. By employing attribute sequences and a decay-based flexible matching algorithm, the HDAG kernel effectively handles "fuzzy" linguistic matches. Experimental results in question classification and sentence alignment tasks demonstrate that the HDAG kernel significantly outperforms conventional bag-of-words, string, and tree-based approaches.

Introduction

The inherent complexity of natural language—spanning syntax, semantics, and discourse—presents a significant challenge for automated similarity measurement. Traditional approaches typically fall into three categories: bag-of-words models, which discard structural information; string kernels, which capture sequence but ignore hierarchy; and tree kernels, which capture hierarchy but struggle with non-tree relations such as coreference. Furthermore, tree kernels are often overly sensitive to minor structural differences, requiring exact matches to register similarity.

To address these limitations, we propose the Hierarchical Directed Acyclic Graph (HDAG) Kernel. This unified mathematical framework is designed to handle "chunks within chunks" while remaining flexible enough to recognize semantic similarity across varying grammatical structures.

Methodology: The HDAG Framework

The core of our approach is the HDAG representation, where a text snippet is modeled as a Directed Acyclic Graph. A defining feature of this model is its hierarchical nature: a node in the graph can represent a "chunk" (e.g., a Noun Phrase) that contains its own internal DAG of words and tags.

Figure 1: An example of the Hierarchical Directed Acyclic Graph (HDAG) structure, illustrating nested chunks, dependency links, and coreference relations.

Attribute Sequences and Flexible Matching

The kernel calculates similarity by identifying common "attribute sequences"—combinations of words, Part-of-Speech (POS) tags, and semantic categories—across two graphs. To ensure robustness against linguistic variations and paraphrasing, we introduce a decay factor ($\lambda$). This allows the kernel to match sequences even when "gaps" or additional nodes exist in one of the graphs, penalizing the similarity score based on the number of skipped nodes.

Generalization of Structures

The HDAG kernel acts as a generalization of several existing structural representations. By adjusting the granularity of the graph, it can emulate simpler models while retaining the ability to capture more complex interactions.

Figure 5: Comparison of structural representations: (a) the proposed Hierarchical and Dependency structure, (b) standard Dependency structure, and (c) simple Word Order.

Computational Efficiency

Despite the structural complexity, the HDAG kernel is computed efficiently using a recursive dynamic programming algorithm. This approach allows for a computation time of $O(n|P||Q|)$, where $n$ is the sequence length and $P, Q$ are the node sets of the compared graphs, making it feasible for practical NLP tasks.

Experimental Evaluation

We evaluated the HDAG kernel on two primary Japanese language tasks: Question Classification and Sentence Alignment.

  1. Question Classification: Utilizing a dataset of 3,011 questions categorized into 148 types, the HDAG kernel was used as a function for Support Vector Machines (SVMs).
  2. Sentence Alignment: This task involved aligning abstract sentences from the Mainichi Shinbun with similar sentences from the Yomiuri Shinbun.

Linguistic analysis was performed using Cabocha for dependency parsing and Goi-taikei for semantic attributes, providing the rich feature set necessary for the HDAG representation.

Key Results

The HDAG kernel demonstrated superior performance across both evaluation metrics:

  • Sentence Alignment: The HDAG kernel achieved a Mean Reciprocal Rank (MRR) of 0.523, notably higher than the String Subsequence Kernel (0.479) and the Tree Kernel (0.174).
  • Question Classification: The HDAG-based SVM reached an accuracy of 86.6%, surpassing the standard DAG kernel (86.2%) and a Bag-of-Attributes baseline (82.3%).

These results indicate that the ability to perform approximate matching via node skips is critical for handling the nuances of natural language. Furthermore, as the complexity of attribute combinations ($n$) increased, the HDAG kernel maintained stable performance, whereas other kernels tended to over-specialize and degrade.

Conclusion

The Hierarchical Directed Acyclic Graph Kernel provides a powerful and flexible method for structured natural language data. By combining hierarchical nesting with relational links and "fuzzy" matching, it captures semantic nuances that simpler kernels miss. Future work will focus on optimizing the computational overhead for web-scale datasets and exploring automated methods for determining optimal hyperparameters like the decay factor $\lambda$.

Summary updated

BibTeX
@inproceedings{suzuki2003hierarchical,
  author = {Jun Suzuki and Tsutomu Hirao and Yutaka Sasaki and Eisaku Maeda},
  title = {{Hierarchical Directed Acyclic Graph Kernel: Methods for Structured Natural Language Data}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2003},
  doi = {10.3115/1075096.1075101},
}
Figure