                              Hierarchical Graph Tokenization for Molecule-Language Alignment



                          Is there a <functional group name> in the molecule?





Examples of MotifHallu are given in Table 17.

During the evaluation, we detect whether the LGLM gives outputs meaning “Yes” or “No” following the practice in (Li et al.,

2023c). For each molecule, we construct questions with positive answers for all kinds of functional groups detected in the

molecule, and questions with negative answers for randomly sampled 6 functional groups from the 38 common functional

groups in RDKit. The construction finally yields 23, 924 query answer pairs about the existence of functional groups in the

molecule. While it is easy to scale up MotifHallu by automatically considering more molecules and a broader scope of

functional groups, we find that the current scale is already sufficient to demonstrate the hallucination phenomena in LGLMs.



D. Details of Experiments

Implementation of graph tokenizer. We implement the GNN tokenizer/encoder based on the same GNN backbone,

which is a 5-layer GIN (Xu et al., 2019). The hidden dimension is 300. For the node-centric tokenization, we employ the

VQVAE GNN tokenizer from Mole-BERT (Xia et al., 2023) and adopt self-supervised learning tasks from the official

Mole-BERT implementation.8 For HIGHT, we train the VQVAE with the self-supervised learning tasks from (Zang et al.,

2023) based on the official implementation.9 Meanwhile, we set the hyperparameters of GNN tokenizer training the same as

those recommended by (Xia et al., 2023; Zang et al., 2023).

After training the tokenizer, we adopt the GNN encoder within the tokenizer instead of the codebook embeddings as we

empirically find that the GNN embeddings perform better than that using the VQVAE codebook embeddings.



Implementation of LGLMs. For the cross-modal adapters, we implement it as a single-layer MLP with an input

dimension of 300 as our main focus is the tokenization. For HIGHT, we adopt three distinct adapters to handle the node-

level, motif-level and graph-level embeddings. Meanwhile, we also adopt a Laplacian position encodings with respect to the

supernode-augmented graphs. The dimension of the Laplacian position encoding is set to 8, therefore the input dimensions

of the adapters in HIGHT will be 308.

For the LoRA adapters, we use a LoRA rank of 128 and a scaling value α of 256 for molecular property prediction

(classification) in order to better fit with the task, and use a LoRA rank of 64 and a scaling value α of 16 for all the remaining

methods and tasks.

For the base LLM, we mainly adopt vicuna-v-1.3-7B (Chiang et al., 2023). The overall scale of parameters is around

6.9B.



Implementation of instruction tuning. In stage 1 instruction tuning, we train all methods based on PubChem-295k

dataset. The training goes 5 epochs, with a batch size of 64 (distributed to 4 GPUs) by default. If there is an OOM issue, we

will decrease the batch size a little bit to 40. The learning rate is set to 2 × 10−3 for all methods.

For classification-based property prediction, the training goes 20 epochs, with a batch size of 128 (distributed to 4 GPUs) by

default. If there is an OOM issue, we will decrease the batch size a little bit to 64. The learning rate is set to 8 × 10−5 for all

methods.

For regression-based property prediction, the training goes 5 epochs, with a batch size of 64 (distributed to 4 GPUs) by

default. The learning rate is set to 2 × 10−5 for all methods.

For molecular description, the training goes 50 epochs, with a batch size of 64 (distributed to 4 GPUs) by default. If there is

an OOM issue, we will decrease the batch size a little bit to 32. The learning rate is set to 8 × 10−5 for all methods.

For forward reaction prediction, the training goes 5 epochs, with a batch size of 64 (distributed to 4 GPUs) by default. The

learning rate is set to 2 × 10−5 for all methods.

For reagent prediction, the training goes 5 epochs, with a batch size of 64 (distributed to 4 GPUs) by default. The learning

rate is set to 2 × 10−5 for all methods.

   8

       https://github.com/junxia97/Mole-BERT

   9

       https://github.com/ZangXuan/HiMol



                                                                22

