A new study has demonstrated that it is possible to make a network of atoms and photons that could improve how artificial intelligence stores and recalls memories.
This network, called a quantum-optical spin glass, works as an associative memory, a form of AI that enables the recall of full memories from partial information—much like how humans can recognize a person's face in a blurred photograph.
The advance, published in Science , shows that this new type of spin glass has a greater capacity to hold and recall memories than a traditional AI network of the same size. The atom-and-photon network also exhibited short-term plasticity, a phenomenon that resembles how synaptic connections between neurons in the brain change when learning new information.
"We can now make neural networks at the atomic level, and they adjust themselves in a way that is somewhat similar to how we believe our brains learn," said Benjamin Lev , the study's senior author and the Stanford Fortitude Professor and professor of physics and applied physics in the School of Humanities and Sciences .
The new spin glass was made with atoms at extremely cold temperatures trapped in a vacuum chamber, so more research needs to be done to see if it can be scaled for practical applications—but with further development, it has the potential for an even larger memory capacity.
A physics challenge
The advance helps illuminate how certain spin glasses function on an atomic level, which physicists have been working to understand for decades.
A spin glass is a type of frustrated magnet. The "spin" refers to the two states in which the atoms can orient, just like a bar magnet can orient with its north pole pointing up or down. Within a common refrigerator magnet, all of the spins align in the same direction, all up or all down, attaching it to the refrigerator door. By contrast, the spins in a spin glass are frustrated: They get stuck pointing in random directions. This is somewhat akin to everyday glass, which looks and behaves like a solid but has atoms in disordered locations like a fluid.
In 1982, physicist John Hopfield used the properties of frustrated spins in a mathematical model to show that a network of spins can store and recall information in the form of memory patterns. Low-energy arrangements of spins called valleys contain full memories. If the network receives incomplete or distorted information, it can "associate" the corrupted information with the most similar stored memory, thereby recalling the full memory.
Hopfield shared the 2024 Nobel Prize in Physics for this work, which helped stimulate the neural-network research that underpins how AI computing systems such as ChatGPT process and understand language. However, the Hopfield network only works up to a certain point: When it contains too many memories, recall fails because the network transitions into a spin glass state, with frustrated spins creating an energy landscape that is too cluttered to accurately recall the correct memories.
New spin on spin glass
For this study, Lev and his colleagues overcame this problem by figuring out how to make a spin glass state function as an associative memory. The key was to make it out of atoms and photons. Using the quantum-optical effects of atoms absorbing and emitting photons, the spin glass network could still recall memories even in this frustrated state, surpassing the limitations of the Hopfield network. This quantum-optical spin glass was first experimentally realized in 2025 as described in the team's previous Science paper , but this study took this work a step further to employ it as an associative memory.
Using laser tweezers, the researchers created an array of atomic gases in an optical cavity, a trap for light formed by two curved mirrors. Called Bose-Einstein condensates, these gases contain clusters of 10,000 or more atoms in a special quantum state, and each cluster behaves as if it were a single super atom.
The researchers sent beams of photons, particles of light, into the cavity. Bouncing back and forth thousands of times between the mirrors, the photons made multiple connections among the atoms, much the same way that synapses connect neurons. The photons helped to drive the spins for each super atom up or down, ultimately settling them into a low-energy valley of the spin glass.
The team then used this small network of up to 20 spins as an associative memory. The quantum-optical spin glass showed it had up to a seven-times greater capacity to hold and recall memories than a traditional Hopfield network with the same number of spins.
The researchers also observed that the photons could push the atoms to create a type of plasticity, where the connections can move and change, similar to the way the human brain's network of neurons and synapses can be rewired.
"We now have a proof of principle of a physical network that adjusts itself in a way a learning system would, and if we can improve and scale that up, AI hardware might become far less power hungry to train," Lev said.
Since the system could allow for the storage of more memories in a small network, AI technology could also potentially use fewer resources. The research is still at a very early stage, Lev emphasized, but the team is working to develop a system with more spins, including ones that can be quantum entangled, and investigate what other properties their new spin glass demonstrates.
"This teaches us a little bit more about how physical systems can compute, not just with the classical laws of physics, but also with quantum laws," Lev said. "It's great to shoot for these applications, but we're also doing this because we want to know more about how nature works."
Lev is a member of Bio-X . He serves as the deputy director of both QFARM and the E.L. Ginzton Laboratory at Stanford.
Other Stanford co-authors on the study include first author and former doctoral scholar Brendan Marsh, former postdoctoral scholar Yunpeng Ji, and current doctoral scholars David Atri Schuller and Henry S. Hunt—all in Lev's lab. Surya Ganguli, associate professor of applied physics in H&S, is also a co-author. Ganguli is also a senior fellow at the Institute for Human-Centered Artificial Intelligence (HAI) and a member of Bio-X and the Wu Tsai Neurosciences Institute .
This study also includes researchers affiliated with Princeton University and the University of St Andrews in the U.K.
This research received support from the U.S. Army Research Office, U.S. Department of Energy, Engineering and Physical Sciences Research Council in the U.K., Stanford QFARM Initiative, Stanford Shoucheng Zhang Graduate Fellowship, and Schmidt Science Polymath program.