DAG-based Long Short-Term Memory for Neural Word Segmentation

Xinchi Chen, Zhan Shi, Xipeng Qiu, Xuanjing HuangarXiv 2017

Abstract

Chinese Word Segmentation (CWS) faces a persistent challenge in balancing the efficiency of character-based sequence labeling with the semantic depth of word-based scoring. This paper introduces DAG-LSTM, a novel architecture that structures a Long Short-Term Memory network over a Directed Acyclic Graph (DAG) of potential words. By aggregating information from all incoming word-level edges at each character node, the model captures rich lexical features while maintaining the simplicity of character-level inference.

Introduction

Unlike English, Chinese text lacks explicit word delimiters, making segmentation a foundational task for downstream NLP. Traditional methods typically fall into two categories: character-based sequence labeling, which is fast but lacks word-level context, and word-based scoring, which captures context but suffers from exponential search spaces. The authors identify a "best of both worlds" opportunity: utilizing informative word-level features without losing the speed and simplicity of character-based labeling.

The DAG-LSTM Framework

The core innovation of this work is the transition from a linear chain LSTM to a DAG-structured one. In this model, nodes represent characters, and edges represent potential words identified from a vocabulary. The hidden state at each character position is calculated by aggregating information from all "incoming" edges (words) that end at that character.

Architecture Overview

The model consists of three primary layers: an embedding layer, a Bi-LSTM layer, and an inference layer.

  1. Embedding Layer: Maps characters and n-grams to dense vectors.
  2. Bi-LSTM Layer: Processes the sequence in both forward and backward directions. In the DAG-LSTM variant, the hidden state at each position is an aggregation of all words ending at that character.
  3. Inference Layer: Uses a Conditional Random Field (CRF) or similar mechanism to output character-level tags (B, M, E, S) for final decoding.

Feature Representation

The model leverages different n-gram features to enrich the character representations. As shown in the figure below, uni-gram features focus on the current character, while bi-gram features incorporate immediate context to provide a more nuanced input to the LSTM.

Comparison of Uni-gram (a) and Bi-gram (b) feature extraction methods for generating character embeddings $z_i$.

Model Variants and Training

The authors explore two main variants of the DAG-LSTM:

  • Model-I (Weight Sharing): Employs uniform weight matrices for all word lengths.
  • Model-II (Weight Independent): Uses distinct weight matrices for different word lengths, allowing the model to explicitly learn the significance of word length as a feature.

To enhance robustness against Out-of-Vocabulary (OOV) words, a technique called In-Vocabulary (IV) Word Dropout is employed. By randomly replacing known words with an <OOV> token during training, the model is forced to rely more on character-level context, improving its generalization to unseen text.

Experimental Evaluation

The DAG-LSTM was evaluated on standard benchmarks from the SIGHAN bakeoffs, including the MSRA, AS, and CTB datasets. Pre-trained embeddings from a Chinese Wikipedia corpus were used to initialize character and word vectors.

Key Results

  • Superior Accuracy: The DAG-LSTM consistently outperformed standard Bi-LSTM baselines. On the MSRA dataset, it achieved an F-value of 96.47%, compared to 94.14% for the baseline.
  • Improved OOV Recall: The IV dropout strategy proved effective, raising the OOV recall rate on the AS dataset from approximately 70% to over 71%.
  • External Knowledge Integration: The model demonstrates a high capacity for incorporating external dictionaries. Adding test-set vocabulary to the DAG pushed F-values above 97%.

Conclusion

The DAG-LSTM provides a powerful framework for Chinese Word Segmentation by naturally encoding the lattice of possible segmentations into a neural network. This approach successfully combines the strengths of character-level and word-level modeling. Future work may extend this DAG-structured approach to other tasks involving complex lattice structures, such as speech recognition or processing morphologically rich languages.

Summary updated

BibTeX
@misc{chen2017dag,
  author = {Xinchi Chen and Zhan Shi and Xipeng Qiu and Xuanjing Huang},
  title = {{DAG-based Long Short-Term Memory for Neural Word Segmentation}},
  year = {2017},
  eprint = {1707.00248},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.00248},
}
Figure