{'fraction_non_alphanumeric': 0.03914737275520223, 'fraction_numerical': 0.009375098976973997, 'mean_word_length': 4.617149973314357, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
G-VAE, a Geometric Convolutional VAE for ProteinStructure Generation

Analyzing the structure of proteins is a key part of understanding their functions and thus their role in biology at the molecular level. In addition, design new proteins in a methodical way is a major engineering challenge. In this work, we introduce a joint geometric-neural networks approach for comparing, deforming and generating 3D protein structures. Viewing protein structures as 3D open curves, we adopt the Square Root Velocity Function (SRVF) representation and leverage its suitable geometric properties along with Deep Residual Networks (ResNets) for a joint registration and comparison. Our ResNets handle better large protein deformations while being more computationally efficient. On top of the mathematical framework, we further design a Geometric Variational Auto-Encoder (G-VAE), that once trained, maps original, previously unseen structures, into a low-dimensional (latent) hyper-sphere. Motivated by the spherical structure of the pre-shape space, we naturally adopt the von Mises-Fisher (vMF) distribution to model our hidden variables. We test the effectiveness of our models by generating novel protein structures and predicting completions of corrupted protein structures. Experimental results show that our method is able to generate plausible structures, different from the structures in the training data.


Introduction
Proteins are large, complex molecules that are critical for the normal functioning of cells. Through their native three-dimensional structures, they are essential to maintain the function and regulation of the body's tissues and organs. Each protein exists first as an unfolded polypeptide or random coil after being translated from a sequence of mRNA to a linear chain of amino acids. As the polypeptide chain is being synthesized, the linear chain begins to fold into its 3D structure (known as native state). In computational biology, solving the problem of protein folding, i.e. determining accurately a protein's 3D shape from its amino-acid sequence, is one of the grandest challenges [11]. Recently, several teams have considered Deep Neural Networks techniques to predict such structures. Indeed, DeepMind's AlphaFold [28] and AlphaFold2 have been placed first in respectively CASP13 (2018) and CASP14 (2020) competitions. By leveraging several Deep Learning architectures, other problems in protein structural modeling and design have been recently addressed [14]. One challenging problem is protein design via generation [3,24,19], i.e. de novo design or generate new structures. Despite their promising results, proposed pipelines remain complex and often make use of tools as introduce Alternating Direction Method of Multipliers (ADMM) and Rosetta algorithm to transform 2D pairwise distances into 3D Cartesian coordinates [3]. While these representations guarantee invariance to rigid transformations (i.e. translations and rotations), they do not guarantee inevitability.
The contributions of this work are three-folds, • We propose a joint geometric-neural networks framework for comparing, deforming and generating protein structures. While previous techniques operates on distance/contact matrices and required complex operations in their pipelines, our G-VAE works directly on protein backbones using a shape-preserving representation. • Unlike previous works which make use of Dynamic Programming to find optimal registration between protein structures, we optimize an unsupervised Deep Residual Network. By integrating a flow of smooth and regular velocity fields, our ResNet estimates optimal diffeomorphic transformations and importantly handles large reparameterizations. • We propose a Geometric VAE to generate realistic protein backbones. Compared to the representation commonly used in literature-based the matrix of pairwise distances (e.g. in [28] and [3]), we propose a much efficient representation inspired from [21]. It does not require any folding process (from the distance matrix to the 3D coordinates) as in [3] using the Alternating Direction Method of Multipliers (ADMM).
The rest of the paper is organized as follows. In Sec. 2, we first remind some basics on proteins and related structures then review (1) existing protein representations and comparisons, and (2) recent generative models from 3D structures. Sec. 2, describes our first contribution, a diffeomorphic deep residual network for the registration and comparison of protein shapes. We present in Sec. 4 essential ingredients of our G-VAR (Geometric variational AE). Experimental validations are presented in Sec. 5. Some concluding remarks and perspectives of this work are drawn in Sec.6.

Background and Related work
Proteins are made up of smaller units called amino acids, which are building blocks of proteins. They are attached to one another by peptide bonds forming a long chain of proteins. Specifically, a protein is made up of one or more linear chains of amino acids, each of which is called a polypeptide. There are 20 types of amino acids commonly found in proteins. Amino acids share a basic structure, which consists of a central carbon atom, also known as the alpha (α) carbon, bonded to an amino group (NH 2 ), a carboxyl group (COOH), and a hydrogen atom. Every amino acid also has another atom or group of atoms bonded to the central atom, known as the R group, which determines the identity of the amino acid. The amino acids of a polypeptide are attached to their neighbors by covalent bonds known as the peptide bonds. Each bond forms in a dehydration synthesis (condensation) reaction.
Orders of protein structure. The simplest level of protein structure, primary structure, is simply the sequence of amino acids in a polypeptide chain. The next level of protein structure, secondary structure, refers to local folded structures that form within a polypeptide due to interactions between atoms of the backbone. The backbone refers to the polypeptide chain apart from the R groups, so secondary structure does not involve R group atoms. The most common types of secondary structures are the α-helix and the β-pleated sheet. Both structures are held in shape by hydrogen bonds, which form between the carbonyl O of one amino acid and the amino H of another. In an α-helix, the carbonyl (C=O) of one amino acid is hydrogen bonded to the amino H (N-H) of an amino acid that is four down the chain. In a β-pleated sheet, two or more segments of a polypeptide chain line up next to each other, forming a sheet-like structure held together by hydrogen bonds. The hydrogen bonds form between carbonyl and amino groups of backbone. The overall three-dimensional structure of a polypeptide is called its tertiary structure. The tertiary structure is primarily due to interactions between the R groups of the amino acids that make up the protein. Some proteins are made up of multiple polypeptide chains, also known as subunits. When these subunits come together, they give the protein its quaternary structure.
Protein representation and comparison. Al Quraishi used in [1] torsion angles to represent the 3D structure of the protein as a data vector. However, because a change in a backbone torsion angle at a residue affects the inter-residue distances between all preceding and subsequent residues, these 1D variables are highly interdependent, which can frustrate learning. To circumvent these limitations, many approaches use 2D projections of 3D protein structure data, such as residue-residue distance and contact maps (e.g. [3], [30] and [26]) and pseudo-torsion angles and bond angles that capture the relative orientations between pairs of residues. AlphaFold [28] predicts a pairwise distance matrix for a given amino-acid sequence and then predicted distances are encapsulated in a penalty-based scoring function to guide a gradient descent-based optimization algorithm assembling fragments into tertiary structures. While these representations guarantee translational and rotational invariance, they do not guarantee invertibility back to the 3D structure. By treating protein backbone structures as three-dimensional curves, [21] proposed a mathematical framework for protein structure comparison. Each parameterized curve is represented by a special function called square root velocity function (SRVF), a Riemannian framework proposed by [18,29] for analyzing shapes and will be reviewd in section 3.1. In order to compare shapes of curves, [21] removed all shape-preserving transformations (i.e., rigid motions and orientation-preserving reparameterizations) from this representation. This is done by forming a quotient space of the original manifold with respect to these shape-preserving transformation groups. In the resulting quotient space, called shape space of elastic curves, one can perform statistical analysis of curves as if they are random variables. One can compare, match, and deform one curve into another, or compute averages and covariances of curve populations. In this work, we adopt the SRVF representation as in [21] for protein shape representation and comparison in the original shape space.
Generative models for protein structures. Structure prediction, fixed-backbone design and de novo protein design are global optimization problems with the same energy function but different degrees of freedom. In structure prediction, the sequence is fixed and the backbone structure is unknown; in fixed backbone protein design, the sequence is unknown but the structure is fixed; and in de novo protein design, neither is known. Protein-based drugs are very common -the diabetes drug insulin is one of the most prescribed. Some of the most expensive and effective cancer medicines are also protein-based, as well as the antibody formulas currently being used to treat COVID-19. Two approaches have been proposed in literature. In [3,2], Anand et al. have proposed to adopt generative adversarial networks (GANs) [22,23] to generate novel protein structures for use in protein design applications. [3] represented protein structures using pairwise distances in angstroms between the α-carbons on the protein backbone. GAN generates a pairwise distance matrix, which is "folded" into a 3D structure by the alternating direction method of multipliers (ADMM) [7] to get α-carbon coordinate positions. To generate full-atom proteins, a fast "trace" script then traces a reasonable protein backbone through the α-carbon positions. Alternatively, [3] also folded full protein structures directly from pairwise distances using Rosetta [9], i.e., fragment sampling subject to distance constraints.
Sabban et al. [26] proposed a LSTM-based Generative Adversarial Network for de novo protein design. Both generator and discriminator are made up of a stack of LSTM [17] layers and a Mixture Density Network is adopted to estimate φ and ψ angles of each residue. This work only concerned with getting a new and unique folded ideal helical protein which is not found in nature, rather than a protein with a specific function or a specific structure.
Guo et al. [15] accommodated a graph-based VAE [27] for protein-specific generation. Each such CA-only structure is first converted into a contact graph. They address the problem of interpretability using disentangled VAE or β-VAE [16]. That is, learning disentangled representations, where perturbations of an individual dimension of the latent code perturb the corresponding backbone in an interpretable manner.
In [12], Eguchi et al. target a class-specific generation task using a variational auto-encoder to directly generate the 3D coordinates of immunoglobulins (Ig). In the core of their model, termed Ig-VAE, a comprised torsion-and distance-aware loss function is minimized. Ig-VAE learns a suitable latent space and allow to generate high-quality structures compatible with existing design tools. Importantly, they illustrate the use of their model to create a computational model of a SARS-CoV2-RBD binder via latent space sampling. Their VAE is trained on AbDb, an antibody structure database [13] including 10,768 immunoglobulins spanning 4,154 non-sequence-redundant structures.

Diffeomorphic Registration and Comparison of Protein Shapes
In this section, we first provide several preliminary definitions and background that will be helpful throughout the rest of the paper. For a more comprehensive review of these concepts, we refer the interested reader to [4,29].

Shape Space, Rotation and Reparameterization-invariant Analysis
We define shape as a property of an object's outline that is invariant to the shape-preserving transformations: translation, rotation, scale and reparameterization. The derivation of the basic representation of a shape begins with a parameterized curve, i.e., β(t) : D → R n , where D is the domain of the curve: D = [0, 1] for an open curve and D = S 1 (i.e., the unit circle in R 2 ) for a closed curve. β(t) is a smooth function on D. The framework of Square-Root Velocity Field (SRVF) proposed in [29] uses the square-root velocity function: as the basis for elastic analysis of a shape defined by the parameterized curve β(t). Translation is removed automatically by the use ofβ(t) in the definition. Rescaling is removed by the normalization of the length of the curve to 1. Since the length of a curve β(t) is D β (t) 2 dt = D q(t) 2 2 = 1 after normalization, the set of all SRVFs is the unit sphere in L 2 (D, R n ). This sphere is called the preshape space: Curves that are within a rotation and/or a re-parameterization of each other result in different elements of C despite having the same shape. The removal of the remaining two transformations is done by defining an appropriate quotient operation via isometric group actions. Here we give the definitions of rotation and reparameterization groups and their actions on preshape space l n . The rotation group for curves in R n is SO(n) = {O ∈ R n×n | O O = I n , det(O) = 1} and its action is SO(n) × l n → l n : (O, q) → Oq. The reparameterization group for curves in R n is: and its action is l n ×Γ → l n : (q, γ) → (q •γ) √γ , where D(D, D) is the set of orientation-preserving, absolutely continuous bijections. Specifically, the reparameterization group for open curves l 0 n is: We denote by γ −1 the reciprocal (also called inverse) of function γ. The transformed curve under O and γ is given by O(β • γ) and its SRVF representation is √γ O(q • γ). Removing rotation and reparameterization is required to define the shape space S, which is defined as the set of all equivalence classes of the type: where each such class [q] is associated with a shape uniquely and vice versa.

Diffeomorphic Deformable Registration using Deep Residual Networks
To derive a curve from a protein structure, we take the sequence of 3D coordinates of the backbone atoms N, CA and C from the PDB [5] file of a given protein and treat them as the coordinates , (i = 1, 2, · · · , n), for n atoms. We use t i = i n so that the parameter lies between [0, 1]. Let the parameterized curve in R 3 derived from the backbone structure of a protein be denoted as: β(t) : [0, 1] → R 3 . Then, we represent β(t) by its square-root velocity function as defined in Eq. 1. The SRVF representation is invariant to any translation of curve β(t) and we can further make it invariant to scales by rescaling each curve to length 1. By removing rotation O ∈ SO(n) and reparameterization γ ∈ Γ as described in section 3.1, we can get the shape space of each protein backbone curve. When we deform one curve (i.e., protein backbone) into another, are actually generating a continuous sequence of curves, or a path in the curve space. The length of this path quantifies the amount of deformation in going from one curve to the other, and an elastic metric is a metric that measures the amount of bending and stretching between successive curves along the path and adds them up for the full path, as illustrated with four examples in Fig. 1. Each curve q(t) can be regarded as a point on a non-linear Riemannian manifold S. For any two points, the distance between them is given by the length of the shortest path (called a geodesic) connecting them in that manifold. Given two curves β 1 and β 2 , represented by their SRVFs q 1 and q 2 , by fixing q 1 and solving the optimization problem defined as: we can get the geodesics, a proper distance in the shape space, between their equivalence classes [q 1 ] and [q 2 ] as: Since C is a sphere, the geodesic between two points q 1 and q * 2 is given by a great circle: where α is a geodesic path between the given two shapes for [q 1 ] at t = 0 and [q 2 ] at t = 1. For each row, we reparameterize the blue curve w.r.t. the green curve using ResNets (left) and dynamic programming (right). For each quadrant, we show the reparameterized blue curve, the optimal reparameterization function γ * , and the geodesic path between the green curve and the reparameterized blue curve. The γ * generated by ResNets are more close to an identity transformation, indicating that our ResNets prefer more smooth deformation.
The optimization problem of Eq. 6 over rotation can be solved using SVD, but the optimization over the reparameterization requires a dynamic programming (DP) algorithm. As dynamic programming is not differentiable, we propose to adopt Residual Networks (ResNets) to reparameterize curves. A series of residual units are the key of residual networks. A residual unit is defined as y = x+F (x; W ), where the function F is the residual mapping containing learnable parameters W. The operation x+F (x) is achieved by a shortcut connection and element-wise addition. The central idea of ResNets is to learn the function F such that the l-th block is related with the next block by the equation: where x l is the input to the l-th residual block, and W l is a set of weights (and biases) associated with the l-th block. We re-interpret the reparameterization function γ ∈ Γ at t = 1 as an integration of time-dependent velocity field v(t, γ(t, τ )): where γ(0, ·) is an identity transformation, i.e., without reparameterization. By discretizing time step t, we can replace integration in Eq. 9 with summation and get: We relate the incremental mapping defined by ResNets to a reparameterization model by establishing links between Eq. (16) and Eq. (10). Specifically, the l-th residual block estimates the velocity field v l that is added to the warping function γ l−1 . Therefore, the entire ResNet implements the composition of a series of incremental mappings of reparameterization.
For any γ t being an element of Γ, γ t needs to satisfy the following conditions: The above conditions impose the boundary conditions, and imply that any γ t ∈ Γ is a monotonically increasing function. This property is also known as order-preserving which is important to reparameterize a curve. To ensure the monotonically increasing property of γ t , instead of estimating the velocity field v directly using a ResNet, we estimate the derivative of v and impose the constraints on the values of the derivative, i.e., the derivative is equal or greater than 0. The velocity field is then computed by integration. The detailed mathematical formulation and the architecture of our ResNet is provided in supplementary material. Figure 2: Different geodesic paths between protein 1jth, the left-most structure, and protein 2k98, the right-most structure. (Top) Geodesic between q 1 and q 2 (i.e. on the preshape space C). (Second) Geodesic between q 1 and q 2 • γ * (i.e. on the shape space S). (Third) Geodesic between Φ D (Φ E (q 1 )) and Φ D (Φ E (q 2 )). (Bottom) Geodesics between Φ D (Φ E (q 1 )) and Φ D (Φ E (q 2 • γ * )) (i.e. on the latent space S l−1 and projected back to C or S). The last column is the geodesic distance between the left-most and right-most structures. Φ E and Φ D represent the encoder and decoder of the G-VAE.
One can appreciate from Fig. 2 several minimizing paths between protein structures of 1jth and 2k98 both in the preshape space C and the shape space S. This figure provides as well an excellent connections to the next section Sec. 4, in which we propose a geometric VAE to translate original shape representations into a latent space. It illustrates approximations of such interpolations on the latent (also hyper-spherical) space then projected back to the original space. Sec. 4 describe the detailed architecture of G-VAE which operates on the full-atoms backbones of the proteins.

Geometric variational auto-encoder or G-VAE
The central idea in our generative model is to accommodate the well-known Variational AutoEncoder (VAE) [20] to the protein backbone generation problem. That is, we want to design a geometric VAE that once trained, will be able to fully generate plausible protein samples or recover corrupted structures (inpainting problem). Our protein representation accounts for the invariance to shape preserving transformations (scaling, translation and rotation). While Φ E is the network which maps an observation q to a latent variable z, Φ D is the decoding network to compute an observation from a latent variable, so that Φ D (Φ E (q)) = Φ D (z) ∼ x. Figure 3: A pictorial on the mapping schemes from the original shape space S to a lower dimensional hypersphere S l−1 (Encoder or Φ E ) and its inverse (Decoder or Φ D ). The generative model from the latent space using vMF distributions is illustrated.
In the VAE setting, the objective is to optimize the log-likelihood of the data, log p(x, z)dz, where x denotes observed data and z denotes unobserved latent variables. When p(x, z) is parameterized by a neural network, marginalizing over the latent variables is generally intractable. An alternative way is to maximize the Evidence Lower Bound (ELBO): where p(z) is the prior distribution, q(z) is the approximate posterior distribution, D KL denotes Kullback-Leibler (KL) divergence. The bound is tight when q(z) = p(z|x). The VAE setting introduces an inference/encoder neural network q ψ (z|x) and a generation/decoder neural network p φ (x|z). In the original VAE both the prior and the posterior of z are defined as Gaussian distributions. Using the reparameterization trick [20,25], the Monte Carlo estimates of the ELBO is differentiable w.r.t. the neural network parameters. As indicated in previous literature, choice of a Gaussian distribution as both prior and posterior has two shortcomings. Firstly, a centered multivariate Gaussian prior p(z) = N (z; 0, I) in the latent space causes the "manifold mismatch" problem [10], failing to model data with a latent hyperspherical structure. As we have shown in section 3.1, the set of all SRVFs is the unit sphere in L 2 (D, R n ). Secondly, the KL divergence term in loss function encourages the variational posterior to approximate the prior, encouraging the posterior distribution of the latent variable to "collapse" to the prior, effectively rendering the latent structure unused [6,8].
We propose to use the von Mises-Fisher (vMF) distribution as an alternative to the Gaussian distribution. The von Mises-Fisher (vMF) distribution is often seen as the Gaussian distribution on a d − 1-dimensional hypersphere S d−1 in R d . It is parameterized by µ ∈ R m indicating the mean direction, and κ ∈ R ≥0 the concentration around µ. High κ value leads to samples that are tightly clustered around µ, which is the mean and mode of the distribution. For the special case of κ = 0, the vMF represents a uniform distribution of a hypersphere. The probability density function of the vMF distribution for a random unit vector z ∈ R m (or z ∈ S m−1 ) is defined as: where µ 2 = 1, C m (κ) is the normalizing constant, and I v denotes the modified Bessel function of the first kind at order v. Replacing Gaussian distribution with vMF distribution leads to a spherical latent space as opposed to a hyperplanar one, i.e., vMF distribution forces the model to put the latent representations on the surface of the unit hypersphere rather than squeezing everything to the origin, which is more suitable to model SRVFs, as shown in Fig. 4. Our prior is a uniform distribution over the unit hypersphere κ = 0 and our family of posterior distributions treats κ as a fixed model hyperparameter. Since the KL divergence only depends on κ [32], by treating κ as a fixed hyperparameter, the problem of KL collapse will therefore be eliminated. Following the implementation of [15,32], we use the rejection sampling scheme [31] to sample a "change magnitude" w. The sampled latent variable is then where v is a randomly sampled unit vector tangent to the hypersphere at µ. As neither v nor w depends on µ, we can now take gradients of z with respect to µ as required.

Experiments
For all experiments, we take the sequence of 3D coordinates of the backbone atoms N, CA and C from the PDB [5] file of the SCOP (Structural Classification of Proteins) database. For each backbone, we split into shorter sequences with 144 atoms, e.g., 48 residues per sequence. We use fixed-backbone design in Rosetta to generate full-atoms protein structures based on the output of our G-VAE. We follow the train and test split of [3]. Note that we only use 30,000 samples for training.
Smoothness and continuity of the latent space S l−1 . We compute and visualize geodesic paths of protein 1jth and 2k98 in both preshape space C and shape space S and the results are shown in Fig. 2. For the first row, we compute the geodesics in preshape space. For the second row, we compute the geodesics in shape space using dynamic programming. We noticed that these intermediate shapes cannot form reasonable alpha helices. For the third and fourth rows, by projecting backbone curves to a low-dimensional hyper-spherical latent space and then projecting back to either preshape space (third row) or shape space (fourth row) using G-VAE, we achieve better intermediate protein structures and lower geodesic path lengths. In Fig. 5, we show that when sampling around the mean µ value, similar but different structures can be generated.
Inpainting for protein design. The inpainting task aims to infer contextually correct missing parts of protein structures, e.g., a subset of residues are eliminated. Given the structure of the rest of the uncorrupted structure, we adopt our G-VAE to fill in the missing residue atoms. During training, we adopt uncorrupted structures to train our G-VAE. During testing, we randomly mask out 10, 15, and 20 residues (e.g., 30, 45 and 60 atoms) from backbones and use the trained model to predict reasonable coordinates of these masked atoms. We only present inpainting results on proteins in the test set, which our G-VAE has not seen during training. The experimental results are shown in Fig. 6. Generating full protein structures. We generate fixed length of proteins using our G-VAE and the experimental results are shown in Fig. 7. We found that the G-VAE is able to learn to generate meaningful secondary structures such as alpha helices and beta sheets. In Fig. 8, we show some examples of generated proteins using randomly sampled latent variables (i.e., ) and results of GAN based on pairwise Cα − Cα distance.  (Bottom) 48-residue fragments generated from randomly sampled latent vectors by GAN using pairwise distance of α-carbon atoms.

Conclusions and Future Directions
We proposed a joint mathematical-neural network framework for comparing, deforming and generating 3D protein structures. First, a Residual Network applied to SRVF shape representations allows joint registration and deformation, through a minimizing geodesic, of protein shapes. Second, a Variational Autoencoder, called Geometric VAE, is designed. Once directly trained on the 3D structures, G-CAE maps previously unseen shapes, which lie to a high-dimensional space, into a latent variable vector element of a low-dimensional spherical space. The inverse embedding (i.e. decoder) allows sampling of new shapes and recovery of partially-obscured shapes. Geometric operations, as computing geodesics on the shape space, could be approximated as interpolations on the latent space. As a direct perspective of this work, we will target the challenging task of generating globally realistic and chemically valid complex tertiary structures [12]. This could be addressed using recurrent architectures which can extend the static current architecture. We are also interested by the class-specific protein generation, as done [12] to directly generate the 3D coordinates of immunoglobulins and the study of SRAS-CoV2, and its complex "S" protein mutations via latent space sampling.

A Residual network architecture
In this section, we provide the architecture of our residual network for reparameterization function estimation. Concretely, in our ResNet, the l-th residual block computes an update in the form of: where γ l−1 is the input to the l-th residual block F (.; W l ) (γ 0 is the identity mapping), and W l is a set of weights and biases associated with the l-th residual block. Specifically, the l-th residual block predicts the velocity field v l = F (γ l−1 ; W l ) that is added to the warping function γ l−1 . An instantiation of ResNet is shown in Fig. 9 which builds on three main steps (only two building blocks are illustrated), -An embedding step consisting of a single convolutional layer which embeds the input time series data from an initial low-dimensional space to a higher dimensional space driven by the number of filters used. -A series of identical residual blocks F (.; W l ) which computes time-dependent (non-stationary) velocity fields (W l are different). In the core of each block, a point-wise ReLU activation function is applied to introduce nonlinearity. -A series of projection operations (i.e. dimensionality reduction) ends each of residual blocks and allow to cast estimated a velocity fields such that v l . Consequently, the outputs γ l are by summation of v l over the residual blocks l ∈ [1, L] where L is the total number of residual blocks and the initial warping function γ 0 .

B Order-preserving property of reparameterization function
In this section, we provide mathematical formulation of the order-preserving property of reparameterization function γ. By discretizing time step t of Eq.(9) in the main paper and representing each  discretized time step by a residual block, the order-preserving property can be reformulate as: τ 1 ≤ τ 2 ⇒ (γ τ1 ≤ γ τ2 and γ τ1 + v τ1 ∆L ≤ γ τ2 + v τ2 ∆L) , where we omit the subscript of t for simplicity. We represent each block as v τ = F (γ t ) and thus from Eq. 17 we have: 12 Instead of prediction F (γ τ ) directly from each block, we predict f (γ τ ), s.t.: and we enforce f (x) ≥ − 1 ∆L , ∀x. This constraint can be implemented by using an ELU layer before the output of each block.

C More generation examples
In this section, we give more examples of proteins generated by our G-VAE in both successful and failing cases.

C.1 Successful cases
In Fig. 11, we show some good generated proteins and their geodesic distances w.r.t. the input. Note that the generated proteins capture the secondary structure (e.g., α-helix and β-sheet).

C.2 Failing cases
In Fig. 12, we also show some bad generated protien structures and their geodesic distances w.r.t. the input. We notice that these generated proteins fail to keep the secondary structures. Compared with Fig. 11, their geodesic distances are relatively large, which is consistent with visualization.