4
$\begingroup$

For classifying a sequence of instances, are there any specific circumstances that make Hidden Markov Models (HMMs) preferable to use over Conditional Random Fields (CRFs)? I have seen several papers that show CRFs outperforming HMMs, but none showing the reverse (granted, my sample size is fairly small so far).

Any real world examples would be great, since I'm still working to understand the differences conceptually.

$\endgroup$
2

2 Answers 2

2
$\begingroup$

Conditional Random Fields (CRFs) are known to have computational efficiency issues relative to the related Hidden Markov Model (HMM) and Maximum-Entropy Markov Model (MEMM) models. (In particular, I assume you are referring to linear-chain CRFs which are appropriate for sequence labeling.)

CRFs were developed as an adjustment to MEMMs which in turn were created as a discriminative analogue of the generative HMM model.

The main difference between (linear-chain) CRFs and MEMMs is that CRFs use global normalization. The cost of calculating this term scales quadratically in the number of label classes.

I am not sure if this is reflected in any practical use cases where HMMs would be preferred, but it is one theoretical disadvantage of CRFs.

Source: Awni Hannun (2019) The Label Bias Problem

Some related pieces on this topic are this series by David S. Batista:

$\endgroup$
2
  • $\begingroup$ Can you define what an MEMM is? You use the acronym without ever giving the full name. $\endgroup$
    – Sycorax
    Commented Mar 14, 2022 at 16:44
  • $\begingroup$ @Sycorax Just edited it to clarify, I also highly recommend checking out David Batista's three-part series about the three models: Part 1 (HMMs), Part 2 (MEMMs), Part 3 (CRFs) $\endgroup$
    – Malper
    Commented Mar 14, 2022 at 16:46
0
$\begingroup$

This is a late answer by 7 years, but. I applied HMM and linear CRF to a falling detection dataset my research group collected, a time step consist of 100+ IMU features. The HMM performs better as I was able to handcraft HMM transition matrix with respect to the human falling dynamics, that is state transitions(falling phases) are restricted to go from 1 to 2, 2 to 3, then stay infinitely in 3. I was only using a python hmm library and CRFsuite python binding blindly. Maybe the linear CRF can be tweaked like what I did to HMM.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.