Does an LLM Reading CIF Understand the Crystal, or Just Imitate the Text?
Key points Within the same structure, comparing “change one digit, the crystal changes” with “rewrite it, the crystal stays the same”: CrystaLLM gets only 28% of structures right, PLaID++ only 7%, and the graph neural network CHGNet 100%. When both edits change exactly one digit, PLaID++ can tell whether an atom moved far or only a tiny bit (96%); CrystaLLM manages 59%. Language models can sense how much a number changed, but not that a symmetry-equivalent rewrite is the same crystal. LLMs copying a CIF occasionally drop a minus sign. Deleting minus signs one at a time, pymatgen parses all 2,380 files without complaint, and in 68 of them the crystal has changed with no warning at all. So my view: let the LLM make the decisions, and leave the crystal itself to code and tools. Summary I recently read some work on representing crystal structures with large language models — CrystaLLM, for example, which outputs a crystal structure given a formula and a space group — and earlier I had seen work using graph neural networks to represent crystals for property prediction. That raised a question. What a language model does is, at bottom, predict the probability of the next token. If you write a crystal as a string of tokens and hand it over, does the model really understand the structure, or has it just learned to imitate — to know what a CIF usually looks like? ...