Designing advanced optical devices is a bit like solving a Rubik’s cube in a thousand dimensions, where a single wrong move can reset your progress, and where each move is computationally expensive. To design metasurfaces, which are advanced nanophotonic devices used in applications ranging from ultra-thin camera lenses to holographic displays, expert engineers spend days to weeks developing and utilizing sophisticated computational algorithms. Now, a Stanford research team has built an AI system that can do the same work in almost real time.
The system, called MetaChat and described in a new paper in Science Advances, represents a new breed of AI assistant that interactively collaborates with human designers and exhibits the traits of true agency. It doesn’t just follow a set of pre-determined instructions but truly thinks through problems, experiments with solutions, and learns from its trials in real time, similar to a human designer.
“You can describe what you want in plain English—something like, ‘design a lens that focuses red light here and blue light there’—and MetaChat engages AI agents and the appropriate simulation tools to figure out the right optimization regime to explore before running thousands of simulations to deliver a complete design,” said Robert Lupoiu, a PhD candidate in electrical engineering at Stanford and the paper’s first author. “It’s like having 24/7 access to an army of experts that works at superhuman speeds.” What makes MetaChat different from typical AI assistants is what the researchers call “true agency.” While chatbots like ChatGPT can answer questions and generate code, they typically followed a fairly rigid approach that at best may include the pre-programmed use of tools. In contrast, MetaChat’s agents can plan multi-step strategies, use specialized tools and solvers, consult with other AI experts, recognize when they are off-track, and autonomously course-correct, all while incorporating human user feedback via natural conversation where appropriate.
In applying MetaChat to metasurfaces, the collaborative nature of human-AI interaction is self-evident. "The system asked me a clarifying question about the thickness constraint, had a brief consultation with its materials expert agent, and then went to work," Lupoiu said. "Eleven minutes later, it delivered a complete design hundreds of wavelengths large. It was incredibly surreal to see it in action, completing in mere minutes a task that took me months when I started my PhD."
The secret to MetaChat's speed is a neural network surrogate solver that can simulate Maxwell’s equations, which are used to describe how light interacts with these nanostructures, in milliseconds. This is roughly 10,000 times faster than conventional physics simulations. This ultrafast solver allows MetaChat's agents to rapidly test hundreds of design variants in parallel and select only the very best performer for each segment of the metasurface. “The accelerated solving of electromagnetics problems is essential in our agentic framework,” says Professor
Jonathan Fan, lead principal investigator of the study. “It not only facilitates fast solving, but it
is also a requirement to practically engage human-in-the-loop AI collaboration through back-
and-forth exchanges.”
The metalenses and beam-steering devices that MetaChat designed matched or exceeded the
performance of similar devices reported in scientific literature, which took expert research
teams weeks or months to develop using conventional computation methods. Beyond the
impressive speed, the researchers see MetaChat as a way to make cutting-edge photonics
accessible to a much broader community. "We've heard from colleagues in biology, chemistry,
and astronomy who need custom metasurface components but who don't have the photonics
background to design them," Fan said. "MetaChat could change that. You don't need to
understand details involving Maxwell's equations or freeform optimization, many of which are
developed in-house. You just describe what you need, and the system handles the complexity."
Perhaps the most striking aspect of MetaChat is what it suggests about the future of scientific
research. When AI agents can autonomously design sophisticated devices in minutes, what
becomes possible? "This technology could fundamentally change the pace of innovation,"
Lupoiu reflected. "Imagine a researcher having an idea in the morning, asking their AI assistant
to design and optimize the device before lunch, and having several fabrication and validation
runs ready by that afternoon. The cycle time from concept to experiment could shrink from
months to hours."
Given the power of these AI tools, one may question what this means for optical designers in
the workforce. “I do not see this technology as a replacement for expert humans,” said Fan.
“These tools enable us to explore ideas and test hypotheses at a pace that was previously
unimaginable. But at the end of the day, a person needs to query MetaChat with the design
task. It will be up to us to ask better questions and drive innovation through our own creativity
and depth of intellectual understanding.”
