Maximum Entropy Model (MaxEnt)
Suppose all you know about a word is a handful of clues: it ends in -ing, the word before it is "is", it is not capitalised. The maximum entropy principle says honour exactly those clues and commit to nothing beyond them.
A log-linear classifier over hand-built features
A maximum entropy model is a log-linear classifier — the same mathematics as multinomial logistic regression. Each candidate label is scored by a weighted sum of feature functions, binary tests over the input and that label, and the scores are exponentiated and normalised into a probability distribution. Training fits the weights so the model's expected feature counts match the counts in the data; of all distributions that satisfy that, the fitted one is the most uniform — maximum entropy — which is the formal way of saying it adds no assumption the features did not force.
Its place in sequence labelling
- Part-of-speech tagging, with features combining word identity, suffixes, capitalisation and the previous tags.
- Named entity recognition over BIO tags.
- Sentence boundary detection, where the clue is the token around a full stop.
Overlapping, redundant features are fine here, which is why MaxEnt taggers displaced generative HMM taggers: an HMM needs its observations to factor cleanly, a MaxEnt model does not.
Where it breaks
Chained into a maximum-entropy Markov model it normalises per position, so a state with one outgoing transition passes probability through whatever the next word says — the label bias problem. Conditional random fields fixed it by normalising over the whole sequence, and that is the model to reach for now. MaxEnt survives as the per-token classifier inside NLTK and older Stanford taggers, and as the clearest route to understanding why CRFs exist.
A maximum entropy model is a log-linear classifier — multinomial logistic regression under another name — that scores each label by a weighted sum of hand-designed feature functions and normalises the result into a probability. It fits the flattest distribution consistent with the feature counts seen in training, so overlapping clues combine without independence assumptions. It powered part-of-speech taggers and entity recognisers before conditional random fields superseded it.
Imagine a detective told to name a suspect using only three established facts, and warned not to invent anything beyond them. The honest answer is the one that fits those facts and stays as open-minded as possible about everything else. That is the idea behind a maximum entropy model.
Given a word in a sentence, the program collects small clues — how the word ends, what came before it, whether it starts with a capital — and weighs up how much each clue has mattered in the past. It then picks the most likely label while assuming nothing the clues did not tell it. For years this is how software labelled words as nouns, verbs or names.