Co-authored with Irio Musskopf.

This article was originally posted at Vice.

59 percent of the Brazilian Congress has been implicated. Could this social media-focused project meant to hold elected officials accountable work in the US?

This is an opinion piece by Operation Serenata de Amor, a project that uses artificial intelligence to analyze public spending and fight corruption.

Imagine yourself face-to-face with indisputable proof that your local representative is abusing public money—your money. Would you vote for them again, or would you broadcast the proof to every one of your neighbors? Brazilian voters don’t have to speculate: A group of 10 data scientists has been using artificial intelligence to monitor public spending and publish suspicious activity on Twitter. While the Trump administration is busy scrubbing data government websites, we’re helping Brazil lead the race to the top of the [Open Data Index(

We are Operation “Serenata de Amor”. Our name means “love song” in Portuguese, and we develop open-source software that democratize access to public spending. Since our launch, 11,388 different expenses have been flagged as either outliers or clearly illegal. At the time of writing, 816 different politicians are listed as under suspicion, implicating 59 percent of the Brazilian Congress.

The cases are surprising both in their scope and their creativity. Elected officials allegedly ate 13 meals per day and consumed 30 pounds in one meal at a pay-by-weight restaurant. One spent public money on goods in the south of Brazil while simultaneously voting on a bill in Brasília, hours away.

Edward Snowden’s revelations have made it clear that privacy has gone to the same place in the sky as cheap gas and expensive magazines. And until now, that reality hasn’t been a two-way street. But that’s about to change—drastically—and elected officials who make a habit of casual theft are beginning to wake up to some very unpleasant surprises.

The idea is simple: personal expenses are flagged as suspicious based on a combination of price, location, seller, and other metadata about the elected official, like their physical presence in the House during a vote and other expenses during the same period.

When a transaction is flagged for review, the politician is publicly called out by a Twitter account run by the operation. Followers engage with the bot to flag false positives and bring information from other sources (like news from the expense day) into the conversation. The code is publicly available on GitHub, where our community of supporters is constantly reviewing it for security and accuracy.

After focusing on one group from the Lower House of Congress, we’re now adapting the same predictive models to the Upper House. The algorithms could work with any of the more than 64,000 politicians in office today.

This past November, we raised $25,000 with crowdfunding to finance the first version. Crowdfunding gave us autonomy to create the project we wanted, so we asked the people who would benefit from it for their support. Interest among the media and the public was immediate and intense, and after a few weeks Congress was reaching out to inquire about thousands of reimbursements. Those inquiries were for transactions as small as $7, which also happens to be the median value of stolen funds.

At Serenata de Amor, we believe that stamping out the long tail of corruption is the key to lasting change. Our goal is to target small-time corruption at a scale larger than anyone has ever been able to attempt.