Sum-Product Networks for Sequence Labeling

Martin Ratajczak, Sebastian Tschiatschek, Franz Pernkopf

Introduction

Sequence labeling is a fundamental task in machine learning, involving the assignment of a sequence of labels to a corresponding sequence of inputs. Common applications include optical character recognition (OCR) and phoneme classification in speech processing. Traditionally, Linear-Chain Conditional Random Fields (LC-CRFs) have been the standard approach. However, these models typically rely on shallow, first-order dependencies, failing to capture the complex, higher-order patterns present in real-world data.

While researchers have attempted to deepen these models using neural networks or Restricted Boltzmann Machines (RBMs), such integrations often lead to intractable inference. In these cases, calculating exact probabilities becomes impossible, forcing a reliance on slow and potentially inaccurate approximations. This paper introduces a novel framework that integrates Sum-Product Networks (SPNs) into CRFs and Markov Emission Markov Models (MEMMs), creating a deep architecture that maintains exact and efficient inference.

The SPN-CRF Architecture

The core innovation of this work is the replacement of standard local factors in a CRF with SPNs. Sum-Product Networks are deep probabilistic models represented as computational graphs of sum and product nodes. Their primary advantage is the ability to marginalize out hidden variables in time linear to the size of the network, ensuring that the "partition function" (the normalization constant) can be calculated exactly.

Graphical representation of an SPN factor (a) and its corresponding computational graph (b).

By using SPNs as local factors, the model learns a hierarchical representation of the input-output relationship. The authors further extend this to Higher-Order SPN-LC-CRFs (SPN-HO-LC-CRFs). In this configuration, the SPN factor considers a window of multiple observations and consecutive labels, effectively learning deep "n-gram" patterns. Because SPNs are differentiable, the entire system can be trained end-to-end using gradient-based optimization.

Experimental Evaluation

The proposed models were evaluated on two benchmark datasets: the OCR dataset (handwritten words) and the TIMIT speech corpus.

OCR Breakthrough

On the OCR task, the impact of higher-order dependencies and deep SPN factors was most evident. A standard first-order LC-CRF produced a Character Error Rate (CER) of 14.2%. In contrast, the SPN-HO-LC-CRF (2nd order) achieved a state-of-the-art CER of 1.41%, outperforming even complex "Cascades CRFs."

Comparison of Character Error Rates (CER) on the OCR dataset across various models, highlighting the superior performance of the SPN-HO-LC-CRF.

TIMIT Performance

For the TIMIT phone classification task, the SPN-based models reached an error rate of 18.2%. While this did not surpass the absolute best neural-heavy models of the time (which reached approximately 17.7%), it significantly outperformed other probabilistic approaches like Hidden Conditional Random Fields (21.5%). The results confirmed a consistent trend: increasing the width (hidden states $H$) and depth (layers $L$) of the SPN factors led to lower error rates, validating the SPN's effectiveness as a deep feature extractor.

Conclusion

This research demonstrates that Sum-Product Networks offer a powerful bridge between deep learning and exact probabilistic inference. By embedding SPNs within the CRF framework, the authors achieved state-of-the-art results in OCR while avoiding the intractability issues common in other deep sequence models. Future work may involve extending this framework to Segmental LC-CRFs to handle tasks without pre-defined segmentation and leveraging the exact marginals of SPNs to enforce linguistic constraints during training.

Summary updated

BibTeX
@misc{ratajczak2018sum,
  author = {Martin Ratajczak and Sebastian Tschiatschek and Franz Pernkopf},
  title = {{Sum-Product Networks for Sequence Labeling}},
  year = {2018},
  eprint = {1807.02324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.02324},
}
Figure