Modern power outlets are a lot safer than they seem from the outside looking in. Take arc fault circuit interrupters (AFCIs), for example: They’re sensors installed behind the wall that trip an outlet’s circuit when they detect a potentially dangerous spark in the power line. Trouble is, arc-fault detectors are sometimes too sensitive, and, as a result, switch off the power prematurely or unnecessarily.

A team at MIT’s Department of Mechanical Engineering solved the problem with artificial intelligence. Their “smart power outlet,” which they detail in a paper published in the journal Engineering Applications of Artificial Intelligence, analyzes the power draw of appliances and can tell the difference between harmless electrical arcs and dangerous ones. It’s also capable of identifying which devices are plugged in by their unique electrical patterns.

“We create fingerprints of current data, and we’re labeling them as good or bad, or what individual device they are,” Joshua Siegel, a research scientist on the project, told MIT News. “There are the good fingerprints, and then the fingerprints of the things that burn your house down. Our job in the near-term is to figure out what’s going to burn down your house and what won’t, and in the long-term, figure out exactly what’s plugged in where.”

The innards of the researchers’ smart outlet differ from conventional arc-fault detectors, which contain low-power chips with basic algorithms. A Raspberry Pi sits at the heart of the intelligent outlet, running the machine learning algorithm. An inductive power clamp secures to an outlet’s wire and monitors the current from the accompanying magnetic field, and a USB sound card reads the current data. (Sound cards are designed to detect small signals at high data rates, the team wrote, which make them ideal for this sort of work.)

The researchers fed the neural network power signature data from four different devices: a fan, an iMac, a stovetop burner, and an air purifier. After sufficient training, it was able to identify dangerous electrical arcs with 99.95 percent accuracy (higher than existing AFCIs) and differentiate between the four devices with 95.61 percent accuracy,

Future versions of the smart power outlet, Siegel said, could have networking capabilities that allow them to exchange data wirelessly, reporting on electrical usage and learning power usage patterns over time.

“By making IoT capable of learning, you’re able to constantly update the system, so that your vacuum cleaner may trigger the circuit breaker once or twice the first week, but it’ll get smarter over time,” Siegel explained. “By the time that you have 1,000 or 10,000 users contributing to the model, very few people will experience these nuisance trips because there’s so much data aggregated from so many different houses.”