The extent of Russia’s fake news hack of the 2016 election is widely misunderstood. The news media doesn’t understand the underlying technology that hackers used and as a result has not properly explained it to the public. The operation wasn’t just about writing thousands of fake stories that were harmful to Clinton and helpful to Trump: Russian hackers socially engineered a massive propaganda campaign on social media networks like Facebook, Twitter and Reddit.

The response from social networks, particularly Facebook’s, has been to declare war on fake news by creating stronger filters and integrating fact checking sites into their News Feed. While these measures will help, they ignore the other half of the issue.

Russian hackers exploited Facebook’s algorithm (which it uses to decide what content appears in your news feed) to maximize their impact. I recognize a lot of the techniques they used, as I’ve been studying the Facebook algorithm for years at Dose. I’ve run hundreds of experiments and regressions trying to predict virality and understand people’s behavior. I used that knowledge to grow our Facebook pages from 400,000 to 4,000,000 in just four months.

I hope that by sharing what I know, we can open a conversation on how to improve this new social “infrastructure” that has become an integral part of our lives.

The power of fake news

So how successful were the Russians in spreading fake news? Very. The top 115 fake news articles got at least 30 million shares, and some were even picked up by the Trump campaign.

But the goal of any propaganda campaign is influence. Did fake news change enough votes to sway the election? That’s where it gets tricky. A recent Stanford study concluded that fake news might not have had a huge impact on the election.

On the other hand, fewer than 78,000 votes in three states decided the election, so the effect didn’t have to be big to be impactful.

Conditions were ripe for attack

Part of the reason the attack worked so well was due to some long term trends in the US:

Increasing distrust of traditional media: A recent Pew Research survey found almost two-thirds of Americans get their news primarily from social media. (Even worse, more than half get all news from one site.)

Online, people don’t get exposed to opposing points of view due to self-segregation — in other words, we tend to tune out people who have political views that are different from ours.

The democratization of content on social networks means that articles from real and fake sources appear the same in your feeds.

Social networks show you what they think you want to see — not a balanced offering of verified news and viewpoints.

Understanding how Facebook decides what content to show you

Facebook says the goal of the news feed is to “show you the stories that matter most to you every time you visit Facebook.” To do that, it measures literally everything you do on the site and knows more about you than you may realize. For example, Facebook revealed last year that it labels your political preferences based on the information they have on you.

Based on my own research, It’s safe to assume Facebook has hundreds of similar categories it sorts us all into. We’ve also found these are some of the metrics that Facebook actively measures:

What kind of content you engage with the most. Do you like pictures more often than videos?

Whose content you engage with the most. Is it your siblings’ photos, Tasty videos or a fake news page?

How long you spend reading a link you clicked. (If you click on a link and immediately return to your news feed, Facebook interprets that as you NOT liking that content)

How long you spend watching a video (down to the second, they know when you stopped watching)

How content spreads on Facebook

When a Facebook page posts something, the algorithm won’t automatically show it to everybody who likes the page. Rather, Facebook will show it to a sample of people who like the page. Based on how they respond, Facebook will either continue to show it to more people or kill it entirely. They do this millions of times a day, for all content on their site.

To illustrate this, let’s use the hypothetical example below. Imagine a Facebook page with four followers. The page’s administrator posts something about green diamonds. Facebook will sample only one person, before deciding whether to show the content to anyone else.

Jose Duarte

Mary doesn’t like green diamonds and doesn’t engage with the post. So Facebook will stop showing it. Same for Rob.

like green diamonds and doesn’t engage with the post. So Facebook will stop showing it. Same for Rob. John, however, likes green diamonds and engages. Facebook sees this as a good sign and shows the post to some of John’s friends. None of John’s friends like green diamonds. The post dies.

Nia, on the other hand, is a gold mine. She and all her friends love diamonds. The post will probably go viral.

What else did the Russians do?

There are three active measures (that we know of!) that Russian hackers used to maximize the spread of fake news and artificially engineer virality.

They successfully infiltrated voter rolls in at least 21 states.

They used that data to create thousands of fake profiles. They used these fake profiles to impersonate different groups of people in the US. Their goal was to fool Facebook users — and Facebook itself — into thinking these were real people. As an example, fake profiles that appeared to be Republicans in the Midwest seem to have been particularly effective as a way to make people implicitly trust that the fake news articles were real.

They may have illegally paid Facebook to place ads promoting fake news that microtargeted key swing voters.

Putin it all together

Imagine that page posting green diamonds was actually a front for a Russian fake news operation. Now, let’s also add a few fake users to see how the algorithm was fooled (the Russians are in red):

Jose Duarte

Using all the data they exploited, the Russians were able to craft a fake news article that Nia — a fake user — shared to her network, and a bunch of the people who liked the green diamonds post were served fake news meticulously crafted to ensure Facebook would show it to them.

It’s true that a single fake news article couldn’t have changed the result of the election. However, the fake news operation was insidious, long and way more effective than has been reported so far. Russians know very well how much Americans have isolated themselves in bubbles and echo chambers, and how our social networks are designed to exploit that isolation by mostly showing content from our bubbles.

This vacuum allowed them to bombard swing voters with fake news over a period of months, slowly but surely flipping people from Clinton to Trump (or getting them to stay home). What’s worse, most other people had no idea this was happening because social networks have become so effective at hiding things outside our bubbles. For example, liberals in New York had no idea that the Pope “endorsed Trump.”

Imagine your TV was only tuned to CNN, and CNN changed the kind of news it broadcast to fit what it thought you wanted to see — and it did that for everyone in America. That is what social networks have become.

So how do we fix it?

The people who want to abuse Facebook’s algorithm already know what levers to pull to exploit it for their own nefarious ends. But most Americans probably don’t even know people are doing that. And if you don’t know that, you just think Facebook is showing you everything in a natural, organic way. So the first step is teaching Americans the basics of how the Facebook algorithm works.

The second step is deciding what to do about it. Should the algorithm be regulated similar to broadcast TV? Should there be an independent panel in charge of shaping the algorithm so that it can’t be so easily exploited? Should there be no algorithm at all?

These are questions we have to answer. Only by having a more open conversation with people — regular people, outside of Facebook and Twitter — can we start to solve this problem before the next election.