AI engineering glossary · NLP embeddings

What is CRF (conditional random field)?

Conditional random field (also called CRF, Linear-chain CRF): A probabilistic model for labelling sequences that scores whole label sequences using features of the input and of neighbouring labels, then normalises over all sequences. It avoids impossible label combinations and is often placed on top of a neural encoder.

Level: advancedTopic: NLP embeddings

Conditional random field: an example

A CRF layer learns that an I-PER tag cannot directly follow an O tag, and so prevents that invalid output.

Related terms

More NLP embeddings terms

Where you learn it

Conditional random field is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.