Cryo-ET sub-tomography image classification method for out-of-distribution detection
By combining three-dimensional discrete wavelet transform and Marshall distance external distribution detector, an adaptive classifier is designed, which solves the problem of processing external distribution data in Cryo-ET sub-tomography classification, improves the noise robustness and classification accuracy of the model, is suitable for small-scale data sets, and reduces data annotation costs.
Patent Information
- Application Number
- CN202510533434.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-26
- Publication Date
- 2025-08-05
AI Technical Summary
The existing Cryo-ET sub-tomography classification method cannot accurately process out-of-distributed data, has poor noise robustness, and relies on large-scale training sets, resulting in limited classification performance and high data labeling costs.
Using an encoder based on three-dimensional discrete wavelet transform and an external distribution detector for Marshall distance, combined with an adaptive classifier, a sub-tomography classification method for external distribution detection is designed. Through feature extraction and external distribution detectors, unknown categories are identified to adapt to data sets of different scales.
It improves the noise robustness and classification accuracy of the model, can effectively process small-scale data sets, reduces dependence on large-scale training sets, avoids misclassification, and improves the accuracy of three-dimensional reconstruction.
Smart Images

Figure CN120431390A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to cryo-electron tomography processing technology in bioinformatics, and in particular to a cryo-ET sub-tomogram classification method for out-of-distribution detection. Background Art
[0002] Cryo-electron tomography (cryo-ET) is an advanced technology capable of analyzing the three-dimensional structure of biological samples at nanometer-scale resolution. It has been widely used in fields such as cell biology, proteomics, and virology. However, due to the limitations of experimental equipment and reconstruction algorithms, the tomograms generated by cryo-ET are generally of low resolution, requiring the use of sub-tomogram averaging (STA) to improve image quality. Sub-tomogram classification is a key step, aiming to distinguish different conformational states or biological complexes, ensuring that the sub-tomograms used for averaging are highly consistent, thereby improving the final reconstruction accuracy.
[0003] The sub-tomogram classification task differs from traditional computer vision tasks in that its 3D image data contains a significant amount of noise and has an extremely low signal-to-noise ratio. This poses a greater challenge to accurately and efficiently extracting image features, and also makes manual data annotation extremely difficult and time-consuming. Therefore, in practical application scenarios, the size of the real dataset available for training is often much smaller than that of the simulated dataset. More importantly, existing sub-tomogram classification methods have failed to address the challenge of out-of-distribution data.
[0004] Existing techniques for classifying cryo-ET sub-tomograms with a small sample size suffer from numerous shortcomings, including an inability to accurately handle out-of-distribution data, poor robustness to noise, and reliance on large training sets. These issues limit the performance of existing sub-tomogram classification techniques. The following sections will specifically address these challenges.
[0005] (1) Unable to accurately handle out-of-distribution data: In practical application scenarios, structures in sub-tomograms often appear that have never appeared in the training phase. Existing technologies deal with this situation by forcibly classifying unknown structures into a known category. This causes the downstream classification task to align and average the wrong structures, making the alignment process difficult to converge and causing the averaged high-resolution structure to deviate from the true structure.
[0006] (2) Poor noise robustness: Due to the imaging technology limitations of cryo-electron tomography, the signal-to-noise ratio of the resulting tomography is very low, making it difficult to identify specific structures with the naked eye. Existing sub-tomogram classification technologies often require additional preprocessing to reduce noise when faced with high-noise sub-tomograms, but the classification performance is still limited.
[0007] (3) Dependence on large-scale training sets: Existing deep learning-based sub-fraction classification techniques rely on large-scale annotated training sets to achieve good classification performance. However, in application scenarios, annotation of real datasets is very difficult and time-consuming, so the scale of real datasets is often much smaller than that of simulated datasets. When predicting real data, models trained on small-scale training sets cannot accurately classify. Summary of the Invention
[0008] The purpose of the present invention is to provide a Cryo-ET sub-tomogram classification method for out-of-distribution detection to make up for the shortcomings of the existing technology.
[0009] The present invention, by combining the sub-fault image classification framework with out-of-distribution detection, will be able to distinguish between known categories (within the distribution) and unknown categories (out-of-distribution), and perform classification prediction on the in-distribution data to support accurate alignment, averaging and three-dimensional reconstruction. The present invention proposes a noise-resistant sub-fault classification method, which integrates an encoder based on three-dimensional discrete wavelet transform (3D-DWT) and an out-of-distribution detector based on Mahalanobis distance to robustly classify sub-fault data. The 3D-DWT encoder is designed specifically for extracting robust features of sub-fault data, which can effectively reduce the interference of high-frequency noise and improve the reliability of features. At the same time, the Mahalanobis distance out-of-distribution detector performs well in out-of-distribution detection of 3D sub-fault data due to its robust measurement characteristics, and can accurately identify out-of-distribution samples. In order to further adapt to data sets of different scales, the present invention also proposes an adaptive classifier for adjusting the inner product operation between the feature vector and the classifier weight, thereby improving classification accuracy and generalization ability.
[0010] To achieve the above object, the present invention adopts the following technical solutions:
[0011] A method for classifying cryo-ET sub-tomograms for out-of-distribution detection includes the following steps:
[0012] S1: Acquire cryo-electron tomography images and perform preprocessing;
[0013] S2: Design a classification model consisting of a 3D discrete wavelet transform-based encoder, a Mahalanobis distance-based out-of-distribution detector, and an adaptive classifier.
[0014] S3: Training the encoder and adaptive classifier based on 3D discrete wavelet transform;
[0015] S4: Use the trained encoder based on 3D discrete wavelet transform to extract features from the test data, input the extracted features into the out-of-distribution detector based on Mahalanobis distance, input the data divided into the distribution into the trained adaptive classifier for category prediction, and output the classification results.
[0016] Furthermore, in S1, the upstream particle positioning result is obtained by the cryo-electron tomography image, and then the center coordinates of the target structure are obtained. A sub-tomogram of 32*32*32 size is cut out from the cryo-electron tomography image according to the center coordinates, and a spherical mask with Gaussian boundary blur is performed on the sub-tomogram to shield redundant background information; during the training stage, the input sub-tomogram is rotated in a random direction to enable the model to learn rotation-invariant features.
[0017] Furthermore, in S2, the encoder based on three-dimensional discrete wavelet transform includes four wavelet blocks, each wavelet block includes: three-dimensional discrete wavelet transform 3D DWT, convolution, batch normalization (BatchNorm) and ReLU activation function.
[0018] Furthermore, the encoder's processing process is as follows: in the first iteration, the 3D DWT module first filters high-frequency noise and performs downsampling operations. Then, the convolution module performs convolution operations on the data. The data is then further processed by the BatchNorm and ReLU modules. In the second iteration, the 3D DWT, convolution, and BatchNorm operations are performed again. Finally, the resulting features are fused with the residual features through channel fusion and further optimized by the ReLU module.
[0019] Specifically, 3D DWT decomposes the input data into low-frequency and high-frequency components by performing one-dimensional wavelet transform along three dimensions respectively;
[0020] The discrete wavelet transform is expressed by the following formula:
[0021]
[0022] Formalize the DWT process as a matrix multiplication operation: in, and are all filter matrices with rows and m columns; they are of the following form:
[0023]
[0024] matrix and Each contains Row vector, where the j-th row vector is defined as and Each row contains m filtered values.
[0025] For 3D data where m H 、mW and m D Representing height, width, and depth respectively, a 3D discrete wavelet transform is performed by applying a 1D DWT along each dimension in sequence, starting with the second dimension (width), then the first dimension (height), and finally the third dimension (depth); the 3D DWT operation is as follows:
[0026]
[0027] Among them, T 1,3 Represents the transpose operation between the first and third dimensions in a 3D matrix; in the decomposed data, the subscripts represent the DWT filters applied along the first (height), second (width), and third (depth) dimensions, where l and h represent low-pass and high-pass filters, respectively; the low-frequency component x is retained. lll , and discard high-frequency components, thereby reducing high-frequency noise. lll It is then used as input to the next module.
[0028] Furthermore, the detection process of the out-of-distribution detector based on Mahalanobis distance is as follows:
[0029] First calculate the Gaussian distribution G of the feature Z and the training set c The Mahalanobis distance between:
[0030]
[0031] Where c∈{1, 2, ..., C} represents the category label. The class prototype μ of the cth category c The covariance matrix of (mean) and training samples is defined as follows:
[0032]
[0033] where N c represents the number of training samples with label c, and N represents the total number of training samples;
[0034] Based on the Mahalanobis distance of all classes, the confidence score is defined as follows:
[0035]
[0036] Then, a given threshold λ is used to determine whether a sub-tomogram is from within or outside the distribution:
[0037]
[0038] Furthermore, in S2, the adaptive classifier includes a fully connected layer and a softmax operation, and its weight is:
[0039] W={w1,...,w c,...,w C}
[0040] where w c represents the classifier weight of category label c;
[0041] In order to make the classifier adaptable to sub-tomogram datasets of different sizes, the classifier weight w c An adaptive inner product operation is introduced between and the feature vector z, so that it is applicable to both small-scale real data sets and large-scale simulated data sets; the adaptive classifier is expressed as:
[0042]
[0043] <w c ,z> cos =||w c ||||z||cos(θ)
[0044] <w c ,z> t-vMF =||w c ||||z||φ(cos(θ);τ)
[0045] in <w c ,z> cos and <w c ,z> t-vMF They represent the inner product based on cosine similarity and the inner product based on t-vMF similarity, respectively, and θ represents the feature vector z and the classifier weight w c The angle between them, φ(·; τ) represents the t-vMF similarity parameterized by τ.
[0046] Furthermore, in S3: After data preprocessing, the encoder based on the 3D discrete wavelet transform performs feature extraction on the input data x to obtain feature z = ε(x); feature z is then input into the adaptive classifier for category prediction; the predicted result is combined with the true category to calculate the cross-entropy loss; backpropagation is then performed to calculate the gradient and optimize the model parameters. During training, the encoder is optimized for 100 epochs using a training set with a batch size of 64, an SGD optimizer, a learning rate η of 0.1, a momentum of 0.9, and a weight decay of 0.0001.
[0047] Furthermore, in S4: the trained encoder is used to extract features from the test data, and the extracted features are then input into an out-of-distribution detector based on the Mahalanobis distance to calculate its out-of-distribution score. The out-of-distribution detection threshold λ is set to 95%, that is, the in-distribution data scores are sorted from large to small, and the in-distribution score at the 95th percentile is used as the threshold; test data with scores below this threshold are classified as out-of-distribution data, rejected for classification, and their path is reported. Test data with scores above this threshold are classified as in-distribution data and input into the adaptive classifier for category prediction.
[0048] Compared with the prior art, the present invention has at least the following beneficial effects:
[0049] (1) The unified framework proposed in this paper is applicable to all existing sub-tomogram classification methods, giving existing methods the ability to process sub-tomograms outside the distribution, avoiding forced misclassification of structures that do not belong to known categories during the classification stage.
[0050] (2) The present invention utilizes an encoder based on three-dimensional discrete wavelet transform to filter high-frequency noise while extracting features, thereby significantly enhancing the noise robustness of the model in an end-to-end processing manner.
[0051] (3) The present invention can effectively process data sets of different sizes, especially can achieve better classification performance on small-scale data sets, reducing the dependence on a large amount of annotated sub-fault data.
[0052] (4) The encoder designed by the present invention has a smaller number of parameters, and the training and inference time are greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The flowchart of the existing method is shown in FIG.
[0054] Figure 2 This is the classification framework diagram of the present invention.
[0055] Figure 3 This is a flow chart of the classification method of the present invention.
[0056] Figure 4 Diagram of the encoder module based on wavelet discrete transform.
[0057] Figure 5 This is a comparison chart of the visualization results of the present invention and the existing method t-SNE. DETAILED DESCRIPTION
[0058] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention is further described below in detail with reference to specific embodiments and the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments disclosed herein without inventive effort are intended to fall within the scope of protection of the present invention.
[0059] like Figure 1 As shown in Figure 2, existing methods can misclassify unknown classes into known classes. Based on these misclassified samples, the 3D reconstructions produced by the sub-tomogram alignment and averaging process deviate from the true structure, leading to misleading conclusions in subsequent structural and functional analyses.
[0060] Example 1
[0061] A cryo-ET sub-tomogram classification method for out-of-distribution detection is provided. The sub-tomogram classification framework proposed in this embodiment is a general method that can be widely applied to existing sub-tomogram classification methods. The method includes the following steps:
[0062] 1. First, establish a sub-tomogram classification framework for out-of-distribution detection
[0063] Figure 2 The workflow of the sub-tomogram classification framework for out-of-distribution detection is presented. First, the sub-tomogram is determined to be out-of-distribution (OOD) or in-distribution, and then classified. During the classification process, for a given sub-tomogram x, the feature extractor first extracts features from the three-dimensional data to generate a feature map. The out-of-distribution detector then analyzes the feature map to determine whether the input sub-tomogram x belongs to the in-distribution or OOD category. If x is determined to be OOD, it is directly rejected from the classification. Conversely, if x is classified as in-distribution, its feature map is passed to the classifier to predict the category label.
[0064] 2. Noise-Robust Subtomogram Classification Method for Out-of-Distribution Detection
[0065] This embodiment proposes a noise-robust sub-tomogram classification method for out-of-distribution detection. This method uses three-dimensional discrete wavelet transform to reduce high-frequency noise during feature extraction.
[0066] (1) Training and inference process
[0067] During the training phase ( Figure 3(a) First, the sub-tomogram data in the training dataset is encoded using a 3D DWT-based encoder. The extracted features are then passed to an adaptive classifier consisting of a fully connected layer and a softmax operation to predict the class label. Throughout the training process, a cross-entropy loss is used to optimize the classification model.
[0068] In the inference phase ( Figure 3 (b) First, a 3D discrete wavelet transform-based encoder is used to extract sub-tomogram features from the test dataset. Subsequently, an out-of-distribution detector based on the Mahalanobis distance determines whether the sub-tomogram belongs to the in-distribution or out-of-distribution category. Sub-tomograms classified as out-of-distribution are discarded; those classified as in-distribution are passed to the classifier for final category prediction.
[0069] (2) Encoder based on 3D discrete wavelet transform
[0070] This encoder uses discrete wavelet transform to filter out high-frequency noise, effectively improving the noise robustness of the method. This encoder replaces each stride-2 convolutional layer in the 3D Resnet18 with a wavelet module and a stride-1 convolutional layer.
[0071] Specifically, it first undergoes a 3D convolution with a convolution kernel of 3*3*3 and a stride of 1.
[0072] This is followed by max pooling with a stride of 2.
[0073] Next are 4 wavelet modules, each with 64, 128, 256, and 512 output channels.
[0074] The specific structure of each wavelet module is as follows Figure 4 shown.
[0075] The data is input into the 3D DWT and then the convolution kernel is 3x3x3, the number of output channels is 64, and the stride is 1; it is further processed by the BatchNorm and ReLU modules.
[0076] Then, 3D DWT, convolution, and BatchNorm operations are performed again. After channel-by-channel feature fusion with the input, it is further optimized through the ReLU module.
[0077] The wavelet module operates in two iterative phases. In each phase, the 3D DWT module first removes high-frequency noise and performs downsampling. Subsequently, the convolution module convolves the data. The data is then further processed by the BatchNorm and Reinforced Luminance (ReLU) modules. In the second iteration, the 3D DWT, convolution, and BatchNorm operations are repeated. Finally, the resulting features are fused with the residual features through channel fusion and further refined by the Reinforced Luminance (ReLU) module.
[0078] For the sub-tomogram classification task, the DWT is extended to a three-dimensional form, namely the 3D DWT, to effectively filter out high-frequency noise and reduce computational complexity. Specifically, the 3D DWT decomposes the input data into low-frequency and high-frequency components by performing a one-dimensional wavelet transform along each of the three dimensions. This process can be repeated recursively to construct a multi-level feature representation. The encoder based on the 3D DWT can more accurately extract structural information and enhance the model's robustness to noise.
[0079] The discrete wavelet transform is expressed by the following formula:
[0080]
[0081] Formalize the DWT process as a matrix multiplication operation: in, and are all filter matrices with rows and m columns. They are of the following form:
[0082]
[0083] matrix and Each contains Row vector, where the j-th row vector is defined as and Each row contains m filtered values.
[0084] For 3D data where m H 、m W and m D Representing height, width, and depth respectively, a 3D discrete wavelet transform is performed by applying a 1D DWT along each dimension in sequence. The process starts with the second dimension (width), then the first dimension (height), and finally the third dimension (depth).
[0085] The detailed 3D DWT operation is as follows:
[0086]
[0087] Among them, T 1,3 Represents the transpose operation between the first and third dimensions in a 3D matrix. In the decomposed data, the subscripts represent the DWT filters applied along the first (height), second (width), and third (depth) dimensions, where l and h represent low-pass and high-pass filters, respectively. The low-frequency components xlll are retained and the high-frequency components are discarded, thereby reducing high-frequency noise. lll It is then used as input to the next module.
[0088] (3) Out-of-distribution detector based on Mahalanobis distance
[0089] In the inference process, given the test data x, a 3D DWT-based encoder is used to extract its features z = ε(x), and an out-of-distribution detector using Mahalanobis distance is proposed for out-of-distribution detection, as shown in Figure 3 (b) This out-of-distribution detector based on Mahalanobis distance captures the intrinsic correlation between features by integrating covariance, providing a more reliable distance metric, which is especially suitable for high-dimensional data analysis and out-of-distribution detection.
[0090] In the out-of-distribution detection process, we first calculate the Gaussian distribution G of the feature z and the training set c The Mahalanobis distance between:
[0091]
[0092] where c∈{1, 2,…, C} represents the category label.
[0093] The class prototype μ of class c c The covariance matrix of (mean) and training samples is defined as follows:
[0094]
[0095] where N c represents the number of training samples with label c, and N represents the total number of training samples.
[0096] Based on the Mahalanobis distance of all classes, the confidence score is defined as follows:
[0097]
[0098] Then, a given threshold λ is used to determine whether a sub-tomogram is from within or outside the distribution:
[0099]
[0100] (4) Adaptive sub-tomogram classifier
[0101] In order to solve the overfitting problem on smaller real datasets and achieve better classification performance while taking into account the performance on larger simulated datasets, an adaptive sub-tomogram classifier is proposed to handle sub-tomogram datasets of different sizes. The proposed sub-tomogram classifier consists of a fully connected layer with weights:
[0102] W={w1,...,w c ,...,w C}
[0103] where w c represents the classifier weight for category label c.
[0104] In order to make the classifier adaptable to sub-tomogram datasets of different sizes, the classifier weight w c An adaptive inner product operation is introduced between and the feature vector z, making it applicable to both small-scale real data sets and large-scale simulated data sets. The adaptive classifier can be expressed as:
[0105]
[0106] <w c ,z> cos =||w c ||||z||cos(θ)
[0107] <w c ,z> t-vMF =||w c ||||z||φ(cos(θ);τ)
[0108] in <w c ,z> cos and <w c ,z> t-vMF They represent the inner product based on cosine similarity and the inner product based on t-vMF similarity, respectively, and θ represents the feature vector z and the classifier weight w c The angle between them, φ(·; τ) represents the t-vMF similarity parameterized by τ. Classifiers based on cosine similarity perform well on large-scale datasets, while t-vMF similarity is more suitable for small-scale datasets with high intra-class variance.
[0109] Example 2:
[0110] This embodiment verifies the robustness of the present invention through specific experiments, and evaluates the performance of the sub-tomogram classification method with out-of-distribution detection using the following three indicators:
[0111] FPR95: The false positive rate for out-of-distribution samples when the true positive rate for in-distribution samples is 95%;
[0112] AUROC: The ability of the model to distinguish between positive and negative samples is evaluated by calculating the area under the receiver operating characteristic curve (ROC);
[0113] ACC: multi-classification accuracy.
[0114] In order to evaluate the proposed method, the present invention (OOD) was compared with other state-of-the-art methods, and the results are shown in Table 1. FPR95 and AUROC are used as evaluation indicators for out-of-distribution detection. Lower FPR95 and higher AUROC indicate stronger out-of-distribution detection capabilities. The present invention achieved smaller FPR95 and higher AUROC than other methods on all datasets. For example, the FPR95 of CFN on the "SHREC19&SHREC21" dataset is 55.26%, and the AUROC of RB3D on the same dataset is 87.40%. The present invention achieved an FPR95 of 0 and an AUROC of 99.99%. The experimental results in Table 1 show that the present invention outperforms other methods in both out-of-distribution detection and classification performance.
[0115] Table 1 Comparative test results
[0116]
[0117] In order to further evaluate the feature modeling and out-of-distribution detection capabilities of the present invention, the comparison of the present invention with other methods in terms of t-SNE visualization and score distribution is shown. Figure 5 As shown in the t-SNE visualization, the out-of-distribution features of the present invention are compactly distributed and well separated from the in-distribution features. For example, on the "SHREC21 & SHREC19" dataset, the t-SNE visualization of the present invention clearly shows the boundary between out-of-distribution and in-distribution features, and the out-of-distribution features are very compact. In contrast, the out-of-distribution features of CFN, RB3D, and Soft LMCCL overlap with the in-distribution features. These visualization results clearly demonstrate the effectiveness of the present invention in feature modeling and out-of-distribution detection.
[0118] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects disclosed in the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for classifying cryo-ET sub-tomograms for out-of-distribution detection, characterized in that: The steps include: S1: Acquire cryo-electron tomography images and perform preprocessing; S2: Design a classification model consisting of a 3D discrete wavelet transform-based encoder, a Mahalanobis distance-based out-of-distribution detector, and an adaptive classifier. S3: Training the encoder and adaptive classifier based on 3D discrete wavelet transform; S4: Use the trained encoder based on 3D discrete wavelet transform to extract features from the test data, input the extracted features into the out-of-distribution detector based on Mahalanobis distance, input the data divided into the distribution into the trained adaptive classifier for category prediction, and output the classification results.
2. The method for classifying Cryo-ET sub-tomograms according to claim 1, wherein: In S1, the upstream particle positioning result is obtained by the cryo-electron tomography image, and then the center coordinates of the target structure are obtained. According to the center coordinates, a sub-tomogram of the required size is cut out from the cryo-electron tomography image, and a spherical mask with Gaussian boundary blur is performed on the sub-tomogram.
3. The method for classifying cryo-ET sub-tomograms according to claim 1, wherein: In S2, the encoder based on three-dimensional discrete wavelet transform includes four wavelet modules, and each wavelet module includes: a three-dimensional discrete wavelet transform, a convolution layer, a batch normalization layer and a ReLU activation function.
4. The method for classifying Cryo-ET sub-tomograms according to claim 1, wherein: The processing process of the encoder based on three-dimensional discrete wavelet transform is as follows: in the first iteration, 3D DWT is first used to filter high-frequency noise and perform downsampling operations; then, the convolution layer performs convolution operations on the data; then, the data is further processed by BatchNorm and ReLU modules; in the second iteration, 3D DWT, convolution and BatchNorm operations are performed again; finally, the resulting features are fused with residual features through channel fusion and optimized by ReLU modules.
5. The method for classifying Cryo-ET sub-tomograms according to claim 4, wherein: 3D DWT decomposes the input data into low-frequency and high-frequency components by performing one-dimensional wavelet transform along three dimensions respectively. where m H 、m W and m D Representing height, width, and depth respectively, the three-dimensional discrete wavelet transform is performed by applying the 1D DWT along each dimension in sequence, starting with the second dimension, then the first dimension, and finally the third dimension; the 3D DWT operation is as follows: Among them, T 1,3 represents the transpose operation between the first and third dimensions in a 3D matrix; in the decomposed data, the subscripts represent the DWT filters applied along the first, second, and third dimensions, where l and h represent low-pass and high-pass filters, respectively; the low-frequency component x is retained. lll , and discard the high frequency components, x lll It is then used as input to the next module.
6. The method for classifying Cryo-ET sub-tomograms according to claim 1, wherein: The detection process of the out-of-distribution detector based on Mahalanobis distance is as follows: First calculate the Gaussian distribution G of the feature z and the training set c The Mahalanobis distance between: Where c∈{1, 2, ..., C} represents the category label; the class prototype mean μ of the cth category c The covariance matrix of the training samples is defined as follows: where N c represents the number of training samples with label c, and N represents the total number of training samples; Based on the Mahalanobis distance of all classes, the confidence score is defined as follows: Then, a given threshold λ is used to determine whether a sub-tomogram is from within or outside the distribution: 。 7. The method for classifying cryo-ET sub-tomograms according to claim 1, wherein: In S2, the adaptive classifier includes a fully connected layer and a softmax operation, and its weight is: W={w1,...,w c ,...,w C } where w c represents the classifier weight of category label c; The adaptive classifier is expressed as: <In c ,z> cos =||in c ||||z||cos(θ) <In c ,With) t-vMF =‖w c ‖||z||φ(cos(θ);τ) in <w c ,z> cos and <w c ,z> t-vMF They represent the inner product based on cosine similarity and the inner product based on t-vMF similarity, respectively, and θ represents the feature vector z and the classifier weight w c The angle between them, φ(·; τ) represents the t-vMF similarity parameterized by τ.
8. The method for classifying Cryo-ET sub-tomograms according to claim 1, wherein: In S3: after data preprocessing, the encoder based on three-dimensional discrete wavelet transform performs feature extraction on the input data x to obtain feature z = ε(x); then the feature z is input into the adaptive classifier to perform category prediction; the predicted result is combined with the true category to calculate the cross entropy loss; then back propagation is performed to calculate the gradient and optimize the model parameters.
9. The method for classifying cryo-ET sub-tomograms according to claim 1, wherein: In S4: using the trained encoder to extract features from the test data, then inputting the extracted features into an out-of-distribution detector based on Mahalanobis distance to calculate its out-of-distribution score; The test data with scores lower than the detection threshold are classified as out-of-distribution data, rejected for classification and their paths are reported. The test data with scores higher than this threshold are classified as in-distribution data and input into the adaptive classifier for category prediction.