IA 360
AI Fundamentals

Machine learning in sentiment analysis and natural language processing

In 2014 a rule-based model was measured beating individual human raters at classifying tweets: 0.96 against 0.84. The figure is real and does not mean what it looks like. That 0.84 says people do not agree with each other, and the disagreement is the task's ceiling. How the technique works, what still breaks it, and how to read any “AI beats humans” headline.

Admin IA360 4 min read AI-generated Leer en español
Machine learning in sentiment analysis and natural language processing

In 2014, C. Hutto and Eric Gilbert published VADER, a rule-based sentiment analysis model — no machine learning, just a lexicon and five grammatical rules — and measured its accuracy classifying the sentiment of tweets. The result, in the paper's own abstract: "VADER outperforms individual human raters (F1 Classification Accuracy = 0.96 and 0.84, respectively)."

The figure is real and properly measured. And it does not mean what it appears to mean. Taking it apart teaches you how to read every "AI beats humans" headline you will meet from now on, and there will be many.

From counting words to reading context

Sentiment analysis means automatically assigning a valuation — positive, negative, neutral, or an intensity — to a text. Its technical history has three clear stages.

The first was the bag of words: counting which terms appear, ignoring their order. "Excellent" adds, "dreadful" subtracts. It is surprisingly effective at large volumes and utterly blind to structure: "not at all bad" and "not at all good" share almost every word.

The second brought in sequence. Recurrent and convolutional networks process text as an ordered chain, which lets them capture negation, intensifiers and multi-word expressions.

The third is the contextual models built on transformers, where each word is represented in terms of those around it. "Bank" does not mean the same thing in a sentence about finance as in one about a river, and the model tells them apart without anyone programming the distinction.

Each stage improved on the last across the benchmarks. And none of them solved the underlying problem, which is not technical.

The 0.84 is the important number

Go back to the opening figure, but look at the second half: individual human raters scored 0.84. That is, one person agrees with the reference standard a little over eight times in ten.

And what was that reference standard? An aggregated rating from several people. So what the 0.84 measures is not that humans read badly: it is that humans do not agree with each other about whether a tweet is positive or negative. Part of that disagreement is irreducible, because a great many texts are genuinely ambiguous.

From which follows the consequence almost nobody spells out: that disagreement is the ceiling of the task. If two competent people agree only 84 % of the time, there is no "99 % accuracy" that means anything, because for the remaining 16 % there is no true answer to be right about. There are only divided opinions.

When a vendor offers you a system with 97 % accuracy on a task like this, the right question is not how they achieved it. It is what they measured it against: either the reference was built in a way that makes it easier than reality, or they are measuring a different task from the one you care about.

So how can a machine "beat" a person?

Because it is not competing at the same thing. The reference is the average of several annotators, and an automated system is tuned to predict that average. The individual person, by contrast, brings their own judgement, with their quirks and their off day.

The machine does not understand better. It is more consistent, and consistency is exactly what a consensus rewards. A model that always returns the same answer to the same text lands closer to the mean than a human who varies. Neither of those is comprehension.

There lies the transferable capability, and it works for the headline about radiologists, about lawyers or about translators: when you read that a system beats humans, ask who built the correct answer. If humans built it by consensus, "beating humans" means "resembling the consensus more closely than one individual does," which is a claim about variance, not about understanding. And ask too whether the human in the comparison was working under normal conditions, with their context and their time, or answering isolated cases blind.

What still breaks

This technique's durable failures do not depend on the architecture, which is why they are worth knowing.

Irony inverts the meaning without changing a word: "brilliant, out of battery again" is negative and does not look it. Domain flips the polarity of whole terms: "unpredictable" praises a film and condemns a car; "heavy" ruins a novel and improves a stout. A model trained on film reviews and applied to insurance complaints will be wrong systematically and silently.

And the target is easily lost: "the camera is magnificent but customer service is a disaster" is not a neutral sentence, it is a sentence with two opposing judgements about two different things. A single number summarises it badly by construction.

The technical answer to the target problem

That last failure does have a named solution, worth knowing because it changes what to ask a vendor for. It is called aspect-based sentiment analysis, and it consists of producing not one number per text but a judgement per topic mentioned: camera, positive; customer service, negative.

It is considerably more expensive to implement and considerably more useful, because it is what the person reading the data actually wants to know. A company whose average score has sat at 0.3 for six months is learning nothing; the same company discovering that the product is rising while support is falling has something to do on Monday. If someone sells you sentiment analysis, ask whether it is aspect-based.

How to test it on your own domain

And here is the concrete procedure, which costs an afternoon and prevents expensive decisions.

Take two hundred of your real texts — your reviews, your support tickets — chosen at random rather than for being striking. Have two people from your team label them separately, without conferring. First measure how much they agree with each other: that is your true ceiling, and it is usually startling how low it sits. Then run those same two hundred through the tool and compare.

If the tool lands near the agreement between your two people, it works. If it falls well short, it does not suit your domain however good its published figures are. And if it comfortably exceeds them, something is wrong: most likely your two annotators were not using the same criterion, and that wants fixing before anything gets automated.

How to use it well

None of this invalidates the technique. It places it. Sentiment analysis is an excellent tool for aggregate trends across large volumes: if the average of ten thousand mentions falls for three straight weeks, something has happened, and individual noise cancels out.

It is a poor tool for individual verdicts. No decision about a specific person — a complaint, an appraisal, a contract — should rest on the score of something they wrote, because there the 16 % of human disagreement does not cancel: it lands entirely on one person.

Where to go next, with no middlemen

The VADER paper is free and explains how its lexicon and five rules were built, and they are readable by anyone. Its official implementation is published and lets you try your own sentences in a minute: writing three or four ambiguous cases and seeing what comes back teaches more than any comparison table.

The capability you take from this is always asking who manufactured the correct answer before believing a score — because accuracy can only be measured against an agreement, and agreement is almost never total.

This article was produced with artificial intelligence under human editorial oversight.

Share this article

This website uses cookies to improve the browsing experience. Cookie policy.

↑↓ navigate ↵ open esc close