Functional-Group Knowledge Is Structured in Language Models Before It Is Spoken
Paper · https://arxiv.org/abs/2611.03684
arXiv:2611.03684v1 Announce Type: new Abstract: Language models serve as the reasoning core of agents for chemistry and materials science, where they must interpret molecular structure before planning syntheses or proposing materials. Yet their outputs show only what they say, not what they know. Given a prompt such as ``The primary functional group in 1-Fluorobutane (CCCCF) is'', a small general-purpose model may answer ``the alkyne group'' instead of an alkyl fluoride. The output alone cannot tell whether the model failed to recognize the fluorine or recognized it and failed to say so. We address this by reading the internal representations of five open-source models on prompts covering 92 molecules and 20 functional groups. Even without chemistry training, the models organize functional groups by chemical family, and they encode chemical differences as consistent directions. The shift from thioether ($\mathrm{R{-}S{-}R'}$) to thiol ($\mathrm{R{-}SH}$), added to ether ($\mathrm{R{-}O{-}R'}$), lands nearest alcohol ($\mathrm{R{-}OH}$). This structure emerges abruptly in the middle layers, where representations shift from tracking the wording of the prompt to tracking the functional group. The base model names the correct functional group in only 58.5\% of prompts, the lowest of the five, yet it encodes functional-group families and preserves chemically meaningful patterns. Its errors are mostly failures to answer rather than wrong answers. Functional-group knowledge is structured in the model before it is spoken. Chemistry fine-tuning reorganizes it, making functional groups rather than prompt wording dominate the representation. These results suggest that evaluating chemical language models through outputs alone can underestimate the chemical information they encode. Representation analysis can distinguish a lack of knowledge from a failure to express it, which matters when choosing or adapting models for chemical agents.
First seen by Oriel on .
AI summary
This study finds that five open-source language models internally organize functional-group knowledge before reliably expressing it, and chemistry fine-tuning shifts representations toward chemical structure.
- The analysis covers 92 molecules and 20 functional groups using internal representations from five open-source models.
- Models organize functional groups by chemical family and encode chemical differences as consistent directions, including meaningful relationships between thioethers, thiols, ethers, and alcohols.
- This structure emerges abruptly in middle layers, where representations shift from prompt wording toward functional-group identity.
- The base model names the correct functional group in 58.5% of prompts, but its errors are mostly failures to answer rather than incorrect chemical knowledge.
- Representation analysis can distinguish missing chemical knowledge from difficulty expressing it when selecting or adapting models for chemical agents.
#language models #chemistry #representation analysis #chemical agents
Generated by gpt-5.6-sol. Check the original for details.
Aliases
| Source | External ID | URL |
|---|---|---|
| arXiv AI Papers | oai:arXiv.org:2611.03684v1 | https://arxiv.org/abs/2611.03684 Read discussion |