Citation

BibTex format

@article{Lei:2025:10.1039/d5dd00374a,
author = {Lei, G and Cooper, SJ},
doi = {10.1039/d5dd00374a},
journal = {Digital Discovery},
pages = {3455--3465},
title = {Do Llamas understand the periodic table?},
url = {http://dx.doi.org/10.1039/d5dd00374a},
volume = {4},
year = {2025}
}

RIS format (EndNote, RefMan)

TY  - JOUR
AB - Large Language Models (LLMs) demonstrate remarkable abilities in synthesizing scientific knowledge, yet their limitations, particularly with basic arithmetic, raise questions about their reliability. As materials science increasingly employs LLMs for tasks like hypothesis generation, understanding how these models encode specialized knowledge becomes crucial. Here, we investigate how the open-source Llama series of LLMs represent the periodic table of elements. We observe a 3D spiral structure in the hidden states of LLMs that aligns with the conceptual structure of the periodic table, suggesting that LLMs can reflect the geometric organization of scientific concepts learned from text. Linear probing reveals that middle layers encode continuous, overlapping attributes that enable indirect recall, while deeper layers sharpen categorical distinctions and incorporate linguistic context. These findings suggest that LLMs represent symbolic knowledge not as isolated facts, but as structured geometric manifolds that intertwine semantic information across layers. We hope this inspires further exploration into the interpretability mechanisms of LLMs within chemistry and materials science, enhancing trust of model reliability, guiding model optimization and tool design, and promoting mutual innovation between science and AI.
AU - Lei,G
AU - Cooper,SJ
DO - 10.1039/d5dd00374a
EP - 3465
PY - 2025///
SN - 2635-098X
SP - 3455
TI - Do Llamas understand the periodic table?
T2 - Digital Discovery
UR - http://dx.doi.org/10.1039/d5dd00374a
UR - https://doi.org/10.1039/d5dd00374a
VL - 4
ER -

Contact us

Dyson School of Design Engineering
Imperial College London
25 Exhibition Road
South Kensington
London
SW7 2DB

design.engineering@imperial.ac.uk
Tel: +44 (0) 20 7594 8888

Campus Map