# Why discriminative models are preferred to generative models for sequence labeling tasks?

I understand that discriminative models, such as CRF(Conditional Random Fields), model conditional probabilities $P(y|x)$, while generative models, such as HMM(Hidden Markov Model), model joint probabilities $P(y,x)$.

Take CRF and HMM for example. I know that CRF can have a larger range of possible features. Apart from that, what else makes CRF (discriminative models) preferable to HMM(generative models) in sequence labeling tasks such as Part-of-Speech tagging and NER(Name Entity Recognition)?

Edit:
I found out that HMMs will have to model $P(x)$, while CRFs don't. Why would it make a big difference in sequence labeling tasks?

• It is a good idea to spell out acronyms and abbreviations. – Peter Flom Oct 16 '13 at 23:09
• @PeterFlom Thanks for the suggestion, I've added the full spelling of some terms. – xiaoyao Oct 17 '13 at 0:06
• This blog entry is one of the best and shortest intros to CRF I've ever read. After reading it, everything made a lot more sense to me. – jpmuc Nov 16 '13 at 16:29
• ^That link is dead now. The blog entry: blog.echen.me/2012/01/03/… – abhshkdz Jan 29 '16 at 1:26
• another mirror of the blog entry: web.archive.org/web/20120726150032/http://… – Franck Dernoncourt Jan 2 '17 at 18:05

I think you pretty much nailed it in your Edit. Generative model makes more restrictive assumption about the distribution of $x$.
"Unlike traditional generative random fields, CRFs only model the conditional distribution $p(t|x)$ and do not explicitly model the marginal $p(x)$. Note that the labels ${ti }$ are globally conditioned on the whole observation $x$ in CRFs. Thus, we do not assume that the observed data $x$ are conditionally independent as in a generative random field."