A lysine lactamization site prediction method based on adaptive grain structure and state space modeling
By using adaptive granular structure and state space modeling, the problems of single feature extraction and insufficient interpretability in existing lysine lactation site prediction are solved. Multi-scale feature fusion and high-precision prediction are achieved, improving the model's generalization ability and biological interpretability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANTONG UNIV
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-09
Smart Images

Figure CN122177212A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of bioinformatics and computational biology, specifically relating to a method for predicting lysine lactation sites based on adaptive granule structure and state space modeling. Background Technology
[0002] Lysine lactation (Kla) is a crucial post-translational modification of proteins. By covalently linking lactate groups to lysine residues, it regulates the protein's charge properties, spatial conformation, and interaction patterns, thereby mediating core biological processes such as metabolic reprogramming and immune homeostasis. Numerous studies have confirmed that aberrant regulation of Kla modification is closely related to the development and progression of malignant tumors such as hepatocellular carcinoma. Kla sites in specific proteins have become potential targets for disease diagnosis and targeted therapy. Therefore, accurate identification of Kla sites in protein sequences is of great significance for elucidating disease pathogenesis and developing novel therapeutic drugs.
[0003] Currently, methods for identifying Kla sites mainly fall into two categories: experimental detection and computational prediction. Experimental detection methods, represented by mass spectrometry, can directly verify the authenticity of Kla sites, but they suffer from drawbacks such as high detection costs, low throughput, and insufficient sensitivity, making it difficult to achieve large-scale screening of low-abundance modified sites. Furthermore, the data interpretation process is complex and cannot meet the needs of rapid research. To overcome the limitations of experimental methods, various computational prediction models have emerged, such as DeepKla and Bert-Kla models based on deep learning. These methods, with their advantages of speed, efficiency, and low cost, have become important tools for the initial screening of Kla sites.
[0004] However, existing computational prediction models still suffer from significant technical bottlenecks: First, feature extraction methods are limited, with most models relying on single-modal features and failing to comprehensively capture multi-scale features related to Kla modifications, thus restricting model generalization ability and prediction accuracy. Second, model structure design has flaws; traditional models either lack effective long-range dependency modeling mechanisms or suffer from excessive computational overhead due to the use of complex attention modules. Third, some models have weak interpretability, making it difficult to reveal the sequence determinants of Kla sites and failing to provide effective support for biological mechanism research. Fourth, existing quantum-enhanced prediction models mostly focus on protein structure classification or drug binding energy prediction, and a mature technical solution for Kla site prediction has not yet been developed, nor has a balance between prediction performance and model complexity been achieved. These problems severely restrict the practical value of Kla site prediction tools, necessitating the development of a new prediction method that is highly accurate, efficient, and interpretable.
[0005] Existing computational prediction models all adopt a single-residue independent modeling mode, without considering the multi-scale organizational relationship of residues in protein sequences. This leads to a significant increase in prediction uncertainty in small sample scenarios, and makes it difficult to adapt to the sequence preference differences of different species when generalizing across species. At the same time, traditional feature extraction does not model the hierarchical relationship between residues, particles, and sequences, and cannot effectively integrate multi-scale information to improve prediction robustness. Summary of the Invention
[0006] Purpose of the Invention: The purpose of this invention is to overcome the following problems in existing lysine lactation site prediction technologies: Existing methods mostly adopt fixed window and static feature fusion strategies, which are difficult to characterize the multi-scale organizational relationships between residues in protein sequences; Traditional deep learning models are usually based on local or global independent modeling, lacking the ability to dynamically model the granular structure evolution process; Existing knowledge enhancement methods mostly adopt feature splicing or simple weighting methods, which fail to enable domain knowledge to directly participate in the internal state evolution process of the model; The model has insufficient interpretability and it is difficult to reveal the contribution mechanism of different sequence regions to modification determination.
[0007] To address the aforementioned technical problems, this invention proposes a lysine lactation site prediction method based on adaptive granular structure and state space modeling. By constructing an adaptive granular structure representation system, introducing a conditional state space dynamic evolution mechanism, and designing a knowledge-driven state transition matrix modulation method, external biological knowledge can directly participate in the system's dynamic structure. This achieves deep integration of multi-scale structural information and domain knowledge, improving the accuracy, generalization ability, and interpretability of lysine lactation site prediction.
[0008] This method includes the following steps:
[0009] Step 1: Data Acquisition and Adaptive Sample Construction: Acquire experimentally validated lysine lactation modification site data, locate lysine residues in the target protein sequence, and construct local sequence window samples centered on lysine residues; adjust the window range by combining protein structural environment information, and select representative negative samples through sequence conservation analysis to finally form a standardized training sample set.
[0010] Step 2: Execute the sequence adaptive granulation algorithm based on semantic coherence: Extract deep semantic features of the sequence through a pre-trained language model, construct a granulation scoring function that integrates local boundary confidence and internal semantic consistency, formalize the granulation problem into a constrained optimization problem that seeks the global optimal solution of the granulation scoring function, and use dynamic programming algorithm to solve it efficiently, and finally realize the deterministic mapping from continuous semantic space to discrete, highly cohesive granular structure;
[0011] Step 3, Granular Multi-Source Feature Representation and Aggregation: For each residue particle, the dual-channel pre-trained feature encoding module is called to extract residue-level features. The residue features within the particle are adaptively weighted and aggregated to form a unified granular feature vector. All granular features are arranged according to the granular structure generated by the pre-trained language model to form a granular feature sequence.
[0012] Step 4: Adaptive state-space modeling based on protein sequence characteristics: Input the granular feature sequence into the state-space modeling module to dynamically model the granular functional state and obtain a dynamic state representation that is complementary to the static granular features.
[0013] Step 5: Knowledge-constrained state modulation and feature enhancement mechanism: Invoke the policy control network, generate granular modulation policy parameters based on the current state representation and historical discrimination error, and adjust the state propagation intensity through the policy function; fuse the modification driving vector with the model features to form the final discrimination feature vector;
[0014] Step 6, Lysine lactation site discrimination: Perform weighted aggregation on the final particle-level state sequence, extract the knowledge-modulated state representation of the particle where the target lysine is located, input the fused representation into a lightweight classification mapping network, and output the site discrimination result.
[0015] Step 1 includes: acquiring experimentally validated lysine lactation site data to locate all lysine residues in the target protein sequence; dynamically adjusting the local sequence window length based on secondary structure prediction results: expanding the transmembrane structure region to 35 residues on each side of the target lysine; shrinking the disordered region to 15 residues on each side; using the default window range for the remaining regions; generating pseudo-labels for unlabeled samples; calculating conservation scores through multi-species sequence alignment, prioritizing negative samples from evolutionarily conserved modification hotspots to reduce data bias; labeling each local sequence window with 1 indicating lactation modification and 0 indicating no modification, and attaching sample confidence scores and evidence source indexes to form a standardized training sample set.
[0016] Step 2 includes:
[0017] Step 2-1: Input sequence S into a pre-trained protein language model to obtain the semantic representation vector of the t-th residue position. ,and Where R represents the real number space, and d represents the dimension of the semantic representation vector, which is also the state space dimension of the SSM state model discussed later; a lightweight granular prediction head is constructed, which uses semantic representation vectors As input, it outputs in parallel the particle boundary probability and intraparticle consistency characterization;
[0018] Particle boundary probability refers to calculating the probability that each position is either the starting point or the ending point of a particle. (Initiation probability) The calculation method Termination probability The calculation method ,in, For the Sigmoid function; This is the initial probability weight matrix; This is the initial probability bias term; The termination probability weight matrix; This is the termination probability bias term;
[0019] The interval assignment consistency function measures the degree of consistency in which all positions within an interval belong to the same particle. For a candidate interval g = [i, j], the interval assignment consistency probability is... Where g = [i,j] represents a continuous sequence segment from position i to position j; This is the interval consistency weight matrix; These are trainable parameters;
[0020] Step 2-2: Construct the particle scoring function. For any candidate particle g = [i, j], define the scoring function Score(g) for candidate particle g:
[0021] ,
[0022] in, , , and For hyperparameters;
[0023] Steps 2-3: Solve for the globally optimal particle using dynamic programming: Define the state DP[t] as the optimal partitioning total score of the subsequence S[1:t] of the particles from position 1 to position t, and introduce a minimum particle length constraint. First, initialize the optimal partition total score DP[0] of the empty sequence to 0, and then define the state transition equation:
[0024] ,
[0025] in, The set of candidate starting positions that satisfy the minimum particle length constraint; The optimal score for the portion before candidate particle [i,t]; Let be the score function for the candidate interval [i,t]. During the recursive calculation, record the optimal decision i when each t reaches its maximum value. After recursively calculating to t = L, obtain the globally optimal particle boundary sequence by backtracking. ,in Let M be the interval of the u-th optimal grain, u be the intermediate parameter, and M be the total number of global optimal grains.
[0026] Steps 2-4: To train the semantic coding model and the granular prediction head, design a multi-task joint loss function. Using unsupervised or weakly supervised signals to guide model learning:
[0027] ,
[0028] Among them, the grain boundary loss function CE() is the cross-entropy loss function. Let be the initial probability of the particle at position i. Let the starting label be the grain at position i. Let be the particle termination probability at position i. The terminator is the granular terminator at position i. and These are weight parameters;
[0029] Intragranular consistency loss function , Intragranular similarity, Here, m represents the interparticle similarity, and m is the interval hyperparameter. , , Used to measure semantic representation vector and The degree of similarity between them The number of residues contained in particle g. denoted as the number of residues contained in the next adjacent particle g.
[0030] In step 3, residue particles refer to information units containing one or more amino acid residues, used to characterize the structural and semantic relationships of proteins at a specific scale; granular features refer to low-dimensional vectors obtained by adaptively aggregating the features of all residues within a residue particle, used to integrate the collaborative information of multiple residues.
[0031] In step 3, adaptive aggregation from residue features to granular features is performed for each residue particle, including the following steps:
[0032] Step 3-1: Establish a dual-channel pre-trained feature encoding module to extract sequence-level and residue-level features for each residue within the granule. For sequence-level features, the initial representation vector of the residue is obtained using embedding representation based on the protein pre-trained language model ESM-2. A one-dimensional convolutional network is then used to extract and compress local sequence patterns to obtain a sequence-level feature vector characterizing the evolutionary conservation of residues. , The feature dimension is 128-dimensional. The residue-level features utilize a protein sequence coding model based on the Transformer structure to generate residue context embedding representations, and a two-dimensional convolutional network is used to model the semantic associations between neighboring residues to extract residue context semantic features. This yields a 256-dimensional residue-level feature vector, where q is the index number of the current residue within its respective particle.
[0033] Step 3-2: Intragranular adaptive weighted aggregation uses a two-factor weighting method, with the two factors being positional importance and semantic contribution, to calculate the fusion weight of each residue within the granular region. ;
[0034] Position weight The calculation formula is:
[0035] ,
[0036] Where k is the index number of the target lysine residue within its respective granule. The distance between the q-th residue and the target k;
[0037] Semantic weight Based on residue semantic similarity normalization, the following was obtained:
[0038] , ,
[0039] Where n is the total number of intragranular residues; Let be the cosine similarity between the semantic representation vectors of residues q and k; and These represent the semantic feature vectors of the q-th residue and the k-th residue, respectively. That is, the BERT model is used to semantically encode protein residues, and the encoded features are further extracted and processed by a two-dimensional convolutional network to obtain the semantic feature vectors of the corresponding residues.
[0040] The original weights of all residues within the granule are normalized so that the sum of the weights of all residues within the granule is 1; the original weight of the q-th residue is then calculated. Intraparticle normalization yields the fusion weight of the q-th residue. ;
[0041] After obtaining the final residue weights, a 768-dimensional semantic granular feature is constructed. ,in The semantic granule feature represents the t-th granule;
[0042] Step 3-3: Concatenate sequence-level, residue-level, and semantic granular features into a 3328-dimensional vector, and compress it into a 256-dimensional unified granular feature vector using a lightweight multilayer perceptron (MLP). All granular features are arranged in a predefined multi-scale rule to form a granular feature sequence. ,in Let M be the uniform-level feature vector of the Mth particle, where M is the total number of particles.
[0043] Step 4 includes the following steps:
[0044] Step 4-1: For granular feature sequences Construct a granular hidden state space model ,in Let be the hidden state vector of the t-th particle. Let be the dynamic state transition matrix of the t-th particle. Let be the input mapping matrix for the t-th particle. Let be the noise disturbance term for the t-th particle;
[0045] Step 4-2: The state space modeling module performs a structured design for modeling the dynamic state evolution of granular feature sequences based on the continuous-time core parameters of the State Space Model (SSM): defining a distance decay mask matrix. Where x and y are indices of the state dimension. The attenuation coefficient is a hyperparameter; exp() is the natural exponential function;
[0046] Generate a structured continuous-time state matrix ,in, For a trainable full parameter matrix, It represents the Hadamah accumulation. Create a block mask matrix; initialize the continuous-time input matrix. and learnable scaling factor , where D is the dimension of the input features; d is the state space dimension of the state model SSM;
[0047] Step 4-3: The state-space modeling module is used to dynamically generate parameters from the current input particle features at each step, realizing conditional modeling, and performing layer normalization on the input particles to obtain layer-normalized particle features. LayerNorm() is the layer normalization operation. Let be the layer-normalized feature vector of the t-th particle; input the layer-normalized feature vector. A lightweight multilayer perceptron (MLP) outputs a set of dynamic parameters:
[0048] ,
[0049] in, ; Let be the adaptive discretization step size vector of the t-th particle; The state transition matrix adjustment vector for the t-th particle; Let be the nonlinear kernel gating vector of the t-th particle; Let be the input projection adjustment vector for the t-th particle. This represents an adaptive multilayer perceptron;
[0050] Construct the continuous-time matrix of the current particle t , where Diag() is the diagonalization function, which converts a vector into a diagonal matrix;
[0051] Step 4-4: Discretize the continuous-time system to accommodate discrete granular inputs, using the zero-order preservation method, and perform independent computation for each state dimension;
[0052] For the c-th state dimension, first calculate the scalar step size. Extract continuous time parameters , ;in, Let c be the c-th dimension component of the vector corresponding to the t-th particle. Let c be the state transition row vector of the t-th particle. Let c be the input projection row vector of the c-th row of the t-th particle;
[0053] Calculate the state transition row vector and input projection row vector of the c-th row after discretization:
[0054] ,
[0055] Where exp() is the natural exponential function;
[0056] The input projection row vector of the c-th row after initial discretization is efficiently calculated using Taylor expansion or approximation:
[0057] ,
[0058] in, It is the c-th row of the identity matrix. For the continuous-time input parameters of the c-th state dimension; pinv() represents the pseudo-inverse;
[0059] Application input adjustment, Finally, the discrete parameters of the current time step are obtained, namely the dynamic state transition matrix. and dynamic input projection matrix , The input projection adjustment vector corresponding to the t-th particle In the context, the component of the c-th state dimension;
[0060] Steps 4-5: Through intergranular remote graph attention coupling, information can flow directly between different granular states at the same time level: the previous hidden state of the t-th granule is... Viewed as a node in the graph, Q represents the computed query, K is the key, and V is the value. The query vector represents the particle. Let l represent the bond vector of the neighboring particle l. Let l represent the value vector of the neighboring particle, where , , For a shared, learnable weight matrix;
[0061] For the current particle t, only calculate the attention to the N most relevant particles:
[0062] ,
[0063] in, The attentional weights of the current particle t and its neighboring particle l; Softmax represents the activation function; Indicates transpose; This is the query vector for the current particle t; Let l be the bond vector of the neighboring particle l;
[0064] Generate the graph context vector of the current particle t. ;
[0065] Steps 4-6: Introduce a nonlinear transformation, first calculate the nonlinear term of the current particle t. ,in It is a non-linear activation function. It is a diagonal matrix, and the diagonal elements come from ;
[0066] Steps 4-7: The state space modeling module updates the current particle state based on the particle feature input, attention context information, and nonlinear modulation term, forming the final state update formula:
[0067] ,
[0068] in, For context projection matrix; This is the context vector obtained through the intergranular long-range graph attention mechanism; Let be the nonlinear modulation term for the t-th particle; This represents the hidden state vector of the (t-1)th particle;
[0069] Steps 4-8: The state-space modeling module generates the continuous-time matrix of the current particle t. Afterwards, Generate a global representation using spectral normalization and attention aggregation methods. .
[0070] Step 5 includes the following steps:
[0071] Step 5-1: Pre-construct a lactation-related knowledge base H, including known lactation site sequence fragments, conserved modification motifs, residue co-occurrence statistical patterns, and statistical rules for the relationship between different particle types and modifications; the knowledge base is stored in the form of a vector database, in the following format: ,in, Let h be the feature vector of the h-th knowledge. The statistical rule for the h-th knowledge;
[0072] Step 5-2: Merge the granular feature sequences Mapping to the knowledge query space yields the query vector for the t-th granule. Calculate the similarity matrix between the t-th particle and the knowledge vector h. Select the N most relevant knowledge points, construct the granule-knowledge coupling matrix, and obtain the knowledge representation vector of the t-th granule. ,in, Let h be the embedding vector of the h-th knowledge item, with a dimension equal to the total number of items in the knowledge base;
[0073] Step 5-3: The policy control network takes granular feature representation as input to generate a knowledge-driven state modulation vector, and then... Input modulation generation network, output granular modulation factor :
[0074] ,
[0075] in, b represents the bias term of the modulation generation network, which is a learnable parameter. This represents the learnable weight matrix in the modulation-generating network;
[0076] Step 5-4: The policy control network processes the dynamic state transition matrix. Knowledge modulation:
[0077] ,
[0078] in, For the granular modulation vector Constructed diagonal modulation matrix; A learnable scaling factor; For element-wise multiplication; This represents the dynamic state transition matrix after knowledge modulation.
[0079] Step 5-5: Re-execute the state update formula Thus, a granular state representation under knowledge constraints is obtained. ; Let represent the input mapping matrix of the t-th particle; Let represent the input vector of the t-th particle;
[0080] Steps 5-6: Merge the original features The final state representation after knowledge modulation The features are then combined to form the final discriminative features. The input classifier outputs the lactation probability of the target lysine, where concat() represents the concatenation operation, resulting in the final granular hidden state sequence. .
[0081] Step 6 includes the following steps:
[0082] Step 6-1: Construct a knowledge-constrained global state representation and perform weighted aggregation on the final granularity state sequence:
[0083] ,
[0084] in, It is the particle-level modification sensitivity score of the t-th particle; In order to be in Granularity-level state representation obtained through recursion under control; Represents a global granularity state representation under knowledge constraints;
[0085] Step 6-2: Extract the knowledge modulation state representation of the k-th particle containing the target lysine. Constructing a fusion representation ;
[0086] Step 6-3: Calculate the discrimination probability and input the fused representation into the lightweight classification mapping network:
[0087] ,
[0088] in, The probability of lactation modification of the target lysine; The weight matrix is a learnable weight matrix;
[0089] Output prediction probability The contribution weight of each particle to the final state and the knowledge modulation intensity are analyzed. By analyzing the contribution ratio of the knowledge modulation matrix in the state transition calculation, the influence of knowledge constraints on the current position discrimination result is obtained, and the influence is defined as the knowledge modulation intensity, which is used to characterize the degree of participation of domain knowledge in the model decision-making process.
[0090] Step 6-4: Introduce a decision threshold τ, 0 < τ < 1. The judgment rule is defined as follows: when p ≥ τ, lysine is judged as a lactation modification site; when p < τ, lysine is judged as a non-lactation site.
[0091] The present invention also provides an electronic device, including a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method.
[0092] The present invention also provides a storage medium storing a computer program or instructions that, when the computer program or instructions are run on a computer, execute the steps of the method described.
[0093] This invention forms a dynamic modeling framework for protein modification mechanisms through the synergistic effect of particle structure generation, particle-level state evolution, and knowledge modulation mechanisms, enabling stable and reliable prediction of the modification tendency of target lysine residues.
[0094] To overcome the limitations of existing technologies in predicting lysine lactation sites, which struggle to effectively characterize the multi-scale organizational relationships of residue features, the dynamic changes in modification-related conformations, and lack interpretability, this invention introduces a pre-trained language model to perform deep semantic encoding of protein sequences, constructs an adaptive granular structure generation mechanism, and maps continuous residue sequences into multi-scale granular structure representations. Simultaneously, a conditional state-space dynamic modeling framework is constructed to model the functional state evolution process of granular features. Furthermore, a knowledge-constrained state transition matrix modulation mechanism is designed, enabling lactation-related biological knowledge to directly participate in the construction and regulation of the system's dynamic structure, achieving a deep fusion of multi-scale structural information and domain knowledge.
[0095] Beneficial effects: This invention effectively overcomes the problems of existing technologies in predicting lysine lactation sites, which are difficult to effectively characterize the multi-scale organizational relationships of residue features, the dynamic changes of modification-related conformations, and the lack of interpretability. Through the synergistic effect of multiple technical modules, it achieves deep integration of multi-scale structural information and domain knowledge, significantly improving the accuracy, generalization ability, and biological interpretability of lysine lactation site prediction, while also possessing good practicality and scalability.
[0096] This invention introduces a pre-trained language model to perform deep semantic encoding of protein sequences. Combined with a constructed adaptive granular structure generation mechanism, it maps continuous residue sequences into multi-scale granular structural representations. Through a sequence adaptive granulation algorithm based on semantic coherence, it integrates a granular scoring function based on local boundary confidence and internal semantic consistency, along with a dynamic programming algorithm, to achieve a deterministic mapping from continuous semantic space to discrete, highly cohesive residue granular structures. This invention overcomes the limitations of fixed-length sequence windows in traditional techniques. It can dynamically adjust the window length based on sequence conservation, structural context information, and sample difficulty distribution through an adaptive sample construction module. Simultaneously, it combines difficult sample mining and cross-species sample alignment to form a standardized training sample set with dynamic boundaries. This effectively captures the optimal local context of different structural regions (transmembrane structural regions, disordered regions, etc.), more accurately characterizes the multi-scale organizational relationships between residues, and improves the rationality and discriminativeness of feature representations.
[0097] The conditional state-space dynamic modeling framework constructed in this invention can effectively model the functional state evolution process of granular features. Through the granular multi-source feature representation and aggregation module, the dual-channel pre-trained feature encoding module is called to extract residue-level and sequence-level features. Combining positional importance and semantic contribution as dual factors, adaptive weighted aggregation of intragranular residue features is achieved to form a unified granular feature vector and arrange it into a granular feature sequence. Then, through adaptive state-space modeling based on protein sequence characteristics, distance decay mask matrix, structured continuous-time state matrix, conditional dynamic parameter generation, intergranular long-range graph attention coupling, and nonlinear transformation are introduced. At the same time, runtime stability constraints are applied to simulate the dynamic process of conformational change, synergistic effect, and state transmission during protein modification. It effectively captures the modification-related conformational dynamic changes that cannot be described by traditional static feature fusion methods, and takes into account the biological rationality and numerical stability of the model.
[0098] The knowledge-constrained state transition matrix modulation mechanism designed in this invention enables lactation-related biological knowledge to directly participate in the construction and regulation of the system's dynamic structure. By pre-constructing a lactation-related knowledge base, the granular fusion feature sequence is mapped to the knowledge query space to generate a knowledge-driven state modulation vector. The dynamic state transition matrix is then subjected to knowledge modulation and the state update is re-executed to obtain a granular state representation under knowledge constraints. This makes the prediction process no longer dependent on simple feature splicing, but has clear biological significance, greatly improving the interpretability and credibility of the model. At the same time, the predicted probability output by the model, the contribution weight of each particle to the final state, the knowledge modulation intensity, and other information can provide strong support for the analysis of the lysine lactation modification mechanism.
[0099] The overall framework of this invention achieves end-to-end trainability. It guides the model to learn efficiently through a multi-task joint loss function and, combined with operations such as pseudo-label generation and evolutionarily conserved negative sample selection in the adaptive sample construction process, effectively alleviates the data bias problem caused by data imbalance and scarce annotations, and improves the model's generalization performance across species and unknown protein sequences. At the same time, the model adopts a modular design, which can transfer core modules such as pre-trained language model-driven granular structure generation and knowledge-constrained state space modeling to other protein post-translational modification site prediction tasks such as phosphorylation and ubiquitination. It has strong versatility and iterability, and provides a stable, reliable and efficient intelligent representation framework for protein post-translational modification site prediction. Attached Figure Description
[0100] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0101] Figure 1 This is a flowchart of the method of the present invention.
[0102] Figure 2 This is a flowchart of adaptive state-space modeling based on protein sequence characteristics. Detailed Implementation
[0103] like Figure 1 As shown, this embodiment of the invention provides a method for predicting lysine lactation sites based on adaptive granule structure and state space modeling, comprising the following steps:
[0104] Step 1: Data Acquisition and Adaptive Sample Construction: Obtain experimentally validated lysine lactation modification site data from protein databases and related literature, and construct local sequence window samples centered on lysine residues; through the adaptive sample construction module, dynamically adjust the window length according to sequence conservation, structural context information and sample difficulty distribution, and perform difficult sample mining and cross-species sample alignment to form a standardized training sample set with dynamic boundaries.
[0105] Step 2: Sequence Adaptive Granulation Algorithm Based on Semantic Coherence: Extract deep semantic features of sequences through a pre-trained language model, construct a granular scoring function that integrates local boundary confidence and internal semantic consistency, and then formalize the granulation problem into a constrained optimization problem that seeks the global optimal solution of the scoring function. The dynamic programming algorithm is used to solve the problem efficiently, and finally achieves a deterministic mapping from continuous semantic space to discrete, highly cohesive granular structures.
[0106] Step 3, Granular Multi-Source Feature Representation and Aggregation: For each residue particle, the dual-channel pre-trained feature encoding module is called to extract residue-level features. The residue features within the particle are adaptively weighted and aggregated to form a unified granular feature vector. All granular features are arranged in the order of the granular structure generated by the pre-trained language model to form a granular feature sequence.
[0107] Step 4: Adaptive state-space modeling based on protein sequence characteristics: Input the granular feature sequence into the state-space modeling module to dynamically model the granular functional state and obtain a dynamic state representation that is complementary to the static granular features.
[0108] Step 5: Knowledge-Constrained State Modulation and Feature Enhancement Mechanism: The policy control network is invoked to generate granular modulation policy parameters based on the current state representation and historical discrimination errors. The state propagation intensity is then adjusted through a policy function. The modified driving vector is fused with the model features to form the final discrimination feature vector.
[0109] Step 6, Lysine lactation site discrimination: Perform weighted aggregation on the final particle-level state sequence, extract the knowledge-modulated state representation of the particle where the target lysine is located, input the fused representation into a lightweight classification mapping network, and output the site discrimination result.
[0110] In this invention, residue particles refer to information units containing one or more amino acid residues, used to characterize the structural and semantic relationships of proteins at a specific scale; granular features refer to low-dimensional vectors obtained by adaptively aggregating the features of all residues within a residue particle, used to integrate the collaborative information of multiple residues; the traditional site prediction problem based on fixed window and static feature fusion is reconstructed into a granular structure adaptive generation problem driven by a large language model, characterizing the dynamic driving process of granular functional state on the target lysine modification tendency, thereby realizing knowledge-driven multi-scale structural modeling and high-precision site prediction.
[0111] In a more specific technical solution, step 1 is used to construct standardized sample inputs suitable for granular computation and state-space modeling, and the specific steps are as follows:
[0112] Experimentally validated lysine lactation site data were obtained from protein databases and literature to locate all lysine residues in the target protein sequence. Based on secondary structure prediction results, the length of the local sequence window was dynamically adjusted: the transmembrane region was expanded to 35 residues on each side of the target lysine; the disordered region was shrunk to 15 residues on each side; and the remaining regions used the default window range. Pseudo-labels were generated for unlabeled samples through literature evidence retrieval; conservation scores were calculated through multi-species sequence alignment, prioritizing negative samples from evolutionarily conserved modification hotspots to reduce data bias. Each local sequence window was labeled with 1 indicating lactation modification and 0 indicating no modification, and a sample confidence score and evidence source index were attached, forming a standardized training sample set of "local sequence + label + confidence score + evidence source".
[0113] In a more specific technical solution, step 2 involves adaptive granular structure generation driven by a pre-trained language model, as detailed below:
[0114] Step 2-1: First, input the sequence S into the pre-trained protein language model to obtain the contextual semantic representation vector of each residue position t. Based on this, a lightweight granular prediction head is constructed, which uses the aforementioned semantic vector sequence. As input, it outputs in parallel the particle boundary probability and the intraparticle consistency characterization.
[0115] Particle boundary probability refers to calculating the probability that each location is either the starting or ending point of a particle. The method for calculating the initiation probability is... The method for calculating the termination probability is... .in, For trainable parameters, This is the Sigmoid function.
[0116] In the interval affiliation consistency function, for g = [i, j], ,in For trainable parameters, This is the Sigmoid function.
[0117] Step 2-2: Construct the granule scoring function. For any candidate granule g = [I, j], define its scoring function Score(g), which quantifies the confidence level of the interval as a complete and reasonable granule.
[0118] ,
[0119] The first item is the granule initiation confidence; the second item is the granule termination confidence; the third item is the granule internal semantic consistency score; and the fourth item is the length penalty item. to All of these are trainable or empirically preset hyperparameters.
[0120] Steps 2-3: Solving for the globally optimal particle size uses a dynamic programming algorithm. The state DP[t] is defined as the optimal total score of the subsequence S[1:t], and a minimum particle size constraint is introduced. First, initialize DP[0] to 0, then define the state transition equation:
[0121] ,
[0122] Here, i represents the candidate starting position of the current particle. During the recursive calculation, the optimal decision i when the maximum value is reached at each t is recorded. After recursively calculating to t = L, the globally optimal particle boundary sequence can be obtained by backtracking. ;
[0123] Steps 2-4: To train the semantic coding model and the granular prediction head, this invention designs a multi-task joint loss function. Using unsupervised or weakly supervised signals to guide model learning:
[0124] ,
[0125] in, , used to constrain the accuracy of boundary prediction.
[0126] Through self-supervised contrastive learning, the model is forced to learn semantic feature representations that are compact within particles and segregated between particles. , .
[0127] A further technical solution is that in step 3, adaptive aggregation from residue features to granular features is achieved for each residue particle. The specific steps are as follows:
[0128] Step 3-1: Call the dual-channel pre-trained feature encoding module to extract sequence-level and residue-level features for each residue within the granule. Sequence-level features are extracted using the ESM-2_CNN1D branch to obtain 128-dimensional evolutionarily conserved features. The residue-level features are used to extract 256-dimensional contextual semantic features through the BERT_CNN2D branch. , where i is the index of intragranular residues.
[0129] Step 3-2: Intragranular adaptive weighted aggregation uses a two-factor weighting method, where the two factors are positional importance and semantic contribution, to calculate the weight of each residue within the granular matrix. .
[0130] Position weight The calculation method uses a weight of 0.1 for the location of the target lysine, and the weights for other locations are reduced by distance. ,in Let be the distance between residue i and target k.
[0131] Semantic weight Based on residue semantic similarity normalization, , where n is the total number of residues within the grain.
[0132] Step 3-3: Concatenate sequence-level, residue-level, and semantic granular features into a 1152-dimensional vector, and compress it into a 256-dimensional unified granular feature vector using a lightweight MLP. All granular features are arranged in a predefined multi-scale rule-defined order: "fine-grained - medium-grained - coarse-grained - semantic granules - conserved granules - novel functional granules," forming a granular feature sequence. , where M is the total number of particles.
[0133] like Figure 2 As shown, in a further technical solution, step 4 is adaptive state-space modeling based on protein sequence characteristics, as detailed below:
[0134] Step 4-1: For the granular feature sequence obtained in step 3 Construct a granular hidden state space model ,in Let be the hidden state vector of the t-th particle. Let be the state transition matrix at step t. For the input mapping matrix, This is the noise disturbance term.
[0135] Step 4-2: To inject prior knowledge about protein-protein interactions, the continuous-time core parameters of the SSM are designed in a structured manner. The distance decay mask matrix is defined as follows: , where i, j are indices of the state dimension. This is the attenuation coefficient hyperparameter. This matrix simulates the stronger connectivity that should exist between neighboring dimensions in the state space.
[0136] Generate a structured continuous-time state matrix .in, For a trainable full parameter matrix, This represents the Hadamard product, i.e., element-wise multiplication. Initialize the continuous-time input matrix. and learnable scaling factor .
[0137] Step 4-3: In each step, the parameters of SSM are dynamically generated from the current input particle features, realizing conditional modeling and performing layer normalization on the input particles. Normalized features are input into a lightweight multilayer perceptron (MLP), which outputs a set of dynamic parameters: .
[0138] in, , This is the adaptive discretization step size vector; This is the state transition matrix adjustment vector, used for fine-tuning the fundamental matrix; It is a nonlinear kernel gating vector that controls the strength of the nonlinear term; This is the input projection adjustment vector, used to scale the effect of the input.
[0139] Construct the continuous time matrix for the current step. , where Diag(·) transforms the vector into a diagonal matrix. This formula combines global structural priors with input-specific adjustments.
[0140] Step 4-4: Discretize the continuous-time system to accommodate discrete granular inputs. A zero-order preservation method is employed, and independent computation is performed for each state dimension to ensure numerical stability and expressive flexibility.
[0141] For the i-th state dimension, first calculate the scalar step size. Extract continuous time parameters , .
[0142] Calculate the discretized state transition row vector and the input projection row vector. The matrix exponent can be efficiently calculated using Taylor expansion or approximation. .in, It is the i-th row of the identity matrix. This indicates a pseudo-inverse. Input adjustment is applied. Finally, the discrete parameters of the current time step are obtained, namely the dynamic state transition matrix. and dynamic input projection .
[0143] Steps 4-5: Through intergranular long-range graph attention coupling, information can flow directly between different granular states at the same time level. This involves storing the previous hidden state of each granule t. Consider it as a node in the graph. Q represents the computed query, K is the key, and V is the value. The query vector represents the particle. The key vector representing the historical particle l. Denotes the value vector of historical particle l, where , , For a shared, learnable weight matrix.
[0144] To reduce complexity, not all particle pairs are computed. For the current particle t, only the K most relevant particles are computed (e.g., based on...). With all Attention based on cosine similarity (Top-K, or based on a pre-defined window of sequence distance): ,in .pass Generate graph context vectors, vectors It aggregates the state information of other related particles to form a lateral long-range dependency signal.
[0145] Steps 4-6: Introduce a nonlinear transformation to enable the model to characterize complex dynamics such as coordination and saturation that may exist during protein modification. First, calculate the nonlinear term. ,in It is a non-linear activation function. It is a diagonal matrix whose diagonal elements come from This enables dimension-by-dimensional gating of nonlinear terms.
[0146] Steps 4-7: Integrate all the above innovative components to form the final state update formula of this invention: ,
[0147] in, and It is the input dependency matrix generated by S4-3. It is the graph context vector calculated in step 4-4. It is the nonlinear term calculated in steps 4-5.
[0148] Steps 4-8: Introduce runtime stability constraints to ensure... The stability of the system. Generating continuous processes at each step. Then, spectral normalization is applied to it. Based on the properties of the matrix exponential function, The spectral radius will be controlled, thereby ensuring the discretized spectral radius is controlled. It is stable. A global representation is generated using an attention aggregation method. .
[0149] In a further technical solution, step 5 introduces a knowledge-constrained state modulation mechanism, the specific steps of which are as follows:
[0150] Step 5-1: Pre-construct a lactation-related knowledge base K, including known lactation site sequence fragments, conserved modification motifs, residue co-occurrence statistical patterns, and statistical rules governing the relationship between different particle types and modifications. The knowledge base is stored in a vector database format, as follows: ,in, For feature vectors, This corresponds to the semantic description or statistical rules.
[0151] Step 5-2: Map the granular fusion feature sequence obtained in Step 4 to the knowledge query space to obtain the query vector. Calculate the similarity matrix between granular features and knowledge vectors. Select Top-K related knowledge and construct a granular-knowledge coupling matrix. This yields the knowledge representation vector corresponding to each particle. .
[0152] Step 5-3: Generate a knowledge-driven state modulation vector and couple the knowledge vector. Input modulation generation network, output granular modulation factor:
[0153] ,
[0154] in, d represents the state dimension. This is the Sigmoid function. The modulation vector represents the particle's ability to adjust the state propagation strength under the current knowledge constraints.
[0155] Step 5-4: Apply the dynamic state transition matrix generated in step 4. To modulate knowledge. .
[0156] in, For the granular modulation vector Constructed diagonal modulation matrix; This is a learnable scaling factor. This step allows knowledge information to directly participate in the system's dynamic structure, rather than just in feature fusion.
[0157] Step 5-5: The state transition matrix after knowledge modulation Next, re-execute the state update. Thus, a granular state representation under knowledge constraints is obtained.
[0158] Steps 5-6: Concatenate the knowledge-modulated final state representation with the original fused features to form the final discriminative features. The input classifier outputs the lactation probability of the target lysine.
[0159] In a more specific technical solution, step 6 is based on knowledge-modulated dynamic state representation for site discrimination, and the specific steps are as follows:
[0160] Step 6-1: Perform weighted aggregation on the final granularity state sequence. .in, It is a granular modification sensitivity score.
[0161] Step 6-2: Extract the knowledge modulation state representation of the target lysine-containing particle. Constructing a fusion representation This representation includes both the local modification environment state and the global structural control state.
[0162] Step 6-3: Calculate the discrimination probability and input the fused representation into the lightweight classification mapping network. .in, This represents the probability of lactation modification of the target lysine residue. Output the predicted probability. The contribution weight of each particle to the final state, and the knowledge modulation intensity. .
[0163] Step 6-4: Introduce a decision threshold τ (0 < τ < 1). The judgment rule is defined as follows: when p ≥ τ, the lysine is judged to be a lactation modification site; when p < τ, the lysine is judged to be a non-lactation site.
[0164] The threshold τ can be determined in the following ways: by maximizing the Youden Index based on the validation set; by selecting the optimal balance point based on the ROC curve; and by adaptively adjusting the Precision or Recall priority according to the application scenario.
[0165] Through the synergistic effect of particle structure generation, state space evolution, and knowledge modulation, this invention forms a dynamic modeling system for protein modification mechanisms, which can achieve high-precision and interpretable prediction of the modification tendency of target lysine residues, and is supported by interpretable biological knowledge, thus forming a stable, reliable, and iterative intelligent representation framework suitable for predicting lysine lactation sites.
[0166] In one specific embodiment of the present invention, a method for predicting the lysine lactation site of the key protein hCLEC12A is provided, comprising the following steps:
[0167] Step 1: The full-length sequence of the protein, consisting of 267 residues, was obtained from the UniProt database. Combined with the Cplm 4.0 database and 5,412 mammalian lactation sites validated in the literature, K174 was confirmed as a known modification site. The system systematically traversed all 15 lysine residues of the protein. For each site, based on the secondary structure predicted by SOPMA, the accuracy of the transmembrane region reached Q3=89.2%. Adaptive window construction was performed: for K174 located at residues 160-180 in the third transmembrane helix, the window was expanded to 35 residues on each side to ensure complete coverage of the α-helix structure where Pα=0.87; for K181 located in the disordered loop region at residues 181-190, the window was shrunk to 15 residues on each side. Multiple sequence alignment of 12 homologous species using Clustal Omega revealed that K181 was completely conserved in 9 species, with a conservation score of 0.85. Based on this, the system generates pseudo-labels with a label of 1 and a confidence level of 0.7, which are then incorporated into the training set, ultimately constructing standardized samples containing the "sequence-label-confidence-source" quadruple.
[0168] Step 2: Input the 71-mer sequence of K174 into the pre-trained ESM-2 model to obtain a 768-dimensional deep semantic vector for each residue. A lightweight prediction head, with parameters accounting for only 0.3% of the main model, calculates the probability of each position as the start and end point of the granulation in parallel. =0.91 (t=170), =0.88 (t=176) and evaluate the semantic consistency within the candidate intervals: the mean cosine similarity of the interval [170,176] is 0.78. This is achieved by optimizing the granular scoring function. , =0.4, =0.4, =0.5, =0.1, The algorithm employs a dynamic programming approach with a time complexity of O(N²), where N=71, to find the globally optimal partition. The algorithm successfully maps continuous sequences into a set of discrete and highly cohesive residue particles with 97.3% normalized mutual information. The average particle length is 7.8 residues. The most critical particle, g1, covering the "FETLKAR" sequence, has an average semantic similarity of 0.71±0.09 between its internal residues, centered at K174. Particle g2, covering the "KECP..." sequence, has a similarity of 0.68±0.11, centered at K181. This partitioning shows only 61% overlap with known protein domains, indicating the discovery of functional microregions beyond traditional definitions.
[0169] Step 3: After determining the granular structure, multi-source feature extraction and aggregation are performed on each granule. Taking granule g1, where K174 is located, as an example, ESM-2_CNN1D and BERT_CNN2D dual channels are used to extract the evolutionary conserved features and contextual semantic features of the 8 residues within the granule, respectively. A two-factor weighting strategy that integrates positional proximity and semantic relevance based on cosine similarity Softmax weights is adopted to aggregate the features, so that the key residue Ala175 obtains the highest comprehensive weight of 0.21. Finally, 8×(128+256)=3072-dimensional features are concatenated with 256-dimensional granular semantic features, and compressed through a 2-layer MLP to obtain a 256-dimensional unified granular feature vector of g1. All granules are arranged in a "fine-medium-coarse" granularity order to form a granular feature sequence, whose average intra-class distance, as measured by t-SNE visualization, is reduced by 28.7% compared with traditional fixed-window features.
[0170] Step 4: State-space modeling is the core of capturing functional dynamics. The model initializes a 256-dimensional hidden state and injects the prior knowledge that "protein interactions decay with distance" into the continuous-time system through a structured mask matrix Mi,j=exp(-0.5|xy|). For the current input granular features, a lightweight MLP dynamically generates a discretization step size with an average value of 0.85±0.12. State transition adjustment vector The parameters, such as those described in claim 6, are converted from continuous-time parameters to discrete-time state-space model parameters Ã_t using the zero-order preserved discretization method. During state updates, the model not only performs linear propagation along the sequence but also computes inter-particle associations through a graph attention layer. When computing the state of particle g2 in particle K181, the cosine similarity between its query vector and the key vector of particle g1 in particle K174 is as high as 0.79. Therefore, the attention mechanism assigns a weight of 0.41 to g1, thereby aggregating 41% of the information from upstream g1 in the hidden state of g2, directly modeling long-range functional coupling with a spatial distance exceeding 15 Å.
[0171] Step 5: From a knowledge base containing 1,247 rules, the sequence pattern "K174-A175" of particle g1 shows a high similarity of 0.95 with the entry "lactic acidification preference-AK-(A / G)-motif". Based on this, the system generates a 256-dimensional modulation vector m1, whose numerical distribution exhibits a bimodal pattern: approximately 35% of the dimension values are >0.8, and 45% are <0.2. This acts like a "biological knob" to modulate the state transition matrix à dimension by dimension. After modulation, the connection strength of the state dimension related to "modification accessibility" increases by 24%, while the dimension related to "transmembrane stability" is suppressed by 18%. The resulting modulated state representation h1_knowledge has a cosine similarity of 0.76 with the original feature h1, indicating that knowledge guidance has produced a significant feature shift.
[0172] Step 6: The system first performs a weighted aggregation of the final states of all particles. The weights are determined by a "modification sensitivity score" calculated by a small network. Particles K174 and K181 receive the highest weights of 0.35 and 0.25, respectively. Next, the local knowledge modulation state h_local of the particle containing the target lysine is extracted and concatenated with the global state h_global to form a 512-dimensional final discriminative feature vector. A two-layer classification MLP outputs the predicted probabilities based on this: 0.89 for K174 and 0.76 for K181. The optimal threshold τ=0.65, determined based on the AUC=0.92 in the validation set ROC curve, is used to determine the site when the Youden index is maximized. Both are predicted as lactation modification sites.
[0173] Performance comparison: On the transmembrane protein test set including hCLEC12A, the method achieved an AUC of 0.92, a precision of 0.86, a recall of 0.84, and an F1 score of 0.85, as shown in Table 1 below.
[0174] Table 1
[0175] Model / Method AUC Accuracy Recall rate F1 score Explainability Adaptability to transmembrane / disordered regions This invention 0.92 0.86 0.84 0.85 high Adaptive (dynamic window adjustment) DeepKla 0.73 0.71 0.69 0.70 Low Fixed window (±25) MusiteDeep 0.68 0.65 0.72 0.68 Low Fixed window (±20)
[0176] It significantly outperforms the best baseline model DeepKla, with a significantly improved recall rate compared to MusiteDeep, and can also adjust the window size more flexibly for transmembrane / disordered regions.
[0177] In one specific embodiment of the present invention, the method includes:
[0178] Step 1: First, systematically obtain lysine lactation site data verified by mass spectrometry experiments from public protein databases (such as Uniprot, PTMcode 3.0) and published academic literature. Then, use protein sequence analysis tools to locate the specific positions of all lysine (K) residues in each target protein sequence and clarify the basic position information of each potential modification site.
[0179] Secondly, the secondary structure information of the target protein is obtained using the SOPMA secondary structure prediction tool. Based on the secondary structure prediction results, the length of the local sequence window centered on each lysine residue is dynamically adjusted to ensure that the window can cover sufficient contextual residue information while reducing redundancy. The specific adjustment rules are as follows: if the target lysine is located in a transmembrane structure region, the local sequence window is expanded to 35 residues on each side of the lysine; if the target lysine is located in a disordered region, the local sequence window is shrunk to 15 residues on each side of the lysine; if the target lysine is located in other structural regions such as α-helices and β-sheets, the default window range (25 residues on each side) is used.
[0180] Subsequently, for samples in the dataset that lack clear annotations, literature evidence was retrieved through academic databases such as PubMed, and high-confidence pseudo-labels (pseudo-label confidence not lower than 0.7) were generated based on homologous sequence alignment results. At the same time, Clustal Omega was used to perform multi-species sequence alignment and calculate the conservation score (range 0-1) for each lysine residue. Negative samples were selected preferentially from evolutionarily conserved modification hotspots (conservation score ≥ 0.7) to effectively reduce the impact of data bias on subsequent model training.
[0181] Finally, each adjusted local sequence window is labeled with a corresponding binary label: 1 indicates that the lysine is a lactation modification site, and 0 indicates that the lysine is a non-lactation modification site. At the same time, a sample confidence score and evidence source index are added to each sample, and finally a standardized training sample set of "local sequence + label + confidence score + evidence source" is formed. This sample set can be directly used for model training and validation in subsequent steps.
[0182] Step 2-1: First, input the local sequence S from the standardized training sample set obtained in Step 1 into the pre-trained protein language model. Through forward inference calculation, obtain the 768-dimensional contextual semantic representation vector of each residue position t. This vector can fully characterize the contextual semantic information and sequence evolution features of residues, providing reliable support for subsequent granular division.
[0183] Based on this, a lightweight granularity prediction head is constructed (consisting of two fully connected layers and a sigmoid activation function; the network parameters are trainable). This granularity prediction head takes the aforementioned semantic vector sequence as input and outputs granular boundary probabilities and intragranular consistency representations in parallel. The specific calculation method is as follows: Granular boundary probability refers to calculating the probability that each residue position is a granular start point or end point, where: the start probability (the probability that residue t is a granular start point) is calculated as follows: The termination probability (the probability that residue t is the termination point of the particle) is calculated as follows: In the formula, This is the Sigmoid activation function, used to map probability values to the 0-1 range, ensuring the reasonableness of the probability values.
[0184] The interval assignment consistency function is used to measure the semantic compactness of residues within a candidate particle. For a candidate particle g=[i,j] (where i is the particle's starting position and j is the particle's ending position, i≤j), its calculation method is as follows: ,
[0185] in, The trainable parameters for the granularity prediction head. This is the Sigmoid activation function.
[0186] Step 2-2: To quantify the confidence of any candidate particle g=[i,j] as a complete and reasonable residue particle, a particle scoring function Score(g) is constructed. This function integrates four indicators: particle start confidence, particle termination confidence, intragranular semantic consistency, and length reasonableness. The specific calculation formula is as follows:
[0187] ,
[0188] In the formula, the meanings of each term are as follows: First term The initial confidence level is the initial probability of the candidate particle at initial position i. and weighting coefficients Decision; Second item Let $\frac{j}{j}$ be the particle termination confidence score, which is the termination probability at candidate particle termination position $j$. The third term is determined by the weighting coefficient β. The semantic consistency score within a particle is determined by the semantic consistency of the candidate particles. The fourth term is determined by the weighting coefficient γ. This is a length penalty term used to prevent grains from being too long or too short, ensuring the appropriate grain length. The optimal particle length is preset. All of these are trainable or empirically preset hyperparameters.
[0189] Steps 2-3: Use dynamic programming algorithm to solve for the globally optimal granular partitioning to ensure a highly cohesive and reasonable granular boundary sequence. The specific implementation process is as follows:
[0190] First, we define the dynamic programming state DP[t], which represents the optimal total score of the subsequence S[1:t] (i.e. the first t residues of the sequence). The higher the score, the more reasonable the granulation scheme of the subsequence. At the same time, we introduce a minimum granule length constraint (in this embodiment, the minimum granule length is set to 3), that is, each residue granule contains at least 3 amino acid residues to avoid incomplete semantic information caused by excessively short granules.
[0191] Secondly, the dynamic programming state is initialized: DP[0] is initialized to 0, where DP[0] represents the optimal partitioning total score of the empty sequence (the first 0 residues) being 0, which serves as the starting condition for dynamic programming.
[0192] Then, the state transition equation is defined as follows: In the formula, i is the candidate starting position of the current particle, and satisfies t-i+1 ≥ 3 (minimum particle length constraint), that is, the length of the candidate particle [i,t] is not less than 3; The score value of candidate particle [i,t] is calculated by the particle scoring function in step S2-2; This represents the optimal granular partitioning scheme for the current subsequence S[1:t], which selects the value that maximizes DP[t] from all constrained starting positions i.
[0193] During the recursive calculation, the optimal decision i when each t reaches its maximum value is recorded synchronously, facilitating subsequent backtracking of the optimal particle boundary sequence. When the recursive calculation reaches t = L (L is the total length of the local sequence), the optimal starting position i of each particle is found backward from t = L (based on the optimal decision recorded during the recursive process) through backtracking. The starting and ending positions of each particle are determined sequentially, ultimately obtaining the globally optimal particle boundary sequence, realizing a deterministic mapping from continuous semantic space to discrete, highly cohesive particle structures.
[0194] Steps 2-4: To train the semantic encoding model (pre-trained protein language model) and the granulation prediction head, enabling the model to learn a reasonable granular structure, this embodiment designs a multi-task joint loss function. This function utilizes unsupervised or weakly supervised signals to guide the model's learning, balancing granular boundary prediction accuracy with the characteristics of granular cohesion and intergranular separation. The specific implementation process is as follows:
[0195] The general formula for the joint loss function of multiple tasks is: In the formula, The boundary prediction loss is used to constrain the accuracy of particle boundary prediction, ensuring that the model can accurately predict the start and end positions of particles. To contrast the learning loss, a self-supervised contrastive learning approach is used to force the model to learn semantic feature representations that are compact within granules and separate between granules.
[0196] Step 3-1: Call the dual-channel pre-trained feature encoding module to extract sequence-level and residue-level features for each residue within each residue particle, achieving complementarity of multi-source features and improving feature expressive power. The specific implementation is as follows:
[0197] 1. Sequence-level feature extraction: Through the ESM-2_CNN1D branch, the semantic vector of each residue within the particle is used for feature extraction and dimensionality reduction, outputting 128-dimensional evolutionarily conserved features. This feature can characterize the evolutionary conservation of residue sequences and reflect the degree of conservation of residues among different species;
[0198] 2. Residue-level feature extraction: Through the BERT_CNN2D branch, feature extraction and dimensionality reduction are performed on the semantic vector of each residue within the particle, outputting 256-dimensional contextual semantic features. ; i is the index of the intragranular residue (i.e. the i-th residue in the intragranular region), and each residue corresponds to one 128-dimensional sequence-level feature and one 256-dimensional residue-level feature.
[0199] Step 3-2: Intragranular adaptive weighted aggregation adopts a two-factor weighting method, with the two factors being positional importance and semantic contribution, respectively. The weight of each residue within the granular region is calculated. The weighting is increased for residues that are closer to the target lysine and have a stronger semantic relevance, thus highlighting the influence of key residues. The specific calculation process is as follows:
[0200] 1. Position weight calculation: The position weight is based on the weight of the target lysine location, and the weight of other positions decreases with distance. The specific calculation formula is as follows: In the formula, 0.1 is the weighted benchmark value of the location of the target lysine. It is the positional distance between intragranular residue i and target lysine k (i.e., the absolute value of the positional difference between the two residues in the local sequence).
[0201] 2. Semantic weight calculation: The semantic weight is obtained by normalizing the semantic similarity between the residue and the target lysine. The specific calculation formula is as follows: In the formula, is the cosine similarity between the semantic vector of residue i within the granule and the semantic vector of the target lysine k (ranging from -1 to 1). The closer the cosine similarity is to 1, the stronger the semantic association between the two. n is the total number of residues within the granule. The denominator is the exponential sum of the semantic similarities of all residues within the granule, which is used to normalize the semantic weights to ensure that the sum of the semantic weights of all residues is 1.
[0202] 3. Final weight determination: The final weight of each residue within the grain. By position weight and semantic weight The resulting product is multiplied, and the final weights are normalized (the sum of all residue weights is 1) before being used for the weighted aggregation of intragranular features.
[0203] Step 3-3: First, analyze the sequence-level features of each residue particle. Residue-level characteristics By concatenating the semantic granule features, a high-dimensional feature vector of 1152 dimensions is obtained. This high-dimensional vector integrates the evolutionary conserved features of residues, contextual semantic features, and intragranular semantic features, comprehensively characterizing the properties of residue granules.
[0204] Subsequently, the high-dimensional feature vector is input into a lightweight MLP (composed of two fully connected layers, with the first layer outputting 512 dimensions and the second layer outputting 256 dimensions). Through linear transformation, the high-dimensional features are compressed into a 256-dimensional uniform-granularity feature vector, reducing the feature dimension and lowering the computational complexity of subsequent models, while retaining key feature information.
[0205] Finally, the granular features of all residue particles are arranged in the order of "fine-grained - medium-grained - coarse-grained - semantic particles - conserved particles - novel functional particles" determined by the Agent, forming a granular feature sequence. , where M is the total number of residue particles corresponding to the current local sequence window, and this feature sequence will be used as the input for subsequent state space modeling.
[0206] Step 4-1: For the granular feature sequence obtained in step 3 A granular hidden state space model is constructed to characterize the dynamic evolution of granular functional states and capture the temporal correlations and functional dependencies between granules. The specific model expression is as follows:
[0207] In the formula, the meanings of each parameter are as follows: The hidden state vector (256-dimensional) of the t-th particle is used to characterize the functional state of the t-th particle, integrating the feature information of the current particle and historical particles; Here is the state transition matrix (256×256 dimensions) for step t, used to characterize the hidden state of the (t-1)th particle. Hidden state of the t-th particle The transfer relationship reflects the functional dependence between particles; The input mapping matrix; The noise disturbance term follows a Gaussian distribution with a mean of 0 and a variance of 0.01. It is used to simulate random errors in the modeling process and improve the robustness of the model.
[0208] Step 4-2: Define the distance attenuation mask matrix To simulate stronger connections between neighboring dimensions in the state space (consistent with the interaction characteristics between protein residues, where closer residues interact more strongly), the specific calculation formula is as follows: In the formula, i and j are the indices of the state dimensions, corresponding to the various dimensions of the hidden state vector; The closer the value is to 1, the stronger the connection; the larger the index difference, the stronger the connection. The closer the value is to 0, the weaker the connection strength. Distance attenuation mask matrix. The dimension is 256×256, which is consistent with the dimension of the state transition matrix.
[0209] Generate a structured continuous-time state matrix The prior knowledge of the distance attenuation mask matrix is injected into the continuous-time state matrix, and the specific calculation formula is as follows: In the formula, It is a trainable full parameter matrix (256×256 dimensions) used to characterize the basic relationships of state transitions; The Hadamard product (i.e., the element-wise multiplication of two matrices) represents the structured continuous-time state matrix. It incorporates both basic state transition relationships and prior knowledge of distance dependencies between protein residues. Simultaneously, it initializes the continuous-time input matrix. and learnable scaling factor It is used for adjusting the subsequent input mapping matrix and modulating the state transition matrix.
[0210] Step 4-3: Process the input granular features Perform layer normalization to obtain normalized features. Layer normalization can reduce the distribution differences of input features, improve the training stability and generalization ability of the model, and the layer normalization formula is: Normalized features Given a lightweight multilayer perceptron (MLP) (consisting of two fully connected layers, with an input dimension of 256 and an output dimension of 1024), it outputs a set of dynamic parameters through linear transformation and the ReLU activation function. In the formula, the definitions of each dynamic parameter are as follows: An adaptive discretization step size vector (256 dimensions) is used to adjust the discretization accuracy of continuous-time systems to adapt to dynamic changes in features at different granularities. This is the state transition matrix adjustment vector (256 dimensions), used for fine-tuning the fundamental matrix; It is a nonlinear kernel gate vector (256 dimensions) that controls the strength of subsequent nonlinear terms; The input projection adjustment vector (256 dimensions) is used to scale the effect of the input features on the hidden state.
[0211] Construct the continuous time matrix of the current step Combining global structural priors (structured continuous-time state matrix) with input-specific adjustments (state transition matrix adjustment vector) The specific calculation formula is as follows: ,
[0212] In the formula, Indicates the vector Convert to a diagonal matrix (256×256 dimensions), the elements on the diagonal are: Each component is equal to 0, and the remaining elements are 0. This formula enables dynamic adjustment of the continuous-time matrix, allowing the matrix to adapt to the current input particle features.
[0213] Step 4-4: For the i-th state dimension, first extract the scalar step size from the dynamic parameters. And extract continuous time parameters , Calculate the discretized state transition row vector and the input projection row vector. The calculation is approximately efficient using a 10th-order Taylor expansion, avoiding the excessive complexity caused by directly calculating the matrix exponent. The formula for calculating the input projected row vector is: .in, It is the i-th row of the identity matrix. This indicates a pseudo-inverse. Input adjustment is applied. Finally, the discrete parameters of the current time step are obtained, namely the dynamic state transition matrix. and dynamic input projection .
[0214] Steps 4-5: Record the previous hidden state of each particle t. Treating each node as a node in the graph, a graph attention network is constructed, and the attention weights of each node (granular state) with other relevant nodes are calculated to achieve weighted aggregation of inter-granular information, as follows:
[0215] Define query vector Q, key vector K, and value vector V to calculate attention weights, where: , represents the query vector for particle t, used to match related particles; , representing the key vector of historical particle l, used to match the query vector of the current particle t; , representing the value vector of historical particle l, used to aggregate information from related particles. In the formula, , , All are shared learnable weight matrices (256×256 dimensions) used to map the hidden state vector to the query, key, and value space; l is the index of the historical granules (l=1~t-1), that is, all granules before the current granule t; h_{l-1} is the hidden state vector of the previous step of the l-th granule (256 dimensions).
[0216] To reduce complexity, instead of calculating the attention of all particle pairs, for the current particle *t*, only the attention of the K particles most relevant to it is calculated. Specifically, the selection method is as follows: based on the cosine similarity between the current particle's query vector *Q* and all historical particle key vectors *K*, the top-3 historical particles with the highest similarity are selected as relevant particles. The formula for calculating the attention weight (the association strength between the current particle *t* and the relevant particle *l*) is: ,in .pass Generate graph context vectors, vectors The state information of other related particles is aggregated to form a horizontal long-range dependency signal. The denominator is the exponential sum of the attention weights of all related particles, which is used to normalize the attention weights to ensure that the sum of the attention weights of all related particles is 1.
[0217] Steps 4-6 introduce a nonlinear transformation to enable the model to characterize complex dynamic behaviors such as coordination and saturation that may occur during protein modification.
[0218] First calculate the nonlinear term ,in This is a nonlinear activation function used to perform a nonlinear transformation on the previous hidden state h_{t-1}, enhancing the model's ability to characterize complex dynamic behaviors. The function's value range is -1 to 1, which can effectively alleviate the gradient vanishing problem; It is a diagonal matrix whose diagonal elements come from This enables dimension-wise gating of nonlinear terms, meaning that the nonlinear intensity of different state dimensions can be adaptively adjusted.
[0219] Steps 4-7: Integrate all the above innovative components to form the final state update formula of this invention:
[0220] ,
[0221] in, and It is the input dependency matrix generated by S4-4, used to characterize the dynamic changes in state transitions and input mappings; It is the graph context vector calculated in steps 4-5, used to supplement intergranular long-range dependency information; This is the nonlinear term calculated in steps 4-6, used to characterize complex dynamic behavior. Through this formula, the hidden state of each particle... They all integrate historical particle states, current particle characteristics, inter-particle long-range dependencies, and nonlinear dynamic information, enabling a comprehensive characterization of the dynamic evolution of particle-level functional states.
[0222] Steps 4-8: Introduce runtime stability constraints to ensure... To ensure stability and avoid gradient explosion or vanishing problems, continuous gradient generation is performed at each step. Then, spectral normalization was applied to it, and The spectral radius is constrained to be less than 1 (the spectral radius is the maximum absolute value of the matrix eigenvalues). According to the properties of matrix exponential functions, when the continuous-time matrix... When the spectral radius is ≤1, its matrix exponent The spectral radius will also be ≤1, thus ensuring the dynamic state transition matrix after discretization. It is stable.
[0223] Step 5-1: Pre-construct a lactation-related knowledge base K. This knowledge base contains four core biological knowledge categories, covering the key characteristics and patterns of lactation modification, providing reliable knowledge support for state modulation. Specifically: Known lactation site sequence fragments: Collect experimentally verified sequence fragments surrounding lactation sites; Conserved modification motifs: Compile reported conserved modification motifs for lysine lactation; Residue co-occurrence statistical patterns: Statistically analyze the common residue co-occurrence combinations and frequencies surrounding lactation modification sites; Statistical rules of particle type-modification relationships: Statistically analyze the association patterns between different particle types (fine-grained, medium-grained, etc.) and lactation modification. The knowledge base is stored in a vector database format, as follows: ,in, For feature vectors, This corresponds to the semantic description or statistical rules.
[0224] Step 5-2: Map the granular fusion feature sequence obtained in Step 4 to the knowledge query space to obtain the query vector. The query vector has the same dimension as the knowledge feature vector in the knowledge base. Calculate the similarity matrix between the granular features and the knowledge vector. For each particle t, the top-K knowledge items with the highest similarity are selected to construct a particle-knowledge coupling matrix. By weighted aggregation of the feature vectors of the Top-K knowledge points, the knowledge representation vector corresponding to each particle is obtained. .
[0225] Step 5-3: Generate a knowledge-driven state modulation vector and couple the knowledge vector. Input modulation generation network, output granular modulation factor:
[0226] ,
[0227] in, d is the state dimension. This is the Sigmoid function. It is used to modulate the modulation factor. Mapped to the 0-1 interval. This modulation factor This indicates the particle's ability to adjust the intensity of state propagation under the current knowledge constraints. The larger the value, the stronger the constraint of the particle's state propagation on the corresponding knowledge.
[0228] Step 5-4: Utilize the granular modulation factor obtained in step 5-3 For the dynamic state transition matrix generated in step 4 Knowledge modulation is performed so that knowledge information directly participates in the system's dynamic structure, rather than just in feature fusion. The specific calculation formula is as follows: .in, For the granular modulation vector The constructed diagonal modulation matrix has elements on the diagonal as follows: Each component is equal to 0, and the rest are 0; It is a learnable scaling factor used to adjust the intensity of knowledge modulation, and can be adaptively adjusted according to the model training effect.
[0229] Step 5-5: The state transition matrix after knowledge modulation Next, re-execute the state update. In the formula, This involves obtaining the knowledge-constrained granular state representation for the t-th particle. This step ensures that the state update process for each particle is constrained by lactation-related knowledge, improving the biological rationality and discriminability of the state representation.
[0230] Steps 5-6: Concatenate the knowledge-modulated final state representation with the original fused features to obtain the concatenated features of each particle, forming the final discriminative features. Input to a subsequent classifier to output the lactation probability of the target lysine.
[0231] Step 6-1: Perform a weighted aggregation operation on the final granularity state sequence under the knowledge constraints obtained in Step 5 to obtain the global discriminative state representation. .in, It is a particle-level modification sensitivity score, used to measure the degree of influence of each particle on the target lysine modification tendency. The higher the modification sensitivity score, the greater the contribution of the particle to the final discrimination result.
[0232] Step 6-2: Extract the knowledge modulation state representation of the target lysine-containing particle. , k is the index of the particle containing the target lysine, and Compared with the global discriminant state representation obtained in step 6-1 Construct a fused representation by splicing together This fusion indicates that it simultaneously includes both the local modification environment state and the global structural regulation state, and can comprehensively characterize the modification environment of the target lysine.
[0233] Step 6-3: Calculate the discrimination probability and input the fused representation into the lightweight classification mapping network. .in, The probability of lactation modification of the target lysine. The closer the value is to 1, the greater the likelihood that the lysine residue is a lactation modification site. The closer the value is to 0, the greater the likelihood that the lysine residue is a non-lactated modification site. Output predicted probability. The contribution weight of each particle to the final state, and the knowledge modulation intensity. .
[0234] Step 6-4: Introduce a decision threshold τ (0 < τ < 1) to distinguish between lactation modification sites and non-lactation modification sites. The determination rule is defined as follows: when p ≥ τ, the lysine is determined to be a lactation modification site; when p < τ, the lysine is determined to be a non-lactation site.
[0235] The threshold τ can be determined using any of the following three methods to suit different application scenarios: 1. Maximize the Youden Index based on the validation set: Youden Index = Sensitivity + Specificity - 1, and select τ that maximizes the Youden Index as the decision threshold; 2. Select the optimal balance point based on the ROC curve: Plot an ROC curve (horizontal axis is the false positive rate, and vertical axis is the true positive rate), and select τ corresponding to the point on the ROC curve closest to the top left corner as the decision threshold; 3. Adaptively adjust the priority of Precision or Recall according to the application scenario: If the application scenario requires precision to be prioritized, then appropriately increase τ; if the application scenario requires recall to be prioritized, then appropriately decrease τ.
[0236] This invention constructs a dynamic modeling system for protein lactation modification mechanisms through the deep synergistic effect of adaptive particle structure generation, dynamic evolution of particle-level state space, and biological knowledge-constrained modulation. This system can accurately capture the modification tendency of target lysine residues, achieving high-precision prediction. Simultaneously, relying on explicit biological knowledge support, it overcomes the "black box" problem of traditional prediction models, possessing good interpretability. Ultimately, it forms a smart representation framework suitable for predicting lysine lactation sites, possessing stability, reliability, and iterability, providing reliable technical support for predicting protein post-translational modification sites.
[0237] This invention provides a method for predicting lysine lactation sites based on adaptive particle structure and state space modeling. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A method for predicting lysine lactation sites based on adaptive particle structure and state-space modeling, characterized in that, Includes the following steps: Step 1: Data Acquisition and Adaptive Sample Construction: Acquire experimentally validated lysine lactation modification site data, locate lysine residues in the target protein sequence, and construct local sequence window samples centered on lysine residues; adjust the window range by combining protein structural environment information, and select representative negative samples through sequence conservation analysis to finally form a standardized training sample set. Step 2: Execute the sequence adaptive granulation algorithm based on semantic coherence: Extract deep semantic features of the sequence through a pre-trained language model, construct a granulation scoring function that integrates local boundary confidence and internal semantic consistency, formalize the granulation problem into a constrained optimization problem that seeks the global optimal solution of the granulation scoring function, and use dynamic programming algorithm to solve it efficiently, and finally realize the deterministic mapping from continuous semantic space to discrete, highly cohesive granular structure; Step 3, Granular Multi-Source Feature Representation and Aggregation: For each residue particle, the dual-channel pre-trained feature encoding module is called to extract residue-level features. The residue features within the particle are adaptively weighted and aggregated to form a unified granular feature vector. All granular features are arranged according to the granular structure generated by the pre-trained language model to form a granular feature sequence. Step 4: Adaptive state-space modeling based on protein sequence characteristics: Input the granular feature sequence into the state-space modeling module to dynamically model the granular functional state and obtain a dynamic state representation that is complementary to the static granular features. Step 5: Knowledge-constrained state modulation and feature enhancement mechanism: Invoke the policy control network, generate granular modulation policy parameters based on the current state representation and historical discrimination error, and adjust the state propagation intensity through the policy function; fuse the modification driving vector with the model features to form the final discrimination feature vector; Step 6, Lysine lactation site discrimination: Perform weighted aggregation on the final particle-level state sequence, extract the knowledge-modulated state representation of the particle where the target lysine is located, input the fused representation into a lightweight classification mapping network, and output the site discrimination result.
2. The method according to claim 1, characterized in that, Step 1 includes: acquiring experimentally validated lysine lactation site data to locate all lysine residues in the target protein sequence; dynamically adjusting the local sequence window length based on secondary structure prediction results: expanding the transmembrane structure region to 35 residues on each side of the target lysine; shrinking the disordered region to 15 residues on each side; using the default window range for the remaining regions; generating pseudo-labels for unlabeled samples; calculating conservation scores through multi-species sequence alignment, prioritizing negative samples from evolutionarily conserved modification hotspots to reduce data bias; labeling each local sequence window with 1 indicating lactation modification and 0 indicating no modification, and attaching sample confidence scores and evidence source indexes to form a standardized training sample set.
3. The method according to claim 2, characterized in that, Step 2 includes: Step 2-1: Input sequence S into a pre-trained protein language model to obtain the semantic representation vector of the t-th residue position. ,and Where R represents the real number space and d represents the dimension of the semantic representation vector; a lightweight granular partitioning prediction head is constructed, which uses the semantic representation vector... As input, it outputs in parallel the particle boundary probability and intraparticle consistency characterization; Particle boundary probability refers to calculating the probability that each position is either the starting point or the ending point of a particle. (Initiation probability) The calculation method Termination probability The calculation method ,in, For the Sigmoid function; This is the initial probability weight matrix; This is the initial probability bias term; The termination probability weight matrix; This is the termination probability bias term; The interval assignment consistency function measures the degree of consistency in which all positions within an interval belong to the same particle. For a candidate interval g = [i, j], the interval assignment consistency probability is... Where g = [i, j] represents a continuous sequence segment from position i to position j; This is the interval consistency weight matrix; These are trainable parameters; Step 2-2: Construct the particle scoring function. For any candidate particle g = [i, j], define the scoring function Score(g) for candidate particle g: , in, , , and For hyperparameters; Steps 2-3: Solve for the globally optimal particle using dynamic programming: Define the state DP[t] as the optimal partitioning total score of the subsequence S[1:t] of the particles from position 1 to position t, and introduce a minimum particle length constraint. First, initialize the optimal partition total score DP[0] of the empty sequence to 0, and then define the state transition equation: , in, The set of candidate starting positions that satisfy the minimum particle length constraint; The optimal score for the portion before candidate particle [i,t]; Let be the score function for the candidate interval [i,t]. During the recursive calculation, record the optimal decision i when each t reaches its maximum value. After recursively calculating to t = L, obtain the globally optimal particle boundary sequence by backtracking. ,in Let M be the interval of the u-th optimal grain, u be the intermediate parameter, and M be the total number of global optimal grains. Steps 2-4: To train the semantic coding model and the granular prediction head, design a multi-task joint loss function. Using unsupervised or weakly supervised signals to guide model learning: , Among them, the grain boundary loss function CE() is the cross-entropy loss function. Let be the initial probability of the particle at position i. Let the starting label be the grain at position i. Let be the particle termination probability at position i. The terminator is the granular terminator at position i. and These are weight parameters; Intragranular consistency loss function , Intragranular similarity, Here, m represents the interparticle similarity, and m is the interval hyperparameter. , , Used to measure semantic representation vector and The degree of similarity between them The number of residues contained in particle g. denoted as the number of residues contained in the next adjacent particle g.
4. The method according to claim 3, characterized in that, In step 3, residue particles refer to information units containing one or more amino acid residues, used to characterize the structural and semantic relationships of proteins at a specific scale; granular features refer to low-dimensional vectors obtained by adaptively aggregating the features of all residues within a residue particle, used to integrate the collaborative information of multiple residues.
5. The method according to claim 4, characterized in that, In step 3, adaptive aggregation from residue features to granular features is performed for each residue particle, including the following steps: Step 3-1: Establish a dual-channel pre-trained feature encoding module to extract sequence-level and residue-level features for each residue within the granule. For sequence-level features, the initial representation vector of the residue is obtained using embedding representation based on the protein pre-trained language model ESM-2. A one-dimensional convolutional network is then used to extract and compress local sequence patterns to obtain a sequence-level feature vector characterizing the evolutionary conservation of residues. , The feature dimension is 128-dimensional. The residue-level features utilize a protein sequence coding model based on the Transformer structure to generate residue context embedding representations, and a two-dimensional convolutional network is used to model the semantic associations between neighboring residues to extract residue context semantic features. This yields a 256-dimensional residue-level feature vector, where q is the index number of the current residue within its respective particle. Step 3-2: Intragranular adaptive weighted aggregation uses a two-factor weighting method, with the two factors being positional importance and semantic contribution, to calculate the fusion weight of each residue within the granular region. ; Position weight The calculation formula is: , Where k is the index number of the target lysine residue within its respective granule. The distance between the q-th residue and the target k; Semantic weight Based on residue semantic similarity normalization, the following was obtained: , , Where n is the total number of intragranular residues; Let be the cosine similarity between the semantic representation vectors of residues q and k; and These represent the semantic feature vectors of the q-th residue and the k-th residue, respectively. That is, the BERT model is used to semantically encode protein residues, and the encoded features are further extracted and processed by a two-dimensional convolutional network to obtain the semantic feature vectors of the corresponding residues. The original weights of all residues within the granule are normalized so that the sum of the weights of all residues within the granule is 1; the original weight of the q-th residue is then calculated. Intraparticle normalization yields the fusion weight of the q-th residue. ; After obtaining the final residue weights, a 768-dimensional semantic granular feature is constructed. ,in The semantic granule feature representing the t-th granule; Step 3-3: Concatenate sequence-level, residue-level, and semantic granular features into a 3328-dimensional vector, and compress it into a 256-dimensional unified granular feature vector using a lightweight multilayer perceptron (MLP). All granular features are arranged in a predefined multi-scale rule to form a granular feature sequence. ,in Let M be the uniform-level feature vector of the Mth particle, where M is the total number of particles.
6. The method according to claim 5, characterized in that, Step 4 includes the following steps: Step 4-1: For granular feature sequences Construct a granular hidden state space model ,in Let be the hidden state vector of the t-th particle. Let be the dynamic state transition matrix of the t-th particle. Let be the input mapping matrix for the t-th particle. Let be the noise disturbance term for the t-th particle; Step 4-2: The state-space modeling module performs a structured design for the dynamic state evolution modeling of granular feature sequences based on the continuous-time core parameters of the state model SSM: defining a distance decay mask matrix. Where x and y are indices of the state dimension. The attenuation coefficient is a hyperparameter; exp() is the natural exponential function; Generate a structured continuous-time state matrix ,in, For a trainable full parameter matrix, It represents the Hadamah accumulation. Create a block mask matrix; initialize the continuous-time input matrix. and learnable scaling factor , where D is the dimension of the input feature; Step 4-3: The state-space modeling module is used to dynamically generate parameters from the current input particle features at each step, realizing conditional modeling, and performing layer normalization on the input particles to obtain layer-normalized particle features. LayerNorm() is the layer normalization operation. Let be the layer-normalized feature vector of the t-th particle; input the layer-normalized feature vector. A lightweight multilayer perceptron (MLP) outputs a set of dynamic parameters: , in, ; Let be the adaptive discretization step size vector of the t-th particle; The state transition matrix adjustment vector for the t-th particle; Let be the nonlinear kernel gating vector of the t-th particle; Let be the input projection adjustment vector for the t-th particle. This represents an adaptive multilayer perceptron; Construct the continuous-time matrix of the current particle t , where Diag() is the diagonalization function, which converts a vector into a diagonal matrix; Step 4-4: Discretize the continuous-time system to accommodate discrete granular sequence inputs, using the zero-order preservation method, and perform independent computation for each state dimension; For the c-th state dimension, first calculate the scalar step size. Extract continuous time parameters , ;in, Let c be the c-th dimension component of the vector corresponding to the t-th particle. Let c be the state transition row vector of the t-th particle. Let c be the input projection row vector of the c-th row of the t-th particle; Calculate the state transition row vector and input projection row vector of the c-th row after discretization: , Where exp() is the natural exponential function; The input projection row vector of the c-th row after initial discretization is efficiently calculated using Taylor expansion or approximation: , in, It is the c-th row of the identity matrix. For the continuous-time input parameters of the c-th state dimension; pinv() represents the pseudo-inverse; Application input adjustment, Finally, the discrete parameters of the current time step are obtained, namely the dynamic state transition matrix. and dynamic input projection matrix , The input projection adjustment vector corresponding to the t-th particle In the context, the component of the c-th state dimension; Steps 4-5: Through intergranular long-range graph attention coupling, information can flow directly between different granular states at the same time level: the previous hidden state of the t-th granule is... Consider it as a node in the graph, where Q represents the computed query, K is the key, and V is the value. The query vector represents the particle. Let l represent the bond vector of the neighboring particle l. Let l represent the value vector of the neighboring particle, where , , For a shared, learnable weight matrix; For the current particle t, only calculate the attention to the N most relevant particles: , in, The attentional particle weights are the current particle t and its neighboring particle l; Softmax represents the activation function. Indicates transpose; This is the query vector for the current particle t; Let l be the bond vector of the neighboring particle l; Generate the graph context vector of the current particle t. ; Steps 4-6: Introduce a nonlinear transformation, first calculate the nonlinear term of the current particle t. ,in It is a non-linear activation function. It is a diagonal matrix, and the diagonal elements come from ; Steps 4-7: The state space modeling module updates the current particle state based on the particle feature input, attention context information, and nonlinear modulation term, forming the final state update formula: , in, For context projection matrix; This is the context vector obtained through the intergranular long-range graph attention mechanism; Let be the nonlinear modulation term for the t-th particle; This represents the hidden state vector of the (t-1)th particle; Steps 4-8: The state-space modeling module generates the continuous-time matrix of the current particle t. Afterwards, Generate a global representation using spectral normalization and attention aggregation methods. .
7. The method according to claim 6, characterized in that, Step 5 includes the following steps: Step 5-1: Pre-construct a lactation-related knowledge base H, including known lactation site sequence fragments, conserved modification motifs, residue co-occurrence statistical patterns, and statistical rules for the relationship between different particle types and modifications; the knowledge base is stored in the form of a vector database, in the following format: ,in, Let h be the feature vector of the h-th knowledge. The statistical rule for the h-th knowledge; Step 5-2: Merge the granular feature sequences Mapping to the knowledge query space yields the query vector for the t-th granule. Calculate the similarity matrix between the t-th particle and the knowledge vector h. Select the N most relevant knowledge points, construct the granule-knowledge coupling matrix, and obtain the knowledge representation vector of the t-th granule. ,in, Let h be the embedding vector of the h-th knowledge item, with a dimension equal to the total number of items in the knowledge base; Step 5-3: The policy control network takes granular feature representation as input to generate a knowledge-driven state modulation vector, and then... Input modulation generation network, output granular modulation factor : , in, b represents the bias term of the modulation generation network, which is a learnable parameter. This represents the learnable weight matrix in the modulation-generating network; Step 5-4: The policy control network processes the dynamic state transition matrix. Knowledge modulation: , in, For the granular modulation vector Constructed diagonal modulation matrix; A learnable scaling factor; For element-wise multiplication; This represents the dynamic state transition matrix after knowledge modulation. Step 5-5: Re-execute the state update formula Thus, a granular state representation under knowledge constraints is obtained. ; Let represent the input mapping matrix of the t-th particle; Let represent the input vector of the t-th particle; Steps 5-6: Merge the original features The final state representation after knowledge modulation The features are then combined to form the final discriminative features. The input classifier outputs the lactation probability of the target lysine, where concat() represents the concatenation operation, resulting in the final granular hidden state sequence. .
8. The method according to claim 7, characterized in that, Step 6 includes the following steps: Step 6-1: Construct a knowledge-constrained global state representation and perform weighted aggregation on the final granularity state sequence: , in, It is the particle-level modification sensitivity score of the t-th particle; In order to be in Granularity-level state representation obtained through recursion under control; Represents a global granularity state representation under knowledge constraints; Step 6-2: Extract the knowledge modulation state representation of the k-th particle containing the target lysine. Constructing a fusion representation ; Step 6-3: Calculate the discrimination probability and input the fused representation into the lightweight classification mapping network: , in, The probability of lactation modification of the target lysine; The weight matrix is a learnable weight matrix; Output prediction probability The contribution weight of each particle to the final state and the knowledge modulation intensity are analyzed. By analyzing the contribution ratio of the knowledge modulation matrix in the state transition calculation, the influence of knowledge constraints on the current position discrimination result is obtained, and the influence is defined as the knowledge modulation intensity, which is used to characterize the degree of participation of domain knowledge in the model decision-making process. Step 6-4: Introduce a decision threshold τ, 0 < τ < 1. The judgment rule is defined as follows: when p ≥ τ, lysine is judged as a lactation modification site; when p < τ, lysine is judged as a non-lactation site.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, It stores a computer program or instructions that, when run on a computer, perform the steps of the method as described in any one of claims 1 to 8.