Emerging Technologies

Facebook has built an AI-based tool that fixes the social network when it crashes

Electronic cables are silhouetted next to the logo of Facebook in this September 23, 2014 illustration photo in Sarajevo.   REUTERS/Dado Ruvic (BOSNIA AND HERZEGOVINA  - Tags: BUSINESS TELECOMS)   - LR1EA9O0V25E7

App, heal thyself ... SapFix can seek out and fix bugs on its own. Image: REUTERS/Dado Ruvic

Alex Gray
Senior Writer, Forum Agenda

Bugs in computer software can range from mild irritant to huge economic loss, and, in the worst cases, to a tragic loss of life.

The vast majority of companies today depend on software to run their businesses. Along the whole supply chain and down to the last customer, it’s software that runs the show.

Facebook’s new Android app has sought to use artificial intelligence - for the first time - to find and fix bugs in its software.

Bugs are a big problem

How Facebook’s SapFix tool generates patches for software bugs
Image: SapFix

The consequences of software bugs range far and wide.

For instance, in 2017, a glitch in the United Kingdom's NHS computer system meant it didn’t send out 709,000 pieces of medical correspondence. While some people missed routine appointments as a result, others failed to receive their patient records, or worse, their cancer test results. Almost 2,000 patients were exposed to harm as a result.

The same year, the Uber app got a Frenchman into trouble when it exposed his affair to his wife. It had continued to send push notifications of his whereabouts, despite him having logged off the service.

In 2018, Tricentis, a Vienna-based software testing company, issued a report that found 606 major software fails, affecting 314 companies and a whopping $1.7 trillion in assets.

Have you read?

How AI could save developers’ time

Software developers have a constant roll of fixes to find and implement, some critical, others routine, and they have systems and processes in place that help alert them to bugs. But a lot of the work involves manually trawling through code.

Facebook’s new AI hybrid tool (called a hybrid because it still requires human interaction) was introduced to alleviate some of this spadework.

SapFix was created by Facebook engineers and is designed to drastically reduce the amount of time engineers spend debugging programs. It’s also designed to speed up the process of rolling out new software.

 How SapFix seeks the engineer’s feedback on the fix it generates
SapFix seeks engineer feedback after it generates a fix. Image: Facebook

It works in two parts. First Sapienz, Facebook’s intelligent software testing tool, finds the bugs. Then SapFix automatically generates fixes and proposes them to engineers, who do the final check before letting loose the fix.

“Since we started testing SapFix in August, the tool has successfully generated patches that have been accepted by human reviewers and pushed to production,” says the company, adding that:

“To our knowledge, this marks the first time that a machine-generated fix – with automated end-to-end testing and repair – has been deployed into a codebase of Facebook’s scale.”

The finer details of how it works can be found here. In the meantime, Facebook promises that it will release the tools to open source “in the future”, with the feedback it receives used to further improve its innovations.

One of its key highlights, and one that might have proven useful to both the NHS and Uber, is that it will head off glitches before they happen.

Don't miss any update on this topic

Create a free account and access your personalized content collection with our latest publications and analyses.

Sign up for free

License and Republishing

World Economic Forum articles may be republished in accordance with the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License, and in accordance with our Terms of Use.

The views expressed in this article are those of the author alone and not the World Economic Forum.

Stay up to date:

Digital Communications

Related topics:
Emerging TechnologiesFourth Industrial Revolution
Share:
The Big Picture
Explore and monitor how Digital Communications is affecting economies, industries and global issues
A hand holding a looking glass by a lake
Crowdsource Innovation
Get involved with our crowdsourced digital platform to deliver impact at scale
World Economic Forum logo
Global Agenda

The Agenda Weekly

A weekly update of the most important issues driving the global agenda

Subscribe today

You can unsubscribe at any time using the link in our emails. For more details, review our privacy policy.

5 ways to achieve effective cyber resilience

Filipe Beato and Jamie Saunders

November 21, 2024

Why AI is Southeast Asia's new engine for profitable growth

About us

Engage with us

  • Sign in
  • Partner with us
  • Become a member
  • Sign up for our press releases
  • Subscribe to our newsletters
  • Contact us

Quick links

Language editions

Privacy Policy & Terms of Service

Sitemap

© 2024 World Economic Forum