Abstract
Sequence labeling tasks like Part-of-Speech (POS) tagging and Optical Character Recognition (OCR) often benefit from higher-order features that capture long-range dependencies. However, standard exact inference methods suffer from exponential complexity as the order increases. This paper introduces a novel exact decoding algorithm that leverages a non-negative weight constraint on higher-order features to maintain computational efficiency. The proposed method achieves state-of-the-art performance with only a fractional increase in processing time compared to first-order models.
Introduction
Sequence labeling is a foundational task in natural language processing and computer vision. While first-order Conditional Random Fields (CRFs) are widely used, they are limited to local dependencies between adjacent labels. Higher-order features (e.g., trigrams, 4-grams, or longer) can capture richer context but typically lead to a state-space explosion in Viterbi decoding. In a standard setup, the complexity grows exponentially with the order of the model, forcing researchers to resort to approximate methods or reranking, which often sacrifice mathematical optimality.
Methodology
The core contribution of this work is an exact decoding algorithm predicated on a specific constraint: all higher-order features must have non-negative weights. This constraint is practically motivated; higher-order features are typically designed to reward specific, known-good patterns (such as a specific sequence of tags for a person's name) rather than penalize unlikely ones. Mathematically, if a positive weight is added to a sequence, the new optimal path is either the previous optimum or the newly rewarded path, simplifying the search space.
Algorithm Structure
The algorithm operates in a multi-layered fashion:
- Base Layer: A standard Viterbi pass computes an initial suboptimal sequence using only low-order (first-order) features.
- Pattern Matching: The algorithm identifies higher-order patterns that have been assigned positive weights in the model.
- Recursive Updates: The scores of label sequences are updated by considering how these patterns interact. The researchers categorize these interactions into four geometric types: separated, disjoint, subsequence, and pre-sequence.
By focusing only on these specific patterns rather than the entire theoretical state space, the complexity becomes quadratic relative to the number of higher-order features, rather than exponential relative to the order of the model.
Experimental Evaluation
The researchers evaluated their algorithm on two classic benchmarks to demonstrate its accuracy and efficiency.
OCR Performance
On an OCR dataset of 6,100 handwritten words, adding higher-order features up to order 7 improved accuracy from 82.42% to 88.53%. Crucially, this significant gain required only about 30% more processing time than the baseline first-order model, demonstrating the scalability of the approach.
Chinese POS Tagging
Using the SIGHAN 2008 / Chinese Tree Bank (CTB) corpus, the model achieved 94.41% accuracy, a state-of-the-art result at the time. This represented a 5.3% relative error reduction over the low-order model, with only a 10% increase in training and testing time.
Discussion and Conclusion
The non-negative constraint allows for exact inference that scales near-linearly with the order of features. While the algorithm cannot handle negative weights for higher-order features without a more complex partitioning step, it provides a powerful framework for incorporating human prior knowledge into sequence models. Future work may involve automated feature discovery and extending the framework to more complex graph structures.
Summary updated