A Transposon Hierarchical Classification Method Based on Dynamically Gated Multi-Scale Features
By using a dynamic gating multi-scale feature approach, the problems of insufficient multi-scale pattern capture, rigid feature fusion mechanism, and inconsistent hierarchical classification decisions in transposon classification in existing technologies are solved, thus achieving efficient and accurate hierarchical classification of transposons.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LUDONG UNIVERSITY
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-26
AI Technical Summary
Existing deep learning methods struggle to efficiently capture multi-scale patterns in long DNA sequences during transposon classification. Their rigid feature fusion mechanisms and inconsistent hierarchical classification decisions result in insufficient classification accuracy.
We employ a dynamic gating multi-scale feature approach, which utilizes DNA sequence dual-modal feature extraction, gating multi-scale convolutional network encoding, attention gating mechanism, and probability threshold hierarchical classification to achieve adaptive feature fusion and hierarchical decision-making.
It improves the accuracy of transposon classification, enhances classification precision, and achieves efficient and accurate hierarchical classification of transposons.
Smart Images

Figure CN121459951B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bioinformatics, specifically relating to a transposon hierarchical classification method based on dynamic gating multi-scale features. This method can automatically analyze the K-mer frequency features and coding features of DNA sequences, and achieve high-precision transposon hierarchical classification through dynamic gating fusion and probability threshold decision mechanism. Background Technology
[0002] Transposable elements (TEs) are a class of mobile DNA sequences in eukaryotic genomes, and their accurate classification is crucial for understanding genome structure, evolution, and function. Existing deep learning methods, such as the CREATE system, use recurrent neural networks (RNNs) to process sequence features and convolutional neural networks (CNNs) to process K-mer features, fusing the two through a simple attention mechanism to achieve a flattened classification. These methods have significant shortcomings: ① Traditional RNNs struggle to efficiently capture functional patterns of varying scales within long DNA sequences; ② K-mer feature extraction typically uses standard convolutional kernels, failing to optimize for the biological characteristics of DNA sequences; ③ The fusion of sequence and K-mer features often involves splicing or adding with fixed weights, failing to dynamically adjust the contributions of the two types of features based on input samples; ④ They underutilize the natural hierarchical classification structure of transposons, often training multiple independent flattened classification models, lacking a coherent, confidence-based hierarchical decision-making process. Therefore, developing a hierarchical classification method capable of multi-scale sequence modeling, adaptive feature fusion, and effective utilization of classification tree structures is a pressing technical challenge in this field. Summary of the Invention
[0003] This invention proposes a transposon hierarchical classification method based on dynamically gated multi-scale features, aiming to solve the problems of insufficient capture of sequence multi-scale patterns, rigid feature fusion mechanisms, and inconsistent hierarchical classification decisions in existing technologies, thereby achieving efficient and accurate transposon classification. The specific technical solution includes five steps:
[0004] Step 1: DNA sequence bimodal feature extraction: Extract K-mer frequency features and one-hot coding features from DNA sequence files in FASTA format to construct the bimodal input of the model;
[0005] Step 2, Gated Multi-Scale Sequence Encoding: Based on the One-hot encoded features obtained in Step 1, a gated multi-scale convolutional network is used for encoding, dynamically fusing sequence features from different receptive fields;
[0006] Step 3, DNA-specific K-mer feature encoding: Based on the K-mer frequency features obtained in Step 1, a DNA-specific multi-scale convolutional pyramid network is used for encoding to extract optimized global sequence pattern features.
[0007] Step 4, Attention-gated dynamic fusion: The sequence features output from Step 2 and the K-mer features output from Step 3 are adaptively weighted and fused through an attention-gated mechanism that references the current input sequence features;
[0008] Step 5, Probability Threshold Hierarchical Classification: Based on the fused features obtained in Step 4, each level of classifier is independently trained and iteratively predicted from top to bottom in the transposon subclassification tree according to the preset probability threshold, outputting the final hierarchical classification path.
[0009] A hierarchical classification method for transposons based on dynamically gated multi-scale features is described below, with step 1 implemented as follows: The system reads DNA sequence files in FASTA format, and for each sequence of length... sequence First, fuzzy base normalization is performed, mapping non-standard bases to A, T, C, and G. Then, two feature representations are computed in parallel: the K-mer frequency feature vector. Let the size of K-mer be... By traversing the sequence through a sliding window, for each K-mer substring... Using hash functions Map it to a Unique integer index within the range and for vectors In position The count at each position is incremented by 1; the hash function is based on quaternary encoding. ,in Map the bases to numbers (A→0, G→1, C→2, T→3); finally, for Normalize it and reshape it into a four-dimensional tensor. To accommodate subsequent convolutional network inputs; One-hot encoding matrix Set the encoding length ,like Then, truncate both ends of the sequence and take the first two. After Encoding is performed using 1 base; if Then, zero values are filled in the middle of the sequence; for each position bases Generate a 4-dimensional one-hot vector. :like ,but ;like ,but ;like ,but ;like ,but All locations Stacking to form a matrix .
[0010] A transposon hierarchical classification method based on dynamically gated multi-scale features, the implementation process of step 2 is as follows: First, a gated multi-scale convolutional layer is constructed, which contains Each has a different kernel size The system consists of a one-dimensional convolutional submodule and a dynamically gated weight generation network, followed by the input sequence features. The processing flow is as follows: Parallel multi-scale feature extraction: ,get Feature tensors Then, the dynamic gating weights are calculated based on the input. Generate importance weights for each scale : Next, feature-weighted fusion is performed: The feature tensors are stacked along the newly added dimension as follows: ,Will Expanded dimension is Perform element-wise multiplication and summation: Residual connections and output: ,in Finally, multiple gated multi-scale convolutional layers are stacked, and Dropout and batch normalization layers are inserted between layers. Global average pooling is then performed on the output sequence dimension to obtain the sequence feature vector. .
[0011] A transposon hierarchical classification method based on dynamically gated multi-scale features is described below for step 3: First, a DNA-specific multi-scale convolutional pyramid network is constructed, consisting of multiple cascaded two-dimensional convolutional blocks, each designed specifically for processing the one-dimensional spectral characteristics of DNA K-mer frequencies; second, for the input K-mer feature tensor... (Dimensions are batch size, height, width, and channel, respectively), the network performs the following operations: First convolutional block: using a kernel size of... The convolutional layer extracts local K-mer combination patterns, followed by batch normalization. Activation and core size are Max pooling, second convolutional block: using kernel size of The convolutional layer extracts a medium range of k-mer patterns, followed by batch normalization. Activation and Max pooling, third convolutional block: using a convolutional layer with a kernel size of 1 to extract long-range K-mer patterns, followed by batch normalization. Activation and Max pooling is performed; then the number of filters in each convolutional layer is increased block by block; finally, after three convolutional blocks, the feature map is flattened into a vector and then subjected to dimensionality reduction and nonlinear transformation through a multilayer perceptron. This MLP contains fully connected layers, Dropout layers, and batch normalization layers, ultimately outputting K-mer feature vectors. .
[0012] A transposon hierarchical classification method based on dynamically gated multi-scale features, the implementation process of step 4 is as follows: This step is to design an attention-gated dynamic fusion mechanism, which adaptively fuses bimodal features based on sequence features; firstly, the attention weights are calculated: the sequence feature vectors are... Through a The activated fully connected layer generates a scalar attention weight. : The value is between 0 and 1, representing the relative importance of sequence features in the final fused features; secondly, feature weighting: using... Sequence features and K-mer features Weighting: This operation is equivalent to a soft attention gating, allowing the model to dynamically determine the mixing ratio of the two types of features based on the current input sequence; finally, the fusion enhancement: the weighted fused features... The final fused feature representation is obtained by using a small feedforward network for enhancement and dimensionality reduction. This provides input for subsequent classification.
[0013] A hierarchical classification method for transposons based on dynamically gated multi-scale features is described in step 5 as follows: The goal is to perform hierarchical classification based on a predefined transposon classification tree and probability thresholds. The classification tree is a directed acyclic graph with the root node TE. Each internal node represents a classification level, and the leaf nodes represent the finest-grained transposon types. First, independent hierarchical model training is performed: for each internal node in the classification tree, a classification model constructed as in steps 1-4 is trained independently. The number of neurons in the output layer of this model is equal to the number of child nodes of that node, and the Softmax function is used to output the probability distribution of each subclass. Second, iterative threshold decision prediction is performed: given a DNA sequence to be predicted and its fusion features... Predicting from the root node TE model: a. Input the model corresponding to the current node to obtain the subclass probability distribution. b. Find the value with the highest probability. and its corresponding subcategories c. Judgment: If ,in If the preset probability threshold is met, then the current sequence is determined to belong to... Category, and As the new current node, repeat steps a; d. If If the classification stops, the current node becomes the final predicted category. The final output is the complete path from the root node to the terminal node after the iteration process ends, which is the hierarchical classification result of the sequence, such as "TE@ClassI@LTR@ERV@ERV1". Attached Figure Description
[0014] Figure 1 This is a diagram illustrating the overall architecture of a transposon hierarchical classification method based on dynamically gated multi-scale features.
[0015] Figure 2 This is a flowchart for extracting dual-modal features from DNA sequences.
[0016] Figure 3 This is a schematic diagram of the structure of a gated multi-scale sequence coding module.
[0017] Figure 4 This is a schematic diagram of the structure of the DNA-specific K-mer feature encoding module.
[0018] Figure 5 This is a schematic diagram of the attention-gated dynamic fusion module.
[0019] Figure 6 This is a flowchart of a hierarchical classification decision-making process based on probability thresholds. Detailed Implementation
[0020] The present invention will now be described in detail with reference to the accompanying drawings and examples.
[0021] DNA feature extraction and graph structure construction: such as Figure 1 and Figure 2As shown, the specific implementation process of this step is as follows: A feature extraction module is implemented by writing a Python script. This module mainly includes the following functions: Fuzzy base normalization function: Define a function named `convert_undetermined_base` that receives a DNA sequence string as input. This function converts the input string to uppercase and then uses a chained call to the `replace()` method to sequentially replace Y with C, D with G, S with C, R with G, V with A, K with G, N with T, H with A, W with A, M with C, X with G, and B with C. Nucleotide-to-number mapping function: Define a function named `nucle2num` that receives a single nucleotide character. This function implements the mapping logic using an if-elif-else structure: if the character is 'A', it returns 0; if it is 'G', it returns 1; if it is 'C', it returns 2; if it is 'T' or 'U', it returns 3; otherwise, it raises a `ValueError` exception. K-mer feature calculation function: Define a function named `seq2kmer` that receives the sequence string `seq` and the K-mer size. k This function performs the following operations: sets the radix. b =4, initialize hash value h =0; Create a dictionary hash_dict with keys from 0 to 1. -1 is an integer, and its value is 0; if the sequence length is less than k Throws a ValueError exception; Initialization phase: before using a for loop to iterate. k Nucleotides, for each position i ,calculate h = h × b + nucle2num(seq[ i ]); Set hash_dict[ h ] = 1; Sliding window phase: Use a for loop to start from position k Iterate to the end of the sequence and for each position i ,calculate h = ( h - nucle2num(seq[ i - k ]) × )× b +nucle2num(seq[ i ]), then hash_dict[ h+= 1, returns a hash_dict. K-mer data acquisition function: Define a function named get_kmer_data that receives the data file path and the k value. This function: Creates an empty list kmer; iterates through each record in the FASTA file using SeqIO.parse(); for each record, obtains the sequence string and calls convert_undetermined_base() to normalize it; calls seq2kmer() to obtain the K-mer dictionary, extracts the values and converts them into a list; adds the list to kmer; after the loop ends, it converts kmer to a NumPy array using np.array(kmer); reshapes the array to (number of samples, 1, ...). 1) Convert to float64 type. One-hot encoding function: Define a function named seq2oh, which takes the sequence string seq and the length threshold len_thre. This function: If the sequence length is ≥ len_thre, take the first len_thre / / 2 and the last len_thre / / 2 characters and concatenate them; otherwise, take the first half and the second half of the sequence and pad with zeros to make the total length len_thre; create a OneHotEncoder object and set handle_unknown='ignore'; use enc.fit_transform(np.array(['A','C','G','T']).reshape(-1,1)) to fit the encoder; convert the processed sequence into an array and reshape it, call enc.transform() to encode; use toarray() to convert it into a dense matrix. One-hot data acquisition function: Define a function named get_oh_data, which takes the data file path and the length threshold. This function iterates through the FASTA records, calls seq2oh() on each record, and stacks all results into a three-dimensional NumPy array. The label data acquisition function defines a function named get_label_data that receives the data file path. This function iterates through the FASTA records, extracts the part after '#' from record.description as the label; performs one-hot encoding on the label using OneHotEncoder(); and returns the encoded label matrix and a list of category names.
[0022] Gated multi-scale sequence coding: such as Figure 3 As shown, the specific implementation process of this step is as follows: Implement a custom layer and encoder using TensorFlow:
[0023] Custom layer GatedMultiScaleConv: Defines a class that inherits from tf.keras.layers.Layer, containing: __init__ method: receives units and scales parameters; build method: creates a list of convolutional layers self.convs, adds a Conv1D layer for each scale s in scales, and sets filters=units, kernel_size= s, padding='same', activation='relu', kernel_regularizer=regularizers.l2(1e-4); Add gated weight layer self.gate_layer = Dense(len(scales), activation='softmax'); Add output projection layer self.output_proj = Dense(units, activation='relu'). The `call` method executes the following computational process: Calculate multi-scale features: `scale_features = [conv(inputs) for conv in self.convs]`; Stack features: `stacked = tf.stack(scale_features, axis=-1)`; Calculate gate weights: `gate_weights = self.gate_layer(inputs)`; Expand dimensions: `gate_weights_expanded = tf.expand_dims(gate_weights, axis=2)`; Weighted fusion: `weighted = tf.reduce_sum(stacked × gate_weights_expanded, axis=-1)`; Output projection: `output = self.output_proj(weighted)`; Residual connection: If the input and output dimensions are the same, execute `output = Add()([inputs, output])`. Sequence encoder construction function: Define a function named build_sequence_encoder that takes seq_len and embedding_dim parameters: Create input layer: inputs = Input(shape=(seq_len, 4), name="sequence_input"); Initial projection: x = Dense(embedding_dim, activation='relu')(inputs); First gated multiscale convolutional layer: x = GatedMultiScaleConv(embedding_dim, scales=[3,7,15], name="hyena_layer1")(x); x = Dropout(0.2)(x); x = BatchNormalization()(x).Second gated multi-scale convolutional layer: x = GatedMultiScaleConv(embedding_dim, scales=[3,15,31], name="hyena_layer2")(x); x = Dropout(0.2)(x); x = BatchNormalization()(x); Global average pooling: x = tf.reduce_mean(x, axis=1); x = Dense(256, activation='relu')(x); x = Dropout(0.3)(x); x = Dense(128, activation='relu')(x). Model creation: Model(inputs=inputs, outputs=x,name="sequence_encoder").
[0024] DNA-specific K-mer feature encoding: such as Figure 4 As shown, the specific implementation process of this step is as follows: Custom layer DNAFeatureExtractor: Define a class that inherits from tf.keras.layers.Layer:
[0025] The `build` method creates a list of `self.conv_layers` and adds the following layers in order: `Conv2D(32, (1,3),padding='same', activation='relu')`; `BatchNormalization()`; `MaxPool2D((1,2))`; `Conv2D(64, (1,5), padding='same', activation='relu')`; `BatchNormalization()`.
[0026] MaxPool2D((1,2)); Conv2D(128, (1,7), padding='same', activation='relu'); BatchNormalization(); MaxPool2D((1,2)). The `call` method executes each layer in `self.conv_layers` sequentially on the input, finally flattening it using `Flatten()`. The K-mer encoder construction function defines a function named `build_kmer_encoder` that receives `kmer_size` and `feature_dim` parameters: calculates `vector_size = ...` ;Create input layer: inputs = Input(shape=(1, vector_size, 1), name="kmer_input"); x = DNAFeatureExtractor()(inputs); x = Dense(512, activation='relu')(x); x = Dropout(0.3)(x); Dense(256, activation='relu')(x); x = Dropout(0.3)(x); x = Dense(feature_dim, activation='relu')(x). Create model: Model(inputs=inputs, outputs=x, name="kmer_encoder").
[0027] Attention-gated dynamic fusion: such as Figure 5 As shown, the specific implementation process of this step is as follows: Complete model construction function: Define a function named `build_hyena_create_model` that receives `kmer_size`, `seq_len`, and `num_classes` parameters: Create a dual-input layer:
[0028] kmer_input = Input(shape=(1, , 1), name="kmer_input";
[0029] seq_input = Input(shape=(seq_len, 4), name="seq_input"). Call the encoder: kmer_features = build_kmer_encoder(kmer_size)(kmer_input);
[0030] seq_features = build_sequence_encoder(seq_len)(seq_input). Attention weight calculation: attention_weights = Dense(1, activation='sigmoid', name="attention_weights")(seq_features). Feature weighting: weighted_kmer = Multiply()([kmer_features, attention_weights]); weighted_seq = Multiply()([seq_features, 1 - attention_weights]). Feature fusion: fused_features = Add(name="feature_fusion")([weighted_kmer, weighted_seq]). Classification Head Network: x = Dropout(0.5, name="fusion_dropout")(fused_features); x = Dense(256, activation='relu', name="fc1")(x); x = BatchNormalization(name="bn1")(x); x = Dropout(0.3, name="drop1")(x); x = Dense(128, activation='relu', name="fc2")(x); x = BatchNormalization(name="bn2")(x); x = Dropout(0.2, name="drop2")(x). Output Layer: If num_classes exists and is greater than 1, add outputs = Dense(num_classes, activation='softmax', name="output")(x). Model Creation: Model(inputs=[kmer_input, seq_input], outputs=outputs, name="Hyena-CREATE").
[0031] Dynamic route prediction output: such as Figure 6As shown, the specific implementation process of this step is as follows: Classification tree definition: Define the transposon classification tree in the tetree.py file: Import the Node, RenderTree, and find modules from the anytree library; define the TEnode class which inherits from Node, and set separator = "|". Define the create_tetree() function to create nodes hierarchically: Root node TE; First level: ClassI, ClassII; Second level: LTR, Non-LTR, Sub1, Sub2; Third level: Bel-Pao, Copia, Gypsy, ERV, DIRS, PLE, LINE, SINE, TIR, Helitron; Fourth level: ERV1-4, CR1, I, Jockey, L1, R2, RTE, Rex1, ID, SINE1 / 7SL, SINE2 / tRNA, SINE3 / 5S, CACTA, MULE, PIF, TcMar, hAT. Helper functions are defined: `get_all_nodes()`: returns all node names; `get_leaf_nodes()`: returns leaf node names; `get_parent_nodes()`: returns non-leaf node names; `find_node_path(node_name)`: returns the node path string. The data splitting function, `split_data_by_label()`, is defined in `train_hyena.py`: it takes `model_name_list`, `data_file`, and `model_data_dir` parameters; it iterates through each model name in `model_name_list`; it iterates through each record in the FASTA file, filtering records based on the model name condition. The labels of the filtered records are rewritten: if `model_name="TE"`: extracts the part after the second "@" in the description; if `model_name="ClassI"`: checks if it contains "@ClassI@", and if so, sets it to "LTR" or "Non-LTR" based on whether it contains "@LTR". Other model names are processed similarly, and the processed records are written to the file `{model_data_dir} / {model_name}.fasta`.Hierarchical classification decision functions: The following functions are defined in `classify_pipeline.py`: `get_labels(model_name)`: Returns a list of sub-labels based on the model name; `get_res(model_name_list, temp_res_dir)`: Loads the predicted probability files for all models; `thred_lcpn(idx, res_dict, prob_thr, label, leaf_node_list)`: A recursive function that determines whether to continue classification downwards based on a probability threshold; `get_thr_lcpn(res_dict, prob_thr)`: Calls `thred_lcpn` for each sample to obtain the predicted label; `hi_classify(true_labels, prob_thr, temp_res_dir)`: The main function, which calculates the hierarchical classification results. Prediction process: The following steps are executed in `test_hyena.py`: Load test data and extract features; Iterate through the list of model names, loading each model for prediction; Save the predicted probabilities to a temporary file; Call `hi_classify()` to perform hierarchical decision-making; Update the label information of the original FASTA file and output it. Parameter settings: Parameters such as prob_thr=0.85, k=7, l=600 can be received via command line arguments.
[0032] To verify the effectiveness of this invention, tests were conducted on the demo_data benchmark dataset. Compared with the CREATE method, this invention improved the ACC value from 96.8% to 97.6%, an improvement of 0.8%, demonstrating the effectiveness and superiority of this invention.
[0033] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A transposon hierarchical classification method based on dynamically gated multi-scale features, characterized in that, Includes the following steps: Step 1: DNA sequence bimodal feature extraction: Extract K-mer frequency features and one-hot coding features from DNA sequence files in FASTA format to construct the bimodal input of the model; Step 2, Gated Multi-Scale Sequence Encoding: Based on the One-hot encoded features obtained in Step 1, a gated multi-scale convolutional network is used for encoding, dynamically fusing sequence features from different receptive fields; Step 3, DNA-specific K-mer feature encoding: Based on the K-mer frequency features obtained in Step 1, a DNA-specific multi-scale convolutional pyramid network is used for encoding to extract optimized global sequence pattern features. Step 4, Attention-gated dynamic fusion: The sequence features output from Step 2 and the K-mer features output from Step 3 are adaptively weighted and fused through an attention-gated mechanism that references the current input sequence features; Step 5, Probability Threshold Hierarchical Classification: Based on the fused features obtained in Step 4, each level of classifier is independently trained and iteratively predicted from top to bottom in the transposon subclassification tree according to the preset probability threshold, outputting the final hierarchical classification path.
2. The transposon sub-hierarchical classification method based on dynamically gated multi-scale features according to claim 1, characterized in that, The implementation process of step 1 is as follows: The system reads DNA sequence files in FASTA format, for each sequence with a length of... sequence First, fuzzy base normalization is performed, mapping non-standard bases to A, T, C, and G. Then, two feature representations are computed in parallel: the K-mer frequency feature vector. Let the size of K-mer be... By traversing the sequence through a sliding window, for each K-mer substring... Using hash functions Map it to a Unique integer index within the range and for vectors In position Increment the count at that location by 1; Hash functions are based on quaternion encoding: ,in Map the bases to numbers (A→0, G→1, C→2, T→3); finally, for Normalize it and reshape it into a four-dimensional tensor. To accommodate subsequent convolutional network inputs; One-hot encoding matrix Set the encoding length ,like Then, truncate both ends of the sequence and take the first two. After Encoding is performed using 1 base; if Then, zero values are filled in the middle of the sequence; for each position bases Generate a 4-dimensional one-hot vector. :like ,but ;like ,but ;like ,but ;like ,but ; All positions Stacking to form a matrix .
3. The transposon sub-hierarchical classification method based on dynamically gated multi-scale features according to claim 1, characterized in that, The implementation process of step 2 is as follows: First, a gated multi-scale convolutional layer is constructed, which contains... Each has a different kernel size The system consists of a one-dimensional convolutional submodule and a dynamically gated weight generation network, followed by the input sequence features. The processing flow is as follows: Parallel multi-scale feature extraction: ,get Feature tensors Then, the dynamic gating weights are calculated based on the input. Generate importance weights for each scale : ,in , Next, feature-weighted fusion is performed: The feature tensors are stacked along the newly added dimension as follows: ,Will Expanded dimension is Perform element-wise multiplication and summation: Residual connection and output: ,in Finally, multiple gated multi-scale convolutional layers are stacked, and Dropout and batch normalization layers are inserted between layers. Global average pooling is then performed on the output sequence dimension to obtain the sequence feature vector. .
4. The transposon hierarchical classification method based on dynamically gated multi-scale features according to claim 1, characterized in that, The implementation process of step 3 is as follows: First, a DNA-specific multi-scale convolutional pyramid network is constructed. This network consists of multiple cascaded two-dimensional convolutional blocks, each specifically designed to process the one-dimensional spectral characteristics of DNA K-mer frequencies. Second, for the input K-mer feature tensor... (Dimensions are batch size, height, width, and channel, respectively), the network performs the following operations: First convolutional block: using a kernel size of... The convolutional layer extracts local K-mer combination patterns, followed by batch normalization, ReLU activation, and a kernel size of [missing value]. Max pooling, second convolutional block: using kernel size of The convolutional layer extracts a moderate range of k-mer patterns, followed by batch normalization, ReLU activation, and... Max pooling, third convolutional block: using kernel size of The convolutional layer extracts the long-range K-mer pattern, followed by batch normalization, ReLU activation, and... Max pooling is performed; then the number of filters in each convolutional layer is increased block by block; finally, after three convolutional blocks, the feature map is flattened into a vector and then subjected to dimensionality reduction and nonlinear transformation through a multilayer perceptron. This MLP contains fully connected layers, Dropout layers, and batch normalization layers, ultimately outputting K-mer feature vectors. .
5. The transposon sub-hierarchical classification method based on dynamically gated multi-scale features according to claim 1, characterized in that, The implementation process of step 4 is as follows: First, calculate the attention weights: (This involves calculating the sequence feature vectors.) A scalar attention weight is generated through a fully connected layer activated by a sigmoid. : ,in For the Sigmoid function, , Values are between 0 and 1; secondly, feature weighting: using Sequence features and K-mer features Weighting: This operation allows the model to dynamically determine the mixing ratio of the two types of features based on the current input sequence; finally, the fusion enhancement: the weighted fused features are... The final fused feature representation is obtained by using a small feedforward network for enhancement and dimensionality reduction. .
6. The transposon sub-hierarchical classification method based on dynamically gated multi-scale features according to claim 1, characterized in that, The implementation process of step 5 is as follows: The classification tree is a directed acyclic graph with the root node TE. Each internal node represents a classification level, and the leaf nodes represent the finest-grained transposon subtypes. Its implementation process is as follows: First, independent hierarchical model training is performed: for each internal node in the classification tree, an independent classification model constructed as in steps 1-4 is trained, where the number of neurons in the output layer of this model equals the number of child nodes of that node. The Softmax function is used to output the probability distribution of belonging to each subclass. Second, iterative threshold decision prediction is performed: given a DNA sequence to be predicted and its fusion features... Predicting from the root node TE model: a. Input the model corresponding to the current node to obtain the subclass probability distribution. ; b. Find the maximum probability value and its corresponding subcategories ; c. Judgment: If ,in If the preset probability threshold is met, then the current sequence is determined to belong to... Category, and As the new current node, repeat steps a; d. If If the classification stops, the current node becomes the final predicted category. Final output: After the iteration process is completed, the complete path from the root node to the terminal node is output as the hierarchical classification result of the sequence.