Robust adaptive fault-tolerant classification method and system for mass spectrometry features of cathinone compounds based on deep neural network

CN122369652APending Publication Date: 2026-07-10HENAN POLICE ACAD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN POLICE ACAD
Filing Date
2026-04-16
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies for mass spectrometry identification of cathinone compounds suffer from insufficient classification accuracy, poor robustness to fault disturbances, and insufficient engineering feasibility, making it difficult to meet the needs of actual drug seizure, forensic identification, and rapid on-site detection.

Method used

A robust adaptive fault-tolerant method based on deep neural networks is adopted. The mass spectrometry statistical feature vector is preprocessed by dimension-wise robust adaptive fault-tolerant standardization, outlier clipping, and principal component whitening to remove redundancy. Combined with deep encoder, multi-expert branch and prototype branch, an adaptive fusion mechanism is constructed to dynamically adjust the weights and achieve stable classification.

Benefits of technology

It significantly improves the stable representation ability under fault disturbance scenarios, alleviates the problems of overfitting and class imbalance in small sample training, improves the ability to distinguish highly similar subclasses within the cathinone family, and has high classification accuracy and engineering reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122369652A_ABST
    Figure CN122369652A_ABST
Patent Text Reader

Abstract

This invention discloses a robust adaptive fault-tolerant mass spectrometry feature classification method and system for cathinone compounds based on deep neural networks. It aims to address the problem of decreased recognition accuracy of cathinone compound mass spectrometry features under conditions of small sample size, strong correlation, unbalanced class distribution, and fault perturbation. The method constructs a robust preprocessing and feature mapping mechanism, improving feature stability through median-interquartile range standardization, outlier clipping, and PCA whitening to remove redundancy. Combining a multi-branch discriminator, prototype distance constraints, and an adaptive fusion mechanism, it dynamically allocates weights between clean and fault-perturbed scenarios based on fault intensity, achieving stable discrimination under perturbation. Simulation results show that the method maintains stable accuracy under fault perturbation scenarios such as random feature masking, additive noise, and system drift. It can effectively distinguish fine-grained categories within cathinone compounds, has high engineering feasibility, and can be used for intelligent screening and rapid forensic identification of new psychoactive substances such as cathinones.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new psychoactive substance identification technology, and in particular to a robust adaptive fault-tolerant mass spectrometry feature classification method and system for cathinone compounds based on deep neural networks. Background Technology

[0002] New psychoactive substances (NPS) are characterized by rapid structural evolution, diverse types, and strong ability to evade regulation, posing a serious challenge to global drug control, forensic identification, and clinical toxicology surveillance. Among them, synthetic cathinones possess central nervous system stimulant effects similar to amphetamines and exhibit rapid molecular structural evolution, making them a key category of NPS for control. According to monitoring data from the EU's early warning system and the UN Office on Drugs and Crime, synthetic cathinones remain a significant source of emerging NPS, with their market seizures and public health risks continuing to rise. Therefore, developing rapid, accurate, and scalable intelligent identification methods for cathinone compounds has become an important research direction in the fields of drug control technology and forensic science.

[0003] Mass spectrometry, with its high sensitivity, high throughput, and excellent structural characterization capabilities, has become the mainstream technique for the detection and identification of new psychoactive substances. However, its direct application to the identification of synthetic cathinones still faces significant technical bottlenecks: on the one hand, the mass spectra of cathinone homologues, site isomers, and structurally similar derivatives differ only slightly, making it easy to misidentify them under conditions of high similarity when using traditional spectral library search methods; on the other hand, new cathinones are constantly emerging, and their standards and reference spectral libraries are updated in a lagging manner, resulting in significant timeliness defects in the screening and confirmation of unknown substances.

[0004] Current research on the analysis and detection of cathinones mainly focuses on improving isomer resolution and expanding the types of applicable samples. This includes using captured ion mobility mass spectrometry (CMA) and electron activation dissociation techniques to improve structural differentiation, combining chromatography-mass spectrometry (GC-MS) to separate easily confused isomers, and using Raman spectroscopy, voltammetry, and chemometrics for rapid screening. While these methods have made some progress in isomer resolution and detection of complex samples, they generally suffer from high dependence on high-end specialized instruments, reliance on standard references, and susceptibility to fluctuations in experimental environment and operating conditions, making it difficult to achieve universal and large-scale application.

[0005] With the development of artificial intelligence technology, mass spectrometry-based intelligent identification methods using machine learning and deep learning have gradually become an important research direction for screening new psychoactive substances. Existing technologies have enabled the discovery of emerging substances based on large-scale mass spectrometry data, retrospective screening using high-resolution mass spectrometry combined with retention time prediction, deep learning-assisted mass spectrometry prediction, inference of unknown substance structures, and screening of new psychoactive substance categories based on models such as random forests, support vector machines, and neural networks. Meanwhile, metric learning and Siamese networks have also begun to be applied to the small-sample mass spectrometry identification of substances such as fentanyl, providing a technological foundation for the intelligent identification of new psychoactive substances.

[0006] However, there are still significant shortcomings when applying existing intelligent identification methods directly to the mass spectrometry feature classification of cathinone compounds: First, most existing models are built based on pure spectra and ideal experimental conditions, without fully considering common fault disturbances such as feature loss, additive noise, and system drift in actual detection, resulting in poor stability in cross-device acquisition, complex matrix samples, and on-site detection scenarios; Second, existing studies mostly focus on the distinction between new psychoactive substances or the coarse classification of cathinones and non-cathinones, with insufficient research on fine-grained identification of highly similar subclasses within the cathinone family; Third, although structured mass spectrometry statistical features for engineering applications have advantages such as simple deployment and low computational cost, they also have problems such as limited feature dimensions, strong collinearity, small sample size, and unbalanced class distribution, which can easily lead to overfitting of deep models, class collapse, and decreased robustness.

[0007] Currently, there is still a lack of a unified intelligent identification framework for mass spectrometry identification of cathinone compounds that combines high classification accuracy, robustness to fault disturbances, and engineering feasibility, making it difficult to meet the application needs of actual drug seizure, forensic identification, and rapid on-site detection. Summary of the Invention

[0008] To address the aforementioned technical challenges and overcome the limitations of existing mass spectrometry technologies for identifying cathinone compounds under conditions of small sample size, strong correlation, uneven class distribution, and fault disturbances.

[0009] To address the aforementioned technical problems, the present invention provides a technical solution: a robust adaptive fault-tolerant mass spectrometry feature classification method for cathinone compounds based on deep neural networks, characterized by comprising the following steps:

[0010] S1. Obtain the mass spectrometry statistical feature vector of the sample to be tested, and perform robust preprocessing on the feature vector to obtain the preprocessed feature vector; the robust preprocessing includes: dimension-wise robust adaptive fault-tolerant standardization, outlier clipping, and linear redundancy removal based on principal component whitening.

[0011] S2. Input the preprocessed feature vector into the depth encoder to extract the deep embedding feature vector;

[0012] S3. Input the deep embedding feature vector into the constructed multi-expert branch and prototype branch respectively. The multi-expert branch outputs the class probability vector. The prototype branch outputs the prototype branch probability by constructing class prototypes and calculating the squared distance between the deep embedding feature vector and the prototype vector.

[0013] S4. Calculate the fusion output probability under the clean scenario and the fusion output probability under the robust scenario respectively. The fusion output of the clean scenario is a weighted combination of the outputs of each expert branch, and the fusion output of the robust scenario is a weighted combination after adjusting the weights for the fault disturbance scenario.

[0014] S5. Construct an adaptive fusion mechanism, calculate the fault intensity estimate based on the entropy index of deeply embedded feature vectors, the divergence degree between multiple expert branches and the prototype outlier degree, and generate adaptive gating coefficients based on the fault intensity estimate.

[0015] S6. Based on the adaptive gating coefficient, the fusion weights of the clean scene and the robust scene are dynamically allocated through the gating function. The fusion outputs of the clean scene and the robust scene are weighted and fused to obtain the final classification probability vector, and the sample category is determined accordingly.

[0016] S7. Construct the overall loss function and train and optimize the parameters of the deep encoder, multi-expert branch, prototype branch and adaptive fusion mechanism to achieve stable classification of cathinone mass spectrometry features.

[0017] Furthermore, the dimension-wise robust adaptive fault-tolerant normalization described in step S1 is achieved based on the median and interquartile range of the training set statistics, and the specific formula is as follows:

[0018] (1)

[0019] in, Let i be the robust feature vector of the i-th sample after robust standardization. For the j-th dimension of the actual observed mass spectrometry statistical characteristics of the i-th sample, Let the j-th dimension feature be the median of the j-th dimension feature on the training set. Let the interquartile range of the j-th dimension feature on the training set satisfy... , j=1,2,…,d.

[0020] Furthermore, the outlier clipping described in step S1 is achieved through a clipping function, the specific formula of which is:

[0021] (2)

[0022] Where c represents the clipping threshold, c>0, and clip(•) is the element-by-element clipping function. For robustly normalized feature vectors, This is the feature vector after clipping.

[0023] Furthermore, the deep encoder described in step S2 is a multi-layer fully connected structure that satisfies the bounded assumption of inter-layer spectral norm: there exists a constant such that the inter-layer spectral norm ≤ this constant; and the activation function is the Lipschitz function. The output of the deep encoder is a deep embedding feature vector, specifically formulated as follows:

[0024] (3)

[0025] (4)

[0026] in, Indicates the total number of encoder layers. Indicates the first Layer weight matrix, Indicates the first Layer bias variables, This represents the activation function. Let be the preprocessed feature vector of the i-th sample. For the first The deep embedding feature vector of the layer.

[0027] Furthermore, the class prototype mentioned in step S3 is defined as the mean of the deep embedding feature vectors of all samples in that class, specifically using the following formula:

[0028] (5)

[0029] in, Let k be the set of indices for the k-th class of samples. Let k be the number of samples in class k. Let be the deep embedding feature vector of the i-th sample. This is the class prototype of the k-th class.

[0030] Furthermore, the clean scene fusion output and the robust scene fusion output mentioned in step S4 are calculated using the following formulas:

[0031] (6)

[0032] (7)

[0033] in, This represents the pre-defined and learnable expert weights in a clean scenario. This represents pre-defined and learnable expert weights in robust scenarios. The total number of branches, For the first The output probability vector of each branch.

[0034] Furthermore, the fault intensity estimate mentioned in step S5 is calculated by combining the entropy index, expert disagreement degree, and system prototype outlier degree, and the specific formula is as follows:

[0035] (8)

[0036] in, As an entropy index, To account for the degree of disagreement among experts, The outlier of the system prototype. These are the weighting coefficients.

[0037] Furthermore, the gating function mentioned in step S6 is a learnable smooth approximation function, and the specific formula is as follows:

[0038] (9)

[0039] in, , These are bias terms, learnable parameters. These are the learnable weight coefficients.

[0040] Furthermore, the overall loss function in step S7 includes classification loss, consistency robustness fault tolerance loss, prototype discrimination loss, gated supervised adaptive loss, and parameter regularization term, with the specific formula as follows:

[0041] (10)

[0042] in, Indicates classification loss, Indicates consistency robustness fault tolerance loss, Indicates prototype discrimination loss, Indicates gated supervisory adaptive loss, Indicates the parameter regularization term, This is the loss weighting coefficient.

[0043] To solve the above-mentioned technical problems, the present invention provides a technical solution as follows: a system based on the robust adaptive fault-tolerant cathinone compound mass spectrometry feature classification method described above, characterized in that...

[0044] The robust preprocessing module is used to perform robust normalization, amplitude limiting and pruning, and principal component whitening to remove redundancy on the input mass spectrometry statistical feature vector, so as to obtain the preprocessed feature vector.

[0045] The deep encoder module is used to extract the deep embedding representation of the preprocessed features to obtain the deep embedding feature vector.

[0046] The multi-expert and prototype classification modules are used to output class probability vectors based on deep embedding feature vectors. The prototype classification module outputs prototype branch probabilities by constructing class prototypes and calculating the squared distance between deep embedding feature vectors and prototype vectors.

[0047] The dual-scenario fusion output module is used to calculate the fusion output probability under the clean scenario and the fusion output probability under the robust scenario respectively. The clean scenario fusion output is a weighted combination of the outputs of each expert branch, and the robust scenario fusion output is a weighted combination after adjusting the weights for the fault disturbance scenario.

[0048] The fusion and gating module calculates the fault intensity estimate based on the entropy of the deeply embedded feature vector, the divergence degree between multiple expert branches, and the prototype outlier degree to generate adaptive gating coefficients. Based on the adaptive gating coefficients, the fusion weights of clean scenes and robust scenes are dynamically allocated through the gating function. The fusion outputs of the clean scenes and robust scenes are then weighted and fused to obtain the final classification result.

[0049] The model training module is used to optimize the trainable parameters of the system based on the overall loss function.

[0050] The beneficial effects of this invention are as follows:

[0051] 1. The robust preprocessing and feature mapping mechanism constructed in this invention specifically overcomes the problems of strong collinearity, poor local separability, and sensitivity to outliers and scale in structured mass spectrometry statistical features. Through median-interquartile range standardization, outlier clipping, and principal component whitening to remove redundancy, it significantly suppresses the problem of excessive amplification of feature dimensions under perturbation environment, and significantly improves the stable representation ability of input features in fault perturbation scenario (fault perturbation scenario is also known as robust scenario), laying the foundation for subsequent accurate classification.

[0052] 2. This invention designs an adaptive weight allocation and adaptive fusion mechanism for clean and fault-prone scenarios. It can evaluate the fault intensity in real time based on entropy index, expert disagreement degree and prototype outlier degree, and dynamically adjust the classification decision weights. It can maintain stable discrimination ability under various perturbation conditions such as random feature masking, additive noise and system drift.

[0053] 3. This invention employs a multi-branch deep / machine learning discriminator and a prototype distance constraint mechanism, which to some extent alleviates the problems of overfitting in small sample training and class collapse caused by unbalanced class distribution. It breaks through the limitations of existing technologies that only focus on coarse classification of NPS major categories and are difficult to achieve fine-grained identification of highly similar subclasses within the cathinone family. It effectively improves the ability to distinguish structurally similar cathinone homologues and isomers in major categories.

[0054] 4. This invention establishes theoretical analysis and theorem proof from three aspects: upper bound of preprocessing perturbation propagation, sufficient condition for maintaining classification results, and stability of prototype nearest neighbor discrimination. It realizes the organic integration of robust fault tolerance theory and deep neural network classification mechanism. Compared with the pure data-driven black box model, it has a more rigorous theoretical basis and higher engineering reliability.

[0055] 5. This invention is based on a structured mass spectrometry statistical feature model, which has low computational cost and is easy to deploy. It takes into account classification accuracy, robustness and practicality. It can be directly used for rapid identification in court and intelligent on-site screening of cathinone-type new psychoactive substances. It can also be extended to the field of intelligent mass spectrometry identification of other new drugs and complex chemical samples, providing a brand-new technical solution with both theoretical significance and engineering application value for drug investigation and court toxicology analysis.

[0056] To make the above and other objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only ten of the drawings in this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0058] Figure 1 This is an overall flowchart of the method of the present invention;

[0059] Figure 2 A diagram showing the confusion matrix analysis on the test set;

[0060] Figure 3 To train and validate the loss evolution analysis graph;

[0061] Figure 4 This is a plot showing the spatial distribution of embeddings on the test set.

[0062] Figure 5 A heatmap analysis of category probabilities on the test set;

[0063] Figure 6 A comparative analysis of the robustness of different algorithms in classifying faults with random features masked.

[0064] Figure 7 A comparative analysis of the robustness of different algorithms in classification accuracy under additive noise faults;

[0065] Figure 8 A comparative analysis chart of the comprehensive performance indicators of different algorithms under clean and faulty disturbance scenarios.

[0066] Figure 9 Box plots comparing the stability of different algorithms under repeated random partitioning conditions;

[0067] Figure 10 This is a graph showing the correlation and redundancy relationships among the statistical features of structured mass spectrometry. Detailed Implementation

[0068] Embodiments of the invention will now be described in detail with reference to the accompanying drawings. While some embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the invention. It should be understood that the drawings and embodiments of the invention are for illustrative purposes only and are not intended to limit the scope of protection of the invention.

[0069] Example

[0070] like Figure 1-10 As shown, a robust adaptive fault-tolerant mass spectrometry feature classification method for cathinone compounds based on deep neural networks is disclosed, including the following steps:

[0071] S1. Obtain the mass spectrometry statistical feature vector of the sample to be tested, and perform robust preprocessing on the feature vector to obtain the preprocessed feature vector; the robust preprocessing includes: dimension-wise robust adaptive fault-tolerant standardization, outlier clipping, and linear redundancy removal based on principal component whitening.

[0072] S2. Input the preprocessed feature vector into the depth encoder to extract the deep embedding feature vector;

[0073] S3. Input the deep embedding feature vector into the constructed multi-expert branch and prototype branch respectively. The multi-expert branch outputs the class probability vector. The prototype branch outputs the prototype branch probability by constructing class prototypes and calculating the squared distance between the deep embedding feature vector and the prototype vector.

[0074] S4. Calculate the fusion output probability under the clean scenario and the fusion output probability under the robust scenario respectively. The fusion output of the clean scenario is a weighted combination of the outputs of each expert branch, and the fusion output of the robust scenario is a weighted combination after adjusting the weights for the fault disturbance scenario.

[0075] S5. Construct an adaptive fusion mechanism, calculate the fault intensity estimate based on the entropy index of deeply embedded feature vectors, the divergence degree between multiple expert branches and the prototype outlier degree, and generate adaptive gating coefficients based on the fault intensity estimate.

[0076] S6. Based on the adaptive gating coefficient, the fusion weights of the clean scene and the robust scene are dynamically allocated through the gating function. The fusion outputs of the clean scene and the robust scene are weighted and fused to obtain the final classification probability vector, and the sample category is determined accordingly.

[0077] S7. Construct the overall loss function and train and optimize the parameters of the deep encoder, multi-expert branch, prototype branch and adaptive fusion mechanism to achieve stable classification of cathinone mass spectrometry features.

[0078] Furthermore, in step S1, the sample set to be tested is assumed to be as shown in equation (1):

[0079] (1)

[0080] In equation (1), Represents the total number of samples. Indicates the first Mass spectrometric statistical feature vectors of each sample Represents the feature dimension. Indicates category label, This indicates the total number of categories.

[0081] Let the ideal fault-free characteristics of each sample be denoted as . The actual observed characteristics are The objective of this invention is to learn the mapping function shown in equation (2) under the conditions of feature masking, unknown noise contamination, and drift perturbation:

[0082] (2)

[0083] In equation (2), express The probability simplex of dimension 1 gives the final predicted category as shown in equation (3):

[0084] (3)

[0085] In actual testing, mass spectrometry statistical characteristics are affected by random feature loss, noise contamination, system drift, and acquisition bias. To uniformly address these factors, this invention defines the observation characteristics as Equation (4):

[0086] (4)

[0087] In equation (4), Represents the feature availability matrix. ,when Time indicates the first Dimensional features intact; when When this happens, it means that the dimension is completely hidden. Indicates additive random noise. This indicates a systematic drift or bias.

[0088] Equation (4) can be rewritten as equation (5):

[0089] (5)

[0090] In equation (5), the total disturbance term is shown in equation (6):

[0091] (6)

[0092] Next, we establish provable robust adaptive fault tolerance, assuming that there exists a constant. This makes equation (7) true:

[0093] (7)

[0094] Equation (7) does not require the fault to be a specific distribution, but only requires the disturbance energy to be bounded.

[0095] Therefore, the subsequent theory of this invention can simultaneously cover clean, mask fault, noise fault and drift fault scenarios, wherein mask fault, noise fault and drift fault scenarios are defined as robust scenarios.

[0096] Because the input features of this invention exhibit significant collinearity, scale differences, and outlier sensitivity, directly feeding them into a deep network can easily lead to excessive amplification of certain dimensions under perturbation. Therefore, a robust preprocessing mapping is first constructed as shown in equation (8):

[0097] (8)

[0098] This invention defines the first The training set statistics for the dimensional features are: This represents the median. Indicates the interquartile range; simultaneously set The dimension-wise robust adaptive fault-tolerant normalization is defined as shown in equation (9):

[0099] (9)

[0100] Next, the amplitude limiting function (10) is used to suppress the abnormal effects.

[0101] (10)

[0102] In equation (10), Indicates the threshold value. This indicates element-by-element clipping.

[0103] Furthermore, considering the possibility of significant group correlations in the statistical characteristics of the data, this invention employs a principal component whitening matrix. Perform linear redundancy removal as shown in equation (11):

[0104] (11)

[0105] Introducing bounded linear mappings The preprocessed output can be obtained as shown in equation (12):

[0106] (12)

[0107] Combining equation (12), the overall preprocessing operator of the system is shown in equation (13):

[0108] (13).

[0109] Furthermore, in step S2, conventional deep learning training strategies such as Dropout regularization, early stopping mechanism, and mini-batch gradient descent can be used during the deep encoder training process.

[0110] The deep encoder is a multi-layer fully connected structure. In actual training, spectral normalization can be used to constrain the spectral norm of the weight matrix to satisfy the assumption that the inter-layer spectral norm is bounded: there exists a constant such that the inter-layer spectral norm ≤ this constant; and the activation function is the Lipschitz function. The output of the deep encoder is a deep embedding feature vector; specifically:

[0111] The depth encoder is defined in this invention as shown in equation (14):

[0112] (14)

[0113] In equation (14), Indicates encoder parameters, The embedding dimension.

[0114] If the encoder contains If the layer is defined, then equation (15) holds true:

[0115] (15)

[0116] Equation (16) is also given:

[0117] (16)

[0118] Combined formulas (15) and (16), Indicates the first Layer weight matrix, Indicates the bias variable. This represents the activation function.

[0119] Assume the interlayer spectral norm is bounded: assume there exists a constant. This makes equation (17) true.

[0120] (17)

[0121] Simultaneous activation function For Lipschitz, the encoder thus has respect to the input. The Lipschitz constant satisfies equation (18):

[0122] (18).

[0123] Furthermore, in step S3, the system has a total of There are several expert branches, and each expert outputs a class probability vector as shown in equation (19):

[0124] (19)

[0125] Combined with formula (19), expert systems can include types such as statistical learning branches, ensemble learning branches, and deep classification branches.

[0126] To enhance geometric separability between classes, this invention will construct class prototypes in the embedding space.

[0127] Let the first The set of class sample indices is shown in equation (20):

[0128] (20)

[0129] Then the first The class prototype is defined as shown in equation (21):

[0130] (twenty one)

[0131] The present invention defines the squared distance from the sample to each prototype as shown in equation (22):

[0132] (twenty two)

[0133] The output probability of the prototype branch is shown in equation (23):

[0134] (twenty three)

[0135] The temperature setting is 1 by default, which is used to adjust the smoothness of the probability distribution.

[0136] Furthermore, in step S4, the prototype branch is defined to provide a stable geometric reference in the face of unknown fault disturbances or boundary uncertain samples; the clean scene fusion output and the robust scene (mask fault, noise fault, and drift fault scenes) fusion output are calculated respectively by the following formula:

[0137] (twenty four)

[0138] (25)

[0139] in, This represents the pre-defined and learnable expert weights in a clean scenario. This represents the pre-defined and learnable expert weights in a robust scenario, satisfying the non-negative and normalized constraint, i.e., the sum of the weights is 1. The total number of branches, For the first The output probability vector of each branch.

[0140] Furthermore, in step S5, the entropy index is defined as shown in equation (26):

[0141] (26)

[0142] The expert disagreement degree is defined as shown in equation (27):

[0143] (27)

[0144] Combining equation (27), equation (28) holds true:

[0145] (28)

[0146] The outlier of the system prototype is defined as shown in equation (29):

[0147] (29)

[0148] The fault intensity estimate combines the entropy index (26), the expert divergence index (28), and the system prototype outlier calculation formula (29), and the specific formula is as follows:

[0149] (30)

[0150] in, As an entropy index, To account for the degree of disagreement among experts, The outlier of the system prototype. These are the weighting coefficients.

[0151] Furthermore, the gating function mentioned in step S6 is a learnable smooth approximation function, and the specific formula is as follows:

[0152] (31)

[0153] in, , These are bias terms, learnable parameters. These are the learnable weight coefficients.

[0154] Combining equations (30) and (31), the final output of the system is shown in equation (32):

[0155] (32)

[0156] Equation (32) shows that when the sample is closer to the clean state, Smaller sample sizes indicate greater system trust in clean optimal fusion. However, when samples exhibit greater uncertainty, expert disagreement, or prototype outliers, As the size increases, the system will automatically transition to robust integration.

[0157] To further illustrate that equations (31) and (32) are not merely empirical designs but have optimization significance, this invention considers defining a proxy objective for a single sample as shown in equation (33):

[0158] (33)

[0159] In equation (33), This represents the fusion loss of the clean state. Indicates robust fusion loss, This indicates the gating regularity strength.

[0160] Differentiating equation (33) yields equation (34):

[0161] (34)

[0162] Combining equation (34), the unconstrained optimum can be obtained as shown in equation (35):

[0163] (35)

[0164] Project equation (35) onto the interval Equation (36) can be obtained:

[0165] (36)

[0166] Equation (36) shows that if the sample is closer to the fault disturbance scenario, the optimal gating is more biased towards the robust branch; if the robust fusion loss is smaller ( If the gating is better, the gating will move further toward the robust direction; if the clean fusion is better, the gating will be adjusted in the opposite direction. Therefore, equation (31) can be regarded as a learnable and smooth approximation of the optimal gating law of equation (36).

[0167] Furthermore, in step S7, in order to simultaneously improve clean accuracy, robust fault tolerance, embedding discrimination performance and gating adaptability, an overall loss function is set.

[0168] The overall loss function includes classification loss, consistency robustness fault tolerance loss, prototype discrimination loss, gated supervised adaptive loss, and parameter regularization term, with the specific formula as follows:

[0169] (37)

[0170] in, Indicates classification loss, Indicates consistency robustness fault tolerance loss, Indicates prototype discrimination loss, Indicates gated supervisory adaptive loss, Indicates the parameter regularization term, This is the loss weighting coefficient.

[0171] Classification loss function As shown in equation (38):

[0172] (38)

[0173] Consistent robust fault-tolerant loss function As shown in equation (39):

[0174] (39)

[0175] In equation (39), express Failure modes:

[0176] Prototype discriminant loss function As shown in equation (40):

[0177] (40)

[0178] In equation (40), Indicates the prototype interval parameter;

[0179] Gated supervised adaptive loss function As shown in equation (41):

[0180] (41)

[0181] In equation (41), The gated reference value is obtained based on equation (36):

[0182] Parameter regularization terms The definition is shown in equation (42):

[0183] (42)

[0184] In equation (42), This represents all trainable parameters.

[0185] Based on the above description, this invention uses the following three theorems to theoretically prove the rationality of the proposed algorithm, and provides proofs for the theorems.

[0186] Theorem 1: Upper bound of perturbation propagation in robust fault-tolerant preprocessing maps

[0187] like And equation (43) holds true:

[0188] (43)

[0189] In equation (43), express The upper bound of the spectral norm.

[0190] Then for any Then equation (44) holds:

[0191] (44)

[0192] In equation (44), Indicates and The corresponding other input vector.

[0193] The proof of Theorem 1 is as follows: First, the input is given. The standardized vector after median centering and interquartile range scaling is shown in equation (45):

[0194] (45)

[0195] The standardized feature definition after amplitude limiting is shown in equation (46):

[0196] (46)

[0197] Combining equations (44), (45), and (46), equation (47) holds true:

[0198] (47)

[0199] Then equation (48) holds:

[0200] (48)

[0201] Take both sides of equation (48) The norm can then be expressed as equation (49):

[0202] (49)

[0203] Due to the scalar clip function It is Lipschitz, therefore for each component All of the following equations hold true:

[0204] (50)

[0205] Squaring both sides of equation (50) and summing the results, we get equation (51):

[0206] (51)

[0207] On the other hand, since equation (52) holds:

[0208] (52)

[0209] Then equation (53) holds:

[0210] (53)

[0211] because If the matrix is ​​diagonal, then equation (54) holds:

[0212] (54)

[0213] Combining equation (54), equation (55) holds true:

[0214] (55)

[0215] Substitute equation (55) into equation (49) and combine... Equation (44) can be obtained; proof complete.

[0216] Theorem 2: Sufficient condition for fusion classification results to remain unchanged

[0217] First, let's define the final output. about Satisfying equation (56):

[0218] (56)

[0219] In equation (57), This indicates that the final classifier output is related to the input. The Lipschitz constant.

[0220] The classification margin is defined as shown in equation (57):

[0221] (57)

[0222] If there is a disturbance, input Equation (58) holds true:

[0223] (58)

[0224] In equation (58), This represents the upper bound of the local perturbation in the input space after preprocessing.

[0225] And equation (59) holds true:

[0226] (59)

[0227] Then equation (60) holds true:

[0228] (60)

[0229] The proof of Theorem 2 is as follows: From equation (56), we can obtain that equation (61) holds:

[0230] (61)

[0231] Because for any vector Equation (62) holds true for all of them:

[0232] (62)

[0233] Therefore for any Then equation (63) holds:

[0234] (63)

[0235] Therefore, for the true category Then equation (64) holds:

[0236] (64)

[0237] For any competitive category Then equation (65) holds:

[0238] (65)

[0239] Take all here The maximum value can be obtained from equation (66):

[0240] (66)

[0241] Subtracting equation (66) from equation (64) yields equation (67):

[0242] (67)

[0243] After simplification, we obtain equation (68):

[0244] (68)

[0245] If equation (59) holds, then the right side of equation (68) is strictly greater than 0, thus yielding equation (69):

[0246] (69)

[0247] Further, equation (61) holds; proof complete.

[0248] Corollary of Theorem 2: If the original input satisfies the fault bounded condition Combining the preprocessing perturbation bound of Theorem 1 (44), as long as equation (70) holds, the performance of the data classification results remains unchanged under fault perturbation:

[0249] (70)

[0250] Theorem 3: Prototype nearest neighbor preservation condition.

[0251] This invention defines a sample The embedding in the system prototype space is shown in equation (71):

[0252] (71)

[0253] Regarding the true category The system prototype margin is defined as shown in equation (72):

[0254] (72)

[0255] If the perturbation is embedded as shown in equation (73):

[0256] (73)

[0257] And equation (74) holds true:

[0258] (74)

[0259] The optimal prototype class of the samples before and after the perturbation is both .

[0260] The proof process is as follows: Definition of this invention (75):

[0261] (75)

[0262] Combining equation (73), we can expand to obtain equation (76):

[0263] (76)

[0264] Subtracting equation (76) from equation (77) yields equation (77):

[0265] (77)

[0266] Combining equations (75) and (77), we can obtain equation (78):

[0267] (78)

[0268] From Cauchy's inequality, we can obtain equation (79):

[0269] (79)

[0270] Furthermore, equation (80) holds:

[0271] (80)

[0272] Combining equation (72), equation (81) holds true:

[0273] (81)

[0274] Therefore, equation (80) can be rewritten as equation (82):

[0275] (82)

[0276] Further combining equation (74), we obtain equation (83):

[0277] (83)

[0278] If equation (74) holds, then the right side of the inequality (83) is strictly greater than 0. Therefore, for any They all Therefore, the optimal prototype after the perturbation is still valid. The proof is complete.

[0279] To solve the above-mentioned technical problems, the present invention provides a technical solution as follows: a system based on the robust adaptive fault-tolerant cathinone compound mass spectrometry feature classification method described above, characterized in that...

[0280] The robust preprocessing module is used to perform robust normalization, amplitude limiting and pruning, and principal component whitening to remove redundancy on the input mass spectrometry statistical feature vector, so as to obtain the preprocessed feature vector.

[0281] The deep encoder module is used to extract the deep embedding representation of the preprocessed features to obtain the deep embedding feature vector.

[0282] The multi-expert and prototype classification modules are used to output class probability vectors based on deep embedding feature vectors. The prototype classification module outputs prototype branch probabilities by constructing class prototypes and calculating the squared distance between deep embedding feature vectors and prototype vectors.

[0283] The dual-scenario fusion output module is used to calculate the fusion output probability under the clean scenario and the fusion output probability under the robust scenario respectively. The clean scenario fusion output is a weighted combination of the outputs of each expert branch, and the robust scenario fusion output is a weighted combination after adjusting the weights for the fault disturbance scenario.

[0284] The fusion and gating module calculates the fault intensity estimate based on the entropy of the deeply embedded feature vector, the divergence degree between multiple expert branches, and the prototype outlier degree, generates adaptive gating coefficients, and weights the fusion output of clean and robust scenarios to obtain the final classification result.

[0285] The model training module is used to optimize the trainable parameters of the system based on the overall loss function.

[0286] The following is a simulation analysis of this application.

[0287] All simulations in this invention were performed in the MATLAB R2024a environment, using a CPU / GPU running mode, with a fixed random seed to ensure experimental reproducibility. The data used were 13-dimensional cathinone-like structured mass spectrometry statistical features, including categories such as Deuterated, Halogenated, MethylenedioxyLike, Other, and PyrrolidineLike. Samples were stratified and randomly divided into training, validation, and test sets in a 6:2:2 ratio. The input was first robustly normalized based on the median and interquartile range, and then a limiting threshold was applied. To suppress the influence of outliers, PCA whitening is used to remove redundancy from strongly correlated features. The cumulative variance explained by the principal components is no less than 95%, and the effective dimension generally does not exceed 10. The DNN branch uses a two-layer fully connected structure with 64 and 32 hidden nodes respectively, and Dropout is set to 0.2. The Adam optimizer is used during training, with an initial learning rate of 1×10⁻⁶. -3 The batch size is 16, the maximum number of training epochs is 80, the early stopping tolerance epochs is 10, and the L2 regularization coefficient is 1×10.-4 The prototype branch uses the mean of various embeddings as the initial prototype, with the temperature parameter set to 1. The final classification output is a combination of the clean fusion branch and the robust fusion branch through an adaptive gating mechanism. The initial value of the gating function is set as follows: Regarding fault perturbation, the random feature masking fault rate was set to [0, 0.55], and the standard deviation of additive Gaussian noise was also set to [0, 0.55]. A slight drift perturbation with an amplitude of 0.05 was introduced during the training phase to simulate statistical extraction bias. Comparison algorithms included SVM, Random Forest, and ordinary MLP, with all models sharing the same data partitioning, preprocessing methods, and fault injection conditions. Performance evaluation metrics included accuracy and Macro-F1 in clean scenarios, average classification accuracy in fault-perturbation scenarios, and stability statistics under repeated random partitioning conditions. The number of repeated partitioning experiments was set to 20 to ensure a comprehensive evaluation of the model's overall accuracy, fault robustness, and sensitivity to random partitioning.

[0288] Based on the above initial conditions, the present invention obtains the following: Figures 2 to 10 The simulation diagram.

[0289] from Figure 2As can be seen, the model exhibits significant clustering of intermediate classes on the test set, with 21 correctly classified samples out of a total of 39 samples, corresponding to an overall recognition accuracy of approximately 53.85%. Among these, the Halogenated class performed relatively well, correctly identifying 8 out of 11 samples, with a recall of approximately 72.73%. The MethylenedioxyLike class had 10 samples, with 5 correctly classified, resulting in a recall of 50.00%; the Other class had 16 samples, with 8 correctly identified, also with a recall of 50.00%. However, the Deuterated and PyrrolidineLike classes, both with few samples, were not correctly identified, with a recall of 0%, indicating that the current model's ability to represent marginal and very few sample classes remains insufficient. From the misclassification distribution, the model mainly classifies the samples into three categories: Halogenated, MethylenedioxyLike, and Other. The confusion between Other→Halogenated (5 samples), MethylenedioxyLike→Halogenated (3 samples), and Other→MethylenedioxyLike (3 samples) is particularly prominent, indicating strong local overlap and boundary coupling among these categories in the current feature space. Overall, this figure shows that the proposed model has a certain discriminative ability for the main categories, but its ability to distinguish between a small number of sample categories is insufficient, and the adjacency boundaries between Halogenated, MethylenedioxyLike, and Other categories still need further enhancement.

[0290] from Figure 3 It can be seen that the basic MLP branch has a relatively fast convergence speed in the early stages of training, with the training loss continuously decreasing from about 0.415 to around 0.10, indicating that the model's ability to fit the training samples is constantly improving. The validation loss, after fluctuating in stages from an initial value of about 0.345, generally decreases, reaching its lowest value of about 0.18 around the 23rd round. This shows that in the first 20 rounds, the model can improve the performance of both the training and validation sets simultaneously, demonstrating good effective learning ability. After the 23rd round, the training loss continues to decrease, while the validation loss slowly recovers from its lowest point and stabilizes in the range of [0.19, 0.21], indicating that the model begins to show a certain degree of overfitting trend, that is, the fit to the training set continues to improve, but the generalization ability does not improve synchronously. From the distance between the two curves, the gap between the training loss and the validation loss in the later stages remains at approximately [0.08, 0.1], further indicating that the model has some generalization error, but the overall magnitude is still within an acceptable range. In summary, the figure shows that the base learner of the proposed model has a relatively stable optimization process and a relatively clear optimal stopping interval.

[0291] from Figure 4 It can be seen that after deep neural network encoding, samples of different categories have formed a certain degree of structured distribution in the two-dimensional embedding space, but overall they still exhibit the characteristics of local separability and global overlap. Specifically, samples of the Other class are mainly distributed in the left region, especially in... , The relatively concentrated cluster structure within the range indicates that the model has a certain clustering ability for this class. The Halogenated class is mainly distributed in the middle-right region, and two obvious outliers appear after high-dimensional mapping, located at (1.7, 3.8) and (1.8, 3.9), indicating strong heterogeneity within this class, with some samples far from the main cluster. The MethylenedioxyLike class is generally distributed in the middle-right region, with a large lateral span, and even has a discrete point far from the main cluster at about (4.1, -0.2), indicating insufficient intra-class compactness of this class in the current embedding space. The Deuterated and PyrrolidineLike classes have very few samples, showing only isolated point distributions, making it difficult to form stable clusters, which is consistent with their low recognition rate in the confusion matrix. From the perspective of inter-class separation relationships, the Halogenated, MethylenedioxyLike, and Other classes have the following characteristics: , The regions show significant overlap, indicating that while the deep representation has extracted some discriminative information, it is still insufficient in separating the boundaries between neighboring categories. Overall, this figure verifies that the proposed model has preliminary embedding discriminative capabilities and can preserve category structure in low-dimensional space, but the representation strength for categories with few samples and the tight separation between easily confused categories still need further improvement.

[0292] from Figure 5As can be seen, after the test samples are sorted according to the true category, the posterior probability of the class output by the model exhibits obvious segmented response characteristics, indicating that the proposed method has been able to learn certain class structure information in the probability space. Specifically, the Halogenated row generally shows a high response, with probabilities reaching around [0.7, 0.85] in many places, indicating that the model has a strong recognition bias for this class. The MethylenedioxyLike row shows continuous bright areas, and the peak probability is also close to 0.80, indicating that this class of samples has good discriminativeness in local intervals. The Other row has a significantly enhanced overall brightness, especially with the posterior probability reaching above 0.80 on some samples, reflecting that the model has relatively high confidence in recognizing this class. The Deuterated and PyrrolidineLike rows generally have low response values ​​on most test samples, mostly in the range of [0.05, 0.15], with only a slight increase in a very few sample positions. This indicates that the model has not yet been able to build stable and clear high-confidence probability channels for these two classes, which is consistent with the phenomenon of low recall rates for the two classes in the confusion matrix. From the perspective of category competition, the three rows of Halogenated, MethylenedioxyLike, and Other exhibit alternating high responses across multiple adjacent sample intervals, indicating that the model does not form an absolute dominant judgment among these easily confused categories, but rather is closer to a locally dominant, mutually competitive decision-making pattern. Overall, this probability heatmap shows that the proposed model can form a relatively continuous posterior response structure for the main categories.

[0293] from Figure 6It can be seen that under the condition of random feature masking faults, the classification accuracy of each algorithm generally decreases with the increase of the masking rate, but the magnitude of the decrease and the stability differ significantly. The RAFT-DNN method proposed in this invention performs best in the low, medium and high fault intensity range: when the fault rate is 0, the accuracy of RAFT-DNN is approximately 0.539, the accuracy of SVM is approximately 0.411, the accuracy of Random Forest is approximately 0.513, and the accuracy of MLP is approximately 0.487. When the fault rate is in the range of [0.05, 0.1], the accuracy of RAFT-DNN is approximately 0.52, showing strong initial fault resistance. When the fault rate increases to 0.15, the accuracy of RAFT-DNN decreases to approximately 0.473. Subsequently, when the fault rate is 0.20, the accuracy of RAFT-DNN is approximately 0.501, indicating that its adaptive fault tolerance mechanism has a certain compensatory effect on moderate fault disturbances. However, when the failure rate continues to increase to the range of [0.3, 0.4], the accuracy of RAFT-DNN is approximately 0.441 and 0.454. In contrast, the RandomForest curve is generally flatter, decreasing from approximately 0.513 to 0.450, indicating better stability but limited peak performance. MLP performs moderately well at low failure rates, but declines slowly overall, with a final accuracy of approximately 0.440. SVM performs the weakest at low failure rates, but fluctuates significantly in the medium-to-high failure rate range. The accuracy briefly rises to approximately 0.477 at a failure rate of 0.35, showing some randomness rather than a sustained stable advantage. In summary, RAFT-DNN has the best or near-best robust fault-tolerant classification ability in low, medium, and high feature-masked failure perturbation scenarios. Furthermore, due to the highly similar structures of cathinone homologues, limited feature dimensions, and small sample size, the theoretical difficulty of distinguishing 5-class classification problems is extremely high. The 53.9% accuracy in this experiment is significantly better than the comparative methods, demonstrating the effectiveness of the method.

[0294] from Figure 7 It can be seen that, under additive noise fault conditions, the classification accuracy of each algorithm increases with the noise standard deviation. While the overall performance decreases slowly with increasing noise levels, different methods exhibit significant differences in noise immunity. RAFT-DNN maintains optimal or near-optimal performance across the entire noise range. At that time, the accuracy of RAFT-DNN was approximately 0.539, significantly higher than SVM (approximately 0.410), Random Forest (approximately 0.512), and MLP (approximately 0.487). Within the specified range, the accuracy of RAFT-DNN consistently remained within a high-level plateau of [0.539, 0.545], exhibiting minimal fluctuations, indicating its strong suppression capability against low to moderate intensity random noise. or At that time, the accuracy of RAFT-DNN was approximately between [0.505, 0.512]. At that time, the accuracy of RAFT-DNN was approximately 0.487, with an overall reduction of approximately 0.052, indicating that the proposed model has good noise resistance and stability. In contrast, MLP performs better in the low-noise range. The initial accuracy was approximately 0.528, but it gradually decreased as noise increased. The accuracy dropped to approximately 0.445, a decrease of about 0.042. Although the trend was relatively stable, its performance in the later stages was significantly inferior to RAFT-DNN. The accuracy of Random Forest mostly remained in the range of [0.48, 0.51], showing moderate and relatively stable overall performance, but it never surpassed RAFT-DNN. SVM performed the weakest across the entire range, especially under low noise conditions, with an accuracy of only [0.405, 0.432], significantly lower than RAFT-DNN overall. In summary, RAFT-DNN exhibits the strongest overall robustness and the most stable performance retention under additive noise perturbation scenarios, indicating that it can more effectively maintain the discrimination boundary and classification confidence under random measurement errors and statistical fluctuations.

[0295] from Figure 8 As can be seen, the four algorithms exhibit significant differences in the four metrics: Clean-Acc, Fault-Acc, CleanMacroF1, and FaultMacroF1. Overall, RAFT-DNN performs best in terms of accuracy, with a Clean-Acc of approximately 0.539, the highest among the four methods, exceeding SVM, Random Forest, and MLP by approximately 0.128, 0.026, and 0.050, respectively. Its Fault-Acc is approximately 0.504, also ranking first, indicating that the proposed method has strong overall recognition capabilities in both clean and fault-prone scenarios. However, in terms of the macro-average F1 score, RAFT-DNN does not excel, with both CleanMacroF1 and FaultMacroF1 scores of approximately 0.312, significantly lower than MLP's 0.494 and 0.447, and only roughly on par with Random Forest. This indicates that while the proposed method achieves optimal overall accuracy, its ability to balance the recognition of different categories, especially those with fewer samples, remains insufficient, exhibiting a high overall number of correct classifications and an unbalanced category distribution. In summary, the RAFT-DNN method demonstrates significant advantages in overall classification accuracy and recognition performance under fault conditions. However, its low macro-average F1 score suggests that the model is currently better suited to improving the overall hit rate of the main class or easily identifiable categories, while there is still room for further optimization in terms of fewer samples and category balance.

[0296] from Figure 9It can be seen that, under repeated random partitioning conditions, the classification accuracy distributions of each algorithm show significant differences. Overall, MLP has the most compact bins, with a median of approximately 0.525, an interquartile range roughly between [0.512, 0.563], and a whisker range of approximately [0.488, 0.589], indicating that its results exhibit the least fluctuation and the best stability in repeated experiments. RandomForest has a slightly higher median of approximately 0.551, but both its bin size and whisker length are significantly increased, with an interquartile range of approximately [0.513, 0.642] and an overall variation range of approximately [0.333, 0.694]. This indicates that while it can achieve high accuracy under partial partitioning, it is more sensitive to data partitioning and lacks stability. The median of RAFT-DNN is approximately [0.525, 0.53], close to that of MLP, with an interquartile range of approximately [0.488, 0.59] and an overall range of approximately [0.36, 0.718]. This indicates that the method is competitive in average performance and has a high upper bound, but some fluctuation still exists under different random partitions. SVM has a relatively low median of approximately 0.512, with an interquartile range of approximately [0.437, 0.59] and a range of approximately [0.36, 0.615]. This indicates that it lacks both a clear upper bound for high performance and the concentrated stability of MLP. In summary, MLP has the strongest stability under repeated partitions. Random Forest and RAFT-DNN can achieve higher accuracy under partial partitions, but with larger variances. SVM's overall performance is moderately weak. RAFT-DNN combines high upper bound performance with acceptable median accuracy.

[0297] from Figure 10 The feature correlation matrix shown reveals that the 13-dimensional mass spectrometry statistical features constructed in this invention exhibit significant grouping correlations, strong local coupling, and partial negative correlations. This indicates that the original inputs are not independent but possess a certain degree of redundancy and complementarity. Specifically, Number of Peaks, Maximum m / z, and m / zMean... m / z Standard Deviation They generally show a strong positive correlation, with correlation coefficients mostly falling within the range of [0.6, 0.9], where m / z Mean With m / z Standard Deviation The correlation between these two mass statistics is the strongest, approaching 1, indicating that they exhibit highly synchronized changes in the current data. Meanwhile, AverageIntensity... ,Standard Deviation of Intensity A clear, strongly correlated sub-block is also formed between Intensity and Density, with correlation coefficients roughly ranging from [0.4 to 0.8], indicating a significant common variation pattern within intensity-type features. In contrast, Peak-to-Peak... Mode shows weak correlations with most features, with most values ​​close to 0, indicating that it provides relatively independent supplementary discriminative information. The figure also shows several significant negative correlations, such as between Intensity Density and Number of Peaks, and m / z Mean. m / z Standard Deviation A strong negative correlation was observed between them, reaching a minimum of approximately [-0.8, -0.9], indicating that the unit normalized density characteristic may decrease as the number of peaks or the mass number statistic increases; furthermore, Standard Deviation of Intensity The data also shows a moderate negative correlation with some m / z statistics. Overall, this figure fully illustrates that the input features of this invention have a clear correlation structure: on the one hand, strongly correlated features help improve the model's main discriminant ability. On the other hand, strong feature collinearity may also lead to unstable boundaries, parameter sensitivity, or even redundant accumulation in traditional models. Therefore, it is reasonable and necessary to adopt robust normalization, PCA whitening, and deep embedding learning. This also supports the design motivation of the robust adaptive fault-tolerant deep neural network method proposed in this invention from a data perspective.

[0298] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A robust adaptive fault-tolerant mass spectrometry feature classification method for cathinone compounds based on deep neural networks, characterized in that, Includes the following steps: S1. Obtain the mass spectrometry statistical feature vector of the sample to be tested, and perform robust preprocessing on the feature vector to obtain the preprocessed feature vector; The robust preprocessing includes: dimension-wise robust adaptive fault-tolerant standardization, outlier clipping, and linear redundancy removal based on principal component whitening. S2. Input the preprocessed feature vector into the depth encoder to extract the deep embedding feature vector; S3. Input the deep embedding feature vector into the constructed multi-expert branch and prototype branch respectively. The multi-expert branch outputs the class probability vector. The prototype branch outputs the prototype branch probability by constructing class prototypes and calculating the squared distance between the deep embedding feature vector and the prototype vector. S4. Calculate the fusion output probability under the clean scenario and the fusion output probability under the robust scenario respectively. The fusion output of the clean scenario is a weighted combination of the outputs of each expert branch, and the fusion output of the robust scenario is a weighted combination after adjusting the weights for the fault disturbance scenario. S5. Construct an adaptive fusion mechanism, calculate the fault intensity estimate based on the entropy index of deeply embedded feature vectors, the divergence degree between multiple expert branches and the prototype outlier degree, and generate adaptive gating coefficients based on the fault intensity estimate. S6. Based on the adaptive gating coefficient, the fusion weights of the clean scene and the robust scene are dynamically allocated through the gating function. The fusion outputs of the clean scene and the robust scene are weighted and fused to obtain the final classification probability vector, and the sample category is determined accordingly. S7. Construct the overall loss function, train and optimize the parameters of the deep encoder, multi-expert branch, prototype branch and adaptive fusion mechanism to achieve stable classification of mass spectrometry features of cathinone compounds.

2. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The dimension-wise robust adaptive fault-tolerant normalization described in step S1 is achieved based on the median and interquartile range of the training set statistics, and the specific formula is as follows: (1) in, Let i be the robust feature vector of the i-th sample after robust standardization. For the j-th dimension of the actual observed mass spectrometry statistical characteristics of the i-th sample, Let the j-th dimension feature be the median of the j-th dimension feature on the training set. Let the interquartile range of the j-th dimension feature on the training set satisfy... , j=1,2,…,d.

3. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The outlier clipping described in step S1 is achieved through a clipping function, the specific formula of which is: (2) Where c represents the clipping threshold, c>0, and clip(•) is the element-by-element clipping function. For robustly normalized feature vectors, This is the feature vector after clipping.

4. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The deep encoder described in step S2 is a multi-layer fully connected structure that satisfies the bounded inter-layer spectral norm assumption: there exists a constant such that the inter-layer spectral norm ≤ this constant; and the activation function is the Lipschitz function. The output of the deep encoder is a deep embedding feature vector, specifically formulated as follows: (3) (4) in, Indicates the total number of encoder layers. Indicates the first Layer weight matrix, Indicates the first Layer bias variables, This represents the activation function. Let be the preprocessed feature vector of the i-th sample. For the first The deep embedding feature vector of the layer.

5. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The class prototype mentioned in step S3 is defined as the mean of the deep embedding feature vectors of all samples in that class, and the specific formula is as follows: (5) in, Let k be the set of indices for the k-th class of samples. Let k be the number of samples in class k. Let be the deep embedding feature vector of the i-th sample. This is the class prototype of the k-th class.

6. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The clean scene fusion output and robust scene fusion output mentioned in step S4 are calculated using the following formulas: (6) (7) in, This represents the pre-defined and learnable expert weights in a clean scenario. This represents pre-defined and learnable expert weights for robust scenarios. The total number of branches, For the first The output probability vector of each branch.

7. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The fault intensity estimate mentioned in step S5 is calculated by combining the entropy index, expert disagreement degree, and system prototype outlier degree. The specific formula is as follows: (8) in, As an entropy index, To account for the degree of disagreement among experts, The outlier of the system prototype. These are the weighting coefficients.

8. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The gate function mentioned in step S6 is a learnable smooth approximation function, and the specific formula is as follows: (9) in, , These are bias terms, learnable parameters. These are the learnable weight coefficients.

9. The robust adaptive fault-tolerant cathinone mass spectrometry feature classification method based on deep neural networks according to claim 1, characterized in that, The overall loss function in step S7 includes classification loss, consistency robustness fault tolerance loss, prototype discrimination loss, gated supervised adaptive loss, and parameter regularization term, with the specific formula as follows: (10) in, Indicates classification loss, Indicates consistency robustness fault tolerance loss, Indicates prototype discrimination loss, Indicates gated supervision adaptive loss, Indicates the parameter regularization term. This is the loss weighting coefficient.

10. The system of the robust adaptive fault-tolerant cathinone compound mass spectrometry feature classification method based on deep neural networks according to any one of claims 1-9, characterized in that, The robust preprocessing module is used to perform robust normalization, amplitude limiting and pruning, and principal component whitening to remove redundancy on the input mass spectrometry statistical feature vector, so as to obtain the preprocessed feature vector. The deep encoder module is used to extract the deep embedding representation of the preprocessed features to obtain the deep embedding feature vector. The multi-expert and prototype classification modules are used to output class probability vectors based on deep embedding feature vectors. The prototype classification module outputs prototype branch probabilities by constructing class prototypes and calculating the squared distance between deep embedding feature vectors and prototype vectors. The dual-scenario fusion output module is used to calculate the fusion output probability under the clean scenario and the fusion output probability under the robust scenario respectively. The clean scenario fusion output is a weighted combination of the outputs of each expert branch, and the robust scenario fusion output is a weighted combination after adjusting the weights for the fault disturbance scenario. The fusion and gating module calculates the fault intensity estimate based on the entropy of the deeply embedded feature vector, the divergence degree between multiple expert branches, and the prototype outlier degree to generate adaptive gating coefficients. Based on the adaptive gating coefficients, the fusion weights of clean scenes and robust scenes are dynamically allocated through the gating function. The fusion outputs of the clean scenes and robust scenes are then weighted and fused to obtain the final classification result. The model training module is used to optimize the trainable parameters of the system based on the overall loss function.