Professor Reihaneh Rabbany and her team use AI to detect online trolls in Canadian elections

With the Canadian federal election looming, Canadians may be wondering if social media influences could play a similar role in impacting the election outcome the way that it may have impacted the U.S. election in 2016.

Canada CIFAR AI Chair Reihaneh Rabbany and her team at McGill University’s school of computer science are using data mining and graph embedding techniques to detect anomalies and suspicious online behaviour on social media platforms around the Canadian election.

Anomalies are detected when users appear to have multiple social media accounts and identities, and use those accounts to post, share and retweet similar content. Anomalies appear when the activities and the users are connected, despite seeming to come from separate individuals or networks — a property also associated with trolls. Previous studies have shown there to be a correlation (not necessarily a cause) between poll results and online troll activity during the U.S. 2016 election.

Rabbany’s research is identifying how different social media accounts are connected and may try to give false credibility to other accounts which are not managed by genuine users. This is thought to be damaging because it reinforces and amplifies false information while seeming to embrace polarizing and potentially radical viewpoints.

“We want to understand how different social media accounts are linked to each other, what the similarities are in their tweets and content, and what their connection to other accounts may be,” she explains.

Rabbany’s team is applying different graph embedding methods, including state-of-the-art deep graph embedding, which transform graph data into more accessible formats, to characterize normal user behaviour and identify anomalous users who deviate from the general pattern of how normal users engage in online discussions.

Map of Twitter around 2019 Canadian Federal Election which provides a birds-eye view of how the detected polluting groups of users engage in the overall discourse.

Her team has compiled a list of hashtags or phrases that are commonly used in online discussions about the Canadian election, drawing from the data of about 400,000 users —this includes user tweets, as well as their followership networks.

While her results so far are preliminary, the research has identified suspicious groups who are active in local politics throughout several Canadian provinces. As well as several far-right groups from the U.S. who are heavily engaging in Canadian politics.

Rabbany is also applying a similar approach to tracking and identifying suspicious online activity around human trafficking and monitoring the online escort markets.

Rabbany, who is also a member at Mila, was named as a Canada CIFAR AI Chair in December 2018 under the CIFAR Pan-Canadian AI Strategy, the world’s first national AI strategy.

"We want to understand how different social media accounts are linked to each other, what the similarities are in their tweets and content, and what their connection to other accounts may be."

The goal of the Canada CIFAR AI Chairs program is to recruit and retain in Canada some of the world’s leading AI researchers and provide them with long-term, dedicated research funding to support their research and train the next generation of AI researchers.

Rabbany, who immigrated to Canada from Iran, is one of the 46 Canada CIFAR AI Chairs named to date. As a young mother and emerging researcher in her field, she says there was no question about where she would go to live and conduct research.

“Canada is open to new ideas more so than other countries - it’s a great place to be as a researcher,” she says.

One of the advantages of the Canada CIFAR AI Chairs program is that it allows talented researchers such as Rabbany to embark on high-risk projects. “One of my main motivations is to use my research in AI for a positive societal impact. So many of our interactions as a society are taking place online — my goal is to develop data mining techniques to better understand these complex dynamics.”


CIFAR is a Canadian-based global charitable organization that convenes extraordinary minds to address the most important questions facing science and humanity.

This story was featured in the CIFAR website. Subscribe to the bi-monthly email publication to keep up to date on AI in Canada.