A cancer gene feature selection method based on three-branch selective autoencoder
By employing a three-branch selective autoencoder approach, utilizing deep autoencoders and granular-sphere clustering, combined with fuzzy loss and intuitionistic fuzzy sets, the feature selection is dynamically adjusted. This approach addresses the boundary handling and noise suppression issues in feature selection for high-dimensional unlabeled data, thereby improving the robustness and interpretability of feature selection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANTONG UNIV
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies struggle to effectively handle boundary features in feature selection for high-dimensional unlabeled data, neglecting the similarity structure and local correlations between features, lacking dynamic adjustment mechanisms, and exhibiting insufficient noise resistance. Consequently, the discriminativeness and interpretability of feature selection results are limited.
A three-branch selective autoencoder method is adopted. The initial deep representation is obtained by pre-training a deep autoencoder, and the features are divided by particle-sphere clustering. A fuzzy loss function and intuitionistic fuzzy set weights are introduced to dynamically adjust the feature selection. Combined with representation alignment loss and regularization constraints, the feature is progressively optimized.
It enhances the semantic consistency and interpretability of feature selection, improves the robustness and discriminative performance of feature selection, effectively suppresses noise interference, and realizes multi-granularity evaluation and dynamic adjustment of the feature selection process.
Smart Images

