Ever get angry, go to Twitter, and shoot off a protest tweet tagged #Arabspring, #AppleVsFBI, #syrianconflict or something else in solidarity with a cause? Whether the tweet is part of a violent movement, a peaceful action, or simply a response to a debate, military and national security types have an interest in predicting how big any given protest movement might become. A new study by researchers at Arizona State University, Texas A&M, and Yahoo, funded in part by the Office of Naval Research, can predict with 70 percent accuracy the likelihood that your next tweet will be part of a protest.

It’s no simple problem for the obvious reason that the telltale heart beats but for the guilty. “The ways in which protest-related events affect a person are not observable, resulting in a lack of knowledge of factors operating at that time causing his next post to be a declaration of protest,” the researchers write in their study, published as part of the proceedings of the Association for the Advancement of Artificial Intelligence conference earlier this month.

The researchers collected 2,686 posts related to the Nigerian general election that took place between February and April of last year, an election that was marred by political violence in the form of the Boko Haram insurgency and that was beset by accusations of voting irregularities. So what predicts when someone begins protesting on Twitter? It’s not your personal history so much as your Twitter history of interacting with people who are part of that movement.

“The interaction we study is how users mention each other,” researchers Suhas Ranganath and Fred Morstatter wrote to Defense One in an email. “In the model, the probability of the future post expressing protest increases if: 1) The post mentioning the user is related to the protest. 2) The author of the post mentioning the user is interested in the protest. We dynamically learn [or teach] the model by testing how each of the previous status messages of the given user are affected by the recent posts mentioning him. We then use the model to predict the likelihood of the user expressing protest in his next post.”

Their accuracy threshold of 70 percent is because what might seem completely unpredictable is in fact part of a pattern, albeit one that’s incredibly complex. The researchers employed Brownian motion theory to design the formula, a theory that usually is employed to track the movement of particles, as well as model stock market fluctuations and other highly complicated systems. “Brownian Motion for fluid particles models change in the direction of the particle movement on collision with other particles. We take each ‘particle’ as a social media user. We relate collision with other particles, other users mentioning him, and the change in direction to change of the user's inclination to express protest in his next post. We then use the models of Brownian motion to relate the two quantities. We mainly employ this to model the dynamic change in user behavior resulting from interactions over time,” Suhas told Defense One.

Could you apply it to ISIS? Yes, so long as you had a good window into how, say, a pro-ISIS Twitter user is interacting with someone else. “This can be applied to scenarios when the complete spreading mechanism is not known. In these scenarios, we go into the history of the user and see who have tried to interact with him and the nature of the interactions. So the individual user's response to the attempt of organizations like ISIS to interact with him can be modeled using the proposed method,” the researchers told Defense One.

The government has a big interest in stopping the spread of ISIS on social media. Last month, the State Department announced that they would be opening up a new “Global Engagement Center” to combat ISIS online and recruited Michael Lumpkin, then assistant secretary of defense for special operations/low-intensity conflict, to run it. The goal of the new operation goes beyond just winning the Twitter war to destroying the allure of ISIS in the Middle East and beyond.

The researchers caution, however, that predicting a protest tweet is a bit different than predicting the moment of actual radicalization, and one is not just a proxy for the other. “In this paper we attempt to find users expressing protest, which is ultimately the expression of an opinion. Radicalization is the development of an opinion, not necessarily the expression. This makes it a very different problem than what we study,” they told Defense One in an email.

Ranganath and Morstatter’s paper is part of a $750,000 grant from the Office of Naval Research to study how crisis manifests itself in social media. The paper follows years of similar government-funded research into measuring protest dynamics on social media. Perhaps the best known program is the 2011 Open Source Indicators project from the Intelligence Advanced Research Projects Agency, or IARPA, which correctly predicted several protest events in Central and South America in real time.

The most recent effort used only open source data so it doesn’t have any legal or ethical implications for privacy. Nevertheless, some critics, such as writer Nafeez Mosaddeq Ahmed, have argued that such tools are often used to target peaceful protesters and dissidents.

The real value, according to the researchers, lies in predicting how big a political storm could be before it hits. “Social media provides a platform for people to declare protest on various sociopolitical issues. In scenarios where the spread of protest is not available, predicting if the next post of a given user will be a declaration of protest will help in estimating the number of protest participants,” they write.