C HEMISTRY - INFORMED M ACROMOLECULE G RAPH R EPRESENTATION FOR S IMILARITY C OMPUTATION AND S UPERVISED L EARNING
A BSTRACT
Macromolecules are large, complex molecules composed of covalently bonded monomer units, existing in different stereochemical conﬁgurations and topologies.
As a result of such chemical diversity, representing, comparing, and learning over macromolecules emerge as critical challenges.
To address this, we developed a macromolecule graph representation, with monomers and bonds as nodes and edges, respectively.
We captured the inherent chemistry of the macromolecule by using molecular ﬁngerprints for node and edge attributes.
For the ﬁrst time, we demonstrated computation of chemical similarity between 2 macromolecules of varying chemistry and topology, using exact graph edit distances and graph kernels.
We also trained graph neural networks for a variety of glycan classiﬁcation tasks, achieving state-of-the-art results.
Our work has two-fold implications – it provides a general framework for representation, comparison, and learning of macromolecules; and enables quantitative chemistry-informed decision-making and iterative design in the macromolecular chemical space.
I NTRODUCTION
Macromolecules are ubiquitous and indispensable, from constituting what we are made up of to being present in almost everything we use.
As biological macromolecules, they form the basis of life, serving as drivers of survival and growth functions.
As synthetic macromolecules, humans have engineered the composition and topology to design structural components, sensors, shape-memory materials, drugs, encode messages, and much more (Lutz et al., 2016; Romio et al., 2020; Boydston et al., 2020; Thompson & Korley, 2020).
An individual macromolecule is a result of its monomer composition, connecting bonds, and their spatial arrangement.
Monomer and bond are functions of atomic composition, stereochemistry, and arrangement, while spatial arrangement dictates the topology.
Experimentalists and theoreticians have explored a vast chemical space by varying monomers, bonds, and topologies – linear and nonlinear such as branched, star, and bottle-brush (Figure A.1) (Hiemenz & Lodge, 2007; Johnson et al., 2011; Alvaradejo et al., 2019).
In this work, we propose a graph representation for macromolecules.
We use graph edit distances (GEDs) with Tanimoto chemical similarity matrices and propagation graph kernels to compute graph similarity.
Further, we train a suite of graph neural network models on different tasks, achieving state-of-the-art results on a data set of glycans.
R ELATED W ORK Representation.
Macromolecules can be represented in line notation similar to simpliﬁed molecular-input line-entry system (SMILES) used for small molecules (Lin et al., 2019).
Linear biological macromolecules, such as proteins and DNA/RNA, are an exception, and represented as sequences of one/three-letter monomer codes.
In a recent attempt, glycans (non-linear macromolecules) were represented as sequences, where groups of monosaccharides were clubbed into ’glycowords’ and placed in hierarchical brackets (Bojar et al., 2021).
Hierarchical ﬁngerprinting is another approach, which follows a hierarchy of atomic, physicochemical, and morphological descriptors (Kim et al., 2018).
However, these representations are limited by their coverage of chemical space, ability to support all topologies, and require signiﬁcant customization for different monomers.
Similarity computation.
In recent times, there have been signiﬁcant advances in similarity computation using GED and graph kernels (Borgwardt et al., 2020; Blumenthal & Gamper, 2020).
Development of software packages, such as graphkernels and GraKeL, has provided fast implementations of graph kernels (Sugiyama et al., 2018;
Siglidis et al., 2020).
For linear biological macromolecules, such as proteins, DNA/RNA and linear glycans, there are several works for computation of sequence similarities.(Altschul et al., 1990; Bojar et al., 2021)
Usually, sequence alignment is done using Smith-Waterman or Needleman-Wunsch algorithm, and scored with substitution matrices, such as BLOSUM62 (Smith & Waterman, 1981; Needleman & Wunsch, 1970;
Eddy, 2004).
The substitution matrices are based on evolutionary statistics thereby biasing the scoring towards the statistical frequency of a particular monomer’s occurrence in the course of evolution, rather than chemical similarity.
Apart from sequence alignment in linear macromolecules, edit distances, linear kernels and deep learning methods have been proposed to compute similarity (Jaakkola et al., 2000; Riesen & Bunke, 2009; Bileschi et al., 2019).
In the case of non-linear macromolecules, alignment of glycans has been explored using q-grams, tree matching methods and tree kernels (Li et al., 2010; Hosoda et al., 2017; Coff et al., 2020).
Unfortunately, the aforementioned methods are limited to biological macromolecules, and do not extend to the general macromolecular chemical space.
Moreover, existing tools for biological macromolecules do not allow incorporation of unnatural monomers, and cannot handle non-linear topologies (except for glycan-speciﬁc tools).
Machine learning.
The ﬁeld of graph neural networks (GNN) has seen substantial developments in both model architecture and attribution.
Different model architectures, such as graph convolutional network (GCN), graph attention network (GAT), message passing neural network (MPNN), SchNet, and Attentive FP, have demonstrated state-of-the-art results across various domains (Zhou et al., 2018;
Sch ¨ utt et al., 2017; Kearnes et al., 2016; Xiong et al., 2020).
In a recent work, graph attribution has been studied quantitatively across four metrics – accuracy, stability, faithfulness and consistency - for a wide variety of tasks and model architectures (Sanchez-lengeling et al., 2020).
For macromolecular property prediction, Polymer Genome and similar works using hierarchical ﬁngerprints predict glass transition temperature, dielectric point and other properties (Kim et al., 2018).
There have been attempts to extrapolate macromolecular property by training over monomer features (St John et al., 2019; Qiao et al., 2020).
GCN over macromolecule graphs with one-hot attributes has been shown to outperform ﬁngerprint-based models (Zeng et al., 2018).
While ﬁngerprint-based models are limited by representation capacity, the GCN model, not having been trained on chemical information, cannot extrapolate for unknown monomers.
M ACROMOLECULE GRAPH REPRESENTATION
We used a generalized text ﬁle format to convert a macromolecule structure into machine-readable format (Figure 1A, Appendix C).
The text ﬁle has 3 sections – SMILES, MONOMERS and BONDS.
Under SMILES, monomer and bond codes followed by the stereochemical SMILES are noted (Figure A.5).
MONOMERS enumerate an index of all nodes numbered from 1 to n, where n is the total number of monomers, followed by the monomer code.
BONDS enumerate an index of connections between monomer indices, followed by bond code.
The macromolecule is represented as a graph, with monomers as nodes and bonds as edges (Figure A.6).
Starting from text ﬁles, we parsed the macromolecules into NetworkX graphs with node and edge attributes (Hagberg et al., 2008).
The monomer and bond molecules were featurized using stereochemical extended connectivity ﬁngerprints (Appendix D) (Rogers & Hahn, [-2010).
-]2010).
The ﬁngerprint is a unique barcode that captures inherent chemistry of the monomer/bond molecule, by topological exploration of the molecular graph (different from the macromolecule graph).
This representation enables the depiction of macromolecules in their native state with explicit featurization
SMILES
Monomers
O HOHO
OH OH
OH
S i m il a r i t y
Macromolecules
Text File System
Macromolecular Graphs
Monomer Fingerprint
M a c r o m o l e c u l e s
Macromolecules
Similarity Matrix
UMAP C
U M AP
C
Dim.
Red. /
Clustering
Graph Neural Network
Classification
ImmunogenicityTaxonomy Labels
Regression Biological Activity
A
B
C of the stereochemistry and topology, and provides a single framework to represent both natural and synthetic, linear and non-linear macromolecules.
S IMILARITY COMPUTATION USING GRAPH EDIT DISTANCE AND GRAPH KERNEL
Leveraging this unique representation, we used exact GED scored with Tanimoto similarity substitution matrices, and graph kernel, to compute similarity between 2 or more macromolecule graphs (Figure 1B).
GED computes the similarity between two graphs by assigning scores for node and edge substitution, similar to local sequence alignment for protein and DNA/RNA sequences (Abu-Aisheh et al., 2015; Altschul et al., 1990).
Instead of evolutionary statistics-based substitution matrices, we use Tanimoto similarity matrices that compute the similarity between molecular ﬁngerprints (Figure 2A, B).
Tanimoto similarity is also applicable for unnatural monomers and provides an accurate measure of chemical similarity, without any evolutionary bias.
Since, computing GEDs is costly, we use propagation attribute kernel to obtain similarity matrices for large data sets (Neumann et al., 2016; Siglidis et al., 2020).
We computed similarity matrices and analyzed similarity vectors for a data set of glycans.
Propagation attribute kernel, implemented in GraKeL, was used to compute similarity (Figure 2C)
(Siglidis et al., 2020) (Appendix E).
This kernel makes for an excellent choice for macromolecule graphs as they capture local node information and iteratively propagate this information along the edges.
In this manner, the kernel captures the local monomer chemistry and the global topology of the macromolecule.
2-components uniform manifold approximation and projection (UMAP) was used for dimensionality reduction of the similarity vectors, where a similarity vector is the vector listing the similarity of a single macromolecule with the entire library (McInnes et al., 2018).
We optimized hyperparameters for UMAP and benchmarked against dimensionality reduction using t-stochastic neighbor embeddings (Appendix F) (Van Der Maaten & Hinton, 2008).
Dimensionality reduction is inﬂuenced more by taxonomic classiﬁcation, such as domain, than immunogenicity.
In the plot, colored by domain (Figure 2D), we observed that the arrangement of domains is similar to the evolutionary process, starting from bacteria at the center, then eukarya, followed by viruses at the fringes (Figure A.11).
As can be seen, immunogenicity is a result of the glycan belonging to a speciﬁc domain, such as bacteria being immunogenic (Figures 2E, F).
● Immunogenic
[Figure]
-immunogenic ● Eukarya ● Virus ● Bacteria ● Immunogenic ● Non-immunogenic
A
B
C
D
E
F
Graph Edit Distance
Similarity: 92.
Propagation AttributeKernel ▲ Linear Glycan
Branched Glycan▼
G RAPH NEURAL NETWORKS FOR CLASSIFICATION OF GLYCANS
We trained 5 GNN model architectures over ﬁngerprint and one-hot node and edge attributes to classify glycans for immunogenicity and 8 taxonomic levels (Appendix G).
For each task, we evaluated classiﬁcation metrics obtained by averaging over models retrained for at least top 5 hyperparameter sets with 5 random initialization seeds (Table 1; Tables A.1, A.2).
Our models obtained state-of-theart results and outperformed metrics reported in the literature (Table A.3) (Bojar et al., 2021).
D ISCUSSION AND F UTURE W ORK
Macromolecule graph representation combined with molecular ﬁngerprints, with graph similarity and GNNs provides for a framework to represent, compute similarity and machine learn macromolecules.
This work enables a chemistry-informed approach for the computational study of macromolecules.
In the near future, we aim to demonstrate the applicability of our framework on a wide range of macromolecule datasets, including proteins and DNA/RNA.
[Table]
A PPENDIX A M ACROMOLECULAR T OPOLOGIES
[Figure]
B G LYCANS DATASET PROCESSING B. D ATASET DOWNLOAD
A dataset of 19299 glycans was accessed and downloaded from GlycoBase (accessed on November 2, 2020)
(Bojar et al., 2021).
The ﬁle contained GlycoBase ID, sequence, link (N, O, free, or none), species, and immunogenicity information for each glycan.
For each glycan sequence string the brackets denote branches, with the point of attachment/bonding of the branch as the monomer immediately after the brackets.
The ﬁrst element within the bracket is the monomer most distant from the point of attachment, and the last element within the bracket is the abbreviation of the bond that connects the branch to the original main chain.
Nested brackets indicate additional sub-branches off of branches, and multiple sets of brackets next to each other indicate several branches off of the same monomer.
B. D ATASET PRE - PROCESSING
7 modiﬁcations and 152 deletions of glycan sequences were made before the process for situations such as an unequal number of opening and closing brackets and dangling branches without speciﬁed connectivity.
Additional glycan sequences were removed due to missing SMILES sequences for a number of monomers.
The original GlycoBase.csv ﬁle was curated to reﬂect the modiﬁcation and deletion changes, resulting in a total of 19147 glycans.
Using the curated database, we visualized the distribution of species of origin, link, and immunogenicity of the glycans (Figures A.2, A.3, A.4).
E s c h c li
H o m s a i e n s
B o s t a u u s
S u s s c f a
M u s m u s u l u s
R a tt u s n o r v e g i c u s
S a cc h a r o m y c
e
s c
e
r e
v
i s i a e
G a ll u s g a ll u s
S h
i g
e ll a d y s e n t
e
r
i a e
P s e u d o m o n a s s p
S c h
z o a cc h o m y c
e s o m b e
H e li c o b a c e l o
S h
i g
e ll a f e x n e r
H a e m o p il u s i n f l u e n z a
S a l m o n e ll a
s p
N i c
o t
i a n a t a b a c u m
P s e u d o m o n a s a e r u g i n o s a
H a f n i a a l v e i
A r a b i d
o p s i s t h a li a n a
S t r e p t
o c o cc u s p
n e u m o n i a e
A c e r p s e u d o p l a t a nu s
K l e b s i e ll a p n e u m o n i a e
P r o t e u s p e nn e r i
B r a d y r h i
z o b u
m j a p o n c u m a n h o m o n a s c a m p e s t s
L e i s h m a n i a m a j o r
S a l m o n e ll a e n t e r
i c a
B u r k h o l d e r i a c
e p a c
i a
T r i t
i c u m a e s t
i v u m
S i n o r h i
z o b i u m s p
N e i ss e
r
i a m e n i n g i t i d i s
S h
i g
e ll a b o y d ii
Y e r s i n i a p e s t
i s
S i n o r h i
z o b i u m f r e d ii
S t e n o t r o p h
o m o n a s m a l t
o p h ili
a
L e i s h m a n i a m e x i c a n a
P r o v i d e n c i a a l c a li f a c i e n s P s e u d o m o n a s f l u o r e s c e n s
L a c t o c o cc u s l a c t i s
N e i ss e
r
i a g o n o rr h
o e a e
P h a s e o l u s v u l g a r
i s
T a m a r i n d u s i n d i c a
L e u c o n o s t o c m
e s e n t
e
r
o i
d e s
H u m a n I mm un
o D e f i c i e n c y V
i r u s
A c i n e t o b a c t e r b a u m a nn ii
C r y p t
o c o cc u s n e
o f
o r m a n s
V i b r i
o
c
h
o
l e r a e
M u r i n e L e u k e
m i a V
i r u s
A g r o b a c t e r i u m t u m e f a c
i e n s
P a s t e u r e ll a m u l t
o c i d a
Species
[Figure] [Figure]
B. SMILES COMPILATION
The chemical composition and formula of the 959 monomers (also known as glycoletters in GlycoBase) and 53 bonds were expressed as isomeric simpliﬁed molecular-input line-entry system (SMILES) sequences.
In the dataset retrieved from GlycoBase, all position-speciﬁc information about monomer modiﬁcations was removed.
The supplementary information of SweetTalk contains all the raw glycan sequences before position-speciﬁc modiﬁcation information was removed (Bojar et al., 2021).
While insufﬁcient information is provided to directly match the raw sequences with the corresponding edited sequences, the raw sequences can be used to look for trends and most common modiﬁcation positions for each monomer.
A dictionary was created to describe the number of times each monomer appears in all the raw sequences.
A couple of terms should be deﬁned for consistency:
• “Monosaccharides” refer to the individual glycoletters without any modiﬁcations, such as D-glucose (D-Glu) and galactose (D-Gal).
The term “monosaccharide” is simplistic because it also covers alcohols, acids, and other classes of molecules, but the term will be employed for the sake of consistency and clarity.
• “Modiﬁcations” refer to substitutions or additions to the original monosaccharide sequence such as a nitrogen-linked acetyl group (NAc) and oxygen-linked methyl group (OMe).
In this dataset, monosaccharides can have between 0-4 modiﬁcations.
• “Monomers” refer to the combination of the monosaccharide and modiﬁcation(s)
[Figure]
Using the raw monomers dictionary, the positions of the modiﬁcations for each monomer in the corresponding SMILES were set using a list of consistent rules outlined below.
The rules are listed in order of priority.
For each monomer/glycoletter, if at least one monomer with the same monosaccharide and set of modiﬁcations exists in the raw monomers dictionary, assume the set of positions with the highest frequency.
If no monomer exists in the raw monomers dictionary with the same monosaccharide and set of modiﬁcations, proceed to the following steps.
If the monomer has a hydroxyl group at the 2 position, is not a furanose or ketose, and contains a nitrogen-linked modiﬁcation (N, NBut, NMe, etc.), assign the ﬁrst occurrence of a nitrogen-linked modiﬁcation to the 2 position.
If the monomer is a hexose or deoxy-hexose and contains a pyruvate acetal (OPyr), assume that the acetal connects the 4 and 6 positions.
If the monomer contains an O-linked phosphate (OP) or sulfate (OS) modiﬁcation, search the raw monomers dictionary for instances of the monosaccharide with only the OP/OS modiﬁcation and assume the most frequent position.
If the monomer contains a variant of the O-linked phosphate modiﬁcation (OPEtn, OPPEtn, etc.), assign the OP-variant modiﬁcation the same position as the most common position for the OP modiﬁcation on the monosaccharide.
If the monomer contains two modiﬁcations, search the raw glycans dictionary for instances of the monosaccharide with only each modiﬁcation separately but not at the same time.
Assign each modiﬁcation the position of highest frequency.
If either monosaccharide and modiﬁcation combination does not exist in the raw monomers dictionary and the monomer is a hexose, assign positions in the following order: 2, 4, 3, 6.
If the position is already occupied from previous steps or does not exist in a deoxy hexose, skip to the position with next highest priority.
If the monomer is a hexose or deoxy-hexose and contains more than two modiﬁcations, assign positions in the following order: 2, 3, 4, 6.
If the position is already occupied from previous steps or does not exist in a deoxy hexose, skip to the position with next highest priority. 8.
Assume all amino acids are connected to the monosaccharide via the oxygen on the carboxyl.
If the connectivity is not speciﬁed for a group following the amino acid (CysAc, AlaFo), assume that the group following the amino acid is connected to the amino acid via the amine group.
For neuraminic acid (Neu), ketodeoxynononic acid (Kdn), pseudaminic acid (Pse), legionaminic acid (Leg), and other similar ketose-based acids, assign modiﬁcation positions in the following order: 1, 4. 10.
For fructofuranose and similar furanoses for which the 1-position is not part of the ring, assign modiﬁcations in the following order: 1, 3, 4.
For alcohols, follow the same rules that apply to the oxidized form of the alcohol.
For example, for glucitol follow the same rules that apply to glucose.
Assume all rare monosaccharides (denoted as Sug) are hexoses with no speciﬁed stereochemistry.
Because the 959 monomers contained some repeat SMILES sequences with different monomer names, 13 redundant names were deleted so that each distinct monomer SMILES only appears once in the SMILES compilation.
The SMILES for the 53 bond types differ in stereochemistry alone (alpha, beta, or unspeciﬁed) but all have the same chemical composition of a glycosidic bond.
Each bond is expressed as a variation of the SMILES sequence CC(OC)CC, which consists of the glycosidic bond C-O-C with one of the C atoms also connected to both a methyl and ethyl group.
The chiral C with the four different attached groups is used to specify the alpha or beta stereochemistry displayed in the bond name.
The stereochemistry at the tetrahedral C is consistently S for all alpha bonds, R for all beta bonds, and not speciﬁed for all unspeciﬁed bonds.
The 53 bond names were condensed into 3 distinct bond types differing in stereochemistry alone.
C T EXT FILE SYSTEM C. F ORMAT
The text ﬁles to convert each macromolecule structure into machine-readable format consist of three sections: the SMILES sequences for each unique monomer or bond, the positions of each monomer, and the two monomer positions connected by each bond.
Each section starts with a header to indicate the start of a new part.
The ﬁrst section contains the abbreviation of each unique monomer or bond in the glycan followed by the corresponding SMILES sequence, with each entry on a separate line.
The monomers section consists of the monomer position followed by the monomer abbreviation.
The bonds section contains the two connectivity positions in the glycan for the bond separated by a space, followed by the bond abbreviation (Figure A.5).
SMILES of unique monomers and bonds
[Table]
and abbreviations
[Table]
C.
T EXT F ILE P ARSER
A text ﬁle parser converts the macromolecule information stored in the .txt ﬁle to a NetworkX graph with monomers expressed as nodes and bonds expressed as edges.
The parser goes through the .txt ﬁle line by line, stores the monomer information in a dictionary with keys as integer positions and values as monomer abbreviations, and stores the bond information in a dictionary with keys as tuples containing bond connectivities and values as bond abbreviations.
Afterwards, the reader uses
NetworkX to add each key in the monomer dictionary as a node and each key in the bond dictionary as an edge, storing the abbreviations as attributes for the corresponding node or edge.
The resulting
NetworkX graphs include both linear and highly branched architectures (Figure A.6).
[Figure]
D N ODE AND EDGE ATTRIBUTES D. F INGERPRINTS – GENERATION AND OPTIMIZATION OF HYPERPARAMETERS
We used RDKit to generate stereochemical extended connectivity ﬁngerprints (Landrum, 2006;
Rogers & Hahn, 2010).
Radius and number of bits were optimized by calculating mean and standard deviation, and visualizing the distribution of Tanimoto similarity of all monomers in the glycans dataset (Figure A.7A-C).
We aimed to obtain ﬁngerprints with lower number of bits and optimal radius that could represent the monomer aptly in both similarity computation and graph neural network models.
For 64 bits, we observed that the mean similarity was as high as 0.4 and standard deviation for similarity went up after radius 3 indicating higher hash collision and lesser differentiability.
For 128 bits, the mean and standard deviation plateaued around 0.3 and 0.08, respectively.
Further, the similarity distribution was qualitatively spread over a larger range, as compared to ﬁngerprints with larger number of bits.
For ﬁngerprint bits longer than 128, we observed lower mean and standard deviation, and decreasing spread in the similarity distribution.
The decreasing trend indicates that the ﬁngerprints with bits higher than 128 are equally dissimilar, thus, if used, will lead to glycans with equally high dissimilar scores.
Hence, we chose ﬁngerprints with 128 bits and radius 3 to generate node attributes for glycans.
For edge attributes, we had 3 types of glycosidic bonds differing by the stereochemistry alone, hence, we chose ﬁngerprints with 16 bits and radius 3.
We observed that there were 3 sets with 7 glycans which had exact ﬁngerprints (Figure A.7D).
Since, the difference was in the number of carbon atoms in the aliphatic chain, we used the ﬁngerprints as is.
OH O
HN O NH 2 O
O
O OH OH O
HN O NH 2 O
O
O OH
GlcNMeOCmOPam
GlcNMeOCmOSte
OH O
NH 2 OH O
O OH OH O
NH 2 OH O
O OH OH O
NH 2 OH O
O OH
GlcNOPam
GlcNOSte
GlcNOMar
GlcOAcOPam
GlcOAcOSte
OH O
O O OH O O
OH
OH O
O O OH O O
OH
A
B
C
D
D. O NE - HOT ENCODING BENCHMARK
One-hot encodings of the 946 monomer and 3 bond types were also employed as feature types for benchmarking with featurization using molecular ﬁngerprints.
The dimensions of the node and edge one-hot encoding features are 946 and 3, respectively.
E S IMILARITY COMPUTATION E. A NALYSIS OF GRAPHS
Most glycan graphs are sparse (Figure A.8).
Complete graphs have density of 1, while graphs with density > 0.5 have been deﬁned as dense (Borgwardt et al., 2020).
The density has been calculated using -
[Equation]
E. S IMILARITY MATRIX
We computed the ( n × n ) similarity matrix for all glycans with labels on at least one taxonomic level using propagation attribute kernel in GraKeL (Figure A.8) (Siglidis et al., 2020).
Each pair of
[Figure]
graph similarity was computed for a maximum of 100 iterations.
This resulted in 5% of the pairs being assigned a 0 similarity (10% of all indices in the similarity matrix are 0).
It may be noted that the computation of similarity using graph kernels is way more accessible than graph edit distances.
The current computation was done on in minutes (wall time), parallelized across 24 cores.
From visual inspection using htop, only about 30% of 2 cores were being used at any particular time, and less than 5% of all other cores were used, although there were 24 jobs running in parallel.
Glycans
[Figure]
G l yc an s 0.
S i m il a r i t y
F D IMENSIONALITY REDUCTION F. H YPERPARAMETER OPTIMIZATION FOR U NIFORM M ANIFOLD A PPROXIMATION AND P ROJECTION (UMAP)
Number of neighbors was optimized for 2-component UMAP dimensionality reduction of similarity vectors (Figure A.10) (McInnes et al., 2018).
From visual inspection, UMAP with 128 neighbors seems to resolve into optimal size and number of clusters.
The subplot shows distinct regions for the immunogenic and non-immunogenic glycans.
We note that there is more to similarity than graph kernel distances, and observe that it has been effectively captured using the GNN models (Appendix
G).
[Figure] [Figure]
[Figure] [Figure]
C
[Figure]
UMAP dimensionality reduction for higher number of components does not provide more information.
The 3 components UMAP looked similar to the 2 components, with slightly more disentangled families (Figure A.11).
We limited our visual analysis to 3 components.
To check if more components can help in ﬁnding distinct clusters, we did dimensionality reduction for { 2 , 3 , 5 , 10 , 30 , 50 } components and let HDBSCAN - an unsupervised clustering algorithm – to ﬁgure out how many clusters are there (McInnes et al., 2017).
We noted that the number of clusters are pretty similar, and in low 400s (Figure A.12).
The high number of clusters indicates the diversity of the space, and the differences in terms of taxonomy.
As a further check to see if the distribution of glycans in different clusters is different, we plotted the histograms of the glycans assigned to each cluster.
Across all the components, the histograms seem to be consistent with the number of glycans in each of them (Figure A.13).
F. T-SNE BENCHMARK
We benchmarked the dimensionality reduction results obtained from UMAP against a broad range of t-stochastic neighbor embeddings (t-SNE) models (Van Der Maaten & Hinton, 2008).
For the differ-
[Figure] [Figure]
ent models, we varied perplexity as { 2 , 5 , 30 , 50 , 100 } , and number of steps as { 500 , 1000 , 5000 } .
From the scatter plot, colored by immunogenicity labels, we noted that dimensionality reduction using t-SNE was not able to deduce the differences and getting the glycans into distinct areas (Figure
A.14).
G S UPERVISED LEARNING WITH GRAPH NEURAL NETWORKS G. D EEP GRAPHS LIBRARY (DGL) GRAPHS
Following featurization, NetworkX graphs were converted into undirected, unweighted, and homogenous DGL graphs (Wang et al., 2019).
For GCN and GAT model architectures, self-loops were added to the DGL graphs to prevent silent performance regression due to zero-in-degree nodes during training.
G. M ODEL ARCHITECTURES
We performed graph classiﬁcation using ﬁve distinct graph neural network model architectures detailed below:
[Figure]
• Weave (Kearnes et al., 2016) • Message Passing Neural Networks (MPNNs)
(Gilmer et al., 2017)
• Attentive FP (Xiong et al., 2020) • Graph convolutional networks (GCN) (Kipf & Welling, 2019)
• Graph Attention Networks (GAT)
(Velickovic et al., 2017)
While Weave, MPNN, and Attentive FP utilize both node and edge attributes in prediction, GCN and GAT only consider node attributes.
The models were trained using implementations in the DGL
LifeSci library (Wang et al., 2019).
The optimization was done by minimization of average crossentropy loss between batches and additional metrics such as F1 score, recall, precision and accuracy were noted.
G. G LYCAN GRAPHS CLASSIFICATION G.3. I MMUNOGENICITY
Dataset.
1313 glycans in the database have immunogenicity labels, 631 of which are immunogenic and 682 of which are not immunogenic.
The training was performed on 60%, validated on 20%, and tested on held-out 20% data.
Models.
We classiﬁed immunogenicity using 5 model architectures combined with 2 different node and edge featurization types, for a total of 10 model architecture-attribute pairs.
For each benchmark, hyperparameter optimization against minimization of binary cross entropy loss was performed on
SigOpt, a standardized hyperparameter optimization platform, for 1000 observations and the 10 best sets of hyperparameters were extracted.
Each model architecture and featurization combination was trained using the 10 best sets of hyperparameters from SigOpt using 10 distinct random seeds for splitting the dataset into train-validation-test datasets, for a total of 100 trainings per model per attribute type.
The tables below report the metrics for the most optimal set of hyperparameters, the values of the most optimal hyperparameters, and mean metrics for each training across allruns.
All models achieve stellar performance on all metrics, with little meaningful difference in performance between ﬁngerprint and one-hot encoding featurization (Figures A.15-A.17 ; Table
A.1).
[Figure]
G.3. T AXONOMY
Dataset.
The taxonomy of the glycans was considered on eight levels: domain, kingdom, phylum, class, order, genus, and species.
First, the classiﬁcation of each species into the other seven taxonomic levels was obtained from the supplementary tables of SweetOrigins (Bojar et al., 2021).
For each glycan with species information, taxonomic information was added in a new .csv ﬁle, with multiple labels on the same taxonomic level separated by commas.
Afterwards, any labels with fewer than ﬁve glycans were removed, and any species names ending with “sp” that are therefore genus labels in disguise were ﬁltered out to produce the ﬁnal dataset for taxonomic training.
The ﬁnal
[Figure] [Figure]
dataset consists of 8899 unique glycans with labels on at least one taxonomic level encompassingdomains, 9 kingdoms, 33 phyla, 70 classes, 144 orders, 253 families, 400 genus, and 567 species.
The training was performed on 60%, validated on 20%, and tested on held-out 20% data.
Graph labels were generated as one-hot encodings for each taxonomic level, with the length of each one-hot encoding tensor corresponding with the number of unique labels in the taxonomic level.
The taxonomy labels accommodate cases in which glycans possess multiple labels within the same taxonomic level.
Models.
Benchmarks of multi-label classiﬁcation were performed using a similar process as with immunogenicity classiﬁcation for 5 different model architectures, 2 different node and edge attribution types, and 8 different taxonomic levels for a total of 80 model architecture–attribute–taxonomic
[Table] [Table]
level combination.
For each combination, hyperparameter optimization against minimization of binary cross entropy loss was performed on SigOpt for 1000 observations and the 5 best sets of hyperparameters were extracted.
Each model architecture, featurization, and taxonomic level combination was trained using the 5 best sets of hyperparameters from SigOpt using 5 distinct random seeds for splitting the dataset into train-validation-test datasets, for a total of 25 trainings per combination.
The pipeline and models achieve state-of-the-art performance on multilabel taxonomic classiﬁcation on all taxonomic levels (Figures A.18-A.25, Table A.2).
G. B ENCHMARKING TOP GNN MODELS AGAINST RESULTS REPORTED IN LITERATURE
For the top-performing models in SI Tables A.1 and A.2, hyperparameter optimization on SigOpt was performed again using the same method as the benchmarks in the work by Bojar et al.
(2021) training on 80% of the dataset and reporting metrics on the remaining 20% used as a validation dataset (Table A.3).
The experiment on SigOpt was optimized through minimization of the loss, and the remaining metrics (ROC-AUC, F1, recall, precision, and accuracy) were obtained as stored metrics in the SigOpt experiment.
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure]
[Table]