Skip to Content
Artificial intelligence

Facebook is using bots to simulate what its users might do

April 15, 2020
Ms Tech | Nonsap Visuals/Unsplash

Facebook has developed a new method to play out the consequences of its code.

The context: Like any software company, the tech giant needs to test its product any time it pushes updates. But the sorts of debugging methods that normal-size companies use aren’t really enough when you’ve got 2.5 billion users. Such methods usually focus on checking how a single user might experience the platform and whether the software responds to those individual users’ actions as expected. In contrast, as many as 25% of Facebook’s major issues emerge only when users begin interacting with one another. It can be difficult to see how the introduction of a feature or updates to a privacy setting might play out across billions of user interactions.

SimCity: In response, Facebook built a scaled-down version of its platform to simulate user behavior. Called WW, it helps engineers identify and fix the undesired consequences of new updates before they’re deployed. It also automatically recommends changes that can be made to the platform to improve the community experience.

Bot doppelgangers: Facebook simulates hundreds to thousands of its users at a time with a mix of hard-coded and machine-learning-based bots. The latter are trained using a reinforcement-learning algorithm, which learns through trial and error to optimize their behavior in light of some objective. The bots are then made to play out different scenarios, such as a scammer trying to exploit other users or a hacker trying to access someone’s private photos. In a scamming scenario, for example, the scammer bots are given the objective of finding the best targets to scam. The target bots, by contrast, are hard-coded with the most common vulnerable behaviors exhibited by users. Each scenario may have only a few bots acting them out, but the system is designed to have thousands of different scenarios running in parallel.

Automatic design: While the scenarios play out, the system automatically adjusts different parameters in the simulation, such as the bots’ privacy settings or the constraints on their actions. With every adjustment, it evaluates which combination of parameters achieves the most desired community behavior, and then recommends the best version to Facebook’s platform developers.

Hidden from view: In order to create as realistic a simulation as possible, WW is actually built directly on the live platform rather than a separate testing version—another key difference from most testing schemes. The bots, however, stay behind the scenes. While a typical user interacts with Facebook through a front-end user interface, such as a profile and other website features, fake bot users can interact directly with the back-end code. This allows them to coexist with real users and more accurately simulate different scenarios on the platform without having those users mistakenly interact with them as well.

Future perfect: Right now the company is using it to test and improve features that would make it much harder for bad actors to violate the platform’s community guidelines. But it also sees other potential applications for the system, such as testing how platform updates might affect engagement and other metrics.

Deep Dive

Artificial intelligence

open sourcing language models concept
open sourcing language models concept

Meta has built a massive new language AI—and it’s giving it away for free

Facebook’s parent company is inviting researchers to pore over and pick apart the flaws in its version of GPT-3

images created by Google Imagen
images created by Google Imagen

The dark secret behind those cute AI-generated animal images

Google Brain has revealed its own image-making AI, called Imagen. But don't expect to see anything that isn't wholesome.

Yann LeCun
Yann LeCun

Yann LeCun has a bold new vision for the future of AI

One of the godfathers of deep learning pulls together old ideas to sketch out a fresh path for AI, but raises as many questions as he answers.

AGI is just chatter for now concept
AGI is just chatter for now concept

The hype around DeepMind’s new AI model misses what’s actually cool about it

Some worry that the chatter about these tools is doing the whole field a disservice.

Stay connected

Illustration by Rose WongIllustration by Rose Wong

Get the latest updates from
MIT Technology Review

Discover special offers, top stories, upcoming events, and more.

Thank you for submitting your email!

Explore more newsletters

It looks like something went wrong.

We’re having trouble saving your preferences. Try refreshing this page and updating them one more time. If you continue to get this message, reach out to us at customer-service@technologyreview.com with a list of newsletters you’d like to receive.