They used machine learning to analyze 18 million tweets posted during Baltimore protests in 2015, which broke out after Freddie Gray fell into a coma on a police transport and later died. The team explored the association between arrest rates (a metric often used to signal violent incidents) and moral tweets (i.e. those related to issues the posters could deem as right or wrong). The number of arrests during the demonstrations correlated with the number of moral tweets posted in the hours leading up to a protest -- the number of tweets containing moral language almost doubled on days with violent clashes between police and protesters.

The researchers found that when people moralize the issue they're protesting, they're more likely to endorse violence. There's an echo chamber effect too -- the study (published in Nature Human Behavior) showed when some people were confident others in their social circle shared their moral views, the more likely they were to consider violent attacks on opponents.

It's far from the first study to correlate violence with social network chatter, and we've seen perpetrators of attacks post calling cards on social media beforehand. Still, harnessing AI's capabilities could lead to a real-time tool that can help forecast clashes at future protests over hotbed issues. Using such information, authorities could potentially consider a different approach to demonstrations, helping to ensure that protests remain peaceful.