The polls are wrong. The U.S. presidential race is a near dead heat, this A.I. ‘sentiment analysis’ tool says

An analysis of the emotions being expressed on social media indicates that the upcoming U.S. presidential election may be a much closer contest than many commentators and pollsters believe.

That’s the conclusion of Expert.ai, a company with offices in Modena, Italy, and Rockville, Md., that uses an A.I. technique called “sentiment analysis” to understand the emotions being expressed in social media posts.

The company’s analysis puts Democratic candidate Joseph Biden ahead of President Donald Trump, 50.2% to 47.3%, a margin that is much narrower than the double-digit lead that Biden has over Trump in most national opinion polls.

Based on these polls, many political analysts and commentators are expecting that Biden may win a historic landslide. But Expert.ai’s A.I.-based analysis indicates the race may be much tighter than these human experts are expecting.

Expert.ai’s political forecasting model was successful in predicting that the U.K. would vote to leave the European Union in 2016. And academic research has shown that similar social media sentiment analysis would have better predicted Trump’s victory in the 2016 U.S. presidential election than polling data.

Trump was the focus of far more social media activity than Biden, accounting for almost 60% of all the posts Expert.ai analyzed, compared to slightly less than 17% for Biden. But Biden ranked higher in terms of positive emotions such as “success” and “hope,” while Trump scored higher on negative emotions such as “fear” and “hatred.”

The only positive emotion on which Trump scores better than Biden, according to a statement from Expert.ai, is “action.”

Walt Mayo, Expert.ai’s chief executive officer, said the company’s ability to analyze hundreds of thousands of social media posts in real time gives it “insight into what voters are discussing and how their attitudes are evolving as we get closer to the election.” He said the analysis helped the company glean “the issues of most importance to voters and the emotions in social media posts that may drive decision-making at the polls.”

Expert.ai’s system looked at 500,000 Twitter posts and other social media comments made over the past week. It uses natural language processing, a form of A.I. that can understand aspects of language, to categorize the sentiment being expressed in these social media posts according to 84 different emotional labels.

These labels are then given a rank in terms of their intensity, on a scale from 1 to 100, and are multiplied by the number of occurrences for each candidate. The emotions are also classified as either “positive” or “negative” and used to create an index that can compare the two candidates against one another.

This story has been updated to include comments from Expert.ai CEO Walt Mayo.