Week 3

My task: To research and determine an ideal way to detect and extract hedges from a document (continued…)

This week, the majority of my research was on conditional random fields, or CRFs.

CRFs are defined as undirected graphical models. However, CRFs are more complicated than I anticipated and with my limited knowledge of advanced mathematics and probability, I could not seem to completely wrap my head around the complex formulas that are associated with CRFs. So, instead of trying to teach myself all the mathematics needed to understand a single formula for a conditional probability distribution, I tried to focus my efforts for the week on understanding the overall purpose of CRFs and how they can be applied to the task at hand.

Let’s say you have a series of images of dogs, and your goal is to label each image based on what the dogs are doing in that image (i.e. walking, running, barking, eating, etc…). You can do this in one of two ways.

The first method: Discount the logical order of the images and classify the images based on larger, easily identifiable contexts.

  • For example, you notice that all of the very bright and vibrant images seem to be taken during the afternoon and illustrate dogs playing with toys outside. You also notice that unclear and dark images seem to be taken at night and illustrate dogs sleeping. In both respective cases, those similar images would be grouped and labeled based on that similarity.

This method is a great and very efficient way to label your images and the contexts that they illustrate. The problem, however, is that this method can result in a lot of information loss.

  • For example, you have an image that is a close-up on a dog’s foot. From that image alone, there is no way to tell whether that dog is walking, running, eating, or even barking. So, that image would end up being discarded by the classifier because it cannot be classified.

In this case, it would be best to use:

The second method: Take into account the logical order of the images and classify the images based on their near and surrounding contexts.

  • Let’s say you still have the image that is a close-up of a dog’s foot. Only this time, you also have the images that came before and after the close-up of the dog’s foot. You may notice that the previous image and/or following image illustrates a dog running. Then, the probability of that dog running in the unidentifiable picture becomes very likely.

Though this method may take longer and is less efficient than the first method, it will give us more accurate results. Well, such is the basis of CRFs: sequenced labeling for accuracy.

CRFs are often used in a natural-language processing method known as part-of-speech tagging, labeling words or phrases in a sentence or document based on contexts by their respective part-of-speech (i.e. noun, verb, pronoun, preposition, adverb, adjective, etc…). With that said, I can imagine they can also be used to label words, phrases, and sentences based on contexts as hedges or non-hedges.