Subword Encoding in Lattice LSTM for Chinese Word Segmentation

Jie Yang, Yue Zhang, Shuailong Liang

Introduction

Chinese Word Segmentation (CWS) is a foundational task in Chinese Natural Language Processing. Unlike languages like English, Chinese text lacks explicit word boundaries, requiring a segmentation step before most downstream tasks can be performed. While character-level sequence labeling is a common approach, it often fails to capture the rich semantic information inherent in multi-character words.

Existing word-aware models face two primary challenges. First, ambiguity: a sequence of characters can often be segmented in multiple valid ways depending on context. Second, circular dependency: to utilize word-level features, models often require a pre-existing segmentor, creating a "chicken-and-egg" problem where the new model's performance is capped by the quality of the legacy segmentor.

The Lattice LSTM Architecture

To address these issues, this research extends the Lattice LSTM architecture to CWS. Unlike a standard LSTM that processes a linear sequence of characters, a Lattice LSTM incorporates "shortcut" paths representing potential words found in a lexicon. For example, if the lexicon contains the word "Chinese" (中国), a shortcut is created from the start character (中) to the end character (国).

The Lattice LSTM architecture integrating character and word/subword information.

The model employs gated units to manage these multiple paths. These gates dynamically weigh the influence of different shortcuts based on the surrounding context, allowing the model to resolve segmentation ambiguities effectively.

Subword Encoding via BPE

A key innovation of this work is the use of Byte Pair Encoding (BPE) to generate a subword lexicon. BPE is an unsupervised, data-driven algorithm that merges frequent adjacent character pairs into subword units. By using BPE-generated subwords instead of a human-defined dictionary, the model breaks the circular dependency on external segmentors. This approach allows the model to capture frequent "word-like" patterns directly from the raw corpus.

Experimental Evaluation

The proposed models were evaluated on four benchmarks:

  • CTB6 (Chinese Treebank 6.0): Formal news text.
  • PKU & MSR: Standard datasets from the SIGHAN 2005 bake-off.
  • Weibo: Informal social media text, characterized by slang and irregular grammar.

The Lattice LSTM models consistently outperformed character-based Bi-LSTM-CRF baselines. Specifically, the "Lattice+Word" model achieved error reductions of 11.9% on CTB6 and 12.8% on PKU. On the MSR and Weibo datasets, the subword-based model (Lattice+Subword) matched or even exceeded the performance of the word-based variant, demonstrating the robustness of BPE.

Performance Analysis

One of the most significant findings is the stability of the subword-based model across different sentence lengths. While traditional word-based models can fluctuate in accuracy depending on the length of the input, the Lattice+Subword model maintains a more consistent F1 score.

F1-value performance across different sentence lengths.

This stability is attributed to the fact that BPE subwords are derived from global corpus statistics rather than the potentially biased outputs of an automated segmentor. Additionally, the lattice structure improves the recall of Out-of-Vocabulary (OOV) words by leveraging internal character-to-word relationships.

Conclusion

The integration of subword encoding into a Lattice LSTM framework provides a powerful, unsupervised method for improving Chinese Word Segmentation. By bypassing the need for external segmentors and human-defined lexicons, the model achieves state-of-the-art results while remaining robust across diverse text types and sentence lengths. Future research may explore the application of this architecture to cross-domain segmentation tasks where domain-specific subword lexicons could be integrated as adaptive shortcuts.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CTB6LaLSTM+SubwordF196.1Word Segmentation · split: test
Source quote
L281: 96.1
MSRLaLSTM+SubwordF197.8Word Segmentation · split: test
Source quote
L282: 97.8
WeiboLaLSTM+SubwordF195.3Word Segmentation · split: test
Source quote
L284: 95.3
BibTeX
@inproceedings{yang2019subword,
  author = {Jie Yang and Yue Zhang and Shuailong Liang},
  title = {{Subword Encoding in Lattice LSTM for Chinese Word Segmentation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1278},
}
Figure