Fragment-based Pretraining and Finetuning on Molecular Graphs

Property prediction on molecular graphs is an important application of Graph Neural Networks. Recently, unlabeled molecular data has become abundant, which facilitates the rapid development of self-supervised learning for GNNs in the chemical domain. In this work, we propose pretraining GNNs at the fragment level, a promising middle ground to overcome the limitations of node-level and graph-level pretraining. Borrowing techniques from recent work on principal subgraph mining, we obtain a compact vocabulary of prevalent fragments from a large pretraining dataset. From the extracted vocabulary, we introduce several fragment-based contrastive and predictive pretraining tasks. The contrastive learning task jointly pretrains two different GNNs: one on molecular graphs and the other on fragment graphs, which represents higher-order connectivity within molecules. By enforcing consistency between the fragment embedding and the aggregated embedding of the corresponding atoms from the molecular graphs, we ensure that the embeddings capture structural information at multiple resolutions. The structural information of fragment graphs is further exploited to extract auxiliary labels for graph-level predictive pretraining. We employ both the pretrained molecular-based and fragment-based GNNs for downstream prediction, thus utilizing the fragment information during finetuning. Our graph fragment-based pretraining (GraphFP) advances the performances on 5 out of 8 common molecular benchmarks and improves the performances on long-range biological benchmarks by at least 11.5%. Code is available at: https://github.com/lvkd84/GraphFP.

Paper

Similar papers

Peer review

Reviewer wcQm5/10 · confidence 5/52023-06-25

Summary

In this paper, the authors proposed contrastively and predictively strategies for pretraining GNNs based on graph fragmentation. Using principle subgraph extraction, the authors pretrain two separate encoders for molecular and fragment graphs, capturing structural information at different resolutions.

Strengths

1. The paper is well-organized and easy to follow. 2. The authors conduct comprehensive comparisons with baselines to show their advantages. 3. The fragment-level contrastive pretraining framework is novel, which captures both granular patterns and higher-order connectivity. 4. The t-SNE visualization in Figure 3 clearly shows the effectiveness of the authors' design.

Weaknesses

1. The technical contribution is limited. For example, the principle subgraph extraction module is borrowed from [19]. 2. The authors do not clearly state how to choose hyperparameter alpha. 3. In Table 3, the effects of the vocabulary size are only explored on three datasets. 4. The pertaining time is not reported in the paper.

Questions

Please see the weakness.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The limitation is not clearly discussed. Please provide the discussion in the rebuttal period.

Reviewer Br6k5/10 · confidence 3/52023-06-29

Summary

This paper presents a novel approach to pretrain Graph Neural Networks (GNNs) at the fragment level for property prediction on molecular graphs. By utilizing a compact vocabulary of prevalent fragments and introducing fragment-based contrastive and predictive pretraining tasks, the authors overcome the limitations of node-level and graph-level pretraining. Two different GNNs are pretrained to capture structural information at multiple resolutions, and the fragment information is utilized during finetuning. The proposed models show improved performances on both common molecular and long-range biological benchmarks.

Strengths

- The paper is easy to follow. - The idea that using motif for pretraining is novel and reasonable.

Weaknesses

- Empirical performance is not strong enough. Especially in Table 2, it's hard to distinguish the absolute gain over the baselines. The authors are encouraged to report the average score over all tasks in molecular property prediction. - The authors are also encouraged to compare with stronger baselines. For example, the authors can also compare JOAO V2 in addition to JOAO. - Missing ablations: the authors add many components and loss functions in the system. It would be interesting know how each contribute to the performance.

Questions

See weakness.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

3 good

Contribution

2 fair

Limitations

Yes

Reviewer MPQy6/10 · confidence 3/52023-07-10

Summary

Based on the belief that learning with fragments can help capture structural information at multiple resolutions, this paper proposes a fragment-based strategy for pretraining and fine-tuning. First, the paper extracts fragments by an existing heuristic algorithm called Principle Subgraph Mining algorithm to obtain fragments from a large molecular dataset (i.e., ChEMBL database). Then, the paper uses two separate GNNs (one for molecules and one for fragments) to learn the node embeddings. In particular, the node embeddings obtained by molecular-based GNN are pooled into fragment embeddings. The model is trained with respect to three tasks: a contrastive task between fragment embeddings obtained by molecular-based GNN and fragment-based GNN, a fragment existence prediction task, and a fragment graph structure prediction task. The experiments are done on 8 binary graph classification tasks from MoleculeNet and 2 graph prediction tasks on large peptide molecules from the Long-range Graph Benchmark.

Strengths

+ The proposed method is easy to follow and conduct. + The results on Long-range Graph Benchmark are particularly good. + Figure 1 clearly shows the method. + Codes are provided. Appendix further provides more details.

Weaknesses

The idea of using molecular fragment can be interesting. The proposed method shows some effectiveness, although how it obtains can be less illuminating. Many design choices need to be further described. Please reply to my questions below. In addition, some writing issues exist. Sentences cannot start with "[reference]".

Questions

1. The fragment extraction strategy can be described and compared with more details. The authors choose Principle Subgraph Mining algorithm to extract fragments. Do you try others? Any empirical evidence supports this choice? Like BRICKS or RECAP? On line 53, the authors comment MGSSL as "their multi-step fragmentation may overly decomposes molecules, losing the ability to represent high-order structural patterns". Can you expand it? Why? On line 122, the authors wrote that "however, existing methods use suboptimal fragmentation or fragment embeddings". Likewise, can you provide more discussion about it? Why their methods obtain suboptimal fragments while yours can? Any theoretical proof? 2. The method assigns different fragment embeddings for two identical fragments appearing int the same molecule. Have you trying forcing them to be the same? I get that the local neighborhood of these two identical fragments can be different. But will it also help capture generic information if fragment is uniquely represented? 3. On lie 159, the authors wrote that "An edge exists between two fragment F nodes of GF is there exist at least a bond interconnecting atoms from the fragments." Will these cause too many edges between fragments? I suspect that most fragments are connected in this case. Therefore, the topology of fragment graph is lost. 4. How to obtain ground-truth structural backbones? 5. More experimental details of fragment extraction algorithm are needed. Any hyperparameters? On line 308, the authors wrote that "we prepare two additional vocabularies with size 1600 and size 3200". How do you prepare that? 6. Why results on long-range tasks can be much improved than existing works? Why different tasks use different baselines? 7. Figure 4(d) is hard to follow. How do you assign fragment ID? Why you need fragment ID as x axis?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

2 fair

Limitations

No potential negative societal impact of their work as far as I know.

Reviewer Vdiv6/10 · confidence 1/52023-07-11

Summary

The authors propose a novel method for generating representations for molecule graphs where two GNNs are contrastively learned. Using this new represntations, the authors achieve good results compared to a variety of baseline methods.

Strengths

The paper and method are presented clearly. The results are strong and the method is interesting + well explained

Weaknesses

I found the presentation of Figure 3 a bit confusing

Questions

i realise that many molecular benchmarks are based on similar organic compounds, but I am curious how the method would behave over a wider-range of molecules in material science. Would it be possible to consider fragments are even larger common structures? Would this aid in longer range predictions? > We reduce the learning rate by a factor of 0.1 every 5 epochs without improvement. I'm curious if a different learning rate schedule would give better results. How is no improvement defined? Long range structural information may involve 3D information, where. things that appear far apart on the graph may not be. I'm curious if this could be measured in some way? Could this method be applied to domains where 3D information is more directly used?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

1: Your assessment is an educated guess. The submission is not in your area or the submission was difficult to understand. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

N/A

Reviewer RaR16/10 · confidence 4/52023-07-27

Summary

This paper proposes a contrastively and predictively strategy for pretraining GNNs based on graph fragmentation. Specifically, it leverages a frequency-based method for extracting molecule fragments, and performs fragment-based contrastive and predictive tasks to jointly pretrain two GNNs on a molecule graph and a fragment graph. It also enforces the consistency between fragment embeddings and atom embeddings for multi-solution structural information.

Strengths

1. The paper is easy to follow. 2. The paper investigates an interesting fragmentation strategy for pretraining tasks. 3. The proposed method enforces the consistency between fragment embeddings and atom embeddings for multi-solution structural information, which is a promising trick. Experiments demonstrate the effectiveness of this method.

Weaknesses

1. The technical novelty is limited, because it is a combination of existing methods. While the performance improvement is not very remarkable. 2. The authors may want to conduct ablation studies on the effect of molecule fragmentation strategy and the pretraining strategy, respectively. 3. Table 3 shows that the performances worsen on some downstream benchmarks as the vocabulary size grows larger. The authors may want to investigate a smaller vocabulary size. When it reaches 1, the method is the same as without fragments. 4. A related work [1]---which leverages a similar frequency-based motif extractor and uses contrastive learning for generative training---is missing. [1] Zijie Geng Z, Shufang Xie, Yingce Xia, et al. De Novo Molecular Generation via Connection-aware Motif Mining. ICLR 2023.

Questions

1. The results of MGSSL [1] is different from what they report in the original paper. Why? 2. Do you kekulize the molecules? Or how do your deal with the possible breakage of aromatic systems? 3. Why do you use a subset of ChEMBL for pretraining? How is the dataset processed? [1] Zaixi Zhang, Qi Liu, Hao Wang, Chengqiang Lu, and Chee-Kong Lee. Motif-based graph self-supervised learning for molecular property prediction. NeurIPS 2021.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

3 good

Presentation

3 good

Contribution

2 fair

Limitations

N/A

Reviewer RaR12023-08-15

Thanks for the response. Increasing my score from 4 to 6.

I appreciate the authors' efforts in responding to my concerns. I have raised my score from 4 to 6. I understand the technical novelty of the paper now, and I admit that it has some interesting insights, especially the cross-level contrastive learning between node embeddings and fragment embeddings. Although I still think these techniques mainly involve detailed manners and are a bit incremental. I understand that a frequency-based motif extractor is suitable for the model, but a comparison with commonly seen motif extractors such as that in JT-VAE will make the paper stronger. Considering the time limitation during rebuttal, I expect the authors to include the comparison in a future revision.

Authorsrebuttal2023-08-15

Thank you

Thank you for your consideration. We are happy that we have addressed your concerns. Your suggestion is valuable to us and we will conduct further experiments with existing fragmentations, such as the one used in JT-VAE, in the final revision.

Reviewer Br6k2023-08-15

Dear Authors, Thank you for the detailed explanation and most of my concerns are addressed. I am happy to change my score. Also, please add these new numbers to your revision. Thanks,

Authorsrebuttal2023-08-15

Thank you

Thank you for your consideration. We appreciate your time reviewing and your help making the paper stronger. We will include the new numbers in the final revision.

Reviewer wcQm2023-08-15

Reply to the authors

I have read the reply and appreciate the author's reply. My concerns are mostly resolved. Thanks!

Authorsrebuttal2023-08-16

Thank you. Any further questions?

Thank you for acknowledging our reply. We are glad that your concerns are mostly resolved. We are happy to discuss any further clarifications to improve your evaluation and enhance the acceptance chance of the paper.

Reviewer MPQy2023-08-20

Thanks for the reply. One question left.

Thanks for the reply. Most of my concerns are cleared. But I DO have one question left. In my question (4), I know that there will be only 1 edge between a pair of connected fragments. Given your fragments are not very small, there can be many bonds interconnecting atoms from the fragments. My point is, will this lead most of the fragments to be connected? Can you provide more detailed statistics, such as the average connected fragments?

Authorsrebuttal2023-08-20

Fragment graph statistics

We report several statistics regarding the fragment graphs. Number of fragment graphs by size: | Size | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ... | 30 | |-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| | Number of Graphs | 167 | 8433 | 76024 | 144940 | 112426 | 52607 | 20999 | 7742 | 3334 | 1570 | 788 | 496 | ... | 1 | The smallest fragment graphs are of size 1 (standalone fragment) while the largest fragment graphs are of size 30. The majority of fragment graphs are of smaller sizes. To illustrate the connectivity within fragment graphs, for each fragment graph size, we report the average number of edges. To save space, we only consider fragment graphs with maximum size 10: | Size | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |-|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| | Average Number of Edges | 0.00 | 1.00 | 2.02 | 3.07 | 4.17 | 5.33 | 6.51 | 7.74 | 8.88 | 10.11 | Since our molecular graphs are connected, our fragment graphs are also connected (i.e, no disconnected island). From the above table, we can see that, given a fragment graph with size $n$, the average number of edges connecting the fragments vary from around $n-1$ to $n$. When the fragment graphs are small, the average number of edges are closer to $n-1$, indicating that the fragment graphs are mostly tree-like. As the fragment graph size increases, more loops appear and thus the average number of edges deviate further from $n-1$. To further illustrate the connectivity and sparsity within fragment graphs, in the following table, with varying vocabulary sizes, we show the average fragment graph size and the average number of edges: | Vocabulary Size | 200 | 400 | 800 | 1600 | 3200 | |-|:-:|:-:|:-:|:-:|:-:| | Average Graph Size | 5.92 | 5.17 | 4.61 | 4.15 | 3.73 | | Average Number of Edges | 5.23 | 4.40 | 3.78 | 3.28 | 2.84 | We hope that we could answer your question and improve your evaluation of the paper. We are happy to follow up if you have any other concern.

Reviewer MPQy2023-08-21

Thanks. I now raise my score.

Dear authors, thanks for the prompt reply. I have no further questions and raise my score to 6.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC