Hierarchical Graph Tokenization for Molecule-Language Alignment

Yongqiang Chen, Quanming Yao, Juzheng Zhang, James Cheng, Yatao Bian

TL;DR

The paper introduces HIGHT (HIerarchical GrapH Tokenization), a novel framework that improves how Large Language Models (LLMs) interpret molecules. By tokenizing molecules at multiple hierarchical levels—atoms, motifs (functional groups), and the entire molecule—and pairing this with a motif-aware instruction-tuning dataset, HIGHT reduces molecular hallucinations by up to 40% and sets new performance standards across 14 chemistry-related benchmarks.

The Problem: Missing the Forest for the Trees

Large Language Models have shown incredible promise in chemistry, but they often struggle with a fundamental issue: hallucination. For instance, a model might confidently claim a molecule contains a hydroxide group ("-OH") when it clearly does not.

The authors argue this stems from a limitation in current tokenization methods. Most existing Large Graph-Language Models (LGLMs) use node-centric tokenization, treating a molecule as a simple, flat list of individual atoms. While an LLM can theoretically piece these atoms together to identify functional groups, the limited expressivity of Graph Neural Networks (GNNs) makes this incredibly difficult. Functional groups are the "words" of chemistry—they determine solubility, toxicity, and reactivity. By ignoring these higher-order structures during tokenization, we force the LLM to work much harder than necessary, leading to misaligned representations and errors.

Comparison of node-centric vs. HIGHT tokenization.

The HIGHT Framework

To address this, the authors propose HIGHT, which tackles the problem through both architectural innovations and augmented data:

  1. Hierarchical Tokenizer: Instead of relying solely on atom tokens, HIGHT injects "supernodes" into the graph representing motifs (detected via the BRICS algorithm) and the entire molecule. It uses separate VQVAE-based encoders to generate discrete tokens for each structural level.
  2. Multi-level Adapters: To bridge the gap between graph embeddings and the LLM's text space, HIGHT employs distinct adapters for atom-level, motif-level, and molecule-level tokens.
  3. Laplacian Positional Encodings: These are added to help the LLM understand the relative positions of these hierarchical tokens within the complex graph structure.
  4. HiPubChem Dataset: The researchers found that standard datasets rarely mention motifs explicitly. They created HiPubChem, an augmented instruction-tuning dataset that includes text descriptions of which functional groups are present and absent in a molecule. This forces the model to align its internal structural tokens with chemical language.
Overview of the HIGHT framework and its performance summary.

Key Insights and Results

The study evaluated HIGHT across 14 real-world benchmarks, including a newly introduced diagnostic benchmark called MotifHallu, designed specifically to measure hallucinations regarding functional groups.

  • Overcoming the "Yes-Man" Phenomenon: The authors discovered that existing LGLMs act as "yes-men"—they tend to predict "Yes" for almost any functional group query because they haven't learned to distinguish specific sub-structures from the raw atom soup. HIGHT successfully mitigates this.
  • Reduced Hallucination: On the MotifHallu benchmark, HIGHT significantly improved the Macro F1 score, reducing worst-class hallucinations by roughly 40%.
  • Broad Performance Gains: HIGHT improves performance across nearly every category, from property prediction to reaction synthesis. It achieved state-of-the-art results on several MoleculeNet tasks and significantly outperformed baselines in QM9 regression (measuring HOMO/LUMO energy levels).
  • Data-Architecture Synergy: The authors note that simply adding motif tokens isn't enough. Without the HiPubChem dataset providing linguistic context for those tokens, the model fails to understand what they represent. Both structural hierarchy and descriptive data are required for true alignment.

Future Directions

Currently, HIGHT focuses on 2D molecular graphs. Incorporating 3D conformational information (the spatial arrangement of atoms) is a vital next step for complex tasks like drug-protein binding. Additionally, moving from rule-based motif detection (like BRICS) to "learned" motifs optimized end-to-end could further enhance the model's chemical reasoning capabilities.

Summary updated

BibTeX
@inproceedings{chen2025hierarchical,
  author = {Yongqiang Chen and Quanming Yao and Juzheng Zhang and James Cheng and Yatao Bian},
  title = {{Hierarchical Graph Tokenization for Molecule-Language Alignment}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=wpbNczwAwV},
}
Figure