HECKLERS have long been a problem for politicians and stand-up comedians, but the rise of the internet has amplified their voices. Trolls, as these online miscreants are commonly called, often abuse other users and can cause chaos. Company websites and social media platforms are finding that they are spending ever more resources on tackling such abuse. Dick Costolo, the chief executive of Twitter, the most popular microblogging platform, has previously admitted that his site's inability to deal with puckish users was “embarrassing”. It recently introduced a new policy that hopes to starve trolls of oxygen: messages that contain abusive language; accounts set up specifically to target individuals; and threats of violence are now all banned.

Though this seems like a welcome response, as a strategy it is limited, being only a reactive posture. A new paper suggests that it might be possible to identify potential trolls before they do their worst. Researchers at Stanford and Cornell have pulled out patterns of behaviour exhibited by the approximately one in 40 users of three news sites—CNN, Breitbart and IGN—who were subsequently banned for abuse. These include trolls’ unwillingness to mould their conversation to the slang of an online community; their propensity to swear; and the volume of contributions they make to a debate. Making an algorithm of these patterns, the researchers believe they can be 80% confident of identifying those likely to cause trouble within five posts online.

Such an approach, if exploited commercially, could save online firms some serious money. Websites are having to spend an increasing proportion of their budgets on moderating online posts and comments, says Richard Millington at Feverbee, a consultancy that specialises in this area. Though companies charge less than a cent to remove the nastiest of comments, the scale of some online communities can cause costs to add up. The Huffington Post, a popular site, was once forced to outsource its moderation—of nearly 500,000 comments a day—to a team of 28 people.

For years the received advice for dealing with troublemakers on the internet was a simple motto: “don’t feed the trolls”. An increasing number of people, and the preponderance of more virulent abuse, have rendered that advice less helpful. For instance, death threats posted against women writers, such Caroline Criado-Perez in Britain (whose tormentors were sentenced to prison), are sadly becoming more common. But even when miscreants are eventually caught, their comments can damage the reputations of websites and social-media platforms, sometimes irretrievably. That is why the ability to forecast which users are likely to become troublemakers would be so helpful. No one, after all, deserves to have death threats delivered direct to their browsers or inboxes.