P RE - TRAINING M OLECULAR G RAPH R EPRESENTATION WITH 3D G EOMETRY
A BSTRACT
Molecular graph representation learning is a fundamental problem in modern drug and material discovery.
Molecular graphs are typically modeled by their 2D topological structures, but it has been recently discovered that 3D geometric information plays a more vital role in predicting molecular functionalities.
However, the lack of 3D information in real-world scenarios has signiﬁcantly impeded the learning of geometric graph representation.
To cope with this challenge, we propose the Graph
Multi-View Pre-training (GraphMVP) framework where self-supervised learning (SSL) is performed by leveraging the correspondence and consistency between 2D topological structures and 3D geometric views.
GraphMVP effectively learns a 2D molecular graph encoder that is enhanced by richer and more discriminative 3D geometry.
We further provide theoretical insights to justify the effectiveness of GraphMVP.
Finally, comprehensive experiments show that GraphMVP can consistently outperform existing graph SSL methods.
Code is available on GitHub.
I NTRODUCTION
In recent years, drug discovery has drawn increasing interest in the machine learning community.
Among many challenges therein how to discriminatively represent a molecule with a vectorized embedding remains a fundamental yet open challenge.
The underlying problem can be decomposed into two components: how to design a common latent space for molecule graphs ( i e. , designing a suitable encoder) and how to construct an objective function to supervise the training ( i e. , deﬁning a learning target).
Falling broadly into the second category, our paper studies self-supervised molecular representation learning by leveraging the consistency between 3D geometry and 2D topology.
Motivated by the prominent success of the pretraining-ﬁnetuning pipeline [17] unsupervisedly pretrained graph neural networks for molecules yields promising performance on downstream tasks and becomes increasingly popular [42, 54, 82, 90, 103, 104].
The key to pre-training lies in ﬁnding an effective proxy task ( i.e. , training objective) to leverage the power of large unlabeled datasets.
Inspired by [54, 58, 79] that molecular properties [29, 54] can be better predicted by 3D geometry due to its encoded energy knowledge, we aim to make use of the 3D geometry of molecules in pre-training.
However, the stereochemical structures are often very expensive to obtain, making such 3D geometric information scarce in downstream tasks.
To address this problem, we propose the
Graph Multi-View Pre-training (GraphMVP) framework, where a 2D molecule encoder is pre-trained with the knowledge of 3D geometry and then ﬁne-tuned on downstream tasks without 3D information.
Our learning paradigm, during pre-training, injects the knowledge of 3D molecular geometry to a 2D molecular graph encoder such that the downstream tasks can beneﬁt from the implicit 3D geometry even if there is no 3D information available.
We attain the aforementioned goal by leveraging two pretext tasks on the 2D and 3D molecular graphs: one contrastive and one generative SSL.
Contrastive SSL creates the supervised signal at an inter-molecule level: the 2D and 3D graph pairs are positive if they are from the same molecule, and negative otherwise; Then contrastive SSL [93] will align the positive pairs and contrast the negative pairs simultaneously.
Generative SSL [38, 49, 91], on the other hand, obtains the supervised signal in an intra-molecule way: it learns a 2D/3D representation that can reconstruct its 3D/2D counterpart view for each molecule itself.
To cope with the challenge of measuring the quality of reconstruction on molecule 2D and 3D space, we further propose a novel surrogate objective function called variation representation reconstruction (VRR) for the generative SSL task, which can effectively compute such quality in the continuous representation space.
The knowledge acquired by these two SSL tasks is complementary, so our GraphMVP framework integrates them to form more discriminative 2D molecular graph representation.
Consistent performance improvements empirically validate the effectiveness of GraphMVP.
We give additional insights to justify the effectiveness of GraphMVP.
First, GraphMVP is a selfsupervised learning approach based on maximizing mutual information (MI) between 2D and 3D views, enabling the learnt representation to capture high-level factors [6, 7, 86] in molecule data.
Second, we ﬁnd that 3D molecular geometry is a form of privileged information [88, 89].
It has been proven that using privileged information in training can accelerate the speed of learning.
We are aware that privileged information is only used in training, while it is not available in testing.
This perfectly matches our intuition of pre-training molecular representation with 3D geometry.
Our contributions include (1) To our best knowledge, we are the ﬁrst to incorporate the 3D geometric information into graph SSL; (2) We propose one contrastive and one generative SSL tasks for pretraining.
Then we elaborate their differences and empirically validate that combining both can lead to a better representation; (3) We provide theoretical insights and case studies to justify why adding 3D geometry is beneﬁcial; (4) We achieve the SOTA performance among all the SSL methods.
Related work.
We brieﬂy review the most related works here and include a more detailed summarization in Appendix A. Self-supervised learning (SSL) methods have attracted massive attention to graph applications [57, 59, 97, 99].
In general, there are roughly two categories of graph SSL: contrastive and generative, where they differ on the design of the supervised signals.
Contrastive graph
SSL [42, 82, 90, 103, 104] constructs the supervised signals at the inter-graph level and learns the representation by contrasting with other graphs, while generative graph SSL [34, 42, 43, 54] focuses on reconstructing the original graph at the intra-graph level.
One of the most signiﬁcant differences that separate our work from existing methods is that all previous methods merely focus on 2D molecular topology.
However, for scientiﬁc tasks such as molecular property prediction, 3D geometry should be incorporated as it provides complementary and comprehensive information [58, 79].
To ﬁll this gap, we propose GraphMVP to leverage the 3D geometry in graph self-supervised pre-training.
P RELIMINARIES
We ﬁrst outline the key concepts and notations used in this work.
Self-supervised learning (SSL) is based on the view design, where each view provides a speciﬁc aspect and modality of the data.
Each molecule has two natural views: the 2D graph incorporates the topological structure deﬁned by the adjacency, while the 3D graph can better reﬂect the geometry and spatial relation.
From a chemical perspective, 3D geometric graphs focus on the energy while 2D graphs emphasize the topological information; thus they can be composed for learning more informative representation in GraphMVP.
Transformation is an atomic operation in SSL that can extract speciﬁc information from each view.
Next, we will brieﬂy introduce how to represent these two views.
2D Molecular Graph represents molecules as 2D graphs, with atoms as nodes and bonds as edges respectively.
We denote each 2D graph as g 2D =
( X, E ) , where X is the atom attribute matrix and E is the bond attribute matrix.
Notice that here E also includes the bond connectivity.
Then we will apply a transformation function T 2D on the topological graph.
Given a 2D molecular graph g 2D , its representation h 2 D can be obtained from a 2D graph neural network (GNN) model:
[Equation]
3D Molecular Graph additionally includes spatial positions of the atoms, and they are needless to be static since atoms are in continual motion on a potential energy surface [4].
The 3D structures at the local minima on this surface are named conformer .
As the molecular properties are conformers ensembled [36], GraphMVP provides a novel perspective on adopting 3D conformers for learning better representation.
Given a conformer g 3D =
( X, R ) , its representation via a 3D GNN model is:
[Equation]
where R is the 3D-coordinate matrix and T 3D is the 3D transformation.
In what follows, for notation simplicity, we use x and y for the 2D and 3D graphs, i.e. , x (cid:44) g 2D and y (cid:44) g 3D .
Then the latent representations are denoted as h x and h y .
G RAPH MVP: G RAPH M ULTI -V IEW P RE - TRAINING
Our model, termed as Graph Multi-View Pre-training (GraphMVP), conducts self-supervised learning (SSL) pre-training with 3D information.
The 3D conformers encode rich information about the molecule energy and spatial structure, which are complementary to the 2D topology.
Thus, applying
SSL between the 2D and 3D views will provide a better 2D representation, which implicitly embeds the ensembles of energies and geometric information for molecules.
In the following, we ﬁrst present an overview of proposed GraphMVP, and then introduce two pretext tasks specialized concerning 3D conformation structures.
Finally, we summarize a broader graph
SSL family that prevails the 2D molecular graph representation learning with 3D geometry.
3. O VERVIEW OF G RAPH MVP
[Figure]
As aforementioned, GraphMVP exerts 2D topology and 3D geometry as two complementary views for each molecule.
By proceeding SSL between these views, it is expected to learn a 2D representation enhanced with 3D conformation, which can better reﬂect certain molecular properties.
As generic SSL pre-training pipelines, GraphMVP has two stages: pre-training then ﬁne-tuning.
In the pre-training, we conduct SSL via auxiliary tasks on data collections providing both 2D and 3D molecular structures.
During ﬁne-tuning, the pre-trained 2D GNN models are subsequently ﬁne-tuned on speciﬁc downstream tasks, where only 2D molecular graphs are available.
At the SSL pre-training stage, we design two pretext tasks: one contrastive and one generative.
We conjecture then empirically prove that these two tasks are focusing on different learning aspects, which are concluded into following two points.
(1) From the perspective of representation learning, contrastive SSL is learning from inter-data and generative SSL is learning by intra-data .
For contrastive SSL, one key step is to obtain the negative view pairs from inter-data for contrasting; while generative SSL focuses on each data point itself, by reconstructing the key features at the intra-data level.
From the perspective of distribution learning, contrastive SSL and generative
SSL are learning the data distribution from local and global manner, respectively.
Contrastive SSL learns the distribution locally by contrasting the pairwise distance at the inter-data level.
Thus, with sufﬁcient number of data, the local contrastive operation can iteratively recover the data distribution.
Generative SSL, on the other hand, learns the global data density function directly.
Therefore, contrastive and generative SSL are essentially conducting representation and distribution learning with different intuitions and disciplines, and we expect that combining these two can lead to better representation.
We later carry out an ablation study (Section 4.4) to verify this empirically.
In addition, to make the pretext tasks more challenging, we take views for each molecule by randomly masking M nodes (and corresponding edges) as the transformation function, i.e. , T 2D = T 3D = mask.
This trick has been widely used in graph SSL [42, 103, 104] and has shown robust improvements.
3. C ONTRASTIVE S ELF -S UPERVISED L EARNING BETWEEN 2D AND 3D V IEWS
The main idea of contrastive self-supervised learning (SSL) [10, 69] is ﬁrst to deﬁne positive and negative pairs of views from the inter-data level, and then to align the positive pairs and contrast the negative pairs simultaneously [93].
For each molecule, we ﬁrst extract representations from 2D and 3D views, i.e. , h x and h y .
Then we create positive and negative pairs for contrastive learning: the 2D-3D pairs ( x , y ) for the same molecule are treated as positive, and negative otherwise.
Finally, we align the positive pairs and contrast the negative ones.
The pipeline is shown in Figure 1.
In the following, we discuss two common objective functions on contrastive graph SSL.
InfoNCE is ﬁrst proposed in [69], and its effectiveness has been validated both empirically [10, 37] and theoretically [3].
Its formulation is given as follows:
[Equation]
where x ( j ) , y ( j ) are randomly sampled 2D and 3D views regarding to the anchored pair ( x , y ) .
f x ( x , y ) and f y ( y , x ) are scoring functions for the two corresponding views, with ﬂexible formulations.
Here we adopt f x ( x , y ) =
f y ( y , x ) =
(cid:104) h x , h y (cid:105) .
More details are in Appendix D.
Energy-Based Model with Noise Contrastive Estimation (EBM-NCE) is an alternative that has been widely used in the line of graph contrastive SSL [42, 82, 103, 104].
Its intention is essentially the same as InfoNCE, to align positive pairs and contrast negative pairs, while the main difference is the usage of binary cross-entropy and extra noise distribution for negative sampling:
[Equation]
(4) where p n is the noise distribution and σ is the sigmoid function.
We also notice that the ﬁnal formulation of EBM-NCE shares certain similarities with Jensen-Shannon estimation (JSE) [68].
However, the derivation process and underlying intuition are different: EBM-NCE models the conditional distributions in MI lower bound (Equation (9)) with EBM, while JSE is a special case of variational estimation of f-divergence.
Since this is not the main focus of GraphMVP, we expand the a more comprehensive comparison in Appendix D, plus the potential beneﬁts with EBM-NCE.
Few works [35] have witnessed the effect on the choice of objectives in graph contrastive SSL.
In
GraphMVP, we treat it as a hyper-parameter and further run ablation studies on them, i.e. , to solely use either InfoNCE ( L C =
L InfoNCE ) or EMB-NCE ( L C =
L EBM-NCE ).
3. G ENERATIVE S ELF -S UPERVISED L EARNING BETWEEN 2D AND 3D
V IEWS
Generative SSL is another classic track for unsupervised pre-training [11, 48, 49, 51].
It aims at learning an effective representation by reconstructing each data point itself.
Speciﬁcally to drug discovery, we have one 2D graph and a certain number of 3D conformers for each molecule, and our goal is to learn a robust 2D/3D representation that can, to the most extent, recover its 3D/2D counterparts.
By doing so, generative SSL can enforce 2D/3D GNN to encode the most inherent geometry/topology information, which can logically improve the downstream performance.
There are many options for generative models, including variational auto-encoder (VAE) [49], generative adversarial networks (GAN) [30], ﬂow-based model [18], etc.
In GraphMVP, we prefer
VAE-like method for the following reasons:
(1) The mapping between two molecular views is stochastic: multiple 3D conformers correspond to the same 2D topology; (2) An explicit 2D graph representation ( i.e. , feature encoder) is required for downstream tasks; (3) Decoders for structured data such as graph are often complicated and hard to design, which make them a suboptimal choice.
Variational Molecule Reconstruction.
Therefore we propose a light VAE-like generative SSL, equipped with a crafty surrogate loss, which we describe follows.
Take one direction for illustration, when generating 3D conformers from their corresponding 2D topology, we want to model the conditional likelihood p ( y | x ) .
By introducing a reparameterized variable z x = µ x + σ x (cid:12) (cid:15) , where µ x and σ x are two ﬂexible functions on h x , (cid:15) ∼ N (0 , I ) and (cid:12) is the element-wise production, we have the following lower bound:
[Equation]
The expression is similar for log p ( x | y ) .
The above objective is composed of a conditional loglikelihood and a KL-divergence term, where the bottleneck is to calculate the ﬁrst term for structured data.
This term has also been recognized as the reconstruction term : it is essentially to reconstruct the 3D conformers ( y ) from the sampled 2D molecular graph representation ( z x ).
However, performing the graph reconstruction on the data space is not trivial: since molecules ( e.g. , atoms and bonds) are discrete, modeling and measuring on the molecule space will bring extra obstacles.
Variational Representation Reconstruction (VRR).
To cope with this challenge, we propose a novel surrogate loss by transferring the reconstruction from data space to representation space.
Instead of decoding the latent code z x to data space, we can directly project it to the 3D representation space, denoted as q x ( z x ) .
Since the representation space is continuous, we may as well model the conditional log-likelihood with Gaussian distribution, resulting in L2 distance for reconstruction, i.e. , (cid:107) q x ( z x ) − SG ( h y ( y ))
(cid:107) 2 .
Here SG is the stop-gradient operation, assuming that h y is a ﬁxed learnt representation function.
SG has been widely adopted in the SSL literature to avoid model collapse [12, 31].
We call this surrogate loss as variational representation reconstruction (VRR):
[Equation]
(cid:104) E q ( z x | x ) (cid:2) (cid:107) q x ( z x ) − SG ( h y )
(cid:107) 2 (cid:3) + E q
( z y | y ) (cid:2) (cid:107) q y
( z y ) − SG ( h x ) (cid:107) 22 (cid:3)(cid:105) +
[Equation]
We provide the generative SSL pipeline in Figure 1 and the complete derivations in Appendix E.
As will be discussed in Section 5.1, VRR is actually maximizing MI, and MI is invariant to continuous bijective function [7].
Thus, this surrogate loss would be exact if the encoding function h satisﬁes this condition.
However, we ﬁnd that GNN, though does not meet the condition, can provide quite robust performance, which empirically justify the effectiveness of VRR.
3. M ULTI - TASK O BJECTIVE F UNCTION
As discussed before, contrastive SSL and generative SSL essentially learn the representation from distinct viewpoints.
A reasonable conjecture is that combining both SSL methods can lead to overall better performance, thus we arrive at minimizing the following complete objective for GraphMVP:
[Equation]
where α 1 , α 2 are weighting coefﬁcients.
A later performed ablation study (Section 4.4) delivers two important messages: (1) Both individual contrastive and generative SSL on 3D conformers can consistently help improve the 2D representation learning; (2) Combining the two SSL strategies can yield further improvements.
Thus, we draw the conclusion that GraphMVP (Equation (7)) is able to obtain an augmented 2D representation by fully utilizing the 3D information.
As discussed in Section 1, existing graph SSL methods only focus on the 2D topology, which is in parallel to GraphMVP: 2D graph SSL focuses on exploiting the 2D structure topology, and
GraphMVP takes advantage of the 3D geometry information.
Thus, we propose to merge the 2D SSL into GraphMVP.
Since there are two main categories in 2D graph SSL: generative and contrastive, we propose two variants GraphMVP-G and GraphMVP-C accordingly.
Their objectives are as follows:
[Equation]
Later, the empirical results also help support the effectiveness of GraphMVP-G and GraphMVP-C, and thus, we can conclude that existing 2D SSL is complementary to GraphMVP.
E XPERIMENTS AND R ESULTS 4. E XPERIMENTAL S ETTINGS
Datasets.
We pre-train models on the same dataset then ﬁne-tune on the wide range of downstream tasks.
We randomly select 50k qualiﬁed molecules from GEOM [4] with both 2D and 3D structures
[Table] [Table]
C
[Table]
for the pre-training.
As clariﬁed in Section 3.1, conformer ensembles can better reﬂect the molecular property, thus we take C conformers of each molecule.
For downstream tasks, we ﬁrst stick to the same setting of the main graph SSL work [42, 103, 104], exploring 8 binary molecular property prediction tasks, which are all in the low-data regime.
Then we explore 6 regression tasks from various low-data domains to be more comprehensive.
We describe all the datasets in Appendix F.
2D GNN.
We follow the research line of SSL on molecule graph [42, 103, 104], using the same
Graph Isomorphism Network (GIN) [100] as the backbone model, with the same feature sets.
3D GNN.
We choose SchNet [79] for geometric modeling, since SchNet: (1) is found to be a strong geometric representation learning method under the fair benchmarking; (2) can be trained more efﬁciently, comparing to the other recent 3D models.
More detailed explanations are in Appendix B.2.
4. M AIN R ESULTS ON M OLECULAR P ROPERTY P REDICTION .
We carry out comprehensive comparisons with 10 SSL baselines and random initialization.
For pre-training, we apply all SSL methods on the same dataset based on GEOM [4].
For ﬁne-tuning, we follow the same setting [42, 103, 104] with 8 low-data molecular property prediction tasks.
Baselines.
Due to the rapid growth of graph SSL [59, 97, 99], we are only able to benchmark the most well-acknowledged baselines: EdgePred [34], InfoGraph [82], GPT-GNN[43], AttrMask &
ContextPred[42], GraphLoG[101], G-{Contextual, Motif}[77], GraphCL[104], JOAO[103].
Our method.
GraphMVP has two key factors: i) masking ratio ( M ) and ii) number of conformers for each molecule ( C ).
We set M = 0 .
15 and C = 5 by default, and will explore their effects in the following ablation studies in Section 4.3.
For EBM-NCE loss, we adopt the empirical distribution for noise distribution.
For Equation (8), we pick the empirically optimal generative and contrastive 2D
SSL method: that is AttrMask for GraphMVP-G and ContextPred for GraphMVP-C.
The main results on 8 molecular property prediction tasks are listed in Table 1.
We observe that the performance of GraphMVP is signiﬁcantly better than the random initialized one, and the average performance outperforms the existing SSL methods by a large margin.
In addition, GraphMVP-G and GraphMVP-C consistently improve the performance, supporting the claim: 3D geometry is complementary to the 2D topology .
GraphMVP leverages the information between 3D geometry and 2D topology, and 2D SSL plays the role as regularizer to extract more 2D topological information; they are extracting different perspectives of information and are indeed complementary to each other.
4. A BLATION S TUDY : T HE E FFECT OF M ASKING R ATIO AND N UMBER OF C ONFORMERS
We analyze the effects of masking ratio M and the number of conformers C in GraphMVP.
In Table 1, we set the M as 0.15 since it has been widely used in existing SSL methods [42, 103, 104], and
[Table] [Table]
[Table]
C is set to 5, which we will explain below.
We explore on the range of M ∈ { 0 , 0 . 15 , 0 . 3 } and
C ∈ { 1 , 5 , 10 , 20 } , and report the average performance.
The complete results are in Appendix G.2.
As seen in Table 2, the improvement is more obvious from M =
(raw graph) to M = 0 .
15 than from M = 0 .
15 to M = 0 .
This can be explained that subgraph masking with larger ratio will make the SSL tasks more challenging, especially comparing to the raw graph ( M = 0 ).
Table 3 shows the effect for C .
We observe that the performance is generally better when adding more conformers, but will reach a plateau above certain thresholds.
This observation matches with previous ﬁndings [5]: adding more conformers to augment the representation learning is not as helpful as expected; while we conclude that adding more conformers can be beneﬁcial with little improvement.
One possible reason is, when generating the dataset, we are sampling top- C conformers with highest possibility and lowest energy.
In other words, top-5 conformers are sufﬁcient to cover the most conformers with equilibrium state (over 80%), and the effect of larger C is thus modest.
To sum up, adding more conformers might be helpful, but the computation cost can grow linearly with the increase in dataset size.
On the other hand, enlarging the masking ratio will not induce extra cost, yet the performance is slightly better.
Therefore, we would encourage tuning masking ratios prior to trying a larger number of conformers from the perspective of efﬁciency and effectiveness.
4. A BLATION S TUDY : T HE E FFECT OF O BJECTIVE F UNCTION
[Table]
In Section 3, we introduce a new contrastive learning objective family called EBM-NCE
[Table]
and we take either InfoNCE and EBM-NCE as the contrastive SSL.
For the generative SSL task, we propose a novel objective function called variational representation reconstruction (VRR) in Equation (6).
As discussed in Section 3.3, stochasticity is important for GraphMVP since it can capture the conformer distribution for each 2D molecular graph.
To verify this, we add an ablation study on representation reconstruction (RR) by removing stochasticity in VRR.
Thus, here we deploy a comprehensive ablation study to explore the effect for each individual objective function (InfoNCE, EBM-NCE, VRR and RR), followed by the pairwise combinations between them.
The results in Table 4 give certain constructive insights as follows: (1) Each individual SSL objective function (middle block) can lead to better performance.
This strengthens the claim that adding 3D information is helpful for 2D representation learning.
According to the combination of those
SSL objective functions (bottom block), adding both contrastive and generative SSL can consistently improve the performance.
This veriﬁes our claim that conducting SSL at both the inter-data and intra-data level is beneﬁcial.
(3) We can see VRR is consistently better than RR on all settings, which veriﬁes that stochasticity is an important factor in modeling 3D conformers for molecules.
4. B ROADER R ANGE OF D OWNSTREAM T ASKS
The 8 binary downstream tasks discussed so far have been widely applied in the graph SSL research line on molecules [42, 103, 104], but there are more tasks where the 3D conformers can be helpful.
Here we test 4 extra regression property prediction tasks and 2 drug-target afﬁnity tasks.
About the dataset statistics, more detailed information can be found in Appendix F, and we may as well brieﬂy describe the afﬁnity task here.
Drug-target afﬁnity (DTA) is a crucial task [70, 71, 96] in drug discovery, where it models both the molecular drugs and target proteins, with the goal to predict
[Table]
their afﬁnity scores.
One recent work [66] is modeling the molecular drugs with 2D GNN and target protein (as an amino-acid sequence) with convolution neural network (CNN).
We adopt this setting by pre-training the 2D GNN using GraphMVP.
As illustrated in Table 5, the consistent performance gain veriﬁes the effectiveness of our proposed GraphMVP.
4. C ASE S TUDY
We investigate how GraphMVP helps when the task objectives are challenging with respect to the 2D topology but straightforward using 3D geometry (as shown in Figure 2).
We therefore design two case studies to testify how GraphMVP transfers knowledge from 3D geometry into the 2D representation.
The ﬁrst case study is 3D Diameter Prediction .
For molecules, usually, the longer the 2D diameter is, the larger the 3D diameter (largest atomic pairwise l2 distance).
However, this does not always hold, and we are interested in using the 2D graph to predict the 3D diameter.
The second case study is Long-Range Donor-Acceptor Detection .
Molecules possess a special geometric structure called donor-acceptor bond, and we want to use 2D molecular graph to detect this special structure.
We validate that GraphMVP consistently brings improvements on these 2 case studies, and provide more detailed discussions and interpretations in Appendix G.6.
[Equation]
[Figure]
T HEORETICAL I NSIGHTS
In this section, we provide the mathematical insights behind GraphMVP.
We will ﬁrst discuss both contrastive and generative SSL methods (Sections 3.2 and 3.3) are maximizing the mutual information (MI) and then how the 3D geometry, as privileged information, can help 2D representation learning.
5. M AXIMIZING M UTUAL I NFORMATION
Mutual information (MI) measures the non-linear dependence [7] between two random variables: the larger MI, the stronger dependence between the variables.
Therefore for GraphMVP, we can interpret it as maximizing MI between 2D and 3D views: to obtain a more robust 2D/3D representation by sharing more information with its 3D/2D counterparts.
This is also consistent with the sample complexity theory [3, 20, 26] where SSL as functional regularizer can reduce the uncertainty in representation learning.
We ﬁrst derive a lower bound for MI (see derivations in Appendix C), and the corresponding objective function L MI is
[Equation]
Contrastive Self-Supervised Learning.
InfoNCE was initialized proposed to maximize the MI directly [69].
Here in GraphMVP, EBM-NCE estimates the conditional likelihood in Equation (9) using EBM, and solves it with NCE [32].
As a result, EBM-NCE can also be seen as maximizing MI between 2D and 3D views.
The detailed derivations can be found in Appendix D.2.
Generative Self-Supervised Learning.
One alternative solution is to use a variational lower bound to approximate the conditional log-likelihood terms in Equation (9).
Then we can follow the same pipeline in Section 3.3, ending up with the surrogate objective, i.e. , VRR in Equation (6).
5. 3D G EOMETRY AS P RIVILEGED I NFORMATION
We show the theoretical insights from privileged information that motivate GraphMVP.
We start by considering a supervised learning setting where ( u i , l i ) is a feature-label pair and u ∗ i is the privileged information [88, 89].
The privileged information is deﬁned to be additional information about the input ( u i , l i ) in order to support the prediction.
For example, u i could be some CT images of a particular disease, l i could be the label of the disease and u ∗
i is the medical report from a doctor.
VC theory [87, 88] characterizes the learning speed of an algorithm from the capacity of the algorithm and the amount of training data.
Considering a binary classiﬁer f from a function class F with ﬁnite
VC-dimension VCD ( F ) .
With probability 1 − δ , the expected error is upper bounded by
[Equation]
where R n ( f ) denotes the training error and n is the number of training samples.
When the training data is separable, then R n ( f ) will diminish to zero and β is equal to 1 .
When the training data is non-separable, β is 12 .
Therefore, the rate of convergence for the separable case is of order 1 /n .
In contrast, the rate for the non-separable case is of order 1 / √ n .
We note that such a difference is huge, since the same order of bounds require up to 100 training samples versus 10,000 samples.
Privileged information makes the training data separable such that the learning can be more efﬁcient.
Connecting the results to GraphMVP, we notice that the 3D geometric information of molecules can be viewed as a form of privileged information, since 3D information can effectively make molecules more separable for some properties [54, 58, 79].
Besides, privileged information is only used in training, and it well matches our usage of 3D geometry for pre-training.
In fact, using 3D structures as privileged information has been already shown quite useful in protein classiﬁcation [89], which serves as a strong evidence to justify the effectiveness of 3D information in graph SSL pre-training.
C ONCLUSION AND F UTURE W ORK
In this work, we provide a very general framework, coined GraphMVP.
From the domain perspective,
GraphMVP (1) is the ﬁrst to incorporate 3D information for augmenting 2D graph representation learning and (2) is able to take advantages of 3D conformers by considering stochasticity in modeling.
From the aspect of technical novelties, GraphMVP brings following insights when introducing
SSL tasks: (1) Following Equation (9), GraphMVP proposes EBM-NCE and VRR, where they are modeling the conditional distributions using EBM and variational distribution respectively.
EBM-NCE is similar to JSE, while we start with a different direction for theoretical intuition, yet
EBM opens another promising venue in this area.
(3) VRR, as a generative SSL method, is able to alleviate the potential issues in molecule generation [25, 106].
(4) Ultimately, GraphMVP combines both contrastive SSL (InfoNCE or EBM-NCE) and generative SSL (VRR) for objective function.
Both empirical results (solid performance improvements on 14 downstream datasets) and theoretical analysis can strongly support the above domain and technical contributions.
We want to emphasize that GraphMVP is model-agnostic and has the potential to be expanded to many other low-data applications.
This motivates broad directions for future exploration, including but not limited to: (1) More powerful 2D and 3D molecule representation methods.
(2) Different application domain other than small molecules, e.g. , large molecules like proteins.
R EPRODUCIBILITY S TATEMENT
To ensure the reproducibility of the empirical results we include our code base in the supplementary material, which contains: instructions for installing conda virtual environment, data preprocessing scripts and training scripts.
Our code is available on GitHub for reproducibility.
Complete derivations of equations and clear explanations are given in Appendices C to E.
A CKNOWLEDGEMENT
This project is supported by the Natural Sciences and Engineering Research Council (NSERC)
Discovery Grant, the Canada CIFAR AI Chair Program, collaboration grants between Microsoft
Research and Mila, Samsung Electronics Co., Ltd., Amazon Faculty Research Award, Tencent AI
Lab Rhino-Bird Gift Fund and a NRC Collaborative R&D Project (AI4D-CORE-06).
This project was also partially funded by IVADO Fundamental Research Project grant PRF-2019-
Appendix Table of Contents A
[Table]
[Table] [Table]
B
Molecular Graph
Representation
B.
2D Molecular Graph Neural Network . . . . . . . . . . . . . . . . . . . . . .
B.
3D Molecular Graph Neural Network . . . . . . . . . . . . . . . . . . . . . .
[Table]
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[Table]
Information
[Table]
[Table] [Table]
A Lower
[Table]
MI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D Contrastive
[Table]
-Supervised Learning
[Table] [Table]
D.
[Table]
-NCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D.3 EBM
[Table]
NCE v.s. JSE and InfoNCE . . . .
E Generative
Self-Supervised Learning
E.
Variational
Molecule Reconstruction . . . . . . . . . . . . . . . . . . . . . . .
E.
Variational Representation Reconstruction
E. Variational Representation Reconstruction and Non-Contrastive SSL
F
[Table]
Overview
F.
Pre-Training Dataset
Overview . . . . . . . . . . . . . . . . . . . . . . . . . .
F. Downstream Dataset
Overview . . . . . . . . . . . . . . . . . . . . . . . . . .
G Experiments Details
G.1 Self-supervised Learning Baselines
G.2 Ablation Study: The Effect of Masking Ratio and Number of Conformers
G.3 Ablation Study: Effect of Each Loss Component
G.4 Broader Range of Downstream Tasks: Molecular Property Prediction Prediction
G.5 Broader Range of Downstream Tasks: Drug-Target Afﬁnity Prediction
G.6 Case Studies
A S ELF -S UPERVISED L EARNING ON M OLECULAR G RAPH
Self-supervised learning (SSL) methods have attracted massive attention recently, trending from vision [9, 10, 12, 37, 92], language [8, 17, 69] to graph [42, 54, 82, 90, 103, 104].
In general, there are two categories of SSL: contrastive and generative, where they differ on the design of the supervised signals.
Contrastive SSL realizes the supervised signals at the inter-data level, learning the representation by contrasting with other data points; while generative SSL focuses on reconstructing the original data at the intra-data level.
Both venues have been widely explored [57, 59, 97, 99].
A. C ONTRASTIVE GRAPH SSL
Contrastive graph SSL ﬁrst applies transformations to construct different views for each graph.
Each view incorporates different granularities of information, like node-, subgraph-, and graph-level.
It then solves two sub-tasks simultaneously: (1) aligning the representations of views from the same data; (2) contrasting the representations of views from different data, leading to a uniformly distributed latent space [93].
The key difference among existing methods is thus the design of view constructions.
InfoGraph [82, 90] contrasted the node (local) and graph (global) views.
ContextPred [42] and
G-Contextual [77] contrasted between node and context views.
GraphCL and JOAO [103, 104] made comprehensive comparisons among four graph-level transformations and further learned to select the most effective combinations.
A. G ENERATIVE GRAPH SSL
Generative graph SSL aims at reconstructing important structures for each graph.
By so doing, it consequently learns a representation capable of encoding key ingredients of the data.
EdgePred [34] and AttrMask [42] predicted the adjacency matrix and masked tokens (nodes and edges) respectively.
GPT
-GNN [43] reconstructed the whole graph in an auto-regressive approach.
A. P REDICTIVE GRAPH SSL
There are certain SSL methods speciﬁc to the molecular graph.
For example, one central task in drug discovery is to ﬁnd the important substructure or motif in molecules that can activate the target interactions.
G-Motif [77] adopts domain knowledge to heuristically extract motifs for each molecule, and the SSL task is to make prediction on the existence of each motif.
Different from contrastive and generative SSL, recent literature [97] takes this as predictive graph SSL, where the supervised signals are self-generated labels.
SSL for Molecular Graphs.
Recall that all previous methods in Table 6 merely focus on the 2D topology.
However, for science-centric tasks such as molecular property prediction, 3D geometry should be incorporated as it provides complementary and comprehensive information [58, 79].
To
[Table]
mitigate this gap, we propose GraphMVP to leverage the 3D geometry with unsupervised graph pre-training.
B M OLECULAR G RAPH R EPRESENTATION
There are two main methods for molecular graph representation learning.
The ﬁrst one is the molecular ﬁngerprints.
It is a hashed bit vector to describe the molecular graph.
There has been re-discoveries on ﬁngerprints-based methods [1, 44, 52, 55, 63, 75], while its has one main drawback:
Random forest and XGBoost are very strong learning models on ﬁngerprints, but they fail to take beneﬁts of the pre-training strategy.
Graph neural network (GNN) has become another mainstream modeling methods for molecular graph representation.
Existing methods can be generally split into two venues: 2D GNN and 3D
GNN, depending on what levels of information is considered.
2D GNN focuses on the topological structures of the graph, like the adjacency among nodes, while 3D GNN is able to model the “energy” of molecules by taking account the spatial positions of atoms.
First, we want to highlight that GraphMVP is model-agnostic, i.e. , it can be applied to any 2D and 3D GNN representation function, yet the speciﬁc 2D and 3D representations are not the main focus of this work.
Second, we acknowledge there are a lot of advanced 3D [23, 45, 58, 78] and 2D [13, 16, 29, 54, 100, 102] representation methods.
However, considering the graph SSL literature and graph representation liteature (illustrated below), we adopt GIN [100] and SchNet [79] in current
GraphMVP.
B. 2D M OLECULAR G RAPH N EURAL N ETWORK
The 2D representation is taking each molecule as a 2D graph, with atoms as nodes and bonds as edges, i.e. , g 2D =
( X, E ) .
X ∈ R n × d n is the atom attribute matrix, where n is the number of atoms (nodes) and d n is the atom attribute dimension.
E ∈ R m × d e is the bond attribute matrix, where m is the number of bonds (edges) and d m is the bond attribute dimension.
Notice that here E also includes the connectivity.
Then we will apply a transformation function T 2D on the topological graph.
Given a 2D graph g 2D , its 2D molecular representation is:
[Equation]
The core operation of 2D GNN is the message passing function [29], which updates the node representation based on adjacency information.
We have variants depending on the design of message and aggregation functions, and we pick GIN [100] in this work.
GIN There has been a long research line on 2D graph representation learning [13, 16, 29, 54, 100, 102].
Among these, graph isomorphism network (GIN) model [100] has been widely used as the backbone model in recent graph self-supervised learning work [42, 103, 104].
Thus, we as well adopt
GIN as the base model for 2D representation.
Recall each molecule is represented as a molecular graph, i.e. , g 2D =
( X, E ) , where X and E are feature matrices for atoms and bonds respectively.
Then the message passing function is deﬁned as:
[Equation]
where z 0 = X and MLP ( k +1) atom and MLP ( k +1) bond are the ( l + 1) -th
MLP layers on the atom- and bond-level respectively.
Repeating this for K times, and we can encode K -hop neighborhood information for each center atom in the molecular data, and we take the last layer for each node/atom representation.
The graph-level molecular representation is the mean of the node representation:
[Equation]
B. 3D M OLECULAR G RAPH N EURAL N ETWORK
Recently, the 3D geometric representation learning has brought breakthrough progress in molecule modeling [23, 45, 58, 78, 79].
3D molecular graph additionally includes spatial locations of the atoms, which needless to be static since, in real scenarios, atoms are in continual motion on a potential energy surface [4].
The 3D structures at the local minima on this surface are named molecular conformation or conformer .
As the molecular properties are a function of the conformer ensembles [36], this reveals another limitation of existing mainstream methods: to predict properties from a single 2D or 3D graph cannot account for this fact [4], while our proposed method can alleviate this issue to a certain extent.
For speciﬁc 3D molecular graph, it additionally includes spatial positions of the atoms.
We represent each conformer as g 3D =
( X, R ) , where R ∈ R n × 3 is the 3D-coordinate matrix, and the corresponding representation is:
[Equation]
where R is the 3D-coordinate matrix and T 3D is the 3D transformation.
Note that further information such as plane and torsion angles can be solved from the positions.
SchNet SchNet [79] is composed of the following key steps:
[Equation]
where K is the number of hidden layers, and
[Equation]
is the continuous-ﬁlter convolution layer, enabling the modeling of continuous positions of atoms.
We adopt SchNet for the following reasons.
(1) SchNet is a very strong geometric representation method after fair benchmarking.
(2) SchNet can be trained more efﬁciently, comparing to the other recent 3D models.
To support these two points, we make a comparison among the most recent 3D geometric models [23, 58, 78] on QM9 dataset.
QM9 [98] is a molecule dataset approximating 12 thermodynamic properties calculated by density functional theory (DFT) algorithm.
Notice:
UNiTE [74] is the state-of-the-art 3D GNN, but it requires a commercial software for feature extraction, thus we exclude it for now.
[Table]
Table 7 shows that, under a fair comparison (w.r.t.
data splitting, seed, cuda version, etc), SchNet can reach pretty comparable performance, yet the efﬁciency of SchNet is much better.
Combining these two points, we adopt SchNet in current version of GraphMVP.
B. S UMMARY
To sum up, in GraphMVP, the most important message we want to deliver is how to design a wellmotivated SSL algorithm to extract useful 3D geometry information to augment the 2D representation for downstream ﬁne-tuning.
GraphMVP is model-agnostic, and we may as well leave the more advanced 3D [23, 45, 58, 78] and 2D [13, 54, 102] GNN for future exploration.
In addition, molecular property prediction tasks have rich alternative representation methods, including SMILES [39, 95], and biological knowledge graph [56, 94].
There have been another SSL research line on them [21, 53, 107], yet they are beyond the scope of discussion in this paper.
C M AXIMIZE M UTUAL I NFORMATION
In what follows, we will use X and Y to denote the data space for 2 D graph and 3 D graph respectively.
Then the latent representations are denoted as h x and h y .
C. F ORMULATION
The standard formulation for mutual information (MI) is
[Equation]
Another well-explained MI inspired from wikipedia is given in Figure 3.
[Equation]
Mutual information (MI) between random variables measures the corresponding non-linear dependence.
As can be seen in the ﬁrst equation in Equation (17), the larger the divergence between the joint ( p ( x , y ) and the product of the marginals p ( x ) p ( y ) , the stronger the dependence between X and Y .
Thus, following this logic, maximizing MI between 2D and 3D views can force the 3D/2D representation to capture higher-level factors, e.g. , the occurrence of important substructure that is semantically vital for downstream tasks.
Or equivalently, maximizing MI can decrease the uncertainty in 2D representation given 3D geometric information.
C. A L OWER B OUND TO MI
To solve MI, we ﬁrst extract a lower bound:
[Equation]
Thus, we transform the MI maximization problem into minimizing the following objective:
[Equation]
In the following sections, we will describe two self-supervised learning methods for solving MI.
Notice that the methods are very general, and can be applied to various applications.
Here we apply it mainly for making 3D geometry useful for 2D representation learning on molecules.
D C ONTRASTIVE S ELF -S UPERVISED L EARNING
The essence of contrastive self-supervised learning is to align positive view pairs and contrast negative view pairs, such that the obtained representation space is well distributed [93].
We display the pipeline in Figure 4.
Along the research line in graph SSL [57, 59, 97, 99], InfoNCE and EBM-NCE are the two most-widely used, as discussed below.
[Figure]
D. I NFO NCE
InfoNCE [69] is ﬁrst proposed to approximate MI Equation (17):
[Equation]
where x j , y j are randomly sampled 2D and 3D views regarding to the anchored pair ( x , y ) .
f x ( x , y ) , f y ( y , x ) are scoring functions for the two corresponding views, whose formulation can be quite ﬂexible.
Here we use f x ( x , y ) =
f y ( y , x ) = exp( (cid:104)
h x , h y (cid:105) ) .
Derivation of InfoNCE
[Equation]
i
[Equation]
(cid:3)
[Equation] [Equation]
where we set f x ( x i , y i )
= log p ( x i , y i ) p
( x i ) p
( y i ) .
Notice that in 1 (cid:13) , we are using data x ∈ X as the anchor points.
If we use the y ∈ Y as the anchor points and follow the similar steps, we can obtain
[Equation]
Thus, by add both together, we can have the objective function as Equation (20).
D. EBM-NCE
We here provide an alternative approach to maximizing MI using energy-based model (EBM).
To our best knowledge, we are the ﬁrst to give the rigorous proof of using EBM to maximize the MI.
D.2. E NERGY -B ASED M ODEL (EBM)
Energy-based model (EBM) is a powerful tool for modeling the data distribution.
The classic formulation is:
[Equation]
) where the bottleneck is the intractable partition function A = (cid:82) x exp( − E ( x ))
d x .
Recently, there have been quite a lot progress along this direction [19, 32, 80, 81].
Noise Contrastive Estimation (NCE) [32] is one of the powerful tools here, as we will introduce later.
D.2. EBM FOR MI
Recall that our objective function is Equation (19): L MI =
[ H ( Y | X )
+ H
( X | Y )] .
Then we model the conditional likelihood with energy-based model (EBM).
This gives us
[Equation]
where f x ( x , y ) =
− E ( x | y ) and f y ( y , x ) = − E ( y | x ) are the negative energy functions, and A x | y and A y | x are the corresponding partition functions.
Under the EBM framework, if we solve Equation (24) with Noise Contrastive Estimation (NCE)
[32], the ﬁnal EBM-NCE objective is
[Equation]
Next we will give the detailed derivations
[Equation]
D.2. D ERIVATION OF CONDITIONAL EBM WITH NCE
WLOG, let’s consider the p θ ( x | y )
ﬁrst, and by EBM
it is as follows:
[Equation]
Then we solve this using NCE.
NCE handles the intractability issue by transforming it as a binary classiﬁcation task.
We take the partition function
A x | y as a parameter, and introduce a noise distribution p n .
Based on this, we introduce a mixture model: z = 0 if the conditional x | y is from p n ( x | y ) , and z = 1 if x | y is from p data ( x | y ) .
So the joint distribution is:
[Equation]
The posterior of p ( z = 0 | x , y ) is
[Equation]
where ν = p ( z =0) p ( z =1) .
Similarly, we can have the joint distribution under EBM framework as:
[Equation]
And the corresponding posterior is:
[Equation]
We indirectly match p θ ( x | y ) to p data ( x | y ) by ﬁtting p n,θ ( z | x , y ) to p n, data ( z | x , y ) by minimizing their KL-divergence:
[Equation]
This optimal distribution is an estimation to the actual distribution (or data distribution), i.e. , p θ ( x | y )
≈ p data ( x | y ) .
We can follow the similar steps for p θ ( y | x ) ≈ p data ( y | x ) .
Thus following Equation (27), the objective function is to maximize ν · E
[Equation]
The we will adopt three strategies to approximate Equation (28):
Self-normalization.
When the EBM is very expressive,
i
[Equation]
e. , using deep neural network for modeling, we can assume it is able to approximate the normalized density directly [64, 80].
In other words, we can set the partition function A = 1 .
This is a self-normalized EBM-NCE, with normalizing constant close to 1, i.e. , p ( x ) = exp( − E ( x )) =
exp( f ( x )) in Equation (23).
Exponential tilting term.
Exponential tilting term [2] is another useful trick.
It models the distribution as ˜ p
θ ( x ) =
q ( x ) exp( − E θ ( x )) , where q ( x ) is the reference distribution.
If we use the same reference distribution as the noise distribution, the tilted probability is ˜ p
θ ( x ) =
p n ( x ) exp( − E θ ( x )) in Equation (23).
Sampling.
For many cases, we only need to sample 1 negative points for each data,
i
[Equation]
e. , ν = 1 .
Following these three disciplines
[Equation]
the objective function to optimize p θ ( x | y ) becomes
[Equation] [Equation]
Thus
[Equation]
the ﬁnal EBM-NCE contrastive SSL objective is
[Equation]
D. EBM-NCE V . S . JSE AND I NFO NCE
We acknowledge that there are many other contrastive objectives [73] that can be used to maximize MI.
However, in the research line of graph SSL, as summarized in several recent survey papers [59, 97, 99], the two most used ones are InfoNCE and Jensen-Shannon Estimator (JSE) [40, 68].
We conclude that JSE is very similar to EBM-NCE, while the underlying perspectives are totally different, as explained below.
Derivation and Intuition.
Derivation process and underlying intuition are different.
JSE [68] starts from f-divergence, then with variational estimation and Fenchel duality on function f .
Our proposed EBM-NCE is more straightforward: it models the conditional distribution in the MI lower bound Equation (19) with EBM, and solves it using NCE.
Flexibility.
Modeling the conditional distribution with EBM provides a broader family of algorithms.
NCE is just one solution to it, and recent progress on score matching [80, 81] and contrastive divergence [19], though no longer contrastive SSL, adds on more promising directions.
Thus, EBM can provide a potential uniﬁed framework for structuring our understanding of self-supervised learning.
Noise distribution.
Starting from [40], all the following works on graph SSL [59, 82, 97, 99] have been adopting the empirical distribution for noise distribution.
However, this is not the case in EBM-NCE.
Classic EBM-NCE uses ﬁxed distribution, while more recent work [2] extends it with adaptively learnable noise distribution.
With this discipline, more advanced sampling strategies (w.r.t.
the noise distribution) can be proposed, e
g. , adversarial negative sampling in [41].
In the above, we conclude three key differences between EBM-NCE and JSE, plus the solid and straightforward derivations on EBM-NCE.
We believe this can provide a insightful perspective of
SSL to the community.
According to the empirical results Section 4.4, we observe that EBM-NCE is better than InfoNCE.
This can be explained using the claim from [47], where the main technical contribution is to construct many positives and many negatives per anchor point.
The binary cross-entropy in EBM-NCE is able to realize this to some extent: make all the positive pairs positive and all the negative pairs negative, where the softmax-based cross-entropy fails to capture this, as in InfoNCE.
To conclude, we are introduce using EBM in modeling MI, which opens many potential venues.
As for contrastive SSL, EBM-NCE provides a better perspective than JSE, and is better than InfoNCE on graph-level self-supervised learning.
E G ENERATIVE S ELF -S UPERVISED L EARNING
Generative SSL is another classic track for unsupervised pre-training [48, 49, 51], though the main focus is on distribution learning.
In GraphMVP, we start with VAE for the following reasons:
One of the biggest attributes of our problem is that the mapping between two views are stochastic: multiple 3D conformers can correspond to the same 2D topology.
Thus, we expect a stochastic model [67] like VAE, instead of the deterministic ones.
For pre-training and ﬁne-tuning, we need to learn an explicit and powerful representation function that can be used for downstream tasks.
The decoder for structured data like graph are often complicated, e.g.. , the auto-regressive generation.
This makes them suboptimal.
To cope with these challenges, in GraphMVP, we start with VAE-like generation model, and later propose a light-weighted and smart surrogate loss as objective function.
Notice that for notation simplicity, for this section, we use h y and h x to delegate the 2D and 3D GNN respectively.
E. V ARIATIONAL M OLECULE R ECONSTRUCTION
As shown in Equation (19), our main motivation is to model the conditional likelihood:
[Equation]
By introducing a reparameterized variable z x = µ x + σ x (cid:12) (cid:15) , where µ x and σ x are two ﬂexible functions on h x , (cid:15) ∼ N (0 , I ) and (cid:12) is the element-wise production, we have a lower bound on the conditional likelihood:
[Equation]
Similarly, we have
[Equation]
where z y = µ y + σ y (cid:12) (cid:15) .
Here µ y and σ y are ﬂexible functions on h y , and (cid:15) ∼ N (0 , I ) .
For implementation, we take multi-layer perceptrons (MLPs) for µ x , µ y , σ x , σ y .
Both the above objectives are composed of a conditional log-likelihood and a KL-divergence.
The conditional log-likelihood has also been recognized as the reconstruction term : it is essentially to reconstruct the 3D conformers ( y ) from the sampled 2D molecular graph representation ( z x ).
However, performing the graph reconstruction on the data space is not easy: since molecules are discrete, modeling and measuring are not trivial.
E. V ARIATIONAL R EPRESENTATION R ECONSTRUCTION
To cope with data reconstruction issue, we propose a novel generative loss termed variation representation reconstruction (VRR).
The pipeline is in Figure 5.
[Figure]
Our proposed solution is very straightforward.
Recall that MI is invariant to continuous bijective function [7].
So suppose we have a representation function
h y satisfying this condition, and this can guide us a surrogate loss by transferring the reconstruction from data space to the continuous representation space:
[Equation]
where g x is the decoder and C is a constant, and this introduces to using the mean-squared error (MSE) for reconstruction on the representation space .
Then for the reconstruction, current formula has two steps: i) the latent code z x is ﬁrst mapped to molecule space, and ii) it is mapped to the representation space.
We can approximate these two mappings with one projection step, by directly projecting the latent code z x to the 3D representation space, i.e. , q x ( z x )
≈
h
y
( g x ( z x )) .
This gives us a variation representation reconstruction (VRR) SSL objective as below:
[Equation]
β -VAE We consider introducing a β variable [38] to control the disentanglement of the latent representation.
To be more speciﬁc, we would have
[Equation]
Stop-gradient For the optimization on variational representation reconstruction, related work have found that adding the stop-gradient operator (SG) as a regularizer can make the training more stable without collapse both empirically [12, 31] and theoretically [84].
Here, we may as well utilize this
SG operation in the objective function:
[Equation]
Objective function for VRR
Thus, combining both two regularizers mentioned above, the ﬁnal objective function for VRR is:
[Equation]
Note that MI is invariant to continuous bijective function [7], thus this surrogate loss would be exact if the encoding function h y and h x satisfy this condition.
However, we ﬁnd GNN (both GIN and
SchNet) can, though do not meet the condition, provide quite robust performance empirically, which justify the effectiveness of VRR.
E. V ARIATIONAL R EPRESENTATION R ECONSTRUCTION AND N ON -C ONTRASTIVE SSL
By introducing VRR, we provide another perspective to understand the generative SSL, including the recently-proposed non-contrastive SSL [12, 31].
We provide a uniﬁed structure on the intra-data generative SSL:
• Reconstruction to the data space, like Equations (5), (31) and (32).
• Reconstruction to the representation space, i.e. , VRR in Equation (35).
– If we remove the stochasticity , then it is simply the representation reconstruction (RR), as we tested in the ablation study Section 4.4.
– If we remove the stochasticity and assume two views are sharing the same represen
- tation function , like CNN for multi-view learning on images, then it is reduced to the
BYOL [31] and SimSiam [12].
In other words, these recently-proposed non-contrastive
SSL methods are indeed special cases of VRR.
F D ATASET O VERVIEW F. P RE -T RAINING D ATASET O VERVIEW
In this section, we provide the basic statistics of the pre-training dataset (GEOM).
In Figure 6, we plot the histogram (logarithm scale on the y-axis) and cumulative distribution on the number of conformers of each molecule.
As shown by the histogram and curves, there are certain number of molecules having over 1000 possible 3d conformer structures, while over 80% of molecules have less than 100 conformers.
[Figure]
In Figure 6, we plot the histogram of the summation of top (descending sorted by weights) {1,5,10,20} conformer weights.
The physical meaning of the weight is the portion of each conformer occurred in nature.
We observe that the top 5 or 10 conformers are sufﬁcient as they have dominated nearly all the natural observations.
Such long-tailed distribution is also in alignment with our ﬁndings in the ablation studies.
We ﬁnd that utilizing top ﬁve conformers in the GraphMVP has reached an idealised spot between effectiveness and efﬁciency.
[Figure]
F. D OWNSTREAM D ATASET O VERVIEW
In this section, we review the four main categories of datasets used for downstream tasks.
Molecular Property: Pharmacology The Blood-Brain Barrier Penetration (BBBP) [61] dataset measures whether a molecule will penetrate the central nervous system.
All three datasets, Tox21 [85],
ToxCast [98], and ClinTox [28] are related to the toxicity of molecular compounds.
The Side Effect
Resource (SIDER) [50] dataset stores the adverse drug reactions on a marketed drug database.
Molecular Property: Physical Chemistry Dataset proposed in [15] measures aqueous solubility of the molecular compounds.
Lipophilicity (Lipo) dataset is a subset of ChEMBL [27] measuring the molecule octanol/water distribution coefﬁcient.
CEP dataset is a subset of the Havard Clean Energy
Project (CEP)
[33], which estimates the organic photovoltaic efﬁciency.
Molecular Property: Biophysics Maximum Unbiased Validation (MUV) [76] is another subdatabase from PCBA, and is obtained by applying a reﬁned nearest neighbor analysis.
HIV is from the Drug Therapeutics Program (DTP)
AIDS Antiviral Screen [105], and it aims at predicting inhibit
HIV replication.
BACE measures the binding results for a set of inhibitors of β -secretase 1 (BACE-1), and is gathered in MoleculeNet [98].
Malaria [24] measures the drug efﬁcacy against the parasite that causes malaria.
Drug-Target Afﬁnity Davis [14] measures the binding afﬁnities between kinase inhibitors and kinases, scored by the K d value (kinase dissociation constant).
KIBA [83] contains binding afﬁnities for kinase inhibitors from different sources, including K i , K d and IC 50 .
KIBA scores [70] are constructured to optimize the consistency among these values
[Table] [Table]
G E XPERIMENTS D ETAILS G. S ELF - SUPERVISED L EARNING B ASELINES
For the SSL baselines in main results (Table 1), generally we can match with the original paper, even though most of them are using larger pre-training datasets, like ZINC-2m. Yet, we would like to add some speciﬁcations.
G-{Contextual, Motif}[77] proposes a new GNN model for backbone model, and does pre-training on a larger dataset.
Both settings are different from us.
• JOAO [103] has two versions in the original paper.
In this paper, we run both versions and report the optimal one.
• Almost all the graph SSL baselines are reporting the test performance with optimal validation error, while GraphLoG [101] reports 73.2 in the paper with the last-epoch performance.
This can be over-optimized in terms of overﬁtting, and here we rerun it with the same downstream evaluation strategy as a fair comparison.
[Table] [Table]
G. A BLATION S TUDY : E FFECT OF E ACH L OSS C OMPONENT
[Table]
G. B ROADER R ANGE OF D OWNSTREAM T ASKS : M OLECULAR P ROPERTY P REDICTION P REDICTION
[Table]
G. B ROADER R ANGE OF D OWNSTREAM T ASKS : D RUG -T ARGET A FFINITY P
REDICTION
[Table]
G. C ASE S TUDIES
Shape Analysis (3D Diameter Prediction).
Diameter is an important measure in molecule [60, 62], and genome [22] modelling.
Usually, the longer the 2D diameter (longest adjacency path) is, the larger the 3D diameter (largest atomic pairwise l2 distance).
However, this is not always true.
Therefore, we are particularly interested in using the 2D graph to predict the 3D diameter when the 2D and 3D molecular landscapes are with large differences (as in Figure 2 and Figure 8).
We formulate it as a n -class recognition problem, where n is the number of class after removing the consecutive intervals.
We provide numerical results in Table 14 and more visualisation examples in Figure
[Table]
[Figure]
Long-Range Donor-Acceptor Detection.
Donor-Acceptor structures such as hydrogen bonds have key impacts on the molecular geometrical structures (collinear and coplanarity), and physical properties (melting point, water afﬁnity, viscosity etc.).
Usually, atom pairs such as “O...H” that are closed in the Euclidean space are considered as the donor-acceptor structures [46].
On this basis, we are particularly interested in using the 2D graph to recognize (i.e., binary classiﬁcation) donor-acceptor
[Table]
structures which have larger ranges in the 2D adjacency (as shown in Figure 2).
Similarly, we select the molecules whose donor-acceptor are close in 3D Euclidean distance but far in the 2D adjacency.
We provide numerical results in Table 15.
Both tables show that MVP is the MVP :)
[Table]
Chirality.
We have also explored other tasks such as predicting the molecular chirality, it is a challenging setting if only 2D molecular graphs are provided [72].
We found that GraphMVP brings negligible improvements due to the model capacity of SchNet.
We save this in the ongoing work
[Table]