Abstract
Standard sequence labeling models like Conditional Random Fields (CRFs) rely on sequential algorithms that fail to exploit the parallel processing power of modern GPUs. We propose Bregman Conditional Random Fields (BCRF), a novel discriminative model that replaces sequential dynamic programming with parallelizable iterative Bregman projections. BCRF achieves accuracy comparable to CRFs while offering significant speedups and superior robustness in highly constrained settings compared to other parallel alternatives like Mean Field approximations.
The Sequential Bottleneck in Sequence Labeling
Sequence labeling—assigning tags such as Part-of-Speech (POS) or Named Entity (NER) labels to words—is a foundational task in Natural Language Processing. For decades, the Conditional Random Field (CRF) has been the gold standard. However, CRFs face a significant hardware bottleneck: the Forward and Viterbi algorithms used for training and inference are inherently recursive. To calculate the state at word $i$, the model must first compute the state at word $i-1$. This sequential dependency forces powerful GPUs to process sequences one step at a time, leading to significant underutilization of hardware resources.
Bregman Conditional Random Fields (BCRF)
BCRF addresses this bottleneck by reframing inference as an optimization problem over a marginal polytope using mean regularization. Instead of sequential dynamic programming, it employs Iterative Bregman Projections (IBP).
By partitioning the sequence constraints (for example, into even-indexed and odd-indexed positions), BCRF can perform projections for all positions in a set simultaneously across the GPU. This approach is conceptually similar to the Sinkhorn algorithm used in optimal transport. Furthermore, BCRF is trained using the Fenchel-Young loss framework, which ensures a convex objective and allows the model to learn effectively even from partial labels.
Experimental Evaluation
The model was evaluated on several standard benchmarks to test its versatility and performance:
- Universal Dependency Treebank 2.15 (UD): POS tagging for Dutch, English, French, and German.
- UD GSD (Chinese and Japanese): Joint word segmentation and POS tagging, a task with high structural constraints.
- CoNLL 2003: The standard benchmark for Named Entity Recognition (NER).
Key Results: Speed and Accuracy
BCRF demonstrates a compelling balance of high accuracy and hardware efficiency.
Performance Parity
Across all evaluated tasks, BCRF consistently matched or slightly exceeded the F1 scores of standard CRFs. In POS tagging, BCRF achieved scores nearly identical to Viterbi-based CRFs. Unlike Mean Field (MF) approximations, which often struggle with transition constraints and can get stuck in local optima, BCRF's concave objective ensures reliable convergence to the global optimum.
Significant Speedups
The parallel nature of BCRF leads to substantial training and inference speedups. In POS tagging tasks with simple word embeddings, BCRF trained up to 7.3x faster than a standard CRF.
As shown in the results for joint segmentation and NER, BCRF provides significant speedup factors (e.g., up to $\times 8.8$ for Chinese segmentation) while maintaining high performance. Even when paired with heavy modern encoders like BERT, BCRF remains faster than the traditional CRF baseline.
Conclusion
Bregman Conditional Random Fields offer a high-performance, GPU-native alternative to traditional CRFs. By replacing sequential bottlenecks with parallelizable projections, BCRF enables faster training and inference without sacrificing accuracy. This makes it a powerful, "drop-in" replacement for sequence labeling in modern deep learning pipelines.
Summary updated