150
12

Inference algorithms for pattern-based CRFs on sequence data

Abstract

We consider Conditional Random Fields (CRFs) with pattern-based potentials defined on a chain. In this model the energy of a string (labeling) x1...xnx_1 ... x_n is the sum of terms over intervals [i,j][i,j] where each term is non-zero only if the substring xi...xjx_i ... x_j equals a prespecified pattern α\alpha. Such CRFs were used in computer vision, and can be naturally applied to many sequence tagging problems. Let Π\Pi be the set of input patterns and L=αΠαL=\sum_{\alpha\in\Pi}|\alpha| be their total length. (Komodakis & Paragios, 2009) showed how to compute MAP in time O(nL)O(n L) when all costs are non-positive. We present a modification that has the same worst-case complexity but can beat it in the best case. More importantly, we give efficient algorithms for the three standard inference tasks in a CRF, namely computing (i) the partition function, (ii) marginals, and (iii) MAP in the general case (i.e. when costs can be positive). Their complexities are respectively O(nL)O(n L), O(nαΠα2)O(n\sum_{\alpha\in\Pi}|\alpha|^2), and O(nLminD,logL)O(n L\cdot \min{|D|,\log L}) where DD is the input alphabet.

View on arXiv
Comments on this paper