Unsupervised Boundary-Aware Language Model Pretraining for Chinese Sequence Labeling

Peijie Jiang, Dingkun Long, Yanzhao Zhang, Pengjun Xie, Meishan Zhang, Min Zhang

Abstract

Chinese sequence labeling tasks, such as Word Segmentation (CWS), Part-of-Speech (POS) tagging, and Named Entity Recognition (NER), are inherently challenged by the lack of explicit word boundaries in written Chinese. While traditional methods rely on external, manually curated lexicons to provide boundary cues, these approaches suffer from high human costs and poor domain adaptability. This paper presents BABERT (Boundary-Aware BERT), a pre-training strategy that injects unsupervised statistical boundary information directly into the language model. By mining Pointwise Mutual Information (PMI) and Left/Right Entropy (LRE) from raw text, BABERT achieves state-of-the-art performance across multiple benchmarks without the need for expensive dictionaries.

Introduction

Unlike English and other alphabetic languages, Chinese text is written as a continuous stream of characters. Identifying word boundaries is a fundamental prerequisite for downstream sequence labeling. Historically, researchers have integrated external lexicons into models to bridge this gap. However, this dependency creates two primary bottlenecks: the high cost of building high-quality lexicons and the sensitivity to domain shifts (e.g., a news-based dictionary failing on financial or social media text).

To address these issues, we propose an unsupervised approach that teaches a model to "sense" word boundaries using only raw, unlabeled text. By extracting statistical metrics that indicate word-tightness and contextual freedom, we can bake structural knowledge into the model's weights during the pre-training phase.

Methodology

The BABERT architecture consists of three core components designed to integrate boundary awareness into the BERT framework:

1. Boundary Information Extractor

Instead of relying on human-annotated dictionaries, we utilize statistical measures mined from a 3-billion-token corpus (Chinese Wikipedia and Baidu Baike). Two key indicators are used:

  • Pointwise Mutual Information (PMI): Quantifies the cohesive strength between characters. A high PMI suggests that a sequence of characters likely forms a single word or entity.
  • Left and Right Entropy (LRE): Measures the variety of contexts in which a string appears. High entropy at the borders of a string indicates a likely boundary, as the string is "free" to appear next to many different characters.

2. Boundary-Aware Representation

For every character in a sequence, we construct "Contextual N-gram Sets." We examine all N-grams (up to length 4) that include the target character and concatenate their respective PMI and LRE values into a single feature vector. This vector serves as a statistical signature of the character's potential boundary status.

3. Boundary-Aware Learning

During pre-training, we augment the standard Masked Language Model (MLM) loss with a specialized regression task. We force the 3rd hidden layer of the BERT model to approximate the statistical boundary vector using Mean Square Error (MSE) loss. This "soft" injection ensures that the model learns to represent structural boundaries internally before processing higher-level semantics.

Experiments and Results

BABERT was evaluated on 10 benchmark datasets across three primary tasks: CWS (CTB6, MSRA, PKU), POS tagging (CTB6, UD1, UD2), and NER (OntoNotes 4.0, Book, News, and Finance).

Performance Gains

BABERT consistently outperformed vanilla BERT across all benchmarks, with an average F1-score increase of 0.67 points. It also surpassed other specialized Chinese models, including BERT-wwm, ERNIE-Gram, and NEZHA, in the majority of tests. Notably, when BABERT was combined with existing supervised lexicon methods (BABERT-LE), it achieved even higher scores, suggesting that unsupervised statistical features and manual dictionaries provide complementary information.

Layer Selection and Structural Learning

An ablation study on the injection layer revealed that the 3rd layer is the optimal location for boundary information. Injecting this data into very shallow (1st) or very deep (12th) layers resulted in lower performance. This suggests that low-level structural information like word boundaries is best handled early in the model's pipeline, allowing deeper layers to focus on complex semantic relationships.

Few-Shot Capabilities

One of the most significant advantages of BABERT is its performance in low-data scenarios. On the Onto4 NER task with only 10 training samples, BABERT achieved an F1-score of 32.07, more than doubling the 14.87 F1-score achieved by vanilla BERT. This demonstrates that pre-training with boundary awareness provides a robust prior that is especially beneficial when labeled data is scarce.

Conclusion

BABERT demonstrates that unsupervised statistical features are a powerful alternative to manual lexicons for Chinese sequence labeling. By integrating PMI and LRE into the pre-training phase, the model develops an internal sense of word boundaries that is both domain-robust and highly effective for low-resource tasks. Future work may explore extending this methodology to other non-spaced languages, such as Japanese or Thai, and investigating additional statistical features to further refine boundary detection.

Summary updated

BibTeX
@inproceedings{jiang2022unsupervised,
  author = {Peijie Jiang and Dingkun Long and Yanzhao Zhang and Pengjun Xie and Meishan Zhang and Min Zhang},
  title = {{Unsupervised Boundary-Aware Language Model Pretraining for Chinese Sequence Labeling}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.34},
}
Figure