The AI Behind ChatGPT Is Ready to Do Chemistry

With its row of glossy chambers connected by squiggly tubing, the AI-powered setup looks more like a futuristic brewery than a chemistry lab.

Yet when given a prompt by its human operator—”make aspirin”—the system leaps into action like a well-oiled team of chemists. One AI takes the command and scours the web to optimize a “recipe” for the medicine. Another AI translates the results into code, and a third directs robotic arms to carry out the experiment.

The system, called Coscientist, is the latest in a push to automate chemistry with large language models. The type of algorithm behind the popular ChatGPT, large language models have taken the world by storm with their ability to understand language, audio, and image inputs, while doling out useful—if not always accurate—responses.

AI is already making a splash in the lab. From modeling protein structures—the solution to a half-decade-long conundrum—to hunting patterns in genetic data and “hallucinating” new chemical drugs such as antibiotics, the technology is set to transform science.

Coscientist is one of the first of its kind. Developed by Dr. Gabe Gomes and colleagues at Carnegie Mellon University, it autonomously learns recipes for chemical reactions and designs lab procedures to make them in just a few minutes.

As a proof of concept, the end-to-end system pulled off a complex chemical reaction that won the 2010 Nobel Prize in chemistry for its critical role in drug development.

“This is the first time that a non-organic intelligence planned, designed, and executed this complex reaction that was invented by humans,” said Gomes.

A quirk of the system is its modularity. By splitting up chemistry tasks, Coscientist behaves like a team of chemists working in tandem to find a solution, speeding up the entire drug discovery process.

Coscientist brings “the vision of self-driving laboratories a step closer to reality,” wrote Ana Laura Dias and Dr. Tiago Rodrigues at the University of Lisbon, who were not involved in the work.

Breaking Bad

Chemistry is a lot like perfecting a recipe.

It starts with a goal: Make a chemical with the least waste. Just as cooks surf the web for recipe ideas, chemists dig into published literature and design a protocol.

It’s a tedious process. Challenged with synthesizing a new chemical, chemists spend hours searching databases of similar molecules and reactions. They need multiple rounds of research, experimentation, and revision before they get the desired molecule with minimal waste.

“Chemists, therefore, long aspired to develop automated systems to facilitate their work,” wrote Dias and Rodrigues.

One major step is injecting different types of chemicals at the exact amounts and perfect times into multiple “chambers” so separate reactions can take place. Normally, this is done by hand, but now affordable robots can easily be programmed to set up new chemical interactions. They’re not perfect, however. Most can only perform one reaction.

“These limitations have frustrated the dream” for autonomous robot chemists, wrote Dias and Rodrigues.

Here’s where OpenAI’s GPT-4, the algorithm behind ChatGPT, comes in.

Hello, Chemical World

Comparing a range of large language models, such as GPT-4, Claude, and Falcon, the team found Coscientist could generate detailed “recipes” for making the chemicals at high yields. The new study is a three-step process, stringing multiple fine-tuned instances of GPT-4 into an automated chemist.

The first is the AI librarian, which learns from a variety of online sources. When the team tracked its preferences, they found the AI spent the most time visiting literature from top chemical journals. This insight is valuable. Often described as a “black box,” large language models don’t always explain how they calculate their results. Coscientist, on the other hand, lays out its reasoning like a chemist writing notes in a lab book, so its work is easier to reproduce.

The second AI in Coscientist “reads” user manuals for robotic arms that dispense chemical reactants—like reading a pamphlet on how to work a new lawnmower, the AI consumes the knowledge to “understand” its instructions.

Finally, the third AI operates a robotic arm to synthesize chemicals. It also has a built-in “professor mode,” which analyzes which reactions work—and which don’t—to feed back into the system for further fine-tuning.

A Nobel Effort

In an initial test, Coscientist acted as a sort of bartender.

Loaded with multiple colored liquids, the AI controlled the robotic arm to carefully spray each color into a line inside a 96-well grid. This is like trying to make multi-colored ice cubes in an ice tray without spilling. It mostly worked. With a simple command “draw a blue diagonal,” Coscientist was able to follow the instructions (with a bit of human help).

Ramping up the difficulty, the team next challenged the system to synthesize seven blockbuster drugs, including common pain-relievers such as aspirin, acetaminophen—the active ingredient in Tylenol—and ibuprofen.

Coscientist calculated how much of each ingredient was needed for each robotic arm and mixed them at optimal speed. The AI struggled the first time around, but with practice, it learned when the robotic arms overheated or when chemicals boiled over. Eventually, like a seasoned cook, the AI homed in on a perfect recipe for the desired product.

The team also asked Coscientist to optimize a range of chemical reactions to increase yield—a notoriously difficult chemistry challenge. With just 10 examples, the system performed better than an established machine learning method. Coscientist struggled when its GPT components didn’t have enough examples, but it quickly learned. After every iteration, it acquired “knowledge” and adapted its strategy for planning the next step over time.

For now, Coscientist is a bit like a new chemistry student. It can read and analyze current publications, generate ideas, and test them. But it also sometimes spews out nonsense, a downfall plaguing most large language models. It’s therefore necessary for chemists to use their intuition and check the results. Real-world chemical problems are also far more complex than those tackled in the study, especially in the realm of biology.

With more development, the team envisions Coscientist as a helper. It can quickly test a range of chemical recipes, and chemists can get a good night’s sleep as the robotic system churns away.

“We can have something that can be running autonomously, trying to discover new phenomena, new reactions, new ideas,” said Gomes.

Image Credit: Louis Reed / Unsplash

Shelly Fan
Shelly Fanhttps://neurofantastic.com/
Shelly Xuelai Fan is a neuroscientist-turned-science writer. She completed her PhD in neuroscience at the University of British Columbia, where she developed novel treatments for neurodegeneration. While studying biological brains, she became fascinated with AI and all things biotech. Following graduation, she moved to UCSF to study blood-based factors that rejuvenate aged brains. She is the co-founder of Vantastic Media, a media venture that explores science stories through text and video, and runs the award-winning blog NeuroFantastic.com. Her first book, "Will AI Replace Us?" (Thames & Hudson) was published in 2019.
RELATED
latest
Don't miss a trend
Get Hub delivered to your inbox

featured