Abstract
Many natural language processing (NLP) tasks can be generalized into segmentation problems. In this paper, we combine semi-CRF with neural networks to solve NLP segmentation tasks. Our model represents a segment both by composing the input units and embedding the entire segment. We thoroughly study different composition functions and different segment embeddings. We conduct extensive experiments on two typical segmentation tasks: named entity recognition (NER) and Chinese word segmentation (CWS). Experimental results show that our neural semi-CRF model benefits from representing the entire segment and achieves the state-of-the-art performance on CWS benchmark datasets and competitive results on the CoNLL03 dataset.
1. Introduction
Many core NLP tasks, such as Named Entity Recognition (NER) and Chinese Word Segmentation (CWS), are fundamentally segmentation problems. These tasks involve identifying subsequences of text and assigning them appropriate labels. While standard sequence labeling approaches like Conditional Random Fields (CRFs) tag individual units (characters or words), they often fail to capture "segment-level" information—the holistic properties of a phrase or word as a single unit.
Semi-Markov Conditional Random Fields (semi-CRFs) were introduced to model segments directly. However, traditional semi-CRFs rely heavily on hand-crafted features. This research investigates "neuralizing" the semi-CRF framework by exploring effective methods to represent variable-length segments as fixed-length vectors.
2. Neural semi-CRF Architecture
The proposed architecture represents segments through two primary mechanisms: input composition and segment embeddings.
2.1 Input Composition
This approach constructs a segment vector by aggregating the individual units (characters or words) it contains. The authors evaluated three distinct composition functions:
- Segmental RNN (SRNN): Utilizes a Bi-LSTM to encode the sequence within the segment.
- Segmental CNN (SCNN): Employs a Convolutional Neural Network followed by max-pooling to extract salient features.
- Segmental Concatenation (SCONCATE): A computationally efficient method that pads segments to a fixed maximum length $L$ and concatenates the unit vectors.
2.2 Segment Embeddings (SEMB)
Beyond composition, the model can treat an entire segment as a single entry in a lookup table, analogous to word embeddings. To prevent overfitting and handle the vast space of possible segments, the authors utilized unsupervised pre-training. By running baseline segmenters on large unlabeled corpora (RCV1 for English, Chinese Gigaword for Chinese), they generated "auto-segmented" data to train these embeddings. They also explored Heterogeneous embeddings (SEMB-HETERO), where the auto-segmentation was performed by a different model type (e.g., a sparse CRF) to introduce diverse structural information.
3. Experimental Evaluation
The models were tested on the CoNLL03 NER dataset and three Chinese Word Segmentation benchmarks: PKU, MSR, and CTB6.
3.1 Key Insights
- Holistic Representation: Incorporating segment embeddings (SEMB) proved significantly more effective than relying solely on composition. In CWS tasks, SEMB led to an average F-score improvement of over 2.0 points.
- Efficiency: While SRNN is a standard choice for sequences, the simpler SCONCATE achieved comparable performance while being 1.7 times faster during inference.
- Generalization and Fine-Tuning: Fine-tuning segment embeddings is beneficial when the vocabulary is well-covered. However, in high Out-of-Vocabulary (OOV) scenarios like NER, keeping pre-trained embeddings fixed (frozen) yields better generalization.
- Heterogeneous Learning: The SEMB-HETERO approach, leveraging a traditional feature-based CRF for pre-training, outperformed self-teaching neural models.
3.2 Results
The neural semi-CRF achieved state-of-the-art F-scores on the PKU (95.67%) and MSR (97.58%) datasets. On the CoNLL03 NER task, the model reached a competitive F-score of 89.77%, demonstrating the power of learned representations without heavy domain-specific feature engineering.
4. Conclusion
This work demonstrates that neural semi-CRFs, particularly when utilizing whole-segment embeddings and efficient composition functions like SCONCATE, are highly effective for NLP segmentation tasks. Future research will focus on improving the handling of OOV segments and integrating additional features like character bigrams to further enhance performance.
Summary updated