← Latest papers
🤖 machine learning

Molecular Representations for Large Language Models

This paper introduces MolJSON, a novel molecular representation that systematically outperforms traditional formats like SMILES and IUPAC names across various reasoning tasks when used with large language models, demonstrating that explicit molecular graph schemas significantly enhance LLM performance in chemistry.

Original authors: Nicholas T. Runcie, Fergus Imrie, Charlotte M. Deane

Published 2026-05-05
📖 4 min read☕ Coffee break read

Original authors: Nicholas T. Runcie, Fergus Imrie, Charlotte M. Deane

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a brilliant but literal-minded robot how to understand and draw complex 3D structures, like a molecule. The problem isn't that the robot is dumb; it's that you are speaking to it in the wrong language.

This paper is about finding the right "dialect" for Large Language Models (LLMs) to talk about chemistry.

The Problem: Speaking "Chemist" vs. Speaking "Robot"

For decades, chemists have used two main ways to write down molecules on a computer:

  1. SMILES: Think of this as a long, confusing string of text that describes a molecule by "walking" through it. It's like describing a house by saying, "Start at the front door, turn left, go up the stairs, turn right, and you're in the kitchen." If you miss a step or get the order wrong, the whole description falls apart.
  2. IUPAC Names: These are the official, human-readable names (like "ethanoic acid"). They are like reading a complex legal contract to describe a house. They are precise for humans but very hard for a robot to parse because the rules are incredibly strict and the sentences are long.

The researchers found that when they asked AI models to read or write molecules using these old formats, the models made a lot of mistakes. It was like asking a robot to build a Lego castle based on a paragraph of text instructions written in a foreign language; it often built the wrong thing or got confused.

The Solution: Introducing "MolJSON"

The authors created a new format called MolJSON.

Think of MolJSON not as a story or a set of instructions, but as a blueprint or a parts list.

  • Instead of saying "walk from point A to point B," MolJSON says: "Here is a list of all the bricks (atoms) and here is a list of exactly which bricks are glued together (bonds)."
  • It looks like a structured list (JSON) that computers love. It explicitly lists every piece and how they connect, without forcing the AI to "walk" through the molecule or decode complex grammar rules.

The Experiment: The Translation Test

To see if this new language worked better, the researchers set up three types of tests with different AI models (like GPT-5 and Claude):

  1. The Translator Test: Give the AI a molecule in one format (like a SMILES string) and ask it to rewrite it in another format.

    • Result: When the AI had to output the new format as MolJSON, it was correct about 71% of the time. When it had to output SMILES or IUPAC names, it was only correct about 43% of the time. The AI just couldn't "speak" the old languages well.
  2. The Maze Test (Shortest Path): Give the AI a molecule and ask, "How many bonds are between this Fluorine atom and that Chlorine atom?"

    • Result: With MolJSON, the AI got it right 98.5% of the time. With SMILES, it was 92%, and with IUPAC names, it dropped to 82%.
    • Bonus: The AI also used fewer "brain tokens" (computing power) to solve the maze when given the MolJSON blueprint. It didn't have to waste energy trying to figure out the structure first.
  3. The Builder Test (Constrained Generation): Ask the AI to "Build a molecule that has one Fluorine, one Chlorine, and two rings."

    • Result: When the AI was allowed to output the answer in MolJSON, it succeeded 95% of the time. When forced to output a SMILES string, it only succeeded 64% of the time.

Why Did MolJSON Win?

The paper suggests that SMILES and IUPAC names force the AI to do two hard things at once:

  1. Decode the structure: It has to figure out what the molecule looks like from the text.
  2. Re-encode the structure: It has to turn that mental image back into a strict text format.

MolJSON skips the hard part. It gives the AI the structure directly (the atoms and bonds) and lets it output the structure directly. It's like giving the robot a box of Lego bricks and a picture of the final castle, rather than a paragraph of text describing how to build it.

The Takeaway

The researchers found that the choice of how you represent a molecule matters just as much as the intelligence of the AI itself. Even though the AI models were trained on millions of SMILES strings and IUPAC names, they performed significantly better when using this new, structured "blueprint" format (MolJSON).

In short: If you want AI to do chemistry, stop speaking to it in chemical riddles (SMILES/IUPAC) and start speaking to it in clear, structured blueprints (MolJSON).

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →