Guide editing efficiency prediction method and system based on deep learning
By constructing a deep learning model and utilizing techniques such as multi-sequence alignment matrices and rotational position encoding, the problem of traditional methods being unable to capture the interactions between multiple nucleic acid sequences was solved, achieving high-precision prediction of guided editing efficiency and improving the accuracy and stability of the prediction.
Patent Information
- Application Number
- CN202511629644.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-08
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies struggle to accurately predict guided editing efficiency, especially since traditional methods rely on manual feature extraction and ignore the complex interactions between multiple key nucleic acid sequences, resulting in insufficient prediction accuracy and generalization ability.
We construct a deep learning-based guided editing efficiency prediction method. Through multi-sequence alignment matrix, rotation position encoding, axial attention computation, deformable convolution and multilayer perceptron network, we achieve end-to-end modeling of multiple biological nucleic acid sequences, capture the correlation and internal dependency between sequences, and perform high-precision prediction.
It significantly improves the accuracy and stability of guided editing efficiency prediction, provides efficient computational support, and offers key guidance for pegRNA design and experimental optimization.
Smart Images

Figure CN121528307A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for predicting guided editing efficiency based on deep learning. Background Technology
[0002] The rapid development of gene editing technology has brought revolutionary tools to life science research and the treatment of human diseases. Among them, guided editing, as a cutting-edge technology capable of precise base substitution, small fragment insertion, and deletion, shows great application potential because it does not rely on DNA double-strand breaks and does not produce byproducts. However, the efficiency of guided editing systems is affected by a variety of complex factors, including pegRNA design, target site sequence context, and endogenous cellular repair mechanisms, resulting in significant differences in editing efficiency across different targets and making it difficult to predict accurately.
[0003] Currently, guided editing efficiency prediction mainly relies on three types of methods: empirical models based on biochemical rules have limited accuracy due to their inability to characterize complex nonlinear interactions; traditional machine learning models, although they have made some progress, rely on manual feature extraction and are difficult to capture unknown inter-sequence relationships, resulting in insufficient generalization ability; while existing deep learning models mostly use a single sequence input, which, although capable of feature learning, completely ignores the complex interactions between multiple key nucleic acid sequences in the guided editing process. This fundamental defect has become the core bottleneck restricting the improvement of prediction performance. Summary of the Invention
[0004] To overcome the above shortcomings, this invention provides a deep learning-based method and system for predicting guided editing efficiency, aiming to achieve high-precision and robust prediction of guided editing efficiency, and to provide key guidance for the rational design of pegRNA and the optimization of experimental protocols.
[0005] In a first aspect, the present invention provides the following technical solution: a deep learning-based guided editing efficiency prediction method, comprising:
[0006] Multiple biological nucleic acid sequences involved in the guided editing system are obtained, including the original target strand, the desired editing strand, the guide sequence, the extension sequence, the helper single-guide RNA sequence, and the original complementary strand. Nucleotide positions of the multiple sequences are compared to form a multiple sequence alignment matrix.
[0007] Each base symbol in the multi-sequence alignment matrix is converted into a corresponding vector representation, and rotation position encoding information is added to the vector to obtain a latent matrix that fuses sequence features and position information.
[0008] The latent matrix is subjected to multi-layer axial attention computation by an aligned sequence encoder, where row attention is used to capture the correlation between different sequences, column attention is used to capture the contextual dependencies within the same sequence, and aligned feature representations are generated through residual connections and normalization operations.
[0009] By using the alternating structure of multiple deformable convolutional layers and pooling layers in the spatial feature refinement module, spatial feature extraction and information compression are performed on the alignment feature representation to obtain global spatial refined features.
[0010] The attention aggregation prediction module performs attention weighting and aggregation on the refined features of the global space, and inputs the aggregated features into a multilayer perceptron network for regression calculation, outputting a predicted value for guided editing efficiency.
[0011] Preferably, the step of nucleotide position alignment of the multiple sequences includes:
[0012] The multiple sequences were cleaned and length normalized to remove non-nucleotide symbols and fill in missing sites.
[0013] Based on the functional correspondence of each sequence in the guided editing reaction process, the nucleotide positions of the multiple sequences are compared and aligned so that the bases in the same column correspond to the same editing site or reaction region;
[0014] The alignment positions of each sequence are arranged as the row dimension of the matrix, and the alignment positions of each nucleotide are arranged as the column dimension of the matrix, so that each matrix element corresponds to the base type of a specific sequence at a specific alignment position, thus forming a unified spatially aligned input structure.
[0015] Preferably, the step of obtaining the latent matrix of fused sequence features and location information includes:
[0016] Each base symbol in the multi-sequence alignment matrix is vectorized, and each base symbol is mapped to a numerical vector of fixed dimension to form an initial feature matrix containing sequence semantic information.
[0017] The initial feature matrix is input into the encoding initialization network, and the numerical vector is subjected to feature normalization and linear transformation to enhance the distinguishability of sequence features.
[0018] Rotation position encoding information is added to the processed feature matrix, so that the relative position information between adjacent points is embedded into the vector space through angular rotation, thereby preserving the spatial order relationship of the sequence;
[0019] Output a latent matrix that fuses the semantic features and location information of the sequence.
[0020] Preferably, the alignment sequence encoder consists of multiple alignment sequence coding blocks, each of which comprises an input layer, a first axial attention layer, a second axial attention layer, a forward propagation layer, and an output layer. The input layer is residually connected to the first axial attention layer, the first axial attention layer is residually connected to the second axial attention layer, and the second axial attention layer is residually connected to the forward propagation layer.
[0021] Preferably, the axial attention layer comprises a QKV projection unit, a rotation position encoding unit, an attention unit, and a gating and output unit. The QKV projection unit projects the input aligned sequence representation into Q, K, and V matrices through layer normalization and linear processing. The rotation position encoding unit first converts the Q and K matrices into complex matrices, then converts them back to real numbers using a pre-calculated rotation vector, obtaining the rotation Q and rotation K matrices. The attention unit calculates the attention output by scaling the dot product of the rotation Q, rotation K, and V matrices. The gating and output unit performs linear processing, sigmoid activation processing, and gating processing on the input aligned sequence representation, then performs gating multiplication with the attention output to finally obtain the aligned feature representation.
[0022] Preferably, the spatial feature refinement module consists of four deformable convolutional layers, two average pooling layers, and two dimensional transformation layers. The deformable convolutional layer includes an offset unit, a variable convolutional unit, and a ReLU activation unit. The aligned feature representation is sequentially passed through the first dimensional transformation layer, the first deformable convolutional layer, and the first average pooling layer to obtain the first spatial refined feature. The first spatial refined feature is sequentially passed through the second and third deformable convolutional layers and the second average pooling layer to obtain the second spatial refined feature. The second spatial refined feature is sequentially passed through the fourth deformable convolutional layer and the second dimensional transformation layer to obtain the global spatial refined feature.
[0023] Preferably, the attention aggregation prediction module consists of a self-attention weighted layer, a feature aggregation layer, and an MLP prediction layer. The self-attention weighted layer calculates the initial score of the learnable weights and the refined features of the global space using Einstein summation, obtains the attention weights by combining Softmax normalization, and then calculates the weighted features of the attention weights and the refined features of the global space using Einstein summation. The feature aggregation layer performs summation, flattening, normalization, and regularization on the weighted features to obtain the aggregated features. The MLP prediction layer performs regression prediction on the aggregated features through a 4-layer MLP network and outputs a predicted value for guided editing efficiency.
[0024] Secondly, this invention provides the following technical solution: a deep learning-based guided editing efficiency prediction system, comprising:
[0025] The sequence alignment input module is used to acquire multiple biological nucleic acid sequences involved in the guided editing system, including the original target strand, the desired editing strand, the guide sequence, the extension sequence, the helper single-guide RNA sequence, and the original complementary strand, and to perform nucleotide position alignment on the multiple sequences to form a multiple sequence alignment matrix;
[0026] An embedding encoding module is used to convert each base symbol in the multi-sequence alignment matrix into a corresponding vector representation, and to add rotation position encoding information to the vector to obtain a latent matrix that fuses sequence features and position information.
[0027] The alignment feature encoding module is used to perform multi-layer axial attention calculation on the latent matrix through an alignment sequence encoder, wherein row attention is used to capture the correlation between different sequences, column attention is used to capture the contextual dependency within the same sequence, and alignment feature representation is generated through residual connection and normalization operations.
[0028] The feature refinement and aggregation prediction module is used to refine and compress the spatial features of the aligned feature representation through the alternating structure of multiple deformable convolutional layers and pooling layers of the spatial feature refinement module, so as to obtain global spatial refined features.
[0029] The prediction output module is used to perform attention weighting and aggregation on the refined features of the global space through the learnable weights of the attention aggregation prediction module, and input the aggregated features into the multilayer perceptron network for regression calculation, and output the predicted value of the editing efficiency.
[0030] The present invention has the following beneficial effects:
[0031] This invention constructs a multi-sequence alignment matrix to uniformly represent multiple biological nucleic acid sequences involved in the guided editing system as a two-dimensional input structure, preserving the spatial correspondence and functional interactions between sequences. It introduces a rotational position encoding mechanism through an embedded encoding module to fuse sequence semantic information and relative positional information. A biaxial attention-based alignment sequence encoder simultaneously models intra-sequence contextual dependencies and inter-sequence co-evolutionary relationships. A spatial feature refinement module combining deformable convolution and pooling alternation structures extracts multi-scale global features. Finally, self-attention aggregation and a multilayer perceptron network are used to complete regression prediction, thereby obtaining a quantitative output of editing efficiency. This invention achieves an end-to-end modeling process from sequence input to prediction output, possesses adaptive feature learning capabilities, and can significantly improve the accuracy, stability, and generalization performance of guided editing efficiency prediction, providing efficient computational support for gene editing experimental design and efficiency optimization. Attached Figure Description
[0032] Figure 1 This is a flowchart of the deep learning-based guided editing efficiency prediction method proposed in this invention.
[0033] Figure 2 This is a structural diagram of the alignment sequence encoder proposed in this invention;
[0034] Figure 3 This is a diagram of the axial attention layer structure proposed in this invention;
[0035] Figure 4 This is a structural diagram of the spatial feature refining module proposed in this invention;
[0036] Figure 5 This is a structural diagram of the attention aggregation prediction module proposed in this invention;
[0037] Figure 6 This is a diagram of the Peps-base architecture of the deep learning model proposed in this invention. Detailed Implementation
[0038] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Example 1
[0040] In a first embodiment of the present invention, the present invention provides a deep learning-based guided editing efficiency prediction method, such as... Figure 1 As shown, it includes:
[0041] S100: Obtain multiple biological nucleic acid sequences involved in the guided editing system, including the original target strand, the desired editing strand, the guide sequence, the extension sequence, the helper single-guide RNA sequence, and the original complementary strand; perform nucleotide position alignment on the multiple sequences to form a multiple sequence alignment matrix;
[0042] Preferably, the step of nucleotide position alignment of the multiple sequences includes:
[0043] The multiple sequences were cleaned and length normalized to remove non-nucleotide symbols and fill in missing sites.
[0044] Based on the functional correspondence of each sequence in the guided editing reaction process, the nucleotide positions of the multiple sequences are compared and aligned so that the bases in the same column correspond to the same editing site or reaction region;
[0045] The alignment positions of each sequence are arranged as the row dimension of the matrix, and the alignment positions of each nucleotide are arranged as the column dimension of the matrix, so that each matrix element corresponds to the base type of a specific sequence at a specific alignment position, thus forming a unified spatially aligned input structure.
[0046] Specifically, nucleic acid sequence data for the guided editing system are extracted from experimental databases, sequencing results, or standard sequence files. These data include the original target strand, the desired editing strand, the guide sequence, the extension sequence, the helper single-guide RNA sequence, and the original complementary strand. To ensure input data consistency, each sequence undergoes formatting preprocessing, including removing non-base symbols (such as spaces, newlines, and non-A / T / G / C characters) and standardizing sequence lengths. When missing sites are present, they are padded by inserting empty or placeholder "-" characters at appropriate positions to ensure that each sequence has the same alignment length.
[0047] Based on the biological principles of guided editing responses, the functional correspondences between the sequences were determined. Specifically, these include: a complementary pairing exists between the original target strand and the guide sequence; the upstream region of the extension sequence corresponds to the primer-binding region after cleavage of the original target strand; the downstream region corresponds to the reverse transcription template region of the desired editing strand; and the helper single-guide RNA sequence has a specific pairing site with the original complementary strand.
[0048] A rule-based Needleman-Wunsch alignment algorithm was employed to ensure that sites with the same functional position were located at the same alignment position in each sequence. During alignment, when deletions or insertions occurred, space symbols were inserted into the corresponding sequences to maintain the consistency of the overall alignment framework, ensuring that the bases in each column represented the same biological editing region.
[0049] After alignment, the aligned sequences are arranged into a unified matrix. The row dimension of the matrix represents different biological sequences, and the column dimension represents the corresponding nucleotide positions after alignment. Each matrix element stores the base type information of the corresponding sequence at that alignment position, such as A, T, G, C, or the empty symbol "-". This multi-sequence alignment matrix serves as the model input data structure, simultaneously preserving the inter-sequence relationships and spatial pairing information in two-dimensional space, providing a standardized input format for subsequent deep learning feature extraction.
[0050] The multiple sequence alignment matrix constructed through the above steps can structurally unify the representation of different types of nucleic acid sequences and maintain spatial consistency of editing sites in the data dimension. The input of this matrix can explicitly reflect the complementary relationship and functional coupling between multiple sequences in the guided editing reaction.
[0051] S200: Convert each base symbol in the multi-sequence alignment matrix into a corresponding vector representation, and add rotation position encoding information to the vector to obtain a latent matrix that fuses sequence features and position information;
[0052] Preferably, the step of obtaining the latent matrix of fused sequence features and location information includes:
[0053] Each base symbol in the multi-sequence alignment matrix is vectorized, and each base symbol is mapped to a numerical vector of fixed dimension to form an initial feature matrix containing sequence semantic information.
[0054] The initial feature matrix is input into the encoding initialization network, and the numerical vector is subjected to feature normalization and linear transformation to enhance the distinguishability of sequence features.
[0055] Rotation position encoding information is added to the processed feature matrix, so that the relative position information between adjacent points is embedded into the vector space through angular rotation, thereby preserving the spatial order relationship of the sequence;
[0056] Output a latent matrix that fuses the semantic features and location information of the sequence.
[0057] Specifically, each base symbol in the multiple sequence alignment matrix is encoded, mapping character-type base data (A, T, G, C, or "-") to numerical form. In one feasible approach, this mapping is implemented using a learnable embedding layer, converting each base symbol into a fixed-dimensional vector representation, such as a dense vector with dimensions of 128, 256, or 512. Each row corresponds to the embedding result of a biological sequence, and each column corresponds to the feature representation at a specific nucleotide position. This mapping can be achieved through a lookup table, i.e., assigning a trainable weight vector to each base in the embedding matrix to obtain an initial feature matrix containing semantic information about the bases.
[0058] The initial feature matrix is input into the encoding initialization network, and each vector is normalized and linearly transformed. In a preferred embodiment, a layer normalization method is used to scale the input features to eliminate numerical differences between different sequences; subsequently, a linear mapping layer is used to resize and weight the features, thereby enhancing the discriminability between sequences and the feature representation ability.
[0059] Rotational position encoding information is added to the feature matrix after linear transformation to introduce relative positional information in the feature space. In one feasible approach, a corresponding rotation vector is constructed for the sequence position index, and the query vector and key vector of the feature matrix are respectively multiplied by complex numbers or rotated by angles with this rotation vector.
[0060] The feature matrix after incorporating positional encoding is output as the latent matrix. This latent matrix is a three-dimensional tensor, where the row dimension represents the embedding of different sequences, the column dimension represents the aligned base positions, and the depth dimension represents the corresponding feature channels.
[0061] The latent matrix generated through the above steps can simultaneously preserve the semantic content and structural position information of the sequence in the numerical space, solving the problem that traditional models rely only on the sequence content and cannot perceive the spatial correspondence between sequences.
[0062] S300: Perform multi-layer axial attention calculation on the latent matrix through an aligned sequence encoder, wherein row attention is used to capture the correlation between different sequences, column attention is used to capture the contextual dependency within the same sequence, and an aligned feature representation is generated through residual connection and normalization operations;
[0063] Preferably, the alignment sequence encoder consists of multiple alignment sequence coding blocks, such as... Figure 2 As shown, the aligned sequence coding block consists of an input layer, a first axial attention layer, a second axial attention layer, a forward propagation layer, and an output layer, wherein the input layer is residually connected to the first axial attention layer, the first axial attention layer is residually connected to the second axial attention layer, and the second axial attention layer is residually connected to the forward propagation layer.
[0064] Preferably, the axial attention layer is as follows: Figure 3 As shown, the system consists of a QKV projection unit, a rotation position encoding unit, an attention unit, and a gating and output unit. The QKV projection unit projects the input aligned sequence representation into Q, K, and V matrices through layer normalization and linear processing. The rotation position encoding unit first transforms the Q and K matrices into complex matrices, and then transforms the complex matrices back into real numbers using a pre-computed rotation vector to obtain the rotation Q and rotation K matrices. The attention unit calculates the rotation Q, rotation K, and V matrices through scaling dot products to obtain the attention output. The gating and output unit performs linear processing, sigmoid activation processing, and gating processing on the input aligned sequence representation, and then performs gating multiplication with the attention output to finally obtain the aligned feature representation.
[0065] Specifically, each aligned sequence encoding block sequentially includes an input layer, a first axial attention layer, a second axial attention layer, a forward propagation layer, and an output layer. Residual connections are established between the input layer and the first axial attention layer, between the first axial attention layer and the second axial attention layer, and between the second axial attention layer and the forward propagation layer, thereby ensuring the stability of deep model training and the effective transfer of feature information. Through this stacked structure, the model can alternately model along both row and column axes, learning the interaction relationships between different sequences and the dependency patterns within the same sequence.
[0066] Each axial attention layer includes a QKV projection unit, a rotational position encoding unit, an attention unit, and a gating and output unit. The implementation process of each unit is as follows:
[0067] QKV projection unit:
[0068] The aligned sequence representation of the input is subjected to layer normalization to eliminate distributional differences between different feature dimensions. The normalized representation is then projected onto the query matrix Q, key matrix K, and value matrix V through three independent linear transformations. In one feasible implementation, the linear transformations are implemented through a fully connected network, with the projection dimension consistent with the depth of the latent matrix, such as 256 or 512 dimensions.
[0069] Rotational position encoding unit:
[0070] To incorporate relative positional information into attention calculation, the Q and K matrices are transformed into complex matrix forms. A corresponding rotation vector is generated for each position index, and rotation encoding is achieved by multiplying the rotation vector with the elements of the Q and K matrices element by element using complex multiplication. Then, the rotated complex matrices are combined with their real and imaginary parts to form new real matrices, resulting in the rotated Q and rotated K matrices, respectively.
[0071] Attention unit:
[0072] The rotation Q matrix, rotation K matrix, and V matrix are input into the attention calculation module, and attention is calculated using a scaled dot product mechanism. First, the inner product of rotation Q and rotation K is calculated and divided by a scaling factor to obtain the attention score. Then, a Softmax normalization operation is performed to obtain the attention weights. The attention weights are multiplied by the V matrix to obtain the attention output features. In a preferred implementation, the scaling factor is taken as the square root of the feature dimension to prevent gradient explosion, and the Softmax function performs normalization along the column dimensions.
[0073] Gating and output unit:
[0074] The aligned sequence representation of the input is subjected to linear transformation and Sigmoid activation to obtain a gating vector. The gating vector is then element-wise multiplied with the attention output to control the flow ratio of different feature channels, achieving feature-selective output. Finally, the gating output is converted into a feature representation of the same dimension as the input through a linear mapping, serving as the output of this axial attention layer.
[0075] The first axial attention layer operates along the column direction of the matrix, calculating attention between the same alignment positions of different sequences to learn co-evolutionary information between sequences. The second axial attention layer operates along the row direction of the matrix, calculating attention between different positions of the same sequence to capture the contextual dependencies within the sequence. Through this alternating computational approach, the model can simultaneously understand the internal structure of a sequence and the coupling relationships between sequences. The output of the second axial attention layer is fed into the forward propagation layer, which, in a preferred embodiment, employs a transformer's FeedForword structure.
[0076] Through the design of the alignment sequence encoder described above, the model can simultaneously learn the co-evolutionary patterns between different sequences and the semantic dependencies within a single sequence in a two-dimensional alignment space.
[0077] S400: Through the alternating structure of multiple deformable convolutional layers and pooling layers in the spatial feature refinement module, spatial feature extraction and information compression are performed on the alignment feature representation to obtain global spatial refined features.
[0078] Preferably, the spatial feature refinement module is as follows: Figure 4 As shown, it consists of four deformable convolutional layers, two average pooling layers, and two dimensional transformation layers. Each deformable convolutional layer includes an offset unit, a variable convolutional unit, and a ReLU activation unit. The alignment feature representation is sequentially passed through the first dimensional transformation layer, the first deformable convolutional layer, and the first average pooling layer to obtain the first spatial refined feature. The first spatial refined feature is sequentially passed through the second and third deformable convolutional layers and the second average pooling layer to obtain the second spatial refined feature. The second spatial refined feature is sequentially passed through the fourth deformable convolutional layer and the second dimensional transformation layer to obtain the global spatial refined feature.
[0079] Specifically, the spatial feature refinement module consists of four deformable convolutional layers, two average pooling layers, and two dimensionality transformation layers connected in sequence. The deformable convolutional layers are used to adaptively adjust the convolutional sampling positions within a local range to capture non-uniform spatial dependencies in sequence features; the average pooling layers are used to reduce the resolution of the feature map and aggregate local information, thereby achieving spatial dimensionality compression; the dimensionality transformation layers are used to linearly map and normalize the feature channels to match the dimensionality requirements of the convolutional layer input and output.
[0080] Each deformable convolutional layer contains an offset unit, a variable convolutional unit, and a ReLU activation unit. The offset unit performs a 3×3 or 5×5 convolution operation on the input features, generating a two-dimensional offset tensor with the same size as the input features, used to describe the displacement of each sampling point. In a preferred embodiment, the components of the offset tensor are limited to the range [-2, 2] to ensure that the sampling position of the convolutional kernel is controllable. The variable convolutional unit dynamically adjusts the sampling coordinates of the output features from the upper layer using the displacement tensor output by the offset unit, performing a weighted convolution operation on the input features at the new sampling position. In this way, the variable convolution can adaptively change the receptive field according to the shape of the input features, thereby capturing complex local patterns. The ReLU activation unit performs nonlinear activation on the output of the variable convolution to enhance feature representation and improve the nonlinear fitting performance of the model.
[0081] The alignment feature representation is sequentially input into the following hierarchical structure for spatial feature extraction. First, the alignment feature representation is passed through a first dimension transformation layer to adjust the number of channels to adapt to subsequent convolution calculations. Then, it is sequentially passed through a first deformable convolutional layer and a first average pooling layer to obtain the first spatial refined feature. The first spatial refined feature is sequentially input into a second deformable convolutional layer, a third deformable convolutional layer, and a second average pooling layer to extract multi-scale spatial features and further compress spatial information to obtain the second spatial refined feature. The second spatial refined feature is sequentially input into a fourth deformable convolutional layer and a second dimension transformation layer to aggregate local patterns and adjust feature dimensions through convolution, finally outputting the global spatial refined feature.
[0082] Through the above structural design, the spatial feature refinement module can extract globally representative abstract features while preserving local structural information. Compared with traditional fixed convolutional structures, this module introduces a deformable sampling mechanism during feature extraction, enabling the model to have greater expressive flexibility when processing biological sequence data with nonlinear sequence dependencies.
[0083] S500: The global space refined features are weighted and aggregated by the learnable weights of the attention aggregation prediction module, and the aggregated features are input into the multilayer perceptron network for regression calculation, and the predicted value of the guided editing efficiency is output.
[0084] Preferably, the attention aggregation prediction module is as follows: Figure 5As shown, the algorithm consists of a self-attention weighted layer, a feature aggregation layer, and an MLP prediction layer. The self-attention weighted layer calculates the initial scores of learnable weights and refined global spatial features using Einstein summation, obtains attention weights by combining them with Softmax normalization, and then calculates the weighted features of attention weights and refined global spatial features using Einstein summation. The feature aggregation layer performs summation, flattening, normalization, and regularization on the weighted features to obtain aggregated features. The MLP prediction layer performs regression prediction on the aggregated features through a 4-layer MLP network and outputs a predicted value for guided editing efficiency.
[0085] Specifically, the attention aggregation prediction module consists of a self-attention weighted layer, a feature aggregation layer, and a multilayer perceptron prediction layer connected sequentially. The overall function of this module is to learn and aggregate weights from the refined global space features of the input, mapping high-dimensional features to low-dimensional representations, and outputting predicted values that guide editing efficiency through regression operations.
[0086] The self-attention weighted layer is used to assign weights based on feature importance, achieving dynamic feature weighting. This layer first performs a linear transformation on the refined global space features of the input, obtaining a set of learnable initial weight scores. Then, it calculates the dot product of the weight scores and the input features using the Einstein summation method to obtain the relevance score for each feature location. Next, it normalizes the relevance scores using the Softmax function, ensuring the sum of all weight values is 1, thus obtaining the attention weight matrix. In a preferred embodiment, Softmax normalization is performed along the feature dimension to ensure that the weighting ratios of features from different channels conform to probability distribution constraints. Finally, the attention weights are weighted and summed with the refined global space features using the Einstein summation method to obtain the weighted feature representation.
[0087] The feature aggregation layer integrates and standardizes the weighted features to form a global representation of the model. Specifically, the weighted features are summed along the spatial dimension to aggregate information from different locations; then, the aggregation result is flattened, expanding the multi-dimensional features into a one-dimensional vector; finally, normalization and regularization operations are performed on the flattened vector to balance the numerical range of each feature component and suppress overfitting. In a preferred scheme, L2 normalization is used for normalization, and Dropout is used for regularization, randomly discarding some feature channels to improve the model's generalization ability.
[0088] The aggregated features are input into a multilayer perceptron (MLP) prediction network for regression calculation. In one feasible implementation, the MLP prediction layer consists of four fully connected layers sequentially, with ReLU nonlinear activation functions used between each layer. The number of output channels for each fully connected layer is 96, 64, 128, and 1, respectively, to achieve feature dimensionality reduction and continuous value prediction. No activation function is used at the output of the last layer to maintain the continuity of the regression output. The final output scalar is the predicted value for guiding editing efficiency, which can be represented as the probability of successful editing, editing rate, or other quantitative indicators.
[0089] Through the aforementioned attention aggregation prediction module, the model can adaptively select important features at multiple spatial levels and aggregate them with weights. The MLP regression structure further maps complex high-dimensional spatial features into a single predicted value, achieving high-precision modeling and prediction to guide editing efficiency.
[0090] Example 2
[0091] In the research and application of guided editing technology, existing methods for predicting editing efficiency generally suffer from limited modeling capabilities, insufficient feature extraction, and an inability to effectively characterize the complex relationships between multiple sequences. Traditional algorithms typically rely on manual features or single-sequence inputs, making it difficult to comprehensively consider the interaction patterns between multiple nucleic acid sequences in the guided editing system, thus resulting in insufficient accuracy and generalization ability of the prediction results.
[0092] To address the aforementioned technical problems, this invention provides a deep learning-based guided editing efficiency prediction system. The deep learning model used in this system is Peps-base, as shown below. Figure 6 As shown. This system takes multiple key biological sequences in the guided editing system as input and uses a deep neural network model to automatically learn the structural relationships and functional coupling features between sequences, achieving end-to-end prediction of editing efficiency. The specific implementation process of this system is as follows:
[0093] The sequence alignment input module is used to acquire and process multiple biological nucleic acid sequences in the guided editing system. This module extracts data such as the original target strand, the desired editing strand, the guide sequence, the extension sequence, the helper single-lead RNA sequence, and the original complementary strand from experimental databases, sequencing results, or standard sequence files. It then performs normalization and cleaning operations on these sequences, removing non-base characters and filling in missing sites. Subsequently, based on the functional correspondence of each sequence in the guided editing reaction, nucleotide position alignment is performed, aligning bases in the same functional regions to the same column positions to construct a multiple sequence alignment matrix.
[0094] The embedding encoding module receives a multi-sequence alignment matrix as input and performs vectorization operations on each base symbol, converting discrete characters into dense vector representations of fixed dimensions to form an initial feature matrix containing sequence semantic features. Subsequently, the feature matrix is normalized and linearly mapped by an encoding initialization network to enhance the discriminative power of features between different sequences. Based on this, Rotation Position Encoding (RoPE) information is added, embedding the relative position information of each position into the feature vector to generate a latent matrix that fuses sequence features and positional information.
[0095] The alignment feature encoding module comprises multiple alignment sequence encoding blocks. Each block sequentially includes an input layer, a first axial attention layer, a second axial attention layer, a forward propagation layer, and an output layer. A residual connection structure is used between the input layer and each axial attention layer to ensure the transfer of deep features and training stability. The axial attention layers generate query matrices, key matrices, and value matrices through QKV projection units and introduce relative position information using rotational position encoding units. Subsequently, scaling dot product attention calculations are performed in both the row and column axes to extract intra-sequence dependencies and co-evolutionary relationships between different sequences. The attention results are then filtered and fused through gating and output units to generate alignment feature representations.
[0096] The feature refinement and aggregation prediction module includes a spatial feature refinement module and an attention aggregation prediction module. The spatial feature refinement module consists of four deformable convolutional layers, two average pooling layers, and two dimensionality transformation layers. The deformable convolutional layers generate positional offsets through offset units, adaptively adjusting the convolutional sampling region to capture complex local patterns; the pooling layers compress spatial dimensions and aggregate local information, forming a multi-scale feature pyramid structure. After processing by this module, global spatial refined features are obtained. Subsequently, the attention aggregation prediction module receives the global features and performs weighted aggregation. The self-attention weighted layer calculates attention weights through matrix multiplication and Softmax normalization, dynamically assigning the importance of different features; the feature aggregation layer sums, flattens, normalizes, and regularizes the weighted features to generate an aggregated feature vector; the MLP prediction layer performs nonlinear regression calculations on the aggregated features through a four-layer fully connected network, outputting a predicted value for guided editing efficiency.
[0097] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting the efficiency of guided editing based on deep learning, characterized by, The method comprises the following steps: Obtain a plurality of biological nucleic acid sequences involved in the guide editing system, including the original target strand, the desired edited strand, the guide sequence, the extended sequence, the auxiliary single guide RNA sequence, and the original complementary strand. Perform nucleotide position alignment on the plurality of sequences to form a multiple sequence alignment matrix; Convert each base symbol in the multiple sequence alignment matrix into a corresponding vector representation, and add rotation position coding information to the vector to obtain a latent matrix that fuses sequence feature and position information; Perform multi-layer axial attention calculation on the latent matrix by an alignment sequence encoder, wherein row-wise attention is used to capture the association between different sequences, and column-wise attention is used to capture the context dependency within the same sequence, and an alignment feature representation is generated through a residual connection and a normalization operation; Perform spatial feature refinement and information compression on the alignment feature representation through an alternating structure of a plurality of deformable convolution layers and pooling layers of a spatial feature refinement module to obtain a globally spatially refined feature; Perform attention weighting and aggregation on the globally spatially refined feature through a learnable weight of an attention aggregation prediction module, and input the aggregated feature into a multi-layer perceptron network for regression calculation to output a guide editing efficiency prediction value. 2.The deep learning-based guided edit efficiency prediction method of claim 1, wherein, The nucleotide position alignment step on the plurality of sequences comprises: Perform sequence cleaning and length standardization processing on the plurality of sequences to remove non-nucleotide symbols and fill in missing sites; According to the functional correspondence of each sequence in the guide editing reaction process, align the nucleotide positions of the plurality of sequences, so that the bases in the same column correspond to the same editing site or reaction region; Arrange the positions of each sequence after alignment as the row dimension of the matrix, arrange the aligned nucleotide positions as the column dimension of the matrix, so that each matrix element corresponds to the base type of a specific sequence at a specific aligned position, thereby forming a unified spatial alignment input structure. 3.The deep learning-based guided edit efficiency prediction method of claim 1, wherein, The step of obtaining a latent matrix that fuses sequence feature and position information comprises: Perform vectorization processing on each base symbol in the multiple sequence alignment matrix, and map each base symbol to a numerical vector of fixed dimension to form an initial feature matrix containing sequence semantic information; Input the initial feature matrix into an encoding initialization network to perform feature normalization and linear transformation on the numerical vector to enhance the distinguishability of the sequence feature; Add rotation position coding information to the processed feature matrix to embed the relative position information between adjacent sites into the vector space through angular rotation, thereby preserving the spatial order relationship of the sequence; Output a latent matrix that fuses sequence semantic feature and position information. 4.The deep learning-based guided edit efficiency prediction method of claim 1, wherein, The alignment sequence encoder is composed of a plurality of alignment sequence encoding blocks, and each alignment sequence encoding block comprises an input layer, a first axial attention layer, a second axial attention layer, a forward propagation layer, and an output layer. The input layer is connected in residual connection with the first axial attention layer, the first axial attention layer is connected in residual connection with the second axial attention layer, and the second axial attention layer is connected in residual connection with the forward propagation layer. 5.The deep learning based guided edit efficiency prediction method of claim 4, wherein, The axial attention layer is composed of a QKV projection unit, a rotary position encoding unit, an attention unit, and a gating and output unit, wherein the QKV projection unit projects the input alignment sequence representation through layer normalization and linear processing into Q, K, and V matrices respectively; the rotary position encoding unit first converts the Q and K matrices into complex matrices, and then converts the complex matrices back to real numbers by combining a precomputed rotation vector to obtain a rotated Q matrix and a rotated K matrix; The attention unit calculates the rotated Q matrix, the rotated K matrix, and the V matrix through scaled dot-product to obtain attention output; the gating and output unit linearly processes, sigmoid activates, and gates the input alignment sequence representation respectively, and then performs gating multiplication with the attention output to finally obtain alignment feature representation. 6.The deep learning based guided edit efficiency prediction method of claim 1, wherein, The spatial feature refining module is composed of four deformable convolution layers, two average pooling layers, and two dimension transformation layers, wherein the deformable convolution layer includes an offset unit, a variable convolution unit, and a ReLU activation unit; The alignment feature representation sequentially passes through the first dimension transformation layer, the first deformable convolution layer, and the first average pooling layer to obtain the first spatial refined feature; the first spatial refined feature sequentially passes through the second, third, and fourth deformable convolution layers and the second average pooling layer to obtain the second spatial refined feature; and the second spatial refined feature sequentially passes through the fourth deformable convolution layer and the second dimension transformation layer to obtain the global spatial refined feature. 7.The deep learning based guided edit efficiency prediction method of claim 1, wherein, The attention aggregation prediction module is composed of a self-attention weighting layer, a feature aggregation layer, and an MLP prediction layer, wherein the self-attention weighting layer calculates the initial score of the learnable weight and the global spatial refined feature through Einstein summation, obtains the attention weight by combining Softmax normalization, and calculates the weighted feature of the attention weight and the global spatial refined feature through Einstein summation; The feature aggregation layer sums, flattens, normalizes, and regularizes the weighted feature to obtain the aggregated feature; The MLP prediction layer outputs the guide editing efficiency prediction value by performing regression prediction on the aggregated feature through a 4-layer MLP network.
8. A guided edit efficiency prediction system based on deep learning, characterized by, The system is used to implement the guide editing efficiency prediction method of any one of claims 1-7, and the system comprises: A sequence alignment input module is configured to obtain a plurality of biological nucleic acid sequences involved in a guide editing system, including an original target strand, a desired edited strand, a guide sequence, an extended sequence, an auxiliary single guide RNA sequence, and an original complementary strand, perform nucleotide position alignment on the plurality of sequences to form a multi-sequence alignment matrix; An embedding encoding module is configured to convert each base symbol in the multi-sequence alignment matrix into a corresponding vector representation, and add rotary position encoding information to the vector to obtain a latent matrix that fuses sequence features and position information; An alignment feature encoding module is configured to perform multi-layer axial attention calculation on the latent matrix through an alignment sequence encoder, wherein row-wise attention is used to capture the association relationship between different sequences, and column-wise attention is used to capture the context dependency relationship within the same sequence, and an alignment feature representation is generated through residual connection and normalization operation; An alignment feature encoding module is configured to perform multi-layer axial attention calculation on the latent matrix through an alignment sequence encoder, wherein row-wise attention is used to capture the association relationship between different sequences, and column-wise attention is used to capture the context dependency relationship within the same sequence, and an alignment feature representation is generated through residual connection and normalization operation; The feature refinement and aggregation prediction module is configured to perform spatial feature refinement and information compression on the alignment feature representation through an alternating structure of multiple deformable convolution layers and pooling layers of the spatial feature refinement module to obtain global spatial refined features; The prediction output module is configured to perform attention weighting and aggregation on the global spatial refined features through learnable weights of the attention aggregation prediction module, and input the aggregated features into a multi-layer perceptron network for regression calculation to output a guided editing efficiency prediction value.