Original: RNA S ECONDARY S TRUCTURE P REDICTION B Y L EARNING U NROLLED A LGORITHMS
Revised: RNA S ECONDARY S TRUCTURE P REDICTION B Y L EARNING U NROLLED A LGORITHMS

Original: Anonymous authors

Original: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: In this paper, we propose an end-to-end deep learning model, called E2Efold, for
Revised: In this paper, we propose an end-to-end deep learning model, called E2Efold, for

Original: RNA secondary structure prediction which can effectively take into account the inherent constraints in the problem.
Revised: RNA secondary structure prediction which can effectively take into account the inherent constraints in the problem.

Original: The key idea of E2Efold is to directly predict the RNA base-pairing matrix, and use an unrolled algorithm for constrained programming as the template for deep architectures to enforce constraints.
Revised: The key idea of E2Efold is to directly predict the RNA base-pairing matrix, and use an unrolled algorithm for constrained programming as the template for deep architectures to enforce constraints.

Original: With comprehensive experiments on benchmark datasets, we demonstrate the superior performance of E2Efold: it predicts signiﬁcantly better structures compared to previous SOTA (especially for pseudoknotted structures), while being as efﬁcient as the fastest algorithms in terms of inference time.
Revised: With comprehensive experiments on benchmark datasets, we demonstrate the superior performance of E2Efold: it predicts signiﬁcantly better structures compared to previous SOTA (especially for pseudoknotted structures), while being as efﬁcient as the fastest algorithms in terms of inference time.

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: G G G A A A C G
Revised: G G G A A A C G

Original: U U C C G G
Revised: U U C C G G

Original: G 1 G 1 A 1 A A
Revised: G 1 G 1 A 1 A A

Original: C G U
Revised: C G U

Original: U 1 C1 C 1 G
Revised: U 1 C

Original: [Figure]
Revised: [Figure]

Original: representation Ribonucleic acid (RNA) is a molecule playing essential roles in numerous cellular processes and regulating expression of genes (Crick, 1970).
Revised: Ribonucleic acid (RNA) is a molecule playing essential roles in numerous cellular processes and regulating expression of genes (Crick, 1970).

Original: It consists of an ordered sequence of nucleotides, with each nucleotide containing one of four bases:
Revised: It consists of an ordered sequence of nucleotides, with each nucleotide containing one of four bases:

Original: Adenine (A) , Guanine (G) , Cytosine (C) and Uracile (U) .
Revised: Adenine (A) , Guanine (G) , Cytosine (C) and Uracile (U) .

Original: This sequence of bases can be represented as x := ( x 1 , . . .
Revised: This sequence of bases can be represented as x := ( x 1 , . . .

Original: , x L ) where x i ∈ { A, G, C, U } , which is known as the primary structure of RNA.
Revised: , x L ) where x i ∈ { A, G, C, U } , which is known as the primary structure of RNA.

Original: The bases can bond with one another to form a set of base-pairs, which deﬁnes the secondary structure .
Revised: The bases can bond with one another to form a set of base-pairs, which deﬁnes the secondary structure .

Original: A secondary structure can be represented by a binary matrix A ∗ where A ∗ ij = 1 if the i, j -th bases are paired (Fig 1).
Revised: A secondary structure can be represented by a binary matrix A ∗ where A ∗ ij = 1 if the i, j -th bases are paired (Fig 1).

Original: Discovering the secondary structure of RNA is important for understanding functions of RNA since the structure essentially affects the interaction and reaction between RNA and other cellular components.
Revised: Discovering the secondary structure of RNA is important for understanding functions of RNA since the structure essentially affects the interaction and reaction between RNA and other cellular components.

Original: Although secondary structure can be determined by experimental assays (e.g. X-ray diffraction), it is slow, expensive and technically challenging.
Revised: Although secondary structure can be determined by experimental assays (e.g. X-ray diffraction), it is slow, expensive and technically challenging.

Original: Therefore, computational prediction of RNA secondary structure becomes an important task in RNA research and is useful in many applications such as drug design (Iorns et al., 2007).
Revised: Therefore, computational prediction of RNA secondary structure becomes an important task in RNA research and is useful in many applications such as drug design (Iorns et al., 2007).

Original: [Figure]
Revised: [Figure]

Original:  structure from knowledge of primary structure has been carried out for decades.
Revised: Research on computational prediction of RNA secondary structure from knowledge of primary structure has been carried out for decades.

Original: Most existing methods assume the secondary structure is a result of energy minimization, i.e., A ∗ =
Revised: Most existing methods assume the secondary structure is a result of energy minimization, i.e., A ∗ =

Original: arg min
Revised: arg min

Original: A E x ( A ) .
Revised: A E x ( A ) .

Original: The energy function is either estimated by physics-based thermodynamic experiments (Lorenz et al., 2011; Bellaousov et al., 2013;
Revised: The energy function is either estimated by physics-based thermodynamic experiments (Lorenz et al., 2011; Bellaousov et al., 2013;

Original: Markham & Zuker, 2008) or learned from data (Do et al., 2006).
Revised: Markham & Zuker, 2008) or learned from data (Do et al., 2006).

Original: These approaches are faced with a common problem that the search space of all valid secondary structures is exponentially-large with respect to the length L of the sequence.
Revised: These approaches are faced with a common problem that the search space of all valid secondary structures is exponentially-large with respect to the length L of the sequence.

Original: To make the minimization tractable, it is often assumed the base-pairing has a nested structure (Fig 2 left), and the energy function factorizes pairwisely.
Revised: To make the minimization tractable, it is often assumed the base-pairing has a nested structure (Fig 2 left), and the energy function factorizes pairwisely.

Original: With this assumption, dynamic programming (DP) based algorithms can iteratively ﬁnd the optimal structure for subsequences and thus consider an enormous number of structures in time O
Revised: With this assumption, dynamic programming (DP) based algorithms can iteratively ﬁnd the optimal structure for subsequences and thus consider an enormous number of structures in time O

Original: ( L 3 ) .
Revised: ( L 3 ) .

Original: Although DP-based algorithms have dominated RNA structure prediction, it is notable that they restrict the search space to nested structures , which excludes some valid yet biologically important
Revised: Although DP-based algorithms have dominated RNA structure prediction, it is notable that they restrict the search space to nested structures , which excludes some valid yet biologically important

Original: RNA secondary structures that contain ‘ pseudoknots ’, i.e., elements with at least two non-nested base-pairs (Fig 2 right).
Revised: RNA secondary structures that contain ‘ pseudoknots ’, i.e., elements with at least two non-nested base-pairs (Fig 2 right).

Original: Pseudoknots make up roughly 1.4% of base-pairs (Mathews & Turner, 2006), and are overrepresented in functionally important regions (Hajdin et al., 2013;
Revised: Pseudoknots make up roughly 1.4% of base-pairs (Mathews & Turner, 2006), and are overrepresented in functionally important regions (Hajdin et al., 2013;

Original: Staple &
Revised: Staple &

Original: Butcher, 2005).
Revised: Butcher, 2005).

Original: Furthermore, pseudoknots are present in around 40% of the RNAs.
Revised: Furthermore, pseudoknots are present in around 40% of the RNAs.

Original: They also assist folding into 3D structures (Fechter et al., 2001) and thus should not be ignored.
Revised: They also assist folding into 3D structures (Fechter et al., 2001) and thus should not be ignored.

Original: To predict RNA structures with pseudoknots, energy-based methods need to run more computationally intensive algorithms to decode the structures.
Revised: To predict RNA structures with pseudoknots, energy-based methods need to run more computationally intensive algorithms to decode the structures.

Original: In summary, in the presence of more complex structured output (i.e., pseudoknots), it is challenging for energy-based approaches to simultaneously take into account the complex constraints while being efﬁcient.
Revised: In summary, in the presence of more complex structured output (i.e., pseudoknots), it is challenging for energy-based approaches to simultaneously take into account the complex constraints while being efﬁcient.

Original: In this paper, we adopt a different viewpoint by assuming that the secondary structure is the output of a feed-forward function, i.e., A ∗ =
Revised: In this paper, we adopt a different viewpoint by assuming that the secondary structure is the output of a feed-forward function, i.e., A ∗ =

Original: F θ ( x ) , and propose to learn θ from data in an end-to-end fashion.
Revised: F θ ( x ) , and propose to learn θ from data in an end-to-end fashion.

Original: It avoids the second minimization step needed in energy function based approach, and does not require the output structure to be nested.
Revised: It avoids the second minimization step needed in energy function based approach, and does not require the output structure to be nested.

Original: Furthermore, the feed-forward model can be ﬁtted by directly optimizing the loss that one is interested in.
Revised: Furthermore, the feed-forward model can be ﬁtted by directly optimizing the loss that one is interested in.

Original: Despite the above advantages of using a feed-forward model, the architecture design is challenging.
Revised: Despite the above advantages of using a feed-forward model, the architecture design is challenging.

Original: To be more concrete, in the RNA case, F θ is difﬁcult to design for the following reasons:
Revised: To be more concrete, in the RNA case, F θ is difﬁcult to design for the following reasons:

Original: (i) RNA secondary structure needs to obey certain hard constraints (see details in Section 3), which means certain kinds of pairings cannot occur at all (Steeg, 1993).
Revised: (i) RNA secondary structure needs to obey certain hard constraints (see details in Section 3), which means certain kinds of pairings cannot occur at all (Steeg, 1993).

Original: Ideally, the output of F θ needs to satisfy these constraints.
Revised: Ideally, the output of F θ needs to satisfy these constraints.

Original: (ii)
Revised: (ii)

Original: The number of RNA data points is limited, so we cannot expect that a naive fully connected network can learn the predictive information and constraints directly from data.
Revised: The number of RNA data points is limited, so we cannot expect that a naive fully connected network can learn the predictive information and constraints directly from data.

Original: Thus, inductive biases need to be encoded into the network architecture.
Revised: Thus, inductive biases need to be encoded into the network architecture.

Original: (iii) One may take a two-step approach, where a post-processing step can be carried out to enforce the constraints when F θ predicts an invalid structure.
Revised: (iii) One may take a two-step approach, where a post-processing step can be carried out to enforce the constraints when F θ predicts an invalid structure.

Original: However, in this design, the deep network trained in the ﬁrst stage is unaware of the post-processing stage, making less effective use of the potential prior knowledge encoded in the constraints.
Revised: However, in this design, the deep network trained in the ﬁrst stage is unaware of the post-processing stage, making less effective use of the potential prior knowledge encoded in the constraints.

Original: [Figure]
Revised: [Figure]

Original: In this paper, we present an end-to-end deep learning solution which integrates the two stages.
Revised: In this paper, we present an end-to-end deep learning solution which integrates the two stages.

Original: The ﬁrst part of the architecture is a transformer-based deep model called Deep Score
Revised: The ﬁrst part of the architecture is a transformer-based deep model called Deep Score

Original: Network which represents sequence information useful for structure prediction.
Revised: Network which represents sequence information useful for structure prediction.

Original: The second part is a multilayer network called Post-Processing Network which gradually enforces the constraints and restrict the output space.
Revised: The second part is a multilayer network called Post-Processing Network which gradually enforces the constraints and restrict the output space.

Original: It is designed based on an unrolled algorithm for solving a constrained optimization.
Revised: It is designed based on an unrolled algorithm for solving a constrained optimization.

Original: These two networks are coupled together and learned jointly in an end-to-end fashion.
Revised: These two networks are coupled together and learned jointly in an end-to-end fashion.

Original: Therefore, we call our model E2Efold .
Revised: Therefore, we call our model E2Efold .

Original: By using an unrolled algorithm as the inductive bias to design Post-Processing Network, the output space of E2Efold is constrained (see Fig 3 for an illustration), which makes it easier to learn a good model in the case of limited data and also reduces the overﬁtting issue.
Revised: By using an unrolled algorithm as the inductive bias to design Post-Processing Network, the output space of E2Efold is constrained (see Fig 3 for an illustration), which makes it easier to learn a good model in the case of limited data and also reduces the overﬁtting issue.

Original: Yet, the constraints encoded in E2Efold are ﬂexible enough such that pseudoknots are included in the output space.
Revised: Yet, the constraints encoded in E2Efold are ﬂexible enough such that pseudoknots are included in the output space.

Original: In summary,
Revised: In summary,

Original: E2Efold strikes a nice balance between model biases for learning and expressiveness for valid RNA structures.
Revised: E2Efold strikes a nice balance between model biases for learning and expressiveness for valid RNA structures.

Original: We conduct extensive experiments to compare E2Efold with state-of-the-art (SOTA) methods on several RNA benchmark datasets, showing superior performance of E2Efold including:
Revised: We conduct extensive experiments to compare E2Efold with state-of-the-art (SOTA) methods on several RNA benchmark datasets, showing superior performance of E2Efold including:

Original: • being able to predict valid RNA secondary structures including pseudoknots; • running as efﬁcient as the fastest algorithm in terms of inference time; • producing structures that are visually close to the true structure; • better than previous SOTA in terms of F1 score, precision and recall.
Revised: • being able to predict valid RNA secondary structures including pseudoknots; • running as efﬁcient as the fastest algorithm in terms of inference time; • producing structures that are visually close to the true structure; • better than previous SOTA in terms of F1 score, precision and recall.

Original: Although in this paper we focus on RNA secondary structure prediction, which presents an important and concrete problem where E2Efold leads to signiﬁcant improvements, our method is generic and can be applied to other problems where constraints need to be enforced or prior knowledge is provided.
Revised: Although in this paper we focus on RNA secondary structure prediction, which presents an important and concrete problem where E2Efold leads to signiﬁcant improvements, our method is generic and can be applied to other problems where constraints need to be enforced or prior knowledge is provided.

Original: We imagine that our design idea of learning unrolled algorithm to enforce constraints can also be transferred to problems such as protein folding and natural language understanding problems (e.g., building correspondence structure between different parts in a document).
Revised: We imagine that our design idea of learning unrolled algorithm to enforce constraints can also be transferred to problems such as protein folding and natural language understanding problems (e.g., building correspondence structure between different parts in a document).

Original:  R ELATED W ORK
Revised:  R ELATED W ORK

Original: Classical RNA folding methods identify candidate structures for an RNA sequence energy minimization through DP and rely on thousands of experimentally-measured thermodynamic parameters.
Revised: Classical RNA folding methods identify candidate structures for an RNA sequence energy minimization through DP and rely on thousands of experimentally-measured thermodynamic parameters.

Original: A few widely used methods such as RNAstructure (Bellaousov et al., 2013), Vienna RNAfold (Lorenz et al., 2011) and UNAFold (Markham & Zuker, 2008) adpoted this approach.
Revised: A few widely used methods such as RNAstructure (Bellaousov et al., 2013), Vienna RNAfold (Lorenz et al., 2011) and UNAFold (Markham & Zuker, 2008) adpoted this approach.

Original: These methods typically scale as O ( L 3 ) in time and O ( L 2 ) in storage (Mathews, 2006), making them slow for long sequences.
Revised: These methods typically scale as O ( L 3 ) in time and O ( L 2 ) in storage (Mathews, 2006), making them slow for long sequences.

Original: A recent advance called LinearFold (Huang et al., 2019) achieved linear run time
Revised: A recent advance called LinearFold (Huang et al., 2019) achieved linear run time

Original: O ( L ) by applying beam search, but it can not handle pseudoknots in RNA structures.
Revised: O ( L ) by applying beam search, but it can not handle pseudoknots in RNA structures.

Original: The prediction of lowest free energy structures with pseudoknots is NP-complete (Lyngsø & Pedersen, 2000), so pseudoknots are not considered in most algorithms.
Revised: The prediction of lowest free energy structures with pseudoknots is NP-complete (Lyngsø & Pedersen, 2000), so pseudoknots are not considered in most algorithms.

Original: Heuristic algorithms such as HotKnots (Andronescu et al., 2010) and Probknots (Bellaousov & Mathews, 2010) have been made to predict structures with pseudoknots, but the predictive accuracy and efﬁciency still need to be improved.
Revised: Heuristic algorithms such as HotKnots (Andronescu et al., 2010) and Probknots (Bellaousov & Mathews, 2010) have been made to predict structures with pseudoknots, but the predictive accuracy and efﬁciency still need to be improved.

Original: Learning-based RNA folding methods such as ContraFold (Do et al., 2006) and ContextFold (Zakov et al., 2011) have been proposed for energy parameters estimation due to the increasing availability of known RNA structures, resulting in higher prediction accuracies, but these methods still rely on the above DP-based algorithms for energy minimization.
Revised: Learning-based RNA folding methods such as ContraFold (Do et al., 2006) and ContextFold (Zakov et al., 2011) have been proposed for energy parameters estimation due to the increasing availability of known RNA structures, resulting in higher prediction accuracies, but these methods still rely on the above DP-based algorithms for energy minimization.

Original: A recent deep learning model,
Revised: A recent deep learning model,

Original: CDPfold (Zhang et al., 2019), applied convolutional neural networks to predict base-pairings, but it adopts the dot-bracket representation for RNA secondary structure, which can not represent pseudoknotted structures.
Revised: CDPfold (Zhang et al., 2019), applied convolutional neural networks to predict base-pairings, but it adopts the dot-bracket representation for RNA secondary structure, which can not represent pseudoknotted structures.

Original: Moreover, it requires a DP-based post-processing step whose computational complexity is prohibitive for sequences longer than a few hundreds.
Revised: Moreover, it requires a DP-based post-processing step whose computational complexity is prohibitive for sequences longer than a few hundreds.

Original: Learning with differentiable algorithms is a useful idea that inspires a series of works (Hershey et al., 2014; Belanger et al., 2017; Ingraham et al., 2018; Chen et al., 2018; Shrivastava et al., 2019), which shared similar idea of using differentiable unrolled algorithms as a building block in neural architectures.
Revised: Learning with differentiable algorithms is a useful idea that inspires a series of works (Hershey et al., 2014; Belanger et al., 2017; Ingraham et al., 2018; Chen et al., 2018; Shrivastava et al., 2019), which shared similar idea of using differentiable unrolled algorithms as a building block in neural architectures.

Original: Some models are also applied to structured prediction problems (Hershey et al., 2014;
Revised: Some models are also applied to structured prediction problems (Hershey et al., 2014;

Original: Pillutla et al., 2018; Ingraham et al., 2018), but they did not consider the challenging RNA secondary structure problem or discuss how to properly incorporating constraints into the architecture.
Revised: Pillutla et al., 2018; Ingraham et al., 2018), but they did not consider the challenging RNA secondary structure problem or discuss how to properly incorporating constraints into the architecture.

Original: OptNet (Amos & Kolter, 2017) integrates constraints by differentiating KKT conditions, but it has cubic complexity in the number of variables and constraints, which is prohibitive for the RNA case.
Revised: OptNet (Amos & Kolter, 2017) integrates constraints by differentiating KKT conditions, but it has cubic complexity in the number of variables and constraints, which is prohibitive for the RNA case.

Original: Dependency parsing in NLP is a different but related problem to RNA folding.
Revised: Dependency parsing in NLP is a different but related problem to RNA folding.

Original: It predicts the dependency between the words in a sentence.
Revised: It predicts the dependency between the words in a sentence.

Original: Similar to nested/non-nested structures, the corresponding terms in NLP are projective/non-projective parsing, where most works focus on the former and
Revised: Similar to nested/non-nested structures, the corresponding terms in NLP are projective/non-projective parsing, where most works focus on the former and

Original: DP-based inference algorithms are commonly used (McDonald et al., 2005).
Revised: DP-based inference algorithms are commonly used (McDonald et al., 2005).

Original: Deep learning models (Dozat & Manning, 2016; Kiperwasser & Goldberg, 2016) are proposed to proposed to score the dependency between words, which has a similar ﬂavor to the Deep Score Network in our work.
Revised: Deep learning models (Dozat & Manning, 2016; Kiperwasser & Goldberg, 2016) are proposed to proposed to score the dependency between words, which has a similar ﬂavor to the Deep Score Network in our work.

Original:  RNA S ECONDARY S TRUCTURE P REDICTION P ROBLEM
Revised:  RNA S ECONDARY S TRUCTURE P REDICTION P ROBLEM

Original: In the RNA secondary structure prediction problem, the input is the ordered sequence of bases x = ( x 1 , . . .
Revised: In the RNA secondary structure prediction problem, the input is the ordered sequence of bases x = ( x 1 , . . .

Original: , x L ) and the output is the RNA secondary structure represented by a matrix A ∗ ∈ { 0 , 1 } L × L .
Revised: , x L ) and the output is the RNA secondary structure represented by a matrix A ∗ ∈ { 0 , 1 } L × L .

Original: Hard constraints on the forming of an RNA secondary structure dictate that certain kinds of pairings cannot occur at all (Steeg, 1993).
Revised: Hard constraints on the forming of an RNA secondary structure dictate that certain kinds of pairings cannot occur at all (Steeg, 1993).

Original: Formally, these constraints are:
Revised: Formally, these constraints are:

Original: (i) Only three types of nucleotides combinations, B := { AU, UA }∪ { GC, CG } ∪ { GU, UG } , can form base-pairs.[Equation]
Revised: (i) Only three types of nucleotides combinations, B := { AU, UA }∪ { GC, CG } ∪ { GU, UG } , can form base-pairs.

Original: then A ij = 0 .
Revised: then A ij = 0 .

Original: (ii) No sharp loops are allowed.
Revised: (ii) No sharp loops are allowed.

Original: [Equation]
Revised: [Equation]

Original: (iii)
Revised: (iii)

Original: There is no overlap of pairs, i.e., it is a matching.
Revised: There is no overlap of pairs, i e., it is a matching.

Original: [Equation]
Revised: [Equation]

Original: (i) and (ii) prevent pairing of certain base-pairs based on their types and relative locations.
Revised: (i) and (ii) prevent pairing of certain base-pairs based on their types and relative locations.

Original: Incorporating these two constraints can help the model exclude lots of illegal pairs.
Revised: Incorporating these two constraints can help the model exclude lots of illegal pairs.

Original: (iii) is a global constraint among the entries of A ∗ .
Revised: (iii) is a global constraint among the entries of A ∗ .

Original: The space of all valid secondary structures contains all symmetric matrices A ∈ { 0 , 1 } L × L that satisfy the above three constraints.
Revised: The space of all valid secondary structures contains all symmetric matrices A ∈ { 0 , 1 } L × L that satisfy the above three constraints.

Original: This space is much smaller than the space of all binary matrices { 0 , 1 } L × L .
Revised: This space is much smaller than the space of all binary matrices { 0 , 1 } L × L .

Original: Therefore, if we could incorporate these constraints in our deep model, the reduced output space could help us train a better predictive model with less training data.
Revised: Therefore, if we could incorporate these constraints in our deep model, the reduced output space could help us train a better predictive model with less training data.

Original: We do this by using an unrolled algorithm as the inductive bias to design deep architecture.
Revised: We do this by using an unrolled algorithm as the inductive bias to design deep architecture.

Original:  E2E FOLD : D EEP L EARNING M ODEL B ASED ON U NROLLED A LGORITHM
Revised:  E2E FOLD : D EEP L EARNING M ODEL B ASED ON U NROLLED A LGORITHM

Original: In the literature on feed-forward networks for structured prediction, most models are designed using traditional deep learning architectures.
Revised: In the literature on feed-forward networks for structured prediction, most models are designed using traditional deep learning architectures.

Original: However, for RNA secondary structure prediction, directly using these architectures does not work well due to the limited amount of RNA data points and the hard constraints on forming an RNA secondary structure.
Revised: However, for RNA secondary structure prediction, directly using these architectures does not work well due to the limited amount of RNA data points and the hard constraints on forming an RNA secondary structure.

Original: These challenges motivate the design of our E2Efold deep model, which combines a Deep Score Network with a Post-Processing Network based on an unrolled algorithm for solving a constrained optimization problem.
Revised: These challenges motivate the design of our E2Efold deep model, which combines a Deep Score Network with a Post-Processing Network based on an unrolled algorithm for solving a constrained optimization problem.

Original: 4. D EEP S CORE N ETWORK
Revised: 4. D EEP S CORE N ETWORK

Original: The ﬁrst part of E2Efold is a Deep Score Network U θ ( x ) whose output is an L × L symmetric matrix.
Revised: The ﬁrst part of E2Efold is a Deep Score Network U θ ( x ) whose output is an L × L symmetric matrix.

Original: Each entry of this matrix, i.e., U θ ( x ) ij , indicates the score of nucleotides x i and x j being paired.
Revised: Each entry of this matrix, i.e., U θ ( x ) ij , indicates the score of nucleotides x i and x j being paired.

Original: The x input to the network here is the L × 4 dimensional one-hot embedding.
Revised: The x input to the network here is the L × 4 dimensional one-hot embedding.

Original: The speciﬁc architecture of U θ is shown in Fig 4.
Revised: The speciﬁc architecture of U θ is shown in Fig 4.

Original: It mainly consists of
Revised: It mainly consists of

Original: • a position embedding matrix P which distinguishes { x i } Li =1 by their exact and relative positions
Revised: • a position embedding matrix P which distinguishes { x i } Li =1 by their exact and relative positions: [Equation]

Original: [Equation]
Revised: [Equation]

Original: where { ψ j } is a set of n feature maps such as sin( · ) , poly ( · ) , sigmoid ( · ) , etc, and MLP ( · ) denotes multi-layer perceptions.
Revised: where { ψ j } is a set of n feature maps such as sin( · ) , poly ( · ) , sigmoid ( · ) , etc, and MLP ( · ) denotes multi-layer perceptions.

Original: Such position embedding idea has been used in natural language modeling such as BERT (Devlin et al., 2018), but we adapted for RNA sequence representation ; • a stack of Transformer Encoders (Vaswani et al., 2017) which encode the sequence information and the global dependency between nucleotides ; • a 2D Convolution layers (Wang et al., 2017) for outputting the pairwise scores.
Revised: Such position embedding idea has been used in natural language modeling such as BERT (Devlin et al., 2018), but we adapted for RNA sequence representation; • a stack of Transformer Encoders (Vaswani et al., 2017) which encode the sequence information and the global dependency between nucleotides; • a 2D Convolution layers (Wang et al., 2017) for outputting the pairwise scores.

Original: [Figure]

Original: [Table]

Original: position 𝐿×

Original: [Figure] r [Figure] With the representation power of neural networks, the hope is that we can learn an informative U θ such that higher scoring entries in U θ ( x ) correspond well to actual paired bases in RNA structure.
Revised: With the representation power of neural networks, the hope is that we can learn an informative U θ such that higher scoring entries in U θ ( x ) correspond well to actual paired bases in RNA structure.

Original: Once the score matrix U θ ( x ) is computed, a naive approach to use it is to choose an offset term s ∈ R (e.g., s = 0 ) and let A ij = 1 if U θ ( x ) ij > s .
Revised: Once the score matrix U θ ( x ) is computed, a naive approach to use it is to choose an offset term s ∈ R (e.g., s = 0 ) and let A ij = 1 if U θ ( x ) ij > s .

Original: However, such entry-wise independent predictions of A ij may result in a matrix A that violates the constraints for a valid RNA secondary structure.
Revised: However, such entry-wise independent predictions of A ij may result in a matrix A that violates the constraints for a valid RNA secondary structure.

Original: Therefore, a post-processing step is needed to make sure the predicted A is valid.
Revised: Therefore, a post-processing step is needed to make sure the predicted A is valid.

Original: This step could be carried out separately after U θ is learned.
Revised: This step could be carried out separately after U θ is learned.

Original: But such decoupling of base-pair scoring and post-processing for constraints may lead to sub-optimal results, where the errors in these two stages can not be considered together and tuned together.
Revised: But such decoupling of base-pair scoring and post-processing for constraints may lead to sub-optimal results, where the errors in these two stages can not be considered together and tuned together.

Original: Instead, we will introduce a Post-Processing Network which can be trained end-to-end together with U θ to enforce the constraints.
Revised: Instead, we will introduce a Post-Processing Network which can be trained end-to-end together with U θ to enforce the constraints.

Original: 4. P OST -P ROCESSING N ETWORK
Revised: 4. P OST -P ROCESSING N ETWORK

Original: The second part of E2Efold is a Post-Processing Network PP φ which is an unrolled and parameterized algorithm for solving a constrained optimization problem.
Revised: The second part of E2Efold is a Post-Processing Network PP φ which is an unrolled and parameterized algorithm for solving a constrained optimization problem.

Original: We ﬁrst present how we formulate the post-processing step as a constrained optimization problem and the algorithm for solving it.
Revised: We ﬁrst present how we formulate the post-processing step as a constrained optimization problem and the algorithm for solving it.

Original: After that, we show how we use the algorithm as a template to design deep architecture PP φ .
Revised: After that, we show how we use the algorithm as a template to design deep architecture PP φ .

Original: 4.2. P OST -P ROCESSING W ITH C ONSTRAINED O PTIMIZATION
Revised: 4.2. P OST -P ROCESSING W ITH C ONSTRAINED O PTIMIZATION

Original: Formulation of constrained optimization.
Revised: Formulation of constrained optimization.

Original: Given the scores predicted by U θ ( x ) , we deﬁne the total score 1 2 (cid:80) i,j ( U θ ( x ) ij − s )
Revised: Given the scores predicted by U θ ( x ) , we deﬁne the total score 12 (cid:80) i,j ( U θ ( x ) ij − s )

Original: A ij as the objective to maximize, where s is an offset term.
Revised: A ij as the objective to maximize, where s is an offset term.

Original: Clearly, without structure constraints, the optimal solution is to take A ij = 1 when U θ ( x ) ij > s .
Revised: Clearly, without structure constraints, the optimal solution is to take A ij = 1 when U θ ( x ) ij > s .

Original: Intuitively, the objective measures the covariation between the entries in the scoring matrix and the
Revised: Intuitively, the objective measures the covariation between the entries in the scoring matrix and the

Original: A matrix.
Revised: A matrix.

Original: With constraints, the exact maximization becomes intractable.
Revised: With constraints, the exact maximization becomes intractable.

Original: To make it tractable, we consider a convex relaxation of this discrete optimization to a continuous one by allowing
Revised: To make it tractable, we consider a convex relaxation of this discrete optimization to a continuous one by allowing

Original: A ij ∈ [0 , 1] .
Revised: A ij ∈ [0 , 1] .

Original: Consequently, the solution space that we consider to optimize over is A ( x ) := (cid:8)
Revised: Consequently, the solution space that we consider to optimize over is A ( x ) := (cid:8)

Original: A ∈ [0 , 1] L × L | A is symmetric and satisﬁes constraints (i)-(iii) in Section 3 (cid:9) . 
Revised: A ∈ [0 , 1] L × L | A is symmetric and satisﬁes constraints (i)-(iii) in Section 3 (cid:9) . [Figure]

Original: To further simplify the search space, we deﬁne a nonlinear transformation T on R L × L as T ( ˆ A ) :
Revised: To further simplify the search space, we deﬁne a nonlinear transformation T on R L × L as T ( ˆ A ) :

Original: = 12 (cid:0) ˆ A ◦ ˆ A
Revised: = 12 (cid:0) ˆ A ◦ ˆ A

Original: +( ˆ A ◦ ˆ A ) (cid:62) (cid:1) ◦ M
Revised: + ( ˆ A ◦ ˆ A ) (cid:62) (cid:1) ◦ M

Original: ( x ) , where ◦ denotes element-wise multiplication.
Revised: ( x ) , where ◦ denotes element-wise multiplication.

Original: Matrix M is deﬁned as M ( x ) ij := 1 if x i x j ∈ B and also | i − j | ≥ 4 , and M ( x ) ij := 0 otherwise.
Revised: Matrix M is deﬁned as M ( x ) ij := 1 if x i x j ∈ B and also | i − j | ≥ 4 , and M ( x ) ij := 0 otherwise.

Original: From this deﬁnition we can see that M ( x ) encodes both constraint (i) and (ii).
Revised: From this deﬁnition we can see that M ( x ) encodes both constraint (i) and (ii).

Original: With transformation T , the resulting matrix is non-negative, symmetric, and satisﬁes constraint (i) and (ii).
Revised: With transformation T , the resulting matrix is non-negative, symmetric, and satisﬁes constraint (i) and (ii).

Original: Hence, by deﬁningA :=
Revised: Hence, by deﬁning

Original:  T ( ˆ A ) , the solution space is simpliﬁed as A ( x ) =
Revised: A := T ( ˆ A ) , the solution space is simpliﬁed as A ( x ) =

Original: { A = T ( ˆ A )
Revised: { A = T ( ˆ A )

Original: | ˆ A ∈ R L × L , A 1 ≤ 1 } .
Revised: | ˆ A ∈ R L × L , A 1 ≤ 1 } .

Original: Finally, we introduce a (cid:96) 1 penalty term (cid:107) ˆ A (cid:107) 1 := (cid:80) i,j | ˆ A ij | to make A sparse and formulate the post-processing step as: ( (cid:104)· , ·(cid:105) denotes matrix inner product, i.e., sum of entry-wise multiplication)
Revised: Finally, we introduce a (cid:96) 1 penalty term (cid:107) ˆ A (cid:107) 1 := (cid:80) i,j | ˆ A ij | to make A sparse and formulate the post-processing step as: ( (cid:104)· , ·(cid:105) denotes matrix inner product, i.e., sum of entry-wise multiplication)

Original: [Table]
Revised: [Equation]

Revised: L

Original: [Equation]
Revised: [Equation]

Original: The advantages of this formulation are that the variables ˆ A ij are free variables in R and there are only L inequality constraints A 1 ≤ 1 .
Revised: The advantages of this formulation are that the variables ˆ A ij are free variables in R and there are only L inequality constraints A 1 ≤ 1 .

Original: This system of linear inequalities can be replaced by a set of nonlinear equalities relu ( A 1 − 1 )
Revised: This system of linear inequalities can be replaced by a set of nonlinear equalities relu ( A 1 − 1 )

Original: = 

Revised: =

Original: so that the constrained problem can be easily transformed into an unconstrained problem by introducing a Lagrange multiplier λ ∈ R L + :
Revised: so that the constrained problem can be easily transformed into an unconstrained problem by introducing a Lagrange multiplier λ ∈ R L + :

Original: [Equation]
Revised: [Equation]

Original: Algorithm for solving it.
Revised: Algorithm for solving it.

Original: We use proximal gradient (derived in Appendix B) for maximization and gradient descent for minimization.
Revised: We use proximal gradient (derived in Appendix B) for maximization and gradient descent for minimization.

Original: In each iteration, ˆ A and λ are updated alternatively by: gradient 
Revised: In each iteration, ˆ A and λ are updated alternatively by: gradient step:

Original: [Equation]
Revised: [Equation]

Original: [Equation]

Original: where
Revised: where

Original: [Equation]
Revised: [Equation]

Original: c 
Revised: c >

Original: [Equation]
Revised: [Equation]

Original: 1 when c > 0 and 0 otherwise, [Equation] soft threshold:
Revised: otherwise

Original: [Equation]
Revised: [Equation]

Original: where α , β are step sizes and γ α , γ β are decaying coefﬁcients.
Revised: where α , β are step sizes and γ α , γ β are decaying coefﬁcients.

Original: When it converges at T , an approximate solution Round (cid:0) A T =
Revised: When it converges at T , an approximate solution Round (cid:0) A T =

Original: T ( ˆ A T ) (cid:1) is obtained.
Revised: T ( ˆ A T ) (cid:1) is obtained.

Original: With this algorithm operated on the learned
Revised: With this algorithm operated on the learned

Original: U θ ( x ) , even if this step is disconnected to the training phase of U θ ( x ) , the ﬁnal prediction works much better than many other existing methods (as reported in Section 6).
Revised: U θ ( x ) , even if this step is disconnected to the training phase of U θ ( x ) , the ﬁnal prediction works much better than many other existing methods (as reported in Section 6).

Original: Next, we introduce how to couple this post-processing step with the training of U θ ( x ) to further improve the performance.
Revised: Next, we introduce how to couple this post-processing step with the training of U θ ( x ) to further improve the performance.

Original: 4.2. P OST -P ROCESSING N ETWORK VIA A N U NROLLED A LGORITHM
Revised: 4.2. P OST -P ROCESSING N ETWORK VIA A N U NROLLED A LGORITHM

Original: We design a Post-Processing Network , denoted by PP φ , based on the above algorithm.
Revised: We design a Post-Processing Network , denoted by PP φ , based on the above algorithm.

Original: After it is deﬁned, we can connect it with the deep score network U θ and train them jointly in an end-to-end fashion, so that the training phase of U θ ( x ) is aware of the post-processing step.Algorithm
Revised: After it is deﬁned, we can connect it with the deep score network U θ and train them jointly in an end-to-end fashion, so that the training phase of U θ ( x ) is aware of the post-processing step.

Original: Parameters φ := { w, s, α, β, γ α , γ β , ρ }
Revised: Parameters φ := { w, s, α, β, γ α , γ β , ρ }

Original: U ← softsign ( U − s ) ◦
Revised: U ← softsign ( U − s ) ◦

Original: U ˆ A 0 ← softsign ( U − s ) ◦ sigmoid ( U )
Revised: U ˆ A 0 ← softsign ( U − s ) ◦ sigmoid ( U )

Original: A 0 ← T ( ˆ A 0 ) ; λ 0 ← w · relu ( A 0 1 − 1 )
Revised: A 0 ← T ( ˆ A 0 ) ; λ 0 ← w · relu ( A 0 1 − 1 )

Original: For t = 0 , . . .
Revised: For t = 0 , . . .

Original: , T − 1 do λ t +1 ,
Revised: , T − 1 do λ t +1 ,

Original: A t +1 , ˆ A t +1 =
Revised: A t +1 , ˆ A t +1 =

Original: PPcell φ ( U, M, λ t , A t , ˆ A t , t ) return { A t } T t =
Revised: PPcell φ ( U, M, λ t , A t , ˆ A t , t ) return { A t } Tt =

Original: Function PPcell φ ( U, M, λ , A, ˆ A, t ) :
Revised: Function PPcell φ ( U, M, λ , A, ˆ A, t ) :

Original: G ← 12 U − ( λ ◦ softsign ( A 1 − 1 )) 1 (cid:62) ˙
Revised: G ← 12 U − ( λ ◦ softsign ( A 1 − 1 )) 1 (cid:62) ˙

Original: A ← ˆ A + α · γ αt · ˆ A ◦ M ◦
Revised: A ← ˆ A + α · γ αt · ˆ A ◦ M ◦

Original: ( G + G (cid:62) )
Revised: ( G + G (cid:62) )

Original: ˆ A ← relu ( | ˙ A | − ρ · α · γ αt ) ˆ A ← 1 − relu (1 − ˆ A ) [i.e., min( ˆ A, 1) ]
Revised: ˆ A ← relu ( | ˙ A | − ρ · α · γ αt ) ˆ A ← 1 − relu (1 − ˆ A ) [i.e., min( ˆ A, 1) ]

Original: A ← T ( ˆ A ) ; λ ← λ + β · γ βt · relu ( A 1 − 1 ) return λ , A, ˆ A
Revised: A ← T ( ˆ A ) ; λ ← λ + β · γ βt · relu ( A 1 − 1 ) return λ , A, ˆ A

Original: The speciﬁc computation graph of PP φ is given in Algorithm 1, whose main component is a recurrent cell which we call PPcell φ .
Revised: The speciﬁc computation graph of PP φ is given in Algorithm 1, whose main component is a recurrent cell which we call PPcell φ .

Original: The computation graph is almost the same as the iterative update from
Revised: The computation graph is almost the same as the iterative update from

Original: Eq.
Revised: Eq.

Original: 3 to Eq.
Revised: 3 to Eq.

Original: 6, except for several modiﬁcations:
Revised: 6, except for several modiﬁcations:

Original: • (learnable hyperparameters)
Revised: • (learnable hyperparameters)

Original: The hyperparameters including step sizes α, β , decaying rate γ α , γ β , sparsity coefﬁcient ρ and the offset term s are treated as learnable parameters in φ , so that there is no need to tune the hyperparameters by hand but automatically learn them from data instead.
Revised: The hyperparameters including step sizes α, β , decaying rate γ α , γ β , sparsity coefﬁcient ρ and the offset term s are treated as learnable parameters in φ , so that there is no need to tune the hyperparameters by hand but automatically learn them from data instead.

Original: • (ﬁxed # iterations) Instead of running the iterative updates until convergence, PPcell φ is applied recursively for T iterations where T is a manually ﬁxed number.
Revised: • (ﬁxed # iterations) Instead of running the iterative updates until convergence, PPcell φ is applied recursively for T iterations where T is a manually ﬁxed number.

Original: This is why in Fig 3 the output space of E2Efold is slightly larger than the true solution space.
Revised: This is why in Fig 3 the output space of E2Efold is slightly larger than the true solution space.

Original: • (smoothed sign function)
Revised: • (smoothed sign function)

Original: Resulted from the gradient of relu ( · ) , the update step in Eq.
Revised: Resulted from the gradient of relu ( · ) , the update step in Eq.

Original: 4 contains a sign ( · ) function.
Revised: 4 contains a sign ( · ) function.

Original: However, to push gradient through PP φ , we require a differentiable update step.
Revised: However, to push gradient through PP φ , we require a differentiable update step.

Original: Therefore, we use a smoothed sign function deﬁned as softsign ( c ) :
Revised: Therefore, we use a smoothed sign function deﬁned as softsign ( c ) :

Original: = 1 / (1 + exp( − kc )) , where k is a temperature.
Revised: = 1 / (1 + exp( − kc )) , where k is a temperature.

Original: • (clip ˆ A )
Revised: • (clip ˆ A )

Original: An additional step, ˆ A ← min( ˆ A, 1) , is included to make the output A t at each iteration stay in the range [0 , 1] L × L .
Revised: An additional step, ˆ A ← min( ˆ A, 1) , is included to make the output A t at each iteration stay in the range [0 , 1] L × L .

Original: This is useful for computing the loss over intermediate results { A t } Tt =1 , for which we will explain more in Section 5.
Revised: This is useful for computing the loss over intermediate results { A t } Tt =1 , for which we will explain more in Section 5.

Original: With these modiﬁcations, the Post-Processing Network PP φ is a tuning-free and differentiable unrolled algorithm with meaningful intermediate outputs.
Revised: With these modiﬁcations, the Post-Processing Network PP φ is a tuning-free and differentiable unrolled algorithm with meaningful intermediate outputs.

Original: Combining it with the deep score network, the ﬁnal deep model is
Revised: Combining it with the deep score network, the ﬁnal deep model is

Original: [Equation]
Revised: [Equation]

Original:  E ND - TO -E ND T RAINING A LGORITHM
Revised:  E ND - TO -E ND T RAINING A LGORITHM

Original: Given a dataset D containing examples of input-output pairs ( x , A ∗ ) , the training procedure of
Revised: Given a dataset D containing examples of input-output pairs ( x , A ∗ ) , the training procedure of

Original: E2Efold is similar to standard gradient-based supervised learning.
Revised: E2Efold is similar to standard gradient-based supervised learning.

Original: However, for RNA secondary structure prediction problems, commonly used metrics for evaluating predictive performances are
Revised: However, for RNA secondary structure prediction problems, commonly used metrics for evaluating predictive performances are

Original: F1 score, precision and recall, which are non-differentiable.
Revised: F1 score, precision and recall, which are non-differentiable.

Original: Differentiable F1 Loss.
Revised: Differentiable F1 Loss.

Original: To directly optimize these metrics, we mimic true positive (TP), false positive (FP), true negative (TN) and false negative (FN) by deﬁning continuous functions on [0 , 1] L × L : 
Revised: To directly optimize these metrics, we mimic true positive (TP), false positive (FP), true negative (TN) and false negative (FN) by deﬁning continuous functions on [0 , 1] L × L : TP = (cid:104) A

Original: [Equation]
Revised: [Equation]

Original: Since F1 = 2 TP / (2 TP + FP + FN ) , we deﬁne a loss function to mimic the negative of F1 score as: 
Revised: Since F1 = 2 TP / (2 TP + FP + FN ) , we deﬁne a loss function to mimic the negative of F1 score as: [Equation]

Original: [Equation]
Revised: [Equation]

Original: Assuming that (cid:80) ij A ∗ ij (cid:54) = 0 , this loss is well-deﬁned and differentiable on [0 , 1] L × L .
Revised: Assuming that (cid:80) ij A ∗ ij (cid:54) = 0 , this loss is well-deﬁned and differentiable on [0 , 1] L × L .

Original: Precision and recall losses can be deﬁned in a similar way, but we optimize F1 score in this paper.
Revised: Precision and recall losses can be deﬁned in a similar way, but we optimize F1 score in this paper.

Original: It is notable that this F1 loss takes advantages over other differentiable losses including (cid:96) 2 and cross-entropy losses, because there are much more negative samples (i.e. A ij = 0 ) than positive samples (i.e. A ij = 1 ).
Revised: It is notable that this F1 loss takes advantages over other differentiable losses including (cid:96) 2 and cross-entropy losses, because there are much more negative samples (i.e. A ij = 0 ) than positive samples (i.e. A ij = 1 ).

Original: A hand-tuned weight is needed to balance them while using (cid:96) 2 or crossentropy losses, but F1 loss handles this issue automatically, which can be useful for a number of problems (Wang et al., 2016; Li et al., 2017).
Revised: A hand-tuned weight is needed to balance them while using (cid:96) 2 or crossentropy losses, but F1 loss handles this issue automatically, which can be useful for a number of problems (Wang et al., 2016; Li et al., 2017).

Original: Overall Loss Function.
Revised: Overall Loss Function.

Original: As noted earlier, E2Efold outputs a matrix A t ∈ [0 , 1] L × L in each iteration.
Revised: As noted earlier, E2Efold outputs a matrix A t ∈ [0 , 1] L × L in each iteration.

Original: This allows us to add auxiliary losses to regularize the intermediate results, guiding it to learn parameters which can generate a smooth solution trajectory.
Revised: This allows us to add auxiliary losses to regularize the intermediate results, guiding it to learn parameters which can generate a smooth solution trajectory.

Original: More speciﬁcally, we use an objective that depends on the entire trajectory of optimization:
Revised: More speciﬁcally, we use an objective that depends on the entire trajectory of optimization:

Original: [Equation]
Revised: [Equation]

Original: where { A t } Tt =1 = PP φ ( U θ ( x ) , M ( x )) and γ ≤ 1 is a discounting factor.
Revised: where { A t } Tt =1 = PP φ ( U θ ( x ) , M ( x )) and γ ≤ 1 is a discounting factor.

Original: Empirically, we ﬁnd it very useful to pre-train U θ using logistic regression loss.
Revised: Empirically, we ﬁnd it very useful to pre-train U θ using logistic regression loss.

Original: Also, it is helpful to add this additional loss to Eq.
Revised: Also, it is helpful to add this additional loss to Eq.

Original: 9 as a regularization.
Revised: 9 as a regularization.

Original:  E XPERIMENTS
Revised:  E XPERIMENTS

Original: We compare E2Efold with the SOTA and also the most commonly used methods in the RNA secondary structure prediction ﬁeld on two benchmark datasets.
Revised: We compare E2Efold with the SOTA and also the most commonly used methods in the RNA secondary structure prediction ﬁeld on two benchmark datasets.

Original: It is revealed from the experimental results that E2Efold achieves 29.7% improvement in terms of F1 score on RNAstralign dataset and it infers the RNA secondary structure as fast as the most efﬁcient algorithm (LinearFold) among existing ones.
Revised: It is revealed from the experimental results that E2Efold achieves 29.7% improvement in terms of F1 score on RNAstralign dataset and it infers the RNA secondary structure as fast as the most efﬁcient algorithm (LinearFold) among existing ones.

Original: An ablation study is also conducted to show the necessity of pushing gradient through the post-processing step.
Revised: An ablation study is also conducted to show the necessity of pushing gradient through the post-processing step.

Original: [Table]
Revised: [Table]

Original: Dataset.
Revised: Dataset.

Original: We use two benchmark datasets: (i) ArchiveII
Revised: We use two benchmark datasets: (i) ArchiveII

Original: (Sloma & Mathews, 2016), containing 3975 RNA structures from 10 RNA types, is a widely used benchmark dataset for classical RNA folding methods.
Revised: (Sloma & Mathews, 2016), containing 3975 RNA structures from 10 RNA types, is a widely used benchmark dataset for classical RNA folding methods.

Original: (ii) RNAStralign (Tan et al., 2017), composed of 37149 structures from 8 RNA types, is one of the most comprehensive collections of RNA structures in the market.
Revised: (ii) RNAStralign (Tan et al., 2017), composed of 37149 structures from 8 RNA types, is one of the most comprehensive collections of RNA structures in the market.

Original: After removing redundant sequences and structures, 30451 structures remain.
Revised: After removing redundant sequences and structures, 30451 structures remain.

Original: See Table 1 for statistics about these two datasets.
Revised: See Table 1 for statistics about these two datasets.

Original: Experiments On RNAStralign.
Revised: Experiments On RNAStralign.

Original: We divide RNAStralign dataset into training, testing and validation sets by stratiﬁed sampling (see details in Table 7 and Fig 6), so that each set contains all RNA types.
Revised: We divide RNAStralign dataset into training, testing and validation sets by stratiﬁed sampling (see details in Table 7 and Fig 6), so that each set contains all RNA types.

Original: We compare the performance of E2Efold to six methods including CDPfold, LinearFold, Mfold, RNAstructure (ProbKnot), RNAfold and CONTRAfold.
Revised: We compare the performance of E2Efold to six methods including CDPfold, LinearFold, Mfold, RNAstructure (ProbKnot), RNAfold and CONTRAfold.

Original: Both E2Efold and CDPfold are learned from the same training/validation sets.
Revised: Both E2Efold and CDPfold are learned from the same training/validation sets.

Original: For other methods, we directly use the provided packages or web-servers to generate predicted structures.
Revised: For other methods, we directly use the provided packages or web-servers to generate predicted structures.

Original: We evaluate the F1 score, Precision and Recall for each sequence in the test set.
Revised: We evaluate the F1 score, Precision and Recall for each sequence in the test set.

Original: Averaged values are reported in Table 2.
Revised: Averaged values are reported in Table 2.

Original: As suggested by Mathews (2019), for a base pair ( i, j ), the following predictions are also considered as correct: ( i + 1 , j ), ( i − 1 , j ), ( i, j + 1 ), ( i, j − 1 ), so we also reported the metrics when one-position shift is allowed.
Revised: As suggested by Mathews (2019), for a base pair ( i, j ), the following predictions are also considered as correct: ( i + 1 , j ), ( i − 1 , j ), ( i, j + 1 ), ( i, j − 1 ), so we also reported the metrics when one-position shift is allowed.

Original: [Table]
Revised: [Table]

Original: As shown in Table 2, traditional methods can achieve a F1 score ranging from 0.433 to 0.624, which is consistent with the performance reported with their original papers.
Revised: As shown in Table [Table] traditional methods can achieve a F1 score ranging from 0.433 to 0.624, which is consistent with the performance reported with their original papers.

Original: The two learning-based methods, CONTRAfold and CDPfold, can outperform classical methods with reasonable margin on some criteria.
Revised: The two learning-based methods, CONTRAfold and CDPfold, can outperform classical methods with reasonable margin on some criteria.

Original: E2Efold, on the other hand, signiﬁcantly outperforms all previous methods across all criteria, with at least 20% improvement.
Revised: E2Efold, on the other hand, signiﬁcantly outperforms all previous methods across all criteria, with at least 20% improvement.

Original: Notice that, for almost all the other methods, the recall is usually higher than precision, while for E2Efold, the precision is higher than recall.
Revised: Notice that, for almost all the other methods, the recall is usually higher than precision, while for E2Efold, the precision is higher than recall.

Original: That can be the result of incorporating constraints during neural network training.
Revised: That can be the result of incorporating constraints during neural network training.

Original: Fig 5 shows the distributions of
Revised: Fig 5 shows the distributions of

Original: F1 scores for each method.
Revised: F1 scores for each method.

Original: It suggests that E2Efold has consistently good performance.
Revised: It suggests that E2Efold has consistently good performance.

Original: To estimate the performance of E2Efold on long sequences, we also compute the F1 scores weighted by the length of sequences, such that the results are more dominated by longer sequences.
Revised: To estimate the performance of E2Efold on long sequences, we also compute the F1 scores weighted by the length of sequences, such that the results are more dominated by longer sequences.

Original: Detailed results are given in Appendix D.3.
Revised: Detailed results are given in Appendix D.3.

Revised: [Table]

Revised: [Table]

Original: Test On ArchiveII Without Re-training.
Revised: Test On ArchiveII Without Re-training.

Original: To mimic the real world scenario where the users want to predict newly discovered RNA’s structures which may have a distribution different from the training dataset, we directly test the model learned from RNAStralign training set on the ArchiveII dataset, without re-training the model.
Revised: To mimic the real world scenario where the users want to predict newly discovered RNA’s structures which may have a distribution different from the training dataset, we directly test the model learned from RNAStralign training set on the ArchiveII dataset, without re-training the model.

Original: To make the comparison fair, we exclude sequences that are overlapped with the RNAStralign dataset.
Revised: To make the comparison fair, we exclude sequences that are overlapped with the RNAStralign dataset.

Original: We then test the model on sequences in ArchiveII that have overlapping RNA types (5SrRNA, 16SrRNA, etc) with the RNAStralign dataset.
Revised: We then test the model on sequences in ArchiveII that have overlapping RNA types (5SrRNA, 16SrRNA, etc) with the RNAStralign dataset.

Original: Results are shown in Table 3.
Revised: Results are shown in Table 3.

Original: It is understandable that the performances of classical methods which are not learning- [Table] [Table] based are consistent with that on RNAStralign.
Revised: It is understandable that the performances of classical methods which are not learningbased are consistent with that on RNAStralign.

Original: The performance of E2Efold, though is not as good as that on RNAStralign, is still better than all the other methods across different evaluation criteria.
Revised: The performance of E2Efold, though is not as good as that on RNAStralign, is still better than all the other methods across different evaluation criteria.

Original: In addition, since the original ArchiveII dataset contains domain sequences (subsequences) [Table] we remove the domains and report the results in Appendix D.4, which are similar to results in Table [Table]
Revised: In addition, since the original ArchiveII dataset contains domain sequences (subsequences), we remove the domains and report the results in Appendix D.4, which are similar to results in Table 3.

Original: Inference Time Comparison.
Revised: Inference Time Comparison.

Original: We record the running time of all algorithms for predicting RNA secondary structures on the RNAStralign test set, which is summarized in Table 4.
Revised: We record the running time of all algorithms for predicting RNA secondary structures on the RNAStralign test set, which is summarized in Table 4.

Original: LinearFold is the most efﬁcient among baselines because it uses beam pruning heuristic to accelerate DP.
Revised: LinearFold is the most efﬁcient among baselines because it uses beam pruning heuristic to accelerate DP.

Original: CDPfold, which achieves higher F1 score than other baselines, however, is extremely slow due to its DP post-processing step.
Revised: CDPfold, which achieves higher F1 score than other baselines, however, is extremely slow due to its DP post-processing step.

Original: Since we use a gradient-based algorithm which is simple to design the PostProcessing Network, E2Efold is fast.
Revised: Since we use a gradient-based algorithm which is simple to design the PostProcessing Network, E2Efold is fast.

Original: On GPU, E2Efold has similar inference time as LinearFold.
Revised: On GPU, E2Efold has similar inference time as LinearFold.

Original: [Table]
Revised: [Table]

Original: Pseudoknot Prediction.
Revised: Pseudoknot Prediction.

Original: Even though E2Efold does not exclude pseudoknots, it is not sure whether it actually generates pseudoknotted structures.
Revised: Even though E2Efold does not exclude pseudoknots, it is not sure whether it actually generates pseudoknotted structures.

Original: Therefore, we pick all sequences containing pseudoknots and compute the averaged F1 score only on this set.
Revised: Therefore, we pick all sequences containing pseudoknots and compute the averaged F1 score only on this set.

Original: Besides, we count the number of pseudoknotted sequences that are predicted as pseudoknotted and report this count as true positive (TP).
Revised: Besides, we count the number of pseudoknotted sequences that are predicted as pseudoknotted and report this count as true positive (TP).

Original: Similarly we report TN, FP and FN in Table 5 along with the F1 score.
Revised: Similarly we report TN, FP and FN in Table 5 along with the F1 score.

Original: Most tools exclude pseudoknots while RNAstructure is the most famous one that can predict pseudoknots, so we choose it for comparison.
Revised: Most tools exclude pseudoknots while RNAstructure is the most famous one that can predict pseudoknots, so we choose it for comparison.

Original: [Table]
Revised: [Table]

Original: true structure
Revised: true structure

Original: E2Efold
Revised: E2Efold

Original: Visualization.
Revised: Visualization.

Original: We visualize predicted structures of three RNA sequences in the main text.
Revised: We visualize predicted structures of three RNA sequences in the main text.

Original: More examples are provided in appendix (Fig 8 to 14).
Revised: More examples are provided in appendix (Fig 8 to 14).

Original: In these ﬁgures, purple lines indicate edges of pseudoknotted elements.
Revised: In these ﬁgures, purple lines indicate edges of pseudoknotted elements.

Original: Although CDPfold has higher F1 score than other baselines, its predictions are visually far from the ground-truth.
Revised: Although CDPfold has higher F1 score than other baselines, its predictions are visually far from the ground-truth.

Original: Instead, RNAstructure and
Revised: Instead, RNAstructure and

Original: CONTRAfold produce comparatively more reasonable visualizations among all baselines, so we compare with them.
Revised: CONTRAfold produce comparatively more reasonable visualizations among all baselines, so we compare with them.

Original: These two methods can capture a rough sketch of the structure, but not good enough.
Revised: These two methods can capture a rough sketch of the structure, but not good enough.

Original: For most cases, E2Efold produces structures most similar to the ground-truths.
Revised: For most cases, E2Efold produces structures most similar to the ground-truths.

Original: Moreover, it works surprisingly well for some RNA sequences that are long and very difﬁcult to predict.
Revised: Moreover, it works surprisingly well for some RNA sequences that are long and very difﬁcult to predict.

Original: [Table]
Revised: [Table]

Original: Ablation Study.
Revised: Ablation Study.

Original: To exam whether integrating the two stages by pushing gradient through the post-process is necessary for performance of E2Efold, we conduct an ablation study (Table 6).
Revised: To exam whether integrating the two stages by pushing gradient through the post-process is necessary for performance of E2Efold, we conduct an ablation study (Table 6).

Original: We test the performance when the post-processing step is disconnected with the training of Deep Score Network U θ .
Revised: We test the performance when the post-processing step is disconnected with the training of Deep Score Network U θ .

Original: We apply the post-processing step (i.e., for solving augmented
Revised: We apply the post-processing step (i.e., for solving augmented

Original: Lagrangian) after U θ is learned (thus the notation “ U θ + PP” in Table 6).
Revised: Lagrangian) after U θ is learned (thus the notation “ U θ + PP” in Table 6).

Original: Although “ U θ + PP” performs decently well, with constraints incorporated into training, E2Efold still has signiﬁcant advantages over it.
Revised: Although “ U θ + PP” performs decently well, with constraints incorporated into training, E2Efold still has signiﬁcant advantages over it.

Original: Discussion.
Revised: Discussion.

Original: To better estimate the performance of E2Efold on different RNA types, we include the per-family F1 scores in Appendix D.5.
Revised: To better estimate the performance of E2Efold on different RNA types, we include the per-family F1 scores in Appendix D.5.

Original: E2Efold performs signiﬁcantly better than other methods in 16S rRNA, tRNA, 5S RNA, tmRNA and telomerase.
Revised: E2Efold performs signiﬁcantly better than other methods in 16S rRNA, tRNA, 5S RNA, tmRNA, and telomerase.

Original: These results are from a single model.
Revised: These results are from a single model.

Original: In the future, we can view it as multi-task learning and further improve the performance by learning multiple models for different RNA families and learning an additional classiﬁer to predict which model to use for the input sequence.
Revised: In the future, we can view it as multi-task learning and further improve the performance by learning multiple models for different RNA families and learning an additional classiﬁer to predict which model to use for the input sequence.

Original:  C ONCLUSION
Revised:  C ONCLUSION

Original: We propose a novel DL model, E2Efold, for RNA secondary structure prediction, which incorporates hard constraints in its architecture design.
Revised: We propose a novel DL model, E2Efold, for RNA secondary structure prediction, which incorporates hard constraints in its architecture design.

Original: Comprehensive experiments are conducted to show the superior performance of E2Efold, no matter on quantitative criteria, running time, or visualization.
Revised: Comprehensive experiments are conducted to show the superior performance of E2Efold, no matter on quantitative criteria, running time, or visualization.

Original: Further studies need to be conducted to deal with the RNA types with less samples.
Revised: Further studies need to be conducted to deal with the RNA types with less samples.

Original: Finally, we believe the idea of unrolling constrained programming and pushing gradient through post-processing can be generic and useful for other constrained structured prediction problems
Revised: Finally, we believe the idea of unrolling constrained programming and pushing gradient through post-processing can be generic and useful for other constrained structured prediction problems. A CKNOWLEDGEMENT

Revised: We would like to thank anonymous reviewers for providing constructive feedbacks.

Revised: This work is supported in part by NSF grants CDS&E-1900017 D3SC, CCF-1836936 FMitF, IIS-1841351, CAREER IIS-1350983 to L.S. and grants from King Abdullah University of Science and Technology, under award numbers BAS/1/1624-01, FCC/1/1976-18-01, FCC/1/1976-23-01, FCC/1/1976-25-01,

Revised: FCC/1/1976-26-01, REI/1/0018-01- and URF/1/4098-01-01.

Original: A M ORE D ISCUSSION O N R ELATED W ORKS
Revised: A M ORE D ISCUSSION O N R ELATED W ORKS

Original: Here we explain the difference between our approach and other works on unrolling optimization problems.
Revised: Here we explain the difference between our approach and other works on unrolling optimization problems.

Original: First, our view of incorporating constraints to reduce output space and to reduce sample complexity is novel.
Revised: First, our view of incorporating constraints to reduce output space and to reduce sample complexity is novel.

Original: Previous works (Hershey et al., 2014; Belanger et al., 2017; Ingraham et al., 2018) did not discuss these aspects.
Revised: Previous works (Hershey et al., 2014; Belanger et al., 2017; Ingraham et al., 2018) did not discuss these aspects.

Original: The most related work which also integrates constraints is OptNet (Amos &
Revised: The most related work which also integrates constraints is OptNet (Amos &

Original: Kolter, 2017), but its very expensive and can not scale to the RNA problem.
Revised: Kolter, 2017), but its very expensive and can not scale to the RNA problem.

Original: Therefore, our proposed approach is a simple and effective one.
Revised: Therefore, our proposed approach is a simple and effective one.

Original: Second, compared to (Chen et al., 2018; Shrivastava et al., 2019), our approach has a different purpose of using the algorithm.
Revised: Second, compared to (Chen et al., 2018; Shrivastava et al., 2019), our approach has a different purpose of using the algorithm.

Original: Their goal is to learn a better algorithm, so they commonly make their architecture more ﬂexible than the original algorithm for the room of improvement.
Revised: Their goal is to learn a better algorithm, so they commonly make their architecture more ﬂexible than the original algorithm for the room of improvement.

Original: However, we aim at enforcing constraints.
Revised: However, we aim at enforcing constraints.

Original: To ensure that constraints are nicely incorporated, we keep the original structure of the algorithm and only make the hyperparameters learnable.
Revised: To ensure that constraints are nicely incorporated, we keep the original structure of the algorithm and only make the hyperparameters learnable.

Original: Finally, although all works consider end-to-end training, none of them can directly optimize the F score.
Revised: Finally, although all works consider end-to-end training, none of them can directly optimize the F score.

Original: We proposed a differentiable loss function to mimic the F1 score/precision/recall, which is effective and also very useful when negative samples are much fewer than positive samples (or the inverse).
Revised: We proposed a differentiable loss function to mimic the F1 score/precision/recall, which is effective and also very useful when negative samples are much fewer than positive samples (or the inverse).

Original: B D ERIVATION O F T HE P ROXIMAL G RADIENT S TEP
Revised: B D ERIVATION O F T HE P ROXIMAL G RADIENT S TEP

Original: The maximization step in Eq.
Revised: The maximization step in Eq.

Original: 2 can be written as the following minimization:
Revised: 2 can be written as the following minimization:

Original: [Equation] [Equation]
Revised: [Equation] [Equation]

Original: Consider the quadratic approximation of − f
Revised: Consider the quadratic approximation of − f

Original: ( ˆ A ) centered at ˆ A t :
Revised: ( ˆ A ) centered at ˆ A t :

Original: [Equation]
Revised: [Equation]

Original: and rewrite the optimization in Eq. 10 as
Revised: and rewrite the optimization in Eq. 10 as

Original: [Equation]
Revised: [Equation]

Original: where
Revised: where

Original: [Equation]
Revised: [Equation]

Original: Next
Revised: Next

Original: [Equation]
Revised: [Equation]

Original: we deﬁne proximal mapping as a function depending on α as follows:
Revised: we deﬁne proximal mapping as a function depending on α as follows:

Original: [Equation]
Revised: [Equation]

Original: Since we always use ˆ A ◦ ˆ A instead of ˆ A in our problem, we can take the absolute value | prox α ( ˙ A t +1 )
Revised: Since we always use ˆ A ◦ ˆ A instead of ˆ A in our problem, we can take the absolute value | prox α ( ˙ A t +1 )

Original: | =
Revised: | =

Original: relu ( | ˙
Revised: relu ( | ˙

Original: A t +1 | − αρ ) without loss of generality.
Revised: A t +1 | − αρ ) without loss of generality.

Original: Therefore, the proximal gradient step is
Revised: Therefore, the proximal gradient step is

Original: [Equation]
Revised: [Equation]

Original: More speciﬁcally, in the main text, we write ∂f ∂ ˆ A t as
Revised: More speciﬁcally, in the main text, we write ∂f ∂ ˆ A t as

Original: [Equation]
Revised: [Equation]

Original: The last equation holds since ˆ A t will remain symmetric in our algorithm if the initial ˆ A 0 is symmetric.
Revised: The last equation holds since ˆ A t will remain symmetric in our algorithm if the initial ˆ A 0 is symmetric.

Original: Moreover, in the main text, α is replaced by α · γ tα .
Revised: Moreover, in the main text, α is replaced by α · γ tα .

Original: C I MPLEMENTATION A ND T RAINING D ETAILS
Revised: C I MPLEMENTATION A ND T RAINING D ETAILS

Original: We used Pytorch to implement the whole package of E2Efold.
Revised: We used Pytorch to implement the whole package of E2Efold.

Original: Deep Score Network.
Revised: Deep Score Network.

Original: In the deep score network, we used a hyper-parameter, d , which was set as 10 in the ﬁnal model, to control the model capacity.
Revised: In the deep score network, we used a hyper-parameter, d , which was set as 10 in the ﬁnal model, to control the model capacity.

Original: In the transformer encoder layers, we set the number of heads as 2, the dimension of the feed-forward network as 2048, the dropout rate as 0.1.
Revised: In the transformer encoder layers, we set the number of heads as 2, the dimension of the feed-forward network as 2048, the dropout rate as 0.1.

Original: As for the position encoding, we used 58 base functions to form the position feature map, which goes through a 3-layer fully-connected neural network (the number of hidden neurons is 5 ∗ d ) to generate the ﬁnal position embedding, whose dimension is L by d .
Revised: As for the position encoding, we used 58 base functions to form the position feature map, which goes through a 3-layer fully-connected neural network (the number of hidden neurons is 5 ∗ d ) to generate the ﬁnal position embedding, whose dimension is L by d .

Original: In the ﬁnal output layer, the pairwise concatenation is carried out in the following way: Let X ∈ R L × 3 d be the input to the ﬁnal output layers in Figure 4 (which is the concatenation of the sequence embedding and position embedding).
Revised: In the ﬁnal output layer, the pairwise concatenation is carried out in the following way: Let X ∈ R L × 3 d be the input to the ﬁnal output layers in Figure 4 (which is the concatenation of the sequence embedding and position embedding).

Original: The pairwise concatenation results in a tensor Y ∈ R L × L × 6 d deﬁned as
Revised: The pairwise concatenation results in a tensor Y ∈ R L × L × 6 d deﬁned as

Original: [Equation]
Revised: [Equation]

Original: where Y ( i, j, :) ∈
Revised: where Y ( i, j, :) ∈

Original: R 6 d , X ( i, :) ∈
Revised: R 6 d , X ( i, :) ∈

Original: R 3 d , and X ( j, :) ∈ R 3 d .
Revised: R 3 d , and X ( j, :) ∈ R 3 d .

Original: In the 2D convolution layers, the the channel of the feature map gradually change from 6 ∗ d to d , and ﬁnally to 1.
Revised: In the 2D convolution layers, the the channel of the feature map gradually change from 6 ∗ d to d , and ﬁnally to 1.

Original: We set the kernel size as 1 to translate the feature map into the ﬁnal score matrix.
Revised: We set the kernel size as 1 to translate the feature map into the ﬁnal score matrix.

Original: Each 2D convolution layer is followed by a batch normalization layer.
Revised: Each 2D convolution layer is followed by a batch normalization layer.

Original: We used ReLU as the activation function within the whole score network.
Revised: We used ReLU as the activation function within the whole score network.

Original: Post-Processing Network.
Revised: Post-Processing Network.

Original: In the PP network, we initialized w as 1, s as log(9) , α as 0.01, β as 0.1, γ α as 0.99, γ β as 0.99, and ρ as 1.
Revised: In the PP network, we initialized w as 1, s as log(9) , α as 0.01, β as 0.1, γ α as 0.99, γ β as 0.99, and ρ as 1.

Original: We set T as 20.
Revised: We set T as 20.

Original: Training details.
Revised: Training details.

Original: During training, we ﬁrst pre-trained a deep score network and then ﬁne-tuned the score network and the PP network together.
Revised: During training, we ﬁrst pre-trained a deep score network and then ﬁne-tuned the score network and the PP network together.

Original: To pre-train the score network, we used binary crossentropy loss and Adam optimizer.
Revised: To pre-train the score network, we used binary crossentropy loss and Adam optimizer.

Original: Since, in the contact map, most entries are 0, we used weighted loss and set the positive sample weight as 300.
Revised: Since, in the contact map, most entries are 0, we used weighted loss and set the positive sample weight as 300.

Original: The batch size was set to fully use the GPU memory, which was 20 for the Titan Xp card.
Revised: The batch size was set to fully use the GPU memory, which was 20 for the Titan Xp card.

Original: We pre-train the score network for 100 epochs.
Revised: We pre-train the score network for 100 epochs.

Original: As for the ﬁne-tuning, we used binary cross-entropy loss for the score network and F1 loss for the PP network and summed up these two losses as the ﬁnal loss.
Revised: As for the ﬁne-tuning, we used binary cross-entropy loss for the score network and F1 loss for the PP network and summed up these two losses as the ﬁnal loss.

Original: The user can also choose to only use the F1 loss or use another coefﬁcient to weight the loss estimated on the score network U θ .
Revised: The user can also choose to only use the F1 loss or use another coefﬁcient to weight the loss estimated on the score network U θ .

Original: Due to the limitation of the GPU memory, we set the batch size as 8.
Revised: Due to the limitation of the GPU memory, we set the batch size as 8.

Original: However, we updated the model’s parameters everysteps to stabilize the training process.
Revised: However, we updated the model’s parameters everysteps to stabilize the training process.

Original: We ﬁne-tuned the whole model for 20 epochs.
Revised: We ﬁne-tuned the whole model for 20 epochs.

Original: Also, since the data for different RNA families are imbalanced, we up-sampled the data in the small RNA families based on their size.
Revised: Also, since the data for different RNA families are imbalanced, we up-sampled the data in the small RNA families based on their size.

Original: For the training of the score network U θ in the ablation study, it is exactly the same as the training of the above mentioned process.
Revised: For the training of the score network U θ in the ablation study, it is exactly the same as the training of the above mentioned process.

Original: Except that during the ﬁne-tune process, there is the unrolled number of iterations is set to be 0.
Revised: Except that during the ﬁne-tune process, there is the unrolled number of iterations is set to be 0.

Original: D M ORE E XPERIMENTAL D ETAILS D. D ATASET S TATISTICS
Revised: D M ORE E XPERIMENTAL D ETAILS D. D ATASET S TATISTICS

Original: [Table]
Revised: [Table]

Original: D. T WO - SAMPLE H YPOTHESIS T ESTING
Revised: D. T WO - SAMPLE H YPOTHESIS T ESTING

Original: To better understand the data distribution in different datasets, we provide statistical hypothesis test results in this section.
Revised: To better understand the data distribution in different datasets, we provide statistical hypothesis test results in this section.

Original: We can assume that
Revised: We can assume that

Original: (i) Samples in RNAStralign training set are i.i.d.
Revised: (i) Samples in RNAStralign training set are i.i.d.

Original: from the distribution P ( RNAStr train ) ; (ii) Samples in RNAStralign testing set are i.i.d.
Revised: from the distribution P ( RNAStr train ) ; (ii) Samples in RNAStralign testing set are i.i.d.

Original: from the distribution P ( RNAStr test ) ; (iii) Samples in ArchiveII dataset are i.i.d.
Revised: from the distribution P ( RNAStr test ) ; (iii) Samples in ArchiveII dataset are i.i.d.

Original: from the distribution P ( ArcII ) .
Revised: from the distribution P ( ArcII ) .

Original: To compare the differences among these data distributions, we can test the following hypothesis:
Revised: To compare the differences among these data distributions, we can test the following hypothesis:

Original: (a) P ( RNAStr train ) =
Revised: (a) P ( RNAStr train ) =

Original: P ( RNAStr test ) (b) P ( RNAStr train ) = P ( ArchiveII )
Revised: P ( RNAStr test ) (b) P ( RNAStr train ) = P ( ArchiveII )

Original: The approach that we adopted is the permutation test on the unbiased empirical Maximum Mean
Revised: The approach that we adopted is the permutation test on the unbiased empirical Maximum Mean

Original: Discrepancy (MMD) estimator:
Revised: Discrepancy (MMD) estimator:

Original: [Equation]
Revised: [Equation]

Original: where X = { x i } Ni =1 contains N i.i.d.
Revised: where X = { x i } Ni =1 contains N i.i.d.

Original: samples from a distribution P 1 , Y = { y i } Mi =1 contains M i.i.d.
Revised: samples from a distribution P 1 , Y = { y i } Mi =1 contains M i.i.d.

Original: samples from a distribution P 2 , and k ( · , · ) is a string kernel.
Revised: samples from a distribution P 2 , and k ( · , · ) is a string kernel.

Original: Since we conduct stratiﬁed sampling to split the training and testing dataset, when we perform permutation test, we use stratiﬁed re-sampling as well (for both Hypothese (a) and (b)).
Revised: Since we conduct stratiﬁed sampling to split the training and testing dataset, when we perform permutation test, we use stratiﬁed re-sampling as well (for both Hypothese (a) and (b)).

Original: The result of the permutation test (permuted 1000 times) is reported in Figure 7.
Revised: The result of the permutation test (permuted 1000 times) is reported in Figure 7.

Original: The result shows
Revised: The result shows

Original: (a) Hypothesis P ( RNAStr train ) = P ( RNAStr test ) can be accepted with signiﬁcance level 0.1.
Revised: (a) Hypothesis P ( RNAStr train ) = P ( RNAStr test ) can be accepted with signiﬁcance level 0.1.

Original: (b) Hypothesis P ( RNAStr train ) = P ( ArchiveII ) is rejected since the p-value is 0.
Revised: (b) Hypothesis P ( RNAStr train ) = P ( ArchiveII ) is rejected since the p-value is 0.

Original: Therefore, the data distribution in ArchiveII is very different from the RNAStralign training set.
Revised: Therefore, the data distribution in ArchiveII is very different from the RNAStralign training set

Original: A good performance on ArchiveII shows a signiﬁcant generalization power of E2Efold.
Revised: A good performance on ArchiveII shows a signiﬁcant generalization power of E2Efold

Original: [Equation] [Figure] F1 S CORE 
Revised: D. P ERFORMANCE O N L ONG S EQUENCES : W EIGHTED F1 S CORE For

Original: For long sequences, E2Efold still performs better than other methods.
Revised: long sequences, E2Efold still performs better than other methods.

Original: We compute F1 scores weighted by the length of sequences (Table 8), such that the results are more dominated by longer sequences.
Revised: We compute F1 scores weighted by the length of sequences (Table 8), such that the results are more dominated by longer sequences.

Original: [Table]
Revised: [Table]

Original: The third row reports how much F1 score drops after reweighting.
Revised: The third row reports how much F1 score drops after reweighting.

Original: D. A RCHIVE II R ESULTS A FTER D OMAIN S EQUENCES A RE R EMOVED
Revised: D. A RCHIVE II R ESULTS A FTER D OMAIN S EQUENCES A RE R EMOVED

Original: Since domain sequence (subsequences) in ArchiveII are explicitly labeled, we ﬁlter them out in
Revised: Since domain sequence (subsequences) in ArchiveII are explicitly labeled [Table] we ﬁlter them out in

Original: ArchiveII and recompute the F1 scores (Table 9).
Revised: ArchiveII and recompute the F1 scores (Table 9) [Table]

Original: The results do not change too much before or after ﬁltering out subsequences.
Revised: The results do not change too much before or after ﬁltering out subsequences.

Original: [Table]
Revised: [Table]

Original: D. P ER - FAMILY P ERFORMANCES
Revised: D. P ER - FAMILY P ERFORMANCES

Original: To balance the performance among different families, during the training phase we conducted weighted sampling of the data based on their family size.
Revised: To balance the performance among different families, during the training phase we conducted weighted sampling of the data based on their family size.

Original: With weighted sampling, the overall
Revised: With weighted sampling, the overall

Original: F1 score (S) is 0.83, which is the same as when we did equal-weighted sampling.
Revised: F1 score (S) is 0.83, which is the same as when we did equal-weighted sampling.

Original: The per-family results are shown in Table10.
Revised: The per-family results are shown in Table

Original: [Table] [Figure]
Revised: [Table] [Table]

Revised: D. M ORE V ISUALIZATION R ESULTS

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: CDPfold true structure

Original: LinearFold
Revised: LinearFold

Original: Mfold CONTRAfold
Revised: Mfold CONTRAfold

Original: RNAfold
Revised: RNAfold

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: CDPfold true structure

Original: LinearFold
Revised: LinearFold

Original: Mfold CONTRAfold
Revised: Mfold CONTRAfold

Original: RNAfold
Revised: RNAfold

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: [Figure] true structure

Original: LinearFold
Revised: LinearFold

Revised: [Figure]

Original: Mfold CONTRAfold
Revised: CONTRAfold

Original: RNAfold
Revised: RNAfold

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: [Figure] true structure

Original: LinearFold
Revised: LinearFold

Original: Mfold CONTRAfold RNAfold
Revised: [Figure]

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: [Figure] true structure

Original: LinearFold Mfold CONTRAfold RNAfold
Revised: [Figure]

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: CDPfold true structure

Original: LinearFold
Revised: LinearFold

Original: Mfold CONTRAfold
Revised: Mfold CONTRAfold

Original: RNAfold
Revised: RNAfold

Original: E2Efold
Revised: E2Efold

Original: RNAstructure
Revised: RNAstructure

Original: CDPfold true structure
Revised: CDPfold true structure

Original: LinearFold
Revised: LinearFold

Original: Mfold CONTRAfold
Revised: Mfold CONTRAfold

Original: RNAfold
Revised: RNAfold