Conditional random field
In pattern recognition and machine learning, conditional random field (CRF) is a class of statistical modeling methods often used for structured prediction.[src] Unlike a classifier which predicts a label for a single sample without considering neighboring samples, a CRF can take context into account.[src] To do so, the predictions are modeled as a graphical model, which represents the presence of dependencies between the predictions.[src] The kind of graph used depends on the application.[src] For example, in natural language processing, linear chain CRFs are popular, for which each prediction is dependent only on its immediate neighbors.[src] In image processing, the graph typically connects locations to nearby and/or similar locations to enforce that they receive similar predictions.[src] Other examples where CRFs are used are: labeling or parsing of sequential data for natural language processing or biological sequences, part-of-speech tagging, shallow parsing, named entity recognition, gene finding, peptide critical functional region finding, and object recognition and image segmentation in computer vision.[src]
In pattern recognition and machine learning, conditional random field (CRF) is a class of statistical modeling methods often used for structured prediction.[src] Unlike a classifier which predicts a label for a single sample without considering neighboring samples, a CRF can take context into account.[src] To do so, the predictions are modeled as a graphical model, which represents the presence of dependencies between the predictions.[src] The kind of graph used depends on the application.[src] For example, in natural language processing, linear chain CRFs are popular, for which each prediction is dependent only on its immediate neighbors.[src] In image processing, the graph typically connects locations to nearby and/or similar locations to enforce that they receive similar predictions.[src] Other examples where CRFs are used are: labeling or parsing of sequential data for natural language processing or biological sequences, part-of-speech tagging, shallow parsing, named entity recognition, gene finding, peptide critical functional region finding, and object recognition and image segmentation in computer vision.[src] ==Description== CRFs are a type of discriminative undirected probabilistic graphical model.[src] Lafferty, McCallum and Pereira define a CRF on observations \boldsymbol{X} and random variables \boldsymbol{Y} as follows: Let G = (V , E) be a graph such that \boldsymbol{Y} = (\boldsymbol{Y}_v)_{v\in V} , so that \boldsymbol{Y} is indexed by the vertices of G .[src] Then (\boldsymbol{X}, \boldsymbol{Y}) is a conditional random field when each random variable \boldsymbol{Y}_v , conditioned on \boldsymbol{X} , obeys the Markov property with respect to the graph; that is, its probability is dependent only on its neighbours in G and not its past states: P(\boldsymbol{Y}_v |\boldsymbol{X}, \{\boldsymbol{Y}_w: w \neq v\}) = P(\boldsymbol{Y}_v |\boldsymbol{X}, \{\boldsymbol{Y}_w: w \sim v\}) , where \mathit{w} \sim v means that w and v are neighbors in G .[src] What this means is that a CRF is an undirected graphical model whose nodes can be divided into exactly two disjoint sets \boldsymbol{X} and \boldsymbol{Y} , the observed and output variables, respectively; the conditional distribution p(\boldsymbol{Y}|\boldsymbol{X}) is then modeled.[src] ===Inference=== For general graphs, the problem of exact inference in CRFs is intractable.[src] The inference problem for a CRF is basically the same as for an MRF and the same arguments hold.[src] However, there exist special cases for which exact inference is feasible: If the graph is a chain or a tree, message passing algorithms yield exact solutions.[src] The algorithms used in these cases are analogous to the forward-backward and Viterbi algorithm for the case of HMMs.[src] If the CRF only contains pair-wise potentials and the energy is submodular, combinatorial max-flow min-cut algorithms yield exact solutions.[src] If exact inference is impossible, several algorithms can be used to obtain approximate solutions.[src] These include: Loopy belief propagation Alpha expansion Mean field inference Linear programming relaxations ===Parameter learning=== Learning the parameters \theta is usually done by maximum likelihood learning for p(Y_i|X_i; \theta) .[src] If all nodes have exponential family distributions and all nodes are observed during training, this optimization is convex.[src] It can be solved for example using gradient descent algorithms, or quasi-Newton methods such as the L-BFGS algorithm.[src] On the other hand, if some variables are unobserved, the inference problem has to be solved for these variables.[src] Exact inference is intractable in general graphs, so approximations have to be used.[src] ===Examples=== In sequence modeling, the graph of interest is usually a chain graph.[src] An input sequence of observed variables X represents a sequence of observations and Y represents a hidden (or unknown) state variable that needs to be inferred given the observations.[src] The Y_{i} are structured to form a chain, with an edge between each Y_{i-1} and Y_{i} .[src] As well as having a simple interpretation of the Y_{i} as "labels" for each element in the input sequence, this layout admits efficient algorithms for: model training, learning the conditional distributions between the Y_{i} and feature functions from some corpus of training data.[src] decoding, determining the probability of a given label sequence Y given X .[src] inference, determining the most likely label sequence Y given X .[src] The conditional dependency of each Y_{i} on X is defined through a fixed set of feature functions of the form f(i, Y_{i-1}, Y_{i}, X) , which can be thought of as measurements on the input sequence that partially determine the likelihood of each possible value for Y_{i} .[src] The model assigns each feature a numerical weight and combines them to determine the probability of a certain value for Y_{i} .[src] Linear-chain CRFs have many of the same applications as conceptually simpler hidden Markov models (HMMs), but relax certain assumptions about the input and output sequence distributions.[src] An HMM can loosely be understood as a CRF with very specific feature functions that use constant probabilities to model state transitions and emissions.[src] Conversely, a CRF can loosely be understood as a generalization of an HMM that makes the constant transition probabilities into arbitrary functions that vary across the positions in the sequence of hidden states, depending on the input sequence.[src] Notably, in contrast to HMMs, CRFs can contain any number of feature functions, the feature functions can inspect the entire input sequence X at any point during inference, and the range of the feature functions need not have a probabilistic interpretation.[src] ==Variants== ===Higher-order CRFs and semi-Markov CRFs=== CRFs can be extended into higher order models by making each Y_{i} dependent on a fixed number k of previous variables Y_{i-k}, ..., Y_{i-1} .[src] In conventional formulations of higher order CRFs, training and inference are only practical for small values of k (such as k ≤ 5), since their computational cost increases exponentially with k .[src] However, another recent advance has managed to ameliorate these issues by leveraging concepts and tools from the field of Bayesian nonparametrics.[src] Specifically, the CRF-infinity approach constitutes a CRF-type model that is capable of learning infinitely-long temporal dynamics in a scalable fashion.[src] This is effected by introducing a novel potential function for CRFs that is based on the Sequence Memoizer (SM), a nonparametric Bayesian model for learning infinitely-long dynamics in sequential observations.[src] To render such a model computationally tractable, CRF-infinity employs a mean-field approximation of the postulated novel potential functions (which are driven by an SM).[src] This allows for devising efficient approximate training and inference algorithms for the model, without undermining its capability to capture and model temporal dependencies of arbitrary length.[src] There exists another generalization of CRFs, the semi-Markov conditional random field (semi-CRF), which models variable-length segmentations of the label sequence Y .[src] This provides much of the power of higher-order CRFs to model long-range dependencies of the Y_{i} , at a reasonable computational cost.[src] Finally, large-margin models for structured prediction, such as the structured Support Vector Machine can be seen as an alternative training procedure to CRFs.[src] ===Latent-dynamic conditional random field=== Latent-dynamic conditional random fields (LDCRF) or discriminative probabilistic latent variable models (DPLVM) are a type of CRFs for sequence tagging tasks.[src] They are latent variable models that are trained discriminatively.[src] In an LDCRF, like in any sequence tagging task, given a sequence of observations x = x_1,\dots,x_n , the main problem the model must solve is how to assign a sequence of labels y = y_1,\dots,y_n from one finite set of labels .[src] Instead of directly modeling (y|x) as an ordinary linear-chain CRF would do, a set of latent variables h is "inserted" between x and y using the chain rule of probability: P(\mathbf{y} | \mathbf{x}) = \sum_\mathbf{h} P(\mathbf{y}|\mathbf{h}, \mathbf{x}) P(\mathbf{h} | \mathbf{x}) This allows capturing latent structure between the observations and labels.[src] While LDCRFs can be trained using quasi-Newton methods, a specialized version of the perceptron algorithm called the latent-variable perceptron has been developed for them as well, based on Collins' structured perceptron algorithm.[src] These models find applications in computer vision, specifically gesture recognition from video streams and shallow parsing.[src] ==Further reading== McCallum, A.: Efficiently inducing features of conditional random fields.[src] In: Proc.[src] 19th Conference on Uncertainty in Artificial Intelligence.[src] (2003) Wallach, H.M.: Conditional random fields: An introduction.[src] Technical report MS-CIS-04-21, University of Pennsylvania (2004) Sutton, C., McCallum, A.: An Introduction to Conditional Random Fields for Relational Learning.[src] In "Introduction to Statistical Relational Learning".[src] Edited by Lise Getoor and Ben Taskar.[src] MIT Press.[src] (2006) Online PDF Klinger, R., Tomanek, K.: Classical Probabilistic Models and Conditional Random Fields.[src] Algorithm Engineering Report TR07-2-013, Department of Computer Science, Dortmund University of Technology, December 2007.[src] ISSN 1864-4503.[src] Online PDF[src]
69 sentences · 69 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Conditional random field." encyclopegia.org, 2026, https://encyclopegia.org/wiki/conditional-random-field. Accessed 25 November 2026.
Chicago
"Conditional random field." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/conditional-random-field.
APA
encyclopegia.org. (2026). Conditional random field. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/conditional-random-field
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON