Put a tray of water in the freezer. For a while, it's liquid. And then—boom—the molecules stack into little hexagons, and you’ve got ice. Pour supercold liquid nitrogen onto a wafer of yttrium barium copper oxide, and suddenly electricity flows through the compound with less resistance than beer down a college student’s throat. You've got a superconductor.

Those drastic alterations in physical properties are called phase transitions, and physicists love them. It's as if they could spot the exact instant Dr. Jekyll morphs into Mr. Hyde. If they could just figure out exactly how the upstanding doctor's body metabolized the secret formula, maybe physicists could understand how it turns him evil. Or make more Mr. Hydes.

A human physicist might never have the neural wetware to see a phase transition, but now computers can. In two papers published in Nature Physics today, two independent groups of physicists—one based at Canada’s Perimeter Institute, the other at the Swiss Federal Institute of Technology in Zurich—show that they can train neural networks to look at snapshots of just hundreds of atoms and figure out what phase of matter they're in.

And it works pretty much like Facebook's auto-tags. “We kind of repurposed the technology they use for image recognition,” says physicist Juan Carrasquilla, who co-authored the Canadian paper and now works for quantum computing company D-Wave.

Of course, facial recognition, water turning to ice, and Jekylls turning to Hydes aren't really the scientists' bag. They want to use artificial intelligence to understand fringey phenomena with potential commercial applications—like why some materials become superconductors only near absolute zero but others transition at a balmy -150 degrees Celsius. “The high-temperature superconductors that might be useful for technology, we actually understand them very poorly,” says physicist Sebastian Huber, who co-wrote the Swiss paper.

They also want to better understand exotic phases of matter called topological states, in which quantum particles act even weirder than usual. (The physicists who discovered these new phases nabbed the Nobel Prize last October.) Quantum particles like photons or atoms change their physical states relatively easily, but topological states are sturdy. That means they might be useful for building data storage for quantum computers, if you were a company like, say, Microsoft.

The research was about more than identifying phases—it was about understanding transitions. The Canadian group trained their computer to find the temperature at which a phase transition occurred to 0.3 percent accuracy. The Swiss group showed an even trickier move, because they got their neural network to understand something without training it ahead of time. Typically in machine learning, you give the neural network a goal: Figure out what a dog looks like. "You train the network with 100,000 pictures,” Huber says. “Whenever a dog is in one, you tell it. Whenever there isn’t, you tell it.”

But the physicists didn’t tell their network about phase transitions at all: They just showed the network collections of particles. The phases were different enough that the computer could identify each one. That's a level of skill acquisition that Huber thinks will eventually allow neural networks to discover entirely new phases of matter.

These new successes aren't just academic. In the hunt for stronger, cheaper, or otherwise better materials, researchers have been using machine learning for a while. In 2004, a collaboration that included NASA and GE developed a strong, durable alloy for aircraft engines using neural networks by simulating the materials before troubleshooting them in the lab. And machine learning is way faster than, say, simulating the properties of a material on a supercomputer.

Still, the phase transition simulations that the physicists studied were simple compared to the real world. Before these speculative materials end up in your new gadgets, the physicists will need to figure out how to make neural networks parse 1023 particles at a time—not just hundreds, but 100 sextillion. But Carrasquilla already wants to show real experimental data to his neural network, to see if it can find phase changes. The computer of the future might be smart enough to tag your grandma’s face in photos—and discover the next wonder material.