Alexander Setescak stares at a shimmering map of magnetic fields, each swirl and spike dancing across his screen like ghostly fingerprints above an invisible world. Beneath that field, hidden just out of sight, lies the true structure of an ultrathin magnet — a labyrinth of tiny magnetic domains pointing up and down, separated by delicate walls where the direction flips. For years, scientists could only guess what lay beneath, like trying to reconstruct a light bulb’s shape from its shadow on a wall. But now, Setescak and his team at the University of Vienna have cracked the code.
Understanding the inner magnetic patterns of materials just a few atoms thick is essential for building faster, greener computers. These ultrathin magnets could revolutionize data storage and low-power electronics — but only if researchers can see how their tiny magnetic domains are arranged. The problem? The best tools, like diamond quantum sensors, only measure the magnetic field outside the material. Countless different internal patterns can create the same external field, making reconstruction a guessing game.
The breakthrough came by teaching AI the laws of physics. Instead of letting machine learning guess blindly, the team built a model that follows the fundamental rules of magnetism. Their algorithm tests possible magnetic configurations and picks the one that not only matches the measured field but also has the lowest physical energy — the state nature would actually choose. It’s like solving a puzzle where only the physically possible answers are allowed.
One of the trickiest hurdles was the sensor’s height. The diamond sensor hovers just nanometers above the sample, and magnetic fields fade fast with distance. A tiny error in height distorts everything. But the new method solves for both the magnetization and the distance at the same time. In their experiment, the software pinpointed the sensor height at exactly 81 nanometers — a number confirmed by independent measurements.
The team tested their method on a real-world sample: an ultrathin magnet called Fe₃−ₓGaTe₂, made at the National University of Singapore and scanned using a diamond sensor at the Max Planck Institute in Dresden. The results were strikingly accurate. And the best part? The software is open source, built on the Vienna-developed NeuralMag package, so any lab can use it.
"Our hope is that other laboratories will pick up the framework and apply it to their own measurements," says Setescak. The team is already working on extending the method to 3D imaging, opening doors to even more complex magnetic systems. For the future of computing, the invisible is becoming visible — one nanometer at a time.