Figure CN122157805A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data dimensionality reduction and feature selection technology, and particularly relates to a method for cancer gene feature selection based on a three-branch selective autoencoder. Background Technology
[0002] With the rapid development of the Internet of Things, biomedicine, and multimedia applications, the data collected in various fields are characterized by high dimensionality, high redundancy, and high noise. For example, in gene expression data analysis, a single sample may contain tens of thousands of gene features. While this high-dimensional data contains rich information, it also brings problems such as high computational complexity, model overfitting, high data noise, and poor interpretability.
[0003] Feature selection, as an effective dimensionality reduction technique, aims to filter representative subsets of features from the original feature space, remove redundant and irrelevant features, and improve model performance and interpretability. Traditional feature selection methods mainly fall into three categories: filtering, wrapping, and embedded. Filtering methods independently evaluate feature importance based on statistical indicators, which is computationally efficient but ignores the interactions between features; wrapping methods evaluate feature subsets by predicting model performance, which, while considering the effect of feature combinations, has high computational overhead; embedded methods embed feature selection into the model training process, such as regularization methods like LASSO, which can automatically perform feature selection during training. However, these methods are mainly applicable to labeled scenarios, and their application in unlabeled high-dimensional data has limited effectiveness. In recent years, the rise of deep learning has provided new ideas for feature selection. ([Selective Deep Autoencoder for Unsupervised Feature Selection (SDAE)] learns a global low-dimensional representation through pre-trained deep autoencoders and introduces a selective layer to filter a subset of features that can reconstruct the entire feature space. [Multigranularity Fuzzy Autoencoder for Discriminative Feature Selection in High-Dimensional Data (FAE)] combines fuzzy theory with autoencoders, reduces the impact of noise and outliers through intuitive fuzzy weights, and introduces a coarse-grained loss function to enhance the discriminative ability of the selected features. However, such methods usually rely on certain supervision information or discriminative structures, and their applicability is limited in purely unsupervised scenarios.) These methods provide new ideas for feature selection, but still have the following problems: (1) Traditional methods usually perform hard feature filtering directly based on the weight size, which cannot effectively handle boundary features. (2) Existing methods usually adopt a global perspective when evaluating feature importance, ignoring the similarity structure and local association between features, making it difficult to capture semantic information at the feature group level, and limiting the discriminativeness and interpretability of feature selection results. (3) In terms of noise resistance, although existing methods attempt to reduce the impact of outliers by weighting samples, most of them rely on labeled datasets to guide the identification and suppression of noisy samples. (4) The feature selection process is often a static one-time optimization and lacks a dynamic adjustment mechanism. Summary of the Invention
[0004] Objective of the Invention: The technical problem to be solved by this invention is to address the shortcomings of existing technologies by providing a method for cancer gene feature selection based on a three-branch selective autoencoder, comprising the following steps:
[0005] Step S10: Pre-train a deep autoencoder, minimize the reconstruction error, obtain a global, deep low-dimensional latent representation, and retain the deep initial representation of features;
[0006] Step S20: Perform particle clustering based on the pre-trained latent representation, divide similar features into the same particle, calculate the average feature membership degree of each particle, determine the optimal threshold pair of the three-way decision by minimizing the fuzziness loss after shadow mapping, and divide the features into positive domain, boundary domain and negative domain.
[0007] Step S30: Construct a one-to-one differentiable feature selection layer and initialize the selection layer weights based on the partitioning results in step S20. At the same time, define the reconstruction error of the sample as the membership degree and the abnormality degree of the sample in the local neighborhood as the non-membership degree to obtain a final sample weight. Use the scoring function of intuitionistic fuzzy set to obtain the fuzzy weight matrix.
[0008] Step S40: Enter the feature selection stage: Use the frozen pre-trained autoencoder, fix the selection layer weights of positive and negative domain features, set only the boundary domain feature weights as trainable parameters, introduce the fine-grained loss function obtained from the fuzzy weight matrix in step S30 during training, and at the same time use the representation alignment loss constraint to ensure that the current feature representation does not deviate from the original semantic space.
[0009] Step S50: Based on the weight changes of the boundary domain features after training in step S40, dynamically adjust the partitioning results, move the boundary domain features with weights exceeding the threshold into the positive and negative domains, and then use only the pre-trained encoder to unfreeze the selection layer weights of all features and perform overall fine-tuning. Add regularization constraints on the basis of representation alignment loss to obtain the final feature results.
[0010] Step S10 includes the following steps:
[0011] Step S11: Construct the encoder part of the deep autoencoder, mapping the input data matrix X to a low-dimensional latent feature space:
[0012] (1);
[0013] in, Indicates inclusion One sample The input data matrix of each feature, Represent the space of real numbers; Represents the encoder mapping function; This represents the trainable parameters of the encoder; Represents the latent representation matrix;
[0014] Step S12: Construct a decoder symmetric to the encoder structure, and convert the latent representation matrix... Reconstructing back to the original data space:
[0015] (2),
[0016] in, This represents the reconstruction of the data matrix; This represents the decoder mapping function; This represents the trainable parameters of the decoder;
[0017] Step S13: Use mean squared error as the reconstruction loss function. The autoencoder is pre-trained by minimizing the difference between the original input and the reconstructed output.
[0018] (3);
[0019] in, and Let represent the i-th sample vector and the reconstructed sample vector corresponding to the i-th sample, respectively; N represents the number of samples; Represents the L2 norm; simultaneously updates encoder and decoder parameters using the backpropagation algorithm;
[0020] Step S14: Input the cancer gene dataset. After pre-training, retain the encoder and decoder parameters, and then extract the weight matrix of the first hidden layer of the encoder. ,in This represents the number of neurons in the first hidden layer.
[0021] In step S14, the weight matrix Each row corresponds to a connection weight of an original feature, and these weights become the initial depth representation of the feature:
[0022] , j=1,2,…,M(4;
[0023] in, Represents the depth representation vector of the j-th feature; This represents the vector of the j-th row of the weight matrix, and the symbol ":" indicates that all column elements of the corresponding row are taken.
[0024] Step S20 includes the following steps:
[0025] Step S21: Based on the feature depth representation set extracted in step S10 K-means clustering algorithm is used to divide the features into spheres, grouping similar features into the same sphere, resulting in m feature spheres. .in, Represents the set of characteristic particles; Let represent the i-th sphere, where each sphere contains a set of feature indices with similar representations; m represents the total number of spheres.
[0026] Step S22: Calculate the importance score for each feature, using the L1 norm of the feature representation vector as the metric, and then normalize it to obtain the feature membership degree. :
[0027] (5);
[0028] in, This represents the importance score of the j-th feature. Represents the L1 norm; This represents the minimum importance score among all features. This represents the importance membership degree of the j-th feature. Represents the j-th feature; This represents the maximum importance score among all features; j represents the feature index.
[0029] Step S23: Calculate the average membership degree of each feature particle:
[0030] (6);
[0031] in, The characteristic quantity in the granule; This represents the average membership degree of the i-th feature particle;
[0032] Step S24: Define and calculate the ambiguity of the feature particle space. :
[0033] (7);
[0034] in, This represents the ambiguity of the i-th feature particle.
[0035] Step S25: Define shadow mapping Map each feature sphere to :
[0036] (8);
[0037] in , For the undetermined threshold, ;
[0038] Spatial ambiguity of feature particles after shadow mapping Contributed solely by boundary domain particles, the calculation formula is as follows:
[0039] (9);
[0040] in Let i represent the set of feature sphere indices of the boundary domain after the three-branch partition; integral x represents the intermediate variable in the integration, and d represents the differential symbol;
[0041] The threshold optimization objective is to minimize the absolute difference in ambiguity before and after mapping:
[0042] (10);
[0043] Solving for the results Optimal threshold and Optimal threshold ;
[0044] Step S26: Based on the optimal threshold, the feature particle sphere is divided into three regions: positive region POS, boundary region BND, and negative region NEG, thus obtaining the assignment of each feature. That is, the original feature set is divided into important features, boundary features, and redundant features.
[0045] Step S30 includes the following steps:
[0046] Step S31: Construct a differentiable feature selection layer and define a learnable gating parameter vector. By restricting the selection weights to the range [0,1] using a truncation function, the actual selection weight vector is obtained. Used for weighted selection of original features:
[0047] (11),
[0048] in, This represents element-wise multiplication. This is the weighted feature matrix;
[0049] Step S32: Based on the partitioning results obtained in step S20, perform differentiated initialization of the selection layer gating parameters: for features within the positive domain POS... Initialize the corresponding gating parameters ,in This represents the corresponding gating parameter for the j-th feature; for features within the boundary domain BND... Initialize the corresponding gating parameters For the negative domain features within NEG Initialize the corresponding gating parameters During forward computation, the corresponding actual selection weights are obtained through a truncation function.
[0050] Step S33: Based on the pre-trained autoencoder, calculate the reconstruction error of each sample using the encoder and decoder, and normalize the reconstruction error as the membership degree of the sample. This indicates the degree to which the sample belongs to the normal pattern:
[0051] (12);
[0052] in, This represents the reconstructed sample vector corresponding to the i-th sample. This represents the reconstruction error of the i-th sample; Here, is the temperature parameter; exp is the natural exponential function.
[0053] Step S34: Using the hidden representation Z obtained from the pre-trained encoder, find the k nearest neighbor set for each sample in the latent space. The average Euclidean distance between a sample and its nearest neighbors is calculated as a local density estimate, and then normalized to obtain the non-membership degree. This indicates the degree of anomaly in the sample:
[0054] (13);
[0055] in, The local average distance of the sample. This represents the latent representation vector corresponding to the i-th sample. This represents the latent representation vector corresponding to the j-th sample; This represents the maximum local average distance of the samples, after which normalization is performed. ;
[0056] Step S35: Based on intuitionistic fuzzy set theory, comprehensively consider the membership degree of the samples. Non-membership degree and degree of hesitation An improved scoring function is used to calculate the reliability weight of each sample.
[0057] In step S35, the improved scoring function is:
[0058] (14);
[0059] Wherein, the score of the i-th sample Combine the scores of all samples to obtain the sample fuzzy weight matrix. .
[0060] Step S40 includes the following steps:
[0061] Step S41: Load the pre-trained encoder and decoder from step S10, and freeze all the pre-trained encoder and decoder in step S40 so that they do not participate in gradient updates; at the same time, load the feature selection layer parameters constructed in step S30, set the weights of positive and negative features to the frozen state, and set only the gating parameters corresponding to the boundary features to trainable parameters.
[0062] Step S42: Input data The weighted feature matrix is obtained by element-wise multiplication with the actual selection weight W. The weighted feature matrix is then sequentially input into the frozen encoder and decoder to obtain the current latent representation. and reconstructing data ;
[0063] Step S43: Calculate the representation alignment loss. The constraint is that the current hidden representation does not deviate from the semantic space of the original hidden representation during pre-training:
[0064] (15)
[0065] in, This is the original hidden representation of the i-th sample obtained in step S10, the pre-training phase. This is the hidden representation obtained by passing the current weighted features through the same encoder;
[0066] Step S44: Calculate the reconstruction error for each sample. And load the sample fuzzy weight matrix S obtained in step S30 to construct a fine-grained loss function. :
[0067] (16);
[0068] Step S45: Apply L1 regularization to the weights of the boundary domain features:
[0069] (17);
[0070] in, This represents the sparsity loss of the boundary domain; Indicates the number of boundary domain features;
[0071] Step S46: Construct the total loss function for the first stage of feature selection. :
[0072] (18);
[0073] in, The hyperparameters representing the balancing loss term;
[0074] Step S47: Calculate the total loss function using the backpropagation algorithm. Gradients to trainable parameters, and updates only the feature weights belonging to the boundary region in the selected layer. .
[0075] Step S50 includes the following steps:
[0076] Step S51: Extract the current gating parameters corresponding to the boundary domain features, and project the current gating parameters into the interval [0,1] through a truncation function to obtain the actual selection weights corresponding to the boundary domain features;
[0077] Based on the optimal threshold obtained in step S20 An adaptive scaling factor is introduced to map the optimal threshold pair from the particle-sphere average membership space to the feature weight space:
[0078] (19)
[0079] in, This indicates the value of the adaptive scaling factor; This represents the mean of the feature weights in the boundary region; This represents the mean membership degree of the spheres corresponding to the boundary domain.
[0080] According to the new threshold Dynamically transfer boundary domain features to update the partitioning results;
[0081] Step S52: Retain the selection layer weights obtained from training in step S40 as initial values. Only the encoder parameters pre-trained in step S10 are loaded. During training, L1 regularization is applied to the negative domain of the selection layer and the encoder weights. The total loss function is... as follows:
[0082] (20)
[0083] in, Indicates the first Layer weights; This indicates regularization of the negative domain of the selection layer. This represents the gating parameter corresponding to the j-th feature during training; The hyperparameters representing the balancing loss term;
[0084] Step S53: Update the encoder parameters and all weights of the feature selection layer together using the backpropagation algorithm.
[0085] 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.
[0086] 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.
[0087] This method, based on the pre-trained initial feature depth representation, divides similar features into the same sphere through sphere clustering, enhancing the structure awareness capability at the feature group level. This allows feature selection to fully utilize semantic information at the feature association level, avoiding the limitations of global single-granularity evaluation. Simultaneously, based on a three-branch decision mechanism, it performs uncertain partitioning of feature spheres, flexibly handling boundary features with ambiguous importance and avoiding information loss caused by rigid partitioning. Finally, by combining sample-level fuzzy weights and representation alignment constraints, it can effectively suppress the interference of noisy samples and maintain the semantic consistency of feature representations, automatically determining the number of features selected, thus improving the reliability and interpretability of unsupervised feature selection.
[0088] Beneficial effects: (1) This invention proposes a multi-granularity feature evaluation mechanism based on three-branch decision-making of granular spheres, which comprehensively characterizes feature importance from both feature granularity and sample granularity levels based on the representation capabilities of deep learning. This invention breaks through the limitation of traditional methods that only evaluate feature importance at a single granularity, and introduces a multi-granularity evaluation framework that combines feature level and sample level. At the feature level, similar features are aggregated into granular spheres through clustering, and the average membership degree of the granular spheres is calculated to capture the collaborative relationship and semantic structure between features from the perspective of feature groups; at the sample level, based on the reconstruction results of the autoencoder, sample weights based on intuitionistic fuzzy sets are obtained and used in the training of the boundary domain. This multi-granularity collaborative evaluation strategy can simultaneously take into account the local correlation and global contribution of features, providing a more comprehensive and robust basis for the importance measurement of feature selection.
[0089] (2) This invention introduces a three-branch decision theory to effectively address the problem of ambiguous feature importance. Addressing the limitations of traditional feature selection methods that employ hard boundaries, this invention introduces a particle-sphere three-branch decision mechanism. By minimizing fuzziness loss, it adaptively determines the optimal threshold pair, dividing features into positive, boundary, and negative domains. The introduction of the boundary domain provides a buffer for features with unclear importance, avoiding information loss or noise introduction due to early decision errors. Subsequently, through targeted training of the boundary domain features, they gradually converge towards the positive or negative domain, achieving soft feature partitioning and progressive selection, significantly improving the robustness and interpretability of feature selection.
[0090] (3) This invention designs a sample weight adaptive mechanism based on intuitionistic fuzzy sets, which effectively suppresses the interference of noisy samples on feature selection. Addressing the problem that existing methods treat all samples equally and ignore differences in sample quality, this invention comprehensively considers the reconstruction error (membership) and the degree of local anomalies (non-membership) of samples, constructing a sample reliability scoring function under the intuitionistic fuzzy set framework. This mechanism weights samples in the fine-grained loss function, making the feature selection process more focused on high-quality samples, reducing the interference of low-quality samples on boundary domain feature training, and improving the robustness of the model in noisy environments.
[0091] (4) This invention proposes a boundary domain-first training and dynamic three-branch adjustment strategy to achieve progressive optimization of feature selection. This invention divides the feature selection process into two stages: boundary domain-first training and overall fine-tuning. This progressive optimization strategy not only ensures the orderly transition of boundary domain features from a fuzzy state to a definite state, but also achieves synergistic optimization of feature selection and representation learning through overall fine-tuning, significantly improving the discriminative performance and semantic consistency of the final feature subset. Attached Figure Description
[0092] 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.
[0093] Figure 1 This is an overall flowchart of a cancer gene feature selection method based on a three-branch selective autoencoder according to the present invention.
[0094] Figure 2 This is a diagram illustrating the overall data processing framework of a cancer gene feature selection method based on a three-branch selective autoencoder according to the present invention.
[0095] Figure 3 This is a flowchart of a cancer gene feature selection method based on a three-branch selective autoencoder in this invention. Detailed Implementation
[0096] like Figure 1 , Figure 2 and Figure 3 As shown, this embodiment of the invention provides a cancer gene feature selection method based on a three-branch selective autoencoder. It uses a set of cancer gene expression matrices as input data, containing 312 samples and 5000 gene features, with a training set of 250 samples and a test set of 62 samples. After data preprocessing, the method includes the following steps:
[0097] Step S10: Pre-train a deep autoencoder, minimize the reconstruction error, obtain a global, deep low-dimensional latent representation, and retain the deep initial representation of features;
[0098] Step S20: Perform particle clustering based on the pre-trained latent representation, divide similar features into the same particle, calculate the average feature membership degree of each particle, and determine the optimal threshold pair of the three-way decision by minimizing the fuzziness loss after shadow mapping, thereby dividing the features into positive domain, boundary domain and negative domain.
[0099] Step S30: Construct a one-to-one differentiable feature selection layer, and initialize the selection layer weights based on the three-branch partitioning results in step S20. Simultaneously, define the sample reconstruction error as the membership degree and the sample's anomaly degree in its local neighborhood as the non-membership degree, obtaining a final sample weight. The fuzzy weight matrix is then obtained using the scoring function of the intuitionistic fuzzy set.
[0100] Step S40: Enter the feature selection stage, the purpose of which is to reduce the number of features selected. A frozen pre-trained autoencoder is used, fixing the selection layer weights for positive and negative features, and only setting the weights of boundary domain features as trainable parameters. During training, a fine-grained loss function obtained from the fuzzy weight matrix in step S30 is introduced, while representation alignment loss constraints ensure that the current feature representation does not deviate from the original semantic space, improving the model's robustness to boundary domain features and its discriminative performance.
[0101] Step S50: Based on the weight changes of the boundary region features after training in step S40, dynamically adjust the three-branch partition, moving boundary region features with weights exceeding the threshold into the positive and negative regions. Then, using only the pre-trained encoder, unfreeze the selection layer weights of all features, perform overall fine-tuning, and add regularization constraints to the representation alignment loss to push the weights of unimportant features to 0, obtaining the final feature result.
[0102] Step S10 includes the following steps:
[0103] S11. Construct the encoder part of the deep autoencoder, mapping the high-dimensional input data to a low-dimensional latent feature space. The encoder hidden layer dimensions are 256 and 128 respectively.
[0104] (1);
[0105] In the formula, Indicates inclusion One sample The input data matrix of each feature, Represent the space of real numbers; Represents the encoder mapping function; This represents the trainable parameters of the encoder. Represents the latent representation matrix;
[0106] S12. Construct a decoder that is symmetric to the encoder structure to reconstruct the low-dimensional implicit representation back to the original data space:
[0107] (2);
[0108] In the formula, This represents the reconstruction of the data matrix; This represents the decoder mapping function; This represents the trainable parameters of the decoder;
[0109] S13. Using mean squared error as the reconstruction loss function, the autoencoder is pre-trained by minimizing the difference between the original input and the reconstructed output:
[0110] (3);
[0111] In the formula, and Let represent the original feature vector and the reconstructed feature vector of the i-th sample, respectively. The encoder parameters and decoder parameters are updated simultaneously through the backpropagation algorithm.
[0112] The pre-training phase consisted of 400 training epochs with a learning rate of 1×10^-3. After training, the autoencoder reconstruction loss decreased from the initial 0.0842 to 0.0071.
[0113] S14. Input the cancer gene dataset. After pre-training, retain the encoder and decoder parameters. Then extract the weight matrix of the first hidden layer of the encoder. ,in Let be the number of neurons in the first hidden layer. Each row of this matrix corresponds to a connection weight of an original feature, which is used as the initial depth representation of the feature.
[0114] , j=1,2,…,M(4;
[0115] In the formula, Let represent the depth representation vector of the j-th feature, which implies the contribution pattern of this feature in the nonlinear transformation. After extracting and transposing the parameters of the first hidden layer of the encoder, a feature depth representation matrix of size 5000×256 is obtained, where each row corresponds to the depth representation vector of a gene feature.
[0116] Step S20 includes the following steps:
[0117] S21. Since similar weight vectors mean that these features are often considered simultaneously during reconstruction and may have strong correlation or complementarity, the feature depth representation set extracted in S21 is used. The K-means clustering algorithm is used to divide the features into spheres, grouping similar features into the same sphere to obtain m feature spheres. Each sphere It contains a set of feature indices with similar representations. In the example, after clustering, 186 feature spheres were obtained, each containing 14 to 43 gene features, with an average of 26.9 features per sphere.
[0118] S22. Then, calculate the importance score for each feature, using the L1 norm of the feature representation vector as the metric, and normalize it to obtain the feature membership degree. :
[0119] (5);
[0120] in, This represents the L1 norm based on the weights of the first layer of the encoder (reflecting the contribution of features to the activation of the hidden layer). This represents the importance membership degree of the j-th feature; a larger value indicates a more important feature.
[0121] S23. Calculate the average membership degree of each feature sphere to reflect the overall importance level of the sphere:
[0122] (6);
[0123] In the formula, The characteristic quantity in the granule;
[0124] S24. Define and calculate the ambiguity of the feature particle space. :
[0125] (7);
[0126] In the formula, This is used to measure the uncertainty in the importance of feature particles. The addition of coefficient 4 normalizes its value range to [0,1].
[0127] S25, Define Shadow Mapping Map each feature sphere to :
[0128] (8);
[0129] In the formula The threshold value is to be determined.
[0130] The ambiguity after mapping is contributed only by the boundary domain particles, and the calculation formula is as follows:
[0131] (9);
[0132] In the formula ,integral ;
[0133] The threshold optimization objective is to minimize the absolute difference in ambiguity before and after mapping:
[0134] (10);
[0135] Solving for the optimal threshold The values are 0.28 and 0.71, respectively.
[0136] S26. Based on the optimal threshold, the feature particles are divided into three regions. This yields 742 positive domain features, 1096 boundary domain features, and 3162 negative domain features. Thus, the original feature set is divided into important features, boundary features, and redundant features, achieving a three-branch decision feature partitioning based on deep autoencoder representation.
[0137] Step S30 includes the following steps:
[0138] S31. Construct a differentiable feature selection layer and define a learnable gating parameter vector. By restricting the selection weights to the range [0,1] using a truncation function, the actual selection weight vector is obtained. Used for weighted selection of original features:
[0139] (11);
[0140] In the formula, This represents element-wise multiplication. This is the weighted eigenma matrix;
[0141] S32. Based on the feature tri-branch partitioning results obtained in step S20, perform differential initialization on the selection layer parameters: for features within the positive domain POS... Initialize the corresponding gating parameters ,in This represents the corresponding gating parameter for the j-th feature; for features within the boundary domain BND... Initialize the corresponding gating parameters For the negative domain features within NEG Initialize the corresponding gating parameters This results in higher initial weights for positive domain features, lower initial weights for negative domain features, and intermediate initial weights for boundary domain features, thus achieving prior knowledge guidance.
[0142] S33. Based on a pre-trained autoencoder, the reconstruction error of each sample is calculated using the encoder and decoder, and the normalized reconstruction error is used as the membership degree of the sample. This indicates the degree to which the sample belongs to the normal pattern:
[0143] (12);
[0144] In the formula, Let temperature be the parameter, and let it be the median or mean of the reconstruction error of all samples, so that the membership degree decreases exponentially as the reconstruction error increases;
[0145] S34. Using the latent representation Z obtained from the pre-trained encoder, find the k-nearest neighbor set for each sample in the latent space. The nearest neighbor number k is set to 5. The average Euclidean distance between the sample and its nearest neighbors is calculated as a local density estimate and normalized to obtain the non-membership degree. This indicates the degree of anomaly in the sample:
[0146] (13);
[0147] In the formula, The local average distance of the samples, after normalization A larger value indicates that the sample is more isolated and more abnormal in its local neighborhood;
[0148] S35. Based on intuitionistic fuzzy set theory, comprehensively consider the membership degree of the samples. Non-membership degree and degree of hesitation The reliability weight for each sample is calculated using an improved scoring function:
[0149] (14);
[0150] In the formula, the score A higher value indicates a more reliable sample. In this example, the minimum sample weight is 0.11, the maximum is 0.96, and the average is 0.74, with 31 samples having a weight below 0.30. This scoring function fully considers the trade-off between the degree of local anomaly (non-membership) of a sample in the latent space and the quality of reconstruction (membership). When sample information is contradictory (…), the function will consider the trade-off between these factors. When a sample's score is zero, it is directly assigned a weight to effectively filter out noisy samples. The scores of all samples are combined to obtain the sample fuzzy weight matrix. This is used to weight the samples in subsequent fine-grained loss calculations;
[0151] Step S40 includes the following steps:
[0152] S41. Load the pre-trained encoder and decoder from step S10 and freeze them all in step S40 so they do not participate in gradient updates; at the same time, load the feature selection layer parameters constructed in step S30, set the weights of positive and negative features to a frozen state, and set only the weights of boundary features to trainable parameters.
[0153] S42, Input data The weighted feature matrix is obtained by element-wise multiplication with the actual selection weight W. The weighted feature matrix is then sequentially input into the frozen encoder and decoder to obtain the current hidden representation. and reconstructing data ;
[0154] S43. Calculate the representation alignment loss to constrain the current hidden representation from deviating from the semantic space of the original hidden representation during pre-training:
[0155] (15);
[0156] In the formula, This is the original hidden representation of the i-th sample obtained in step S10, the pre-training phase. This is the hidden representation obtained by passing the current weighted features through the same encoder.
[0157] S44. Calculate the reconstruction error for each sample. And load the sample fuzzy weight matrix S obtained in step S30 to construct a fine-grained loss:
[0158] (16);
[0159] S45. Calculate the sparsity constraint loss of the boundary domain features, and apply L1 regularization to the weights of the boundary domain features to induce the boundary domain features to converge in the direction of clearly important (weights approaching 1) or clearly unimportant (weights approaching 0):
[0160] (17);
[0161] In the formula, Indicates the number of boundary domain features;
[0162] S46. Construct the total loss function for the first stage of feature selection:
[0163] (18);
[0164] In the formula, This represents the hyperparameters of the balancing loss term.
[0165] S47. Calculate the total loss function using the backpropagation algorithm. Gradients to trainable parameters, and updates only the feature weights belonging to the boundary region in the selected layer. .
[0166] The first training phase consisted of 300 epochs with a learning rate of 5 × 10^-4. After training, the alignment loss decreased to 0.0126, and the fine-grained reconstruction loss decreased to 0.0834. Simultaneously, the weight distribution of boundary region features initially concentrated around 0.50 gradually diverged towards both ends, with 286 boundary region features having weights above 0.70, 514 boundary region features having weights below 0.30, and the remaining 296 features remaining in a transitional state. These results demonstrate that boundary region-first training effectively reduces the uncertainty in the initial partitioning.
[0167] This boundary domain priority training focuses on handling the boundary domain features with the highest uncertainty. On the one hand, it reduces the interference of noisy samples on the boundary domain through fine-grained loss; on the other hand, it constrains the changes in boundary domain features to not deviate from the original semantic space through representation alignment loss, thereby avoiding model collapse. After multiple rounds of iterative optimization, the boundary domain features gradually converge from an uncertain state to a clearly important or clearly unimportant state, effectively reducing the uncertainty of the boundary domain.
[0168] Step S50 includes the following steps:
[0169] S51. Extract the corresponding current gating parameters, and project the current gating parameters into the interval [0,1] using a truncation function to obtain the actual selection weights corresponding to the boundary domain features. Then, based on the optimal threshold obtained in step S20... Introducing an adaptive scaling factor Map it from the particle-sphere average membership space to the feature weight space:
[0170] (19)
[0171] In the formula, This represents the mean of the feature weights in the boundary domain. This represents the average membership degree of the corresponding spheres in the boundary region. This scaling factor reflects the change in the dimension of the boundary region feature importance before and after training, and is used to adaptively adjust the sphere-level threshold to a feature-level threshold. Furthermore, based on this new threshold, [the following is applied to...]. The boundary domain features are dynamically transferred to update the three-branch partition. In the example, 143 boundary domain features are transferred to the positive domain, and 187 boundary domain features are transferred to the negative domain.
[0172] S52. Retain the selection layer weights obtained from training in step S40 as initial values. Only the encoder parameters pre-trained in step S10 are loaded. At this stage, the encoder parameters are allowed to be fine-tuned with a small learning rate, enabling the model to adaptively adjust the feature representation space to fit the selected feature subset. To prevent the encoder from "compensating" for deleted features by adjusting its internal weights during feature selection, L1 regularization is applied to the encoder during training. Simultaneously, to encourage redundant features to converge to zero weights, L1 regularization is applied to the negative domain of the selection layer during training. The total loss function is as follows:
[0173] (20);
[0174] In the formula, Indicates the first Layer weights This indicates regularization of the negative domain of the selection layer. This represents the hyperparameters of the balancing loss term.
[0175] S53. The encoder parameters and all weights of the feature selection layer are jointly updated using the backpropagation algorithm. After multiple rounds of optimization, the final feature importance weights are determined. Features with non-zero weights must have made substantial contributions to completing the task and are therefore considered relevant features. All features with a weight of 0 are discarded to obtain the final feature selection result. In this example, the number of training rounds in the second stage is set to 300, the learning rate is set to 2×10^-4, and stronger sparsity constraints are applied to the negative domain. After overall fine-tuning, 856 non-zero weight features are finally obtained, of which 524 features have a weight greater than or equal to 0.70 and can be used as priority candidate genes for cancer-related genes; the weights of 4144 features are compressed to 0 and discarded. When the downstream classifier is trained using the selected features, the classification accuracy reaches 93.4%, and the linear reconstruction error is 0.0149.
[0176] A schematic comparison was made between the method of this invention and existing feature selection methods, and the results are as follows: When using the variance filtering method, 1000 features were retained, and the classification accuracy was 89.1%; when using the conventional SDAE method, 912 features were retained, and the classification accuracy was 91.9%; while using the method of this invention, only 856 non-zero weight features were retained to achieve a classification accuracy of 92.1%. This demonstrates that the method of this invention can achieve good reconstruction ability and classification performance while retaining fewer features, indicating that it has better robustness and interpretability when dealing with the large number of redundant features, boundary features, and noisy samples in cancer gene expression data.
[0177] This invention provides a method for cancer gene feature selection based on a three-branch selective autoencoder. 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 selecting cancer gene features based on a three-branch selective autoencoder, characterized in that, Includes the following steps: Step S10: Pre-train a deep autoencoder, minimize the reconstruction error, obtain a global, deep low-dimensional latent representation, and retain the deep initial representation of features; Step S20: Perform particle clustering based on the pre-trained latent representation, divide similar features into the same particle, calculate the average feature membership degree of each particle, determine the optimal threshold pair of the three-way decision by minimizing the fuzziness loss after shadow mapping, and divide the features into positive domain, boundary domain and negative domain. Step S30: Construct a one-to-one differentiable feature selection layer and initialize the selection layer weights based on the partitioning results in step S20. At the same time, define the reconstruction error of the sample as the membership degree and the abnormality degree of the sample in the local neighborhood as the non-membership degree to obtain a final sample weight. Use the scoring function of intuitionistic fuzzy set to obtain the fuzzy weight matrix. Step S40: Enter the feature selection stage: Use the frozen pre-trained autoencoder, fix the selection layer weights of positive and negative domain features, set only the boundary domain feature weights as trainable parameters, introduce the fine-grained loss function obtained from the fuzzy weight matrix in step S30 during training, and at the same time use the representation alignment loss constraint to ensure that the current feature representation does not deviate from the original semantic space. Step S50: Based on the weight changes of the boundary domain features after training in step S40, dynamically adjust the partitioning results, move the boundary domain features with weights exceeding the threshold into the positive and negative domains, and then use only the pre-trained encoder to unfreeze the selection layer weights of all features and perform overall fine-tuning. Add regularization constraints on the basis of representation alignment loss to obtain the final feature results.
2. The method according to claim 1, characterized in that, Step S10 includes the following steps: Step S11: Construct the encoder part of the deep autoencoder, mapping the input data matrix X to a low-dimensional latent feature space: (1); in, Indicates inclusion One sample The input data matrix of each feature, Represent the space of real numbers; Represents the encoder mapping function; This represents the trainable parameters of the encoder; Represents the latent representation matrix; Step S12: Construct a decoder symmetric to the encoder structure, and convert the latent representation matrix... Reconstructing back to the original data space: (2), in, This represents the reconstruction of the data matrix; This represents the decoder mapping function; This represents the trainable parameters of the decoder; Step S13: Use mean squared error as the reconstruction loss function. The autoencoder is pre-trained by minimizing the difference between the original input and the reconstructed output. (3); in, and Let represent the i-th sample vector and the reconstructed sample vector corresponding to the i-th sample, respectively; N represents the number of samples; Represents the L2 norm; simultaneously updates encoder and decoder parameters using the backpropagation algorithm; Step S14: Input the cancer gene dataset. After pre-training, retain the encoder and decoder parameters, and then extract the weight matrix of the first hidden layer of the encoder. ,in This represents the number of neurons in the first hidden layer.
3. The method according to claim 2, characterized in that, In step S14, the weight matrix Each row corresponds to a connection weight of an original feature, and these weights become the initial depth representation of the feature: , j=1,2,…,M(4); in, Represents the depth representation vector of the j-th feature; This represents the vector in the j-th row of the weight matrix.
4. The method according to claim 3, characterized in that, Step S20 includes the following steps: Step S21: Based on the feature depth representation set extracted in step S10 K-means clustering algorithm is used to divide the features into spheres, grouping similar features into the same sphere, resulting in m feature spheres. ,in, Represents the set of characteristic particles; Let represent the i-th sphere, where each sphere contains a set of feature indices with similar representations; m represents the total number of spheres. Step S22: Calculate the importance score for each feature, using the L1 norm of the feature representation vector as the metric, and then normalize it to obtain the feature membership degree. : (5); in, This represents the importance score of the j-th feature. Represents the L1 norm; This represents the minimum importance score among all features. This represents the importance membership degree of the j-th feature. Represents the j-th feature; This represents the maximum importance score among all features; j represents the feature index. Step S23: Calculate the average membership degree of each feature particle: (6); in, The characteristic quantity in the granule; This represents the average membership degree of the i-th feature particle; Step S24: Define and calculate the ambiguity of the feature particle space. : (7); in, This represents the ambiguity of the i-th feature particle. Step S25: Define shadow mapping Map each feature sphere to : (8); in , For the undetermined threshold, ; Spatial ambiguity of feature particles after shadow mapping Contributed solely by boundary domain particles, the calculation formula is as follows: (9); in Let i represent the set of feature sphere indices of the boundary domain after the three-branch partition; integral x represents the intermediate variable in the integration, and d represents the differential symbol; The threshold optimization objective is to minimize the absolute difference in ambiguity before and after mapping: (10); Solving for the results Optimal threshold and Optimal threshold ; Step S26: Based on the optimal threshold, the feature particle sphere is divided into three regions: positive region POS, boundary region BND, and negative region NEG, thus obtaining the assignment of each feature. That is, the original feature set is divided into important features, boundary features, and redundant features.
5. The method according to claim 4, characterized in that, Step S30 includes the following steps: Step S31: Construct a differentiable feature selection layer and define a learnable gating parameter vector. By restricting the selection weights to the range [0,1] using a truncation function, the actual selection weight vector is obtained. Used for weighted selection of original features: (11), in, This represents element-wise multiplication. This is the weighted feature matrix; Step S32: Based on the partitioning results obtained in step S20, perform differentiated initialization of the selection layer gating parameters: for features within the positive domain POS... Initialize the corresponding gating parameters ,in This represents the corresponding gating parameter for the j-th feature; for features within the boundary domain BND... Initialize the corresponding gating parameters For the negative domain features within NEG Initialize the corresponding gating parameters During forward computation, the corresponding actual selection weights are obtained through a truncation function. Step S33: Based on the pre-trained autoencoder, calculate the reconstruction error of each sample using the encoder and decoder, and normalize the reconstruction error as the membership degree of the sample. This indicates the degree to which the sample belongs to the normal pattern: (12); in, This represents the reconstructed sample vector corresponding to the i-th sample. This represents the reconstruction error of the i-th sample; Here, is the temperature parameter; exp is the natural exponential function. Step S34: Using the hidden representation Z obtained from the pre-trained encoder, find the k nearest neighbor set for each sample in the latent space. The average Euclidean distance between a sample and its nearest neighbors is calculated as a local density estimate, and then normalized to obtain the non-membership degree. This indicates the degree of anomaly in the sample: (13); in, The local average distance of the sample. This represents the latent representation vector corresponding to the i-th sample. This represents the latent representation vector corresponding to the j-th sample; This represents the maximum local average distance of the samples, after which normalization is performed. ; Step S35: Based on intuitionistic fuzzy set theory, comprehensively consider the membership degree of the samples. Non-membership degree and degree of hesitation An improved scoring function is used to calculate the reliability weight of each sample.
6. The method according to claim 5, characterized in that, In step S35, the improved scoring function is: (14), Wherein, the score of the i-th sample Combine the scores of all samples to obtain the sample fuzzy weight matrix. .
7. The method according to claim 6, characterized in that, Step S40 includes the following steps: Step S41: Load the pre-trained encoder and decoder from step S10, and freeze all the pre-trained encoder and decoder in step S40 so that they do not participate in gradient updates; at the same time, load the feature selection layer parameters constructed in step S30, set the weights of positive and negative features to the frozen state, and set only the gating parameters corresponding to the boundary features to trainable parameters. Step S42: Input data The weighted feature matrix is obtained by element-wise multiplication with the actual selection weight W. The weighted feature matrix is then sequentially input into the frozen encoder and decoder to obtain the current latent representation. and reconstructing data ; Step S43: Calculate the representation alignment loss. The constraint is that the current hidden representation does not deviate from the semantic space of the original hidden representation during pre-training: (15), in, This is the original hidden representation of the i-th sample obtained in step S10, the pre-training phase. This is the hidden representation obtained by passing the current weighted features through the same encoder; Step S44: Calculate the reconstruction error for each sample. And load the sample fuzzy weight matrix S obtained in step S30 to construct a fine-grained loss function. : (16); Step S45: Apply L1 regularization to the weights of the boundary domain features: (17); in, This represents the sparsity loss of the boundary domain; Indicates the number of boundary domain features; Step S46: Construct the total loss function for the first stage of feature selection. : (18); in, The hyperparameters representing the balancing loss term; Step S47: Calculate the total loss function using the backpropagation algorithm. Gradients to trainable parameters, and updates only the feature weights belonging to the boundary region in the selected layer. .
8. The method according to claim 7, characterized in that, Step S50 includes the following steps: Step S51: Extract the current gating parameters corresponding to the boundary domain features, and project the current gating parameters into the interval [0,1] through a truncation function to obtain the actual selection weights corresponding to the boundary domain features; Based on the optimal threshold obtained in step S20 An adaptive scaling factor is introduced to map the optimal threshold pair from the particle-sphere average membership space to the feature weight space: (19), in, This indicates the value of the adaptive scaling factor; This represents the mean of the feature weights in the boundary region; This represents the mean membership degree of the spheres corresponding to the boundary domain. According to the new threshold Dynamically transfer boundary domain features to update the partitioning results; Step S52: Retain the selection layer weights obtained from training in step S40 as initial values. Only the encoder parameters pre-trained in step S10 are loaded. During training, L1 regularization is applied to the negative domain of the selection layer and the encoder weights. The total loss function is... as follows: (20), in, Indicates the first Layer weights; This indicates regularization of the negative domain of the selection layer. This represents the gating parameter corresponding to the j-th feature during training; The hyperparameters representing the balancing loss term; Step S53: Update the encoder parameters and all weights of the feature selection layer together using the backpropagation algorithm.
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.