An RNA secondary structure prediction method based on a hybrid deep learning model

By combining supervised and unsupervised learning with a dual-branch deep learning model, and dynamically fusing features and refining techniques, the problem of feature representation and fusion in RNA secondary structure prediction is solved, achieving more efficient RNA structure prediction and analysis.

CN121260263BActive Publication Date: 2026-04-21INNOVATION CENTER OF YANGTZE RIVER DELTA ZHEJIANG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNOVATION CENTER OF YANGTZE RIVER DELTA ZHEJIANG UNIVERSITY
Filing Date
2025-12-08
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing RNA secondary structure prediction methods suffer from problems such as insufficient feature representation capabilities, simple model fusion mechanisms, and low prediction accuracy for complex structures, making it difficult to effectively capture long-distance dependencies and dynamically fuse multi-source features.

Method used

An RNA secondary structure prediction method based on a hybrid deep learning model is adopted. It uses a two-branch deep neural network, combining supervised learning of the main branch and variational autoencoders of the side branches for feature extraction and dynamic fusion. It refines features using one-dimensional and two-dimensional convolutional modules and optimizes them using learnable dynamic weight parameters and joint loss functions.

Benefits of technology

It significantly improves the accuracy and robustness of RNA secondary structure prediction, enhances the model's ability to generalize to unknown data, and can efficiently capture long-distance dependencies and complex structural patterns, providing a novel and efficient RNA analysis solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121260263B_ABST
    Figure CN121260263B_ABST
Patent Text Reader

Abstract

This invention discloses a method for predicting RNA secondary structure based on a hybrid deep learning model, belonging to the interdisciplinary field of bioinformatics and artificial intelligence. The invention includes: acquiring a dataset of RNA sequences to be predicted and converting it into sequence feature vectors; inputting these vectors into a two-branch deep neural network model, which includes a main branch network and side branch networks, to achieve deep, multi-dimensional feature mining and high-precision contact map prediction of RNA sequence information, obtaining a main contact map and side branch contact maps; obtaining a fused contact map based on dynamic weight parameters; deeply refining the features of the fused contact map; and outputting the final RNA secondary structure prediction contact map. This invention effectively integrates the local syntactic features and global structural information of RNA sequences, significantly improving the accuracy and robustness of secondary structure prediction, and providing a novel, efficient, and powerful computational tool for RNA function research, disease mechanism exploration, and targeted drug design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of bioinformatics and computational biology, and particularly relates to a method for predicting the structure of biological macromolecules using artificial intelligence deep learning technology, specifically a method for predicting the secondary structure of RNA based on a hybrid deep learning model. Background Technology

[0002] Ribonucleic acid (RNA) is one of the core macromolecules constituting living systems, playing multiple crucial roles within cells, including transmitting genetic information, regulating gene expression, catalyzing biochemical reactions, and serving as a structural scaffold. Unlike deoxyribonucleic acid (DNA), which serves as a stable carrier of genetic information, RNA molecules typically exist in single-stranded form and fold into complex and precise three-dimensional conformations through interactions between intrastrand bases. This specific spatial conformation is the structural basis for RNA to perform its diverse biological functions. RNA secondary structure, as the backbone of its three-dimensional structure, defines basic structural motifs such as stems, loops, protrusions, and pseudoknots formed by canonical and non-canonical base pairings. Therefore, accurately predicting RNA secondary structure is a primary and crucial step in deciphering its biological functions, understanding the regulatory networks of life activities, elucidating disease mechanisms, and guiding the development of novel RNA-targeted drugs and RNA therapies. Over the past few decades, computational prediction methods for RNA secondary structure have made significant progress, gradually forming two main technical approaches: methods based on thermodynamic energy minimization and covariance analysis methods based on comparative genomics. Thermodynamic-based methods are the most classic and fundamental prediction strategies in this field. Their core assumption is that RNA molecules spontaneously fold into a thermodynamically stable state with the lowest global free energy under physiological conditions. These methods, represented by Mfold and RNAfold, utilize experimentally determined thermodynamic parameters of numerous oligonucleotide fragments and employ dynamic programming algorithms to search all possible secondary structure spaces to find the lowest-energy conformation. However, the MFE assumption is not universally applicable in the complex cellular environment. The crowded molecular environment within cells, ion concentrations, the assisted folding of RNA-binding proteins, and the dynamic process of transcription and folding coexisting can all trap RNA molecules in a metastable state rather than the state with the lowest global energy. Therefore, relying solely on simplified in vitro thermodynamic parameter models cannot accurately reflect the true in vivo RNA structural state. Comparative genomics methods take a different approach. Their basic principle is that functional conservation determines structural conservation. By performing multiple sequence alignments on a set of functionally homologous RNA sequences, this method searches for base pairs that have undergone cooperative changes during evolution. If a mutation at two positions in one species leads to a corresponding mutation in another species that allows for the reformation of a stable base pair, then these two positions are considered highly likely to form a structural pair. The application of this method is severely limited. First, it heavily relies on the construction of high-quality MSAs, which is itself a computationally challenging problem, especially when sequence similarity is low, as alignment errors are directly propagated and amplified in structure prediction. Second, it cannot effectively predict novel RNA molecules that are species-specific, evolutionarily non-conserved, or lack known homologous sequences.

[0003] With the rise of artificial intelligence, especially deep learning, the field of RNA secondary structure prediction has undergone a paradigm shift. Deep neural network-based methods transform this problem into a pixel-level prediction task similar to image processing. This approach encodes RNA sequences into numerical matrices and leverages the powerful automatic feature extraction capabilities of deep networks to directly learn a complex nonlinear mapping from sequence patterns to base pairing probabilities from sequence data. These data-driven methods eliminate reliance on physical model assumptions and homologous sequences, demonstrating the potential to outperform traditional methods in multiple benchmark tests.

[0004] Despite this, existing deep learning-based methods still face a series of deep-seated problems that urgently need to be addressed. First, most existing models employ purely supervised learning frameworks, whose performance is highly dependent on high-quality labeled data with known structures. This means that the feature representations learned by the models may be limited to recognizing known pairing patterns, failing to capture the deeper sequence linguistic rules or inherent distributional patterns of structural tendencies hidden within massive amounts of unlabeled sequence data, thus limiting the model's generalization ability. Second, the limited receptive field of standard convolutional neural networks makes them ineffective at effectively capturing long-range dependencies crucial for forming complex topologies. Although techniques such as dilated convolution or attention mechanisms have been introduced, how to comprehensively and dynamically model the interactions between all nucleotide pairs while ensuring computational efficiency remains an open challenge. Third, some models attempt to fuse features from different sources, but often employ simple post-concatenation or weighted averaging, lacking an inherent, dynamically adjustable fusion mechanism. This static fusion strategy may not adaptively weigh the contributions of different feature streams according to the characteristics of different sequences, thus failing to achieve optimal prediction results. Therefore, designing a novel deep learning architecture that can organically combine the advantages of supervised and unsupervised learning, enabling it to learn precise pairing rules from labeled data and mine the inherent generative patterns of sequences from unlabeled data, while also efficiently capturing long and short distance dependencies and achieving intelligent and dynamic fusion of multi-source features, has become a key technical challenge for improving the prediction performance of RNA secondary structure and overcoming existing technological bottlenecks. Summary of the Invention

[0005] The purpose of this invention is to overcome the problems of insufficient feature representation ability, simple model fusion mechanism and low prediction accuracy for complex structures in existing RNA secondary structure prediction technologies, and to provide an RNA secondary structure prediction method based on a hybrid deep learning model.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for predicting RNA secondary structure based on a hybrid deep learning model, comprising the following steps:

[0007] Obtain the RNA sequence dataset to be predicted, and convert each RNA sequence in the RNA sequence dataset into a numerical sequence feature vector using a one-hot encoding method, which will be used as the input data for the model.

[0008] The sequence feature vector is input into a dual-branch deep neural network model, the model including a main branch network and a side branch network;

[0009] In the main branch network, the sequence feature vector is processed by a one-dimensional convolution module to extract one-dimensional deep sequence features, and a main contact map is generated based on the one-dimensional deep sequence features through a low-rank decomposition operation.

[0010] In the side branch network, the side branch network is a variational autoencoder structure. The one-dimensional deep sequence features are input into the variational autoencoder structure and encoded to obtain their mean and log variance in the latent space. The latent representation is generated by sampling through reparameterization techniques, and the side branch contact map is reconstructed based on the latent representation.

[0011] Based on learnable dynamic weight parameters, the main contact map and the side branch contact map are weighted and fused to obtain a fused contact map;

[0012] The fused contact map is input into a two-dimensional convolutional refining module for deep feature refinement, and the final RNA secondary structure prediction contact map is output.

[0013] Furthermore, the dual-branch deep neural network model uses the VFold model.

[0014] Furthermore, the step of generating the main contact map through low-rank decomposition includes: inputting the one-dimensional depth sequence features in parallel into two independent convolutional rank decomposition modules, each of which is a one-dimensional convolutional layer, to generate a first rank vector and a second rank vector, respectively; performing a dimension transpose operation on the first rank vector and performing a matrix multiplication operation with the second rank vector to obtain the main contact map; and performing symmetry processing on the main contact map.

[0015] Further, the step of reconstructing the side-branch contact map based on the latent representation includes: performing dimensional permutation on the latent representation and linear transformation through a fully connected layer to obtain latent spatial features; performing batch matrix multiplication on the latent spatial features and their transpose, and processing them through a Sigmoid activation function to obtain a dimensionality-reduced contact map; and upsampling the dimensionality-reduced contact map using bilinear interpolation to restore its spatial size to a size matching the length of the RNA sequence, thereby obtaining the side-branch contact map.

[0016] Furthermore, both the one-dimensional convolution module and the two-dimensional convolution refining module include residual structures; the one-dimensional convolution module is composed of at least one-dimensional residual layer, and the two-dimensional convolution refining module is composed of at least one-dimensional residual block.

[0017] Furthermore, the reparameterization technique specifically involves: obtaining the log-variance vector characterizing the dispersion of variables, sampling a random noise vector from the standard normal distribution, calculating half of the log-variance vector to obtain its exponential function value, multiplying it with the random noise vector, and finally adding the mean vector encoded by the variational autoencoder to obtain the latent representation generated by the sampling.

[0018] The expression for the reparameterization technique is:

[0019] ;

[0020] in, The latent representation generated by sampling, The mean vector encoded by the variational autoencoder. Let be the log-variance vector. This is a random noise vector sampled from a standard normal distribution.

[0021] Furthermore, the expression for the weighted fusion is:

[0022] ;

[0023] in, The fusion contact diagram, This is the main contact diagram. This is the contact diagram of the side branch. The learnable dynamic weight parameters are optimized during model training.

[0024] Furthermore, the method includes a post-processing step on the final RNA secondary structure prediction contact map, which aims to ensure that each nucleotide participates in at most one base pairing. Specifically, this includes: performing upper triangularization on the prediction contact map matrix; iteratively searching for and retaining the pairing with the highest probability value in each column and each row of the matrix using a greedy algorithm; and restoring the processed matrix to a symmetric matrix.

[0025] Furthermore, the method performs end-to-end training through a joint loss function, wherein the total loss includes the main classification loss between the final predicted contact map and the real contact map, the intermediate classification loss between the fused contact map and the real contact map, the L1 regularization loss applied to the prediction result, the contact map reconstruction loss of the side branch network, and the KL divergence loss between the posterior and prior distributions of the latent representations in the side branch network.

[0026] The joint loss function is expressed as follows: ;

[0027] in, Total loss; The final prediction of the main classification loss between the contact map and the actual contact map; The intermediate classification loss between the fused contact map and the true contact map is... Its weighting coefficient; The L1 regularization loss applied to the prediction results, Its weighting coefficient; The contact graph reconstruction loss of the side branch network, Its weighting coefficient; The KL divergence loss is the difference between the posterior and prior distributions of the latent representations in the side branch network. Its weighting coefficient.

[0028] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method.

[0029] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] This invention innovatively constructs a multi-stage collaborative hybrid prediction framework with significant core advantages. In the first stage, the invention performs parallel parsing of sequence features through complementary dual branches: the supervised learning path of the main branch focuses on quickly capturing explicit structural mapping patterns, while the unsupervised path of the variational autoencoder (VAE) in the side branches is dedicated to learning the intrinsic, more generalizable latent representations of the data. This dual-dimensional representation achieves complementary advantages of features, fundamentally overcoming the limitations of a single model in feature extraction and enhancing the model's generalization ability to unknown data. In the second stage, the invention introduces an intelligent dynamic fusion and deep refinement mechanism. Through a learnable weight that is automatically optimized during training, the model can adaptively fuse dual-branch information, rather than using a fixed static combination, thereby forming a higher-quality fused feature map. This feature map is then fed into a dedicated two-dimensional residual network for refinement to accurately capture complex structural patterns such as long-distance dependencies. Finally, the training of the entire model is collaboratively optimized by a multi-objective joint loss function, providing stable and rich gradient signals for the complex dual-branch network, ensuring that each module can efficiently converge to the optimal solution. In summary, this invention, through multi-stage feature processing, intelligent dynamic fusion, and collaborative training strategies, not only significantly improves the accuracy and robustness of RNA secondary structure prediction, but also provides a novel and efficient solution for the analysis of complex biological sequences. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart of the present invention;

[0034] Figure 2 This is a schematic diagram of the internal network structure of the VFold model. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer and more complete, the technical solutions of this invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The embodiments in this specification are intended to explain the invention and are not intended to limit the scope of protection of the invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.

[0036] like Figure 1As shown, this invention proposes a method for predicting RNA secondary structure based on a hybrid deep learning model. Its core is a deep neural network model named VFold, featuring an innovative dual-branch coupled architecture. This method integrates a complete end-to-end process from data input, feature encoding, dual-branch parallel prediction, dynamic feature fusion, two-dimensional feature refinement to final structure generation. The method includes the following steps:

[0037] Step 1: Obtain the RNA sequence dataset to be predicted, and convert each RNA sequence in the RNA sequence dataset into a numerical sequence feature vector using the one-hot encoding method, which will be used as the input data for the model.

[0038] Step 2: Input the sequence feature vector into a two-branch deep neural network model, the model including a main branch network and a side branch network;

[0039] In the main branch network, the sequence feature vector is processed by a one-dimensional convolution module to extract one-dimensional deep sequence features, and a main contact map is generated based on the one-dimensional deep sequence features through a low-rank decomposition operation.

[0040] In the side branch network, the side branch network is a variational autoencoder structure. The one-dimensional deep sequence features are input into the variational autoencoder structure and encoded to obtain their mean and log variance in the latent space. The latent representation is generated by sampling through reparameterization techniques, and the side branch contact map is reconstructed based on the latent representation.

[0041] Based on learnable dynamic weight parameters, the main contact map and the side branch contact map are weighted and fused to obtain a fused contact map;

[0042] Step 3: Input the fused contact map into the two-dimensional convolutional refining module for in-depth feature refinement, and output the final RNA secondary structure prediction contact map.

[0043] In a preferred embodiment, the core task of step 1 is to transform the biologically significant RNA sequence and its structural information into a numerical tensor representation that can be processed and learned by a deep learning model. In this embodiment, this process is implemented through a dedicated data processing module, specifically including the following sub-steps:

[0044] 1.1. Dataset Loading and Standardization

[0045] This method first obtains RNA sequence datasets from public databases containing known secondary structures (such as RNAstralign, ArchiveII, bpRNA, etc.) or user-provided files in specific formats (such as CSV or FASTA). These datasets typically contain three key pieces of information: a unique sequence identifier, the RNA base sequence itself, and its corresponding actual secondary structure. The actual secondary structure can be described using one of two standard formats: dotted bracket notation or a base pairing list. The data loading module of this method can automatically recognize and accommodate both formats. If the input is in dotted bracket notation, the system will automatically call a conversion function to parse it into a more computationally efficient base pairing list.

[0046] Preferably, to ensure the stability and efficiency of model training, the data loading module also includes a sequence length filtering mechanism. Users can set minimum and maximum length thresholds for sequences. When loading data, the system will automatically filter out sequences whose length exceeds this range, thereby avoiding memory overflow problems caused by excessively long sequences or the inability to provide meaningful structural information due to sequences that are too short.

[0047] 1.2. Numerical coding of RNA sequences

[0048] Deep neural networks cannot directly process biological sequences composed of characters such as the simplest representation of bases. Therefore, these character sequences must be converted into high-dimensional numerical representations. This invention employs a one-hot encoding method, a process completed by a separate embedding module.

[0049] For a given RNA sequence *s*, with length *L*, first define a vocabulary containing four standard nucleotides. The k-th nucleotide in sequence s is denoted as... Its one-hot encoded vector It is a one-dimensional vector with dimension 4. Its generation can be defined by the following formula:

[0050] ;

[0051] , ;

[0052] Where k represents the position index of the nucleotide in the sequence, and the value of k ranges from 1 to L; j represents the index of the nucleotide in the vocabulary, and the value of j ranges from 1 to 4; Represents the encoding vector The j-th element. By performing this operation on each nucleotide in the sequence, an RNA sequence of length L is eventually transformed into a sequence of shape […]. The two-dimensional numerical matrix is ​​the original input feature of the model.

[0053] This method also provides compatibility handling for non-standard or ambiguous nucleotides (such as N, R, Y, etc.). For these nucleotides, their encoding vectors are no longer sparse vectors with only one element equal to 1, but are instead distributed probabilistically based on the standard nucleotide combinations they represent.

[0054] 1.3. Generation of the Target Contact Diagram

[0055] To train the model, the real secondary structure information needs to be transformed into matrix form, serving as the target label for supervised learning. This matrix is ​​called the contact map. The contact map of an RNA sequence of length L... It is a shape of A symmetric matrix. Its matrix elements are defined as follows:

[0056] If the (i+1)th base and the (j+1)th base form a pair;

[0057] If the (i+1)th and (j+1)th bases do not pair.

[0058] Where i and j are the matrix indices, with values ​​ranging from 0 to... This contact diagram precisely describes the positional information of all base pairs in the sequence.

[0059] 1.4. Batch processing and dynamic filling

[0060] During model training, to leverage the parallel computing capabilities of modern computing hardware, multiple samples are typically grouped into a batch for processing. However, RNA sequences within the same batch often vary in length, posing a challenge to constructing a uniform input tensor. To address this issue, this invention employs a dynamic padding strategy. For a batch containing N samples, the system first determines the maximum length of the sequences within that batch. Then, the dimensions of the input feature matrix (one-hot encoded) and the target contact map matrix for all samples in the batch are expanded. The specific operation is as follows: when the length is insufficient... The end of the matrix corresponding to the sequence is padded with specific values ​​(either in the sequence length dimension or the row and column dimensions). For the input feature matrix, zero vectors are typically used for padding; for the target contact map matrix, a special negative value (e.g., -1) is used. This padding value of -1 is identified and ignored in subsequent loss function calculations, ensuring that the padding does not affect the model's parameter updates. After this step, all inputs and targets in the batch have a uniform size and can be efficiently fed into the neural network for computation.

[0061] As a preferred embodiment, step 2 is the core technology of this invention, detailing the internal dual-branch structure of the VFold model and the entire process of forward propagation and computation of data within the model, such as... Figure 2 As shown, the specific steps include the following:

[0062] 2.1. One-dimensional deep sequence feature extraction

[0063] The batched input data is first fed into the main branch of the model. The beginning of the main branch is a powerful one-dimensional residual network whose task is to extract deep, multi-scale sequence context features from the original one-hot encoding.

[0064] This one-dimensional residual network consists of an initial one-dimensional convolutional layer and a series of stacked one-dimensional residual blocks. The process of data flowing through this network can be abstractly represented as follows:

[0065] ;

[0066] ;

[0067] in, It is a batch-encoded one-hot input matrix; It is the initial feature map after processing by the initial convolutional layer and the ReLU activation function; l represents the number of layers in the residual block; It is the input feature map of the l-th residual block; This represents the nonlinear transformation function performed on the l-th residual block. A typical one-dimensional residual block... The internal structure is as follows:

[0068] ;

[0069] In this implementation, BN stands for Batch Normalization, which stabilizes the training process and accelerates model convergence; ReLU is the Modified Linear Unit Activation Function, used to introduce non-linearity; and Conv1D is a one-dimensional convolutional layer. In this embodiment, the one-dimensional residual block employs a bottleneck design: the first convolutional layer reduces the number of channels, and the second convolutional layer restores the number of channels to improve computational efficiency. Furthermore, the convolutional layers can be configured with dilation rates to expand the receptive field through interval sampling, thereby capturing longer-distance sequence dependencies without increasing the number of parameters. Finally, the output of the one-dimensional residual network is a high-dimensional sequence feature map, denoted as... .

[0070] 2.2. Low-rank decomposition of the main branch and generation of the preliminary contact graph

[0071] In order to extract features from one-dimensional deep sequence This invention innovatively employs a low-rank decomposition strategy, rather than the traditional 2D transposed convolution, to efficiently generate 2D contact maps. This strategy significantly reduces computational complexity and the number of model parameters.

[0072] The input is fed in parallel into two independent one-dimensional convolutional layers, which are called rank decomposition modules. Their function is to compress the high-dimensional number of channels of the input to a pre-defined, smaller rank.

[0073] ;

[0074] ;

[0075] in, and These are two one-dimensional convolutional layers with the same structure but not shared parameters, and both have rank output channels. and Two shapes, both of which are (batch size, rank, The rank matrix of ). Then, the two-dimensional contact diagram is reconstructed through matrix multiplication:

[0076] ;

[0077] The Transpose operation transforms the shape of V_a into (batch size, ... MatMul performs batched matrix multiplication. The final generated master contact map has the shape of (batch size, rank). , Since base pairing is mutually symmetrical, a forced symmetry treatment is finally performed:

[0078] .

[0079] 2.3. Variational autoencoder and supplementary contact diagram generation of side branches

[0080] In parallel with the main branch, the side branches receive the same one-dimensional depth sequence features. Furthermore, a latent representation of the sequence is learned through a variational autoencoder framework, generating a complementary contact map. First, an encoder network, typically composed of convolutional and pooling layers, is used to compress and extract information from features along the sequence dimension. Then, the posterior distribution parameters of the latent space—the mean—are predicted from the encoder's output through two independent linear or one-dimensional convolutional layers. Sum of logarithmic variance To maintain gradient transitivity during random sampling, this invention employs a reparameterization technique. The sampling process for the latent representation z is as follows:

[0081] ;

[0082] ;

[0083] in, It is a shape identical to z, with elements following a standard normal distribution. The random noise tensor sampled independently; ⊙ denotes element-wise multiplication.

[0084] In this way, randomness is introduced as input to the model, while z is relative to... and The computation process is deterministically differentiable. The sampled latent representation z contains highly compressed structural information about the sequence. To decode it into a contact graph, it is first linearly transformed through a fully connected layer, and then matrix multiplication is performed using its transpose, conceptually similar to calculating the covariance matrix, which aims to capture the interrelationships between latent dimensions.

[0085] ;

[0086] in, It is the latent representation z after dimensionality rearrangement. This operation generates a smaller, low-dimensional contact graph. Finally, to match its dimensions with the main contact diagram, a bilinear interpolation algorithm was used for upsampling to obtain the side branch contact diagram.

[0087] 2.4. Dual-branch dynamic fusion and two-dimensional feature refinement

[0088] Information from the two branches is intelligently fused. The main contact map and the side branch contact map are connected by a learnable scalar parameter. Weighted summation is performed to obtain the fused contact map. Automatic optimization is performed during model training using gradient descent. This allows the model to autonomously learn the dependence of the two branches on information under different conditions. The fused contact map is then fed into a 2D residual network for deep refinement. This network has a similar structure to a 1D residual network, but all its operations are 2D, aiming to learn and correct high-level spatial patterns in the contact map, such as identifying cooperative pairings, eliminating artifacts, and enhancing the true stem region signal. The feature map refined by the 2D residual network is then passed through a final 2D convolutional layer to reduce the number of channels to 1, yielding the final predicted logistic value. This logistic value is then subjected to forced symmetry processing to form the final, unnormalized predicted contact map.

[0089] As a preferred embodiment, to ensure that this complex two-branch model can be effectively trained end-to-end, this invention designs a joint loss function containing multiple components, specifically including the following sub-steps:

[0090] Step 1: Design of the joint loss function

[0091] Total loss It consists of five weighted components:

[0092] ;

[0093] in, Total loss; The final prediction of the main classification loss between the contact map and the actual contact map; The intermediate classification loss between the fused contact map and the true contact map is... Its weighting coefficient; The L1 regularization loss applied to the prediction results, Its weighting coefficient; The contact graph reconstruction loss of the side branch network, Its weighting coefficient; The KL divergence loss is the difference between the posterior and prior distributions of the latent representations in the side branch network. Its weighting coefficient.

[0094] This is the core monitoring signal, used to measure the difference between the final predicted contact map and the actual contact map. This invention employs a weighted binary cross-entropy loss:

[0095] ;

[0096] in, It is a real label (0 or 1). (This is the probability predicted by the model), and N is the total number of pixels involved in the calculation. and These are the weights for positive (paired) and negative (unpaired) samples, respectively. Since there are far more unpaired bases than paired bases in the RNA structure, this is a typical class imbalance problem. By setting... much smaller This can effectively prevent the model from predicting all positions as unpaired. This is equivalent to introducing an additional supervision signal in the middle layer of the network, which helps to alleviate the gradient vanishing problem in deep networks and ensures that the fusion step itself can optimize in the right direction. These are the weighting coefficients for the loss term. VAE reconstruction loss. This is the reconstruction objective of the side-branch variational autoencoder. It measures the similarity between the side-branch contact map generated by decoding the latent variable z and the true contact map. It is calculated using the weighted cross-entropy loss. This loss ensures that the latent space z does indeed encode effective information capable of reconstructing the true structure. It is its weight. The KL divergence loss is a regularization term in the VAE, used to constrain the distribution of the latent space. It measures the posterior distribution generated by the encoder. With a pre-defined prior distribution The KL divergence between them.

[0097] ;

[0098] Minimizing the KL divergence loss results in a regular, continuous distribution of the latent representations generated by the encoder, concentrated near the origin, which helps improve the model's generalization ability and the quality of generated samples. L1 regularization loss. Calculate the sum of all positive predictions in the final predicted probability map. Minimizing this encourages the model to produce a sparser contact map, which helps reduce false positive predictions.

[0099] Step 2: Model Optimization and Training Loop

[0100] The model uses the Adam optimizer for parameter updates, which is a gradient descent algorithm with an adaptive learning rate. Throughout the training cycle, the model alternately performs fitting on the training set and testing on the validation set. After each training epoch, the model switches to evaluation mode, where the validation process does not calculate gradients, but only performs forward propagation and performance metric calculations.

[0101] In a preferred embodiment, step 3 includes the following sub-steps:

[0102] 3.1. Prediction and Post-processing

[0103] The user inputs the sequence to be predicted, the model performs a complete forward propagation, and outputs a... The predicted contact map probability matrix is ​​obtained. This invention employs an efficient greedy algorithm for post-processing. The goal of this algorithm is to extract the most probable set of pairings from the probability matrix that satisfies the constraint that "each nucleotide participates in at most one pairing". The steps are as follows:

[0104] First, consider only the upper triangular portion of the probability matrix (i.e., i < j) to avoid redundant calculations. Find the index of the maximum probability for each row and column of the matrix. Iterate through all potential pairings. Only when the position A pair is considered valid and conflict-free and is retained only when its probability value is simultaneously the maximum value in both the i-th row and the j-th column. All pairs that do not satisfy this bidirectional maximum condition are removed. This process ensures that the output structure is physically valid.

[0105] 3.2 Final Structure Generation

[0106] The sparse, binary contact map matrix obtained after post-processing is finally converted into a user-friendly format, containing a list of base pairs or standard dotted bracket notation, through a conversion function.

[0107] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method.

[0108] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0109] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0110] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only.

[0111] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A method for predicting RNA secondary structure based on a hybrid deep learning model, characterized in that, Includes the following steps: Obtain the RNA sequence dataset to be predicted, and convert each RNA sequence in the RNA sequence dataset into a numerical sequence feature vector using a one-hot encoding method, which will be used as the input data for the model. The sequence feature vector is input into a dual-branch deep neural network model, the model including a main branch network and a side branch network; In the main branch network, the sequence feature vector is processed by a one-dimensional convolution module to extract one-dimensional deep sequence features, and a main contact map is generated based on the one-dimensional deep sequence features through a low-rank decomposition operation. In the side branch network, the side branch network is a variational autoencoder structure. The one-dimensional deep sequence features are input into the variational autoencoder structure and encoded to obtain their mean and log variance in the latent space. The latent representation is generated by sampling through reparameterization techniques, and the side branch contact map is reconstructed based on the latent representation. Based on learnable dynamic weight parameters, the main contact map and the side branch contact map are weighted and fused to obtain a fused contact map; The dual-branch deep neural network model is trained end-to-end using a joint loss function. The total loss includes the main classification loss between the final predicted contact map and the real contact map, the intermediate classification loss between the fused contact map and the real contact map, the L1 regularization loss applied to the prediction results, the contact map reconstruction loss of the side branch network, and the KL divergence loss between the posterior and prior distributions of the latent representations in the side branch network. Total loss It consists of five weighted components: ; in, Total loss; The final prediction of the main classification loss between the contact map and the actual contact map; The intermediate classification loss between the fused contact map and the true contact map is... Its weighting coefficient; The L1 regularization loss applied to the prediction results, Its weighting coefficient; The contact graph reconstruction loss of the side branch network, Its weighting coefficient; The KL divergence loss is the difference between the posterior and prior distributions of the latent representations in the side branch network. Its weighting coefficient; This is the core supervisory signal used to measure the difference between the final predicted contact map and the actual contact map; a weighted binary cross-entropy loss is employed. ; in, It's a real label. This represents the probability predicted by the model, where N is the total number of pixels involved in the calculation. and These are weights for positive and negative samples respectively; by setting... much smaller This prevents the model from tending to predict all locations as negative samples; ; in, This represents the mean in the posterior distribution parameters. This represents the log-variance in the posterior distribution parameters; The fused contact map is input into a two-dimensional convolutional refining module for deep feature refinement, and the final RNA secondary structure prediction contact map is output. The final RNA secondary structure prediction contact map is post-processed to ensure that each nucleotide participates in at most one base pairing, specifically including: Perform upper triangulation on the predicted contact map matrix; The greedy algorithm iteratively searches for and retains the pair with the highest probability value in each column and each row of the matrix, while eliminating other potential pairs that conflict with that pair. The upper triangular matrix processed by the greedy algorithm is restored to a symmetric matrix to obtain the final refined contact diagram.

2. The method according to claim 1, characterized in that, The generation of the main contact graph through low-rank decomposition operation includes: The one-dimensional deep sequence features are input in parallel to two independent convolutional rank decomposition modules, each of which is a one-dimensional convolutional layer, generating a first rank vector and a second rank vector respectively. The first rank vector is transposed, and then matrix multiplication is performed with the second rank vector to obtain the main contact graph. The main contact diagram is symmetricized by adding the matrix to its transpose and then averaging the results.

3. The method according to claim 1, characterized in that, The process of reconstructing the side branch contact graph based on the latent representation includes: The latent representation is dimensionally permuted and then linearly transformed through a fully connected layer to obtain latent spatial features; The latent spatial features are subjected to batch matrix multiplication with their own transpose, and then processed by the Sigmoid activation function to obtain a dimension-reduced contact map. The reduced-dimensional contact map is upsampled using bilinear interpolation to restore its spatial dimensions to match the length of the RNA sequence, thus obtaining the side-branch contact map.

4. The method according to claim 1, characterized in that, Both the one-dimensional convolution module and the two-dimensional convolution refining module include residual structures; The one-dimensional convolution module consists of at least one-dimensional residual layer, and the two-dimensional convolution refining module consists of at least one-dimensional residual block.

5. The method according to claim 1, characterized in that, The reparameterization technique specifically involves: obtaining a log-variance vector that characterizes the dispersion of variables, sampling a random noise vector from a standard normal distribution, calculating half of the log-variance vector to obtain its exponential function value, multiplying it by the random noise vector, and finally adding the mean vector encoded by a variational autoencoder to obtain the latent representation generated by the sampling.

6. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method as described in any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Knowledge-driven and data-driven magnaporthe oryzae AVR gene RNA secondary structure generator and prediction method thereof

    CN119626339A

  • RNA secondary structure prediction method and related device

    CN120564819A