Chemical exchange saturation transfer imaging abnormality detection method
By constructing the Mamba-AE autoencoder model based on the Mamba network, the problem of interference signals in CEST MRI lesion detection was solved, achieving high-precision and robust lesion detection and improving clinical diagnostic efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-03-20
AI Technical Summary
In chemical exchange saturation transfer magnetic resonance imaging, lesion detection is easily affected by interference signals, and traditional models lack long-distance modeling capabilities, resulting in insufficient detection accuracy and robustness.
The Mamba-AE autoencoder model based on the Mamba network is adopted. By constructing a joint loss function for the feature space and data space, and combining multiple Mamba modules, long-range dependencies in the spectrum are captured, signal patterns of normal tissue are learned, and lesions are detected by an anomaly scoring calculation mechanism.
It achieves high-precision and robust lesion detection, significantly improving the efficiency and accuracy of clinical diagnosis, and enabling early identification and localization of disease lesions.
Smart Images

Figure CN119919371B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of medical magnetic resonance image analysis, and particularly relates to a chemical exchange saturation transfer image abnormality detection method. BACKGROUND
[0002] Chemical exchange saturation transfer (CEST) magnetic resonance imaging (MRI) is an emerging molecular imaging technique that can specifically detect low concentrations of endogenous metabolites such as glucose, glutamate, creatinine, etc., and use them as non-invasive biomarkers. Due to this feature, numerous studies have shown that CEST imaging has the ability to detect a variety of diseases, including tumors, Alzheimer's disease and stroke, so the technology has broad clinical application prospects. However, the CEST scanning process is easily affected by various companion signals that are not sensitive to lesions, such as direct water saturation (DS) effect and magnetization transfer effect (MT). These effects will dilute the key diagnostic information and severely weaken the contrast of the lesion tissue in the image, posing a challenge to clinical diagnosis.
[0003] It is very difficult to manually detect lesions from the disturbed image, so it is a feasible means to use computer-aided diagnosis technology for detection. In recent years, deep neural networks have become a popular medical image analysis tool that can help researchers extract pathological information from mixed signals. Although supervised learning methods perform relatively stably in disease detection and segmentation tasks, this method relies on high-quality labeled data, and the collection and labeling of clinical pathological images is a challenging task, and it is also difficult to summarize different abnormal manifestations of various diseases when building a dataset. Therefore, compared with supervised methods, unsupervised anomaly detection, which does not require labeled pathological data, has received more and more attention. This method aims to identify abnormal information by learning the patterns of normal samples, and usually uses a generative model to reconstruct the input image, and determines whether the data is abnormal according to the difference between the original input and the reconstructed data, i.e. the size of the reconstruction error. Generally speaking, lesion data will significantly exhibit higher reconstruction error than normal data. However, traditional methods are not suitable for lesion detection in CEST images, the main reason being that each pixel in the image is composed of long-distance frequency spectra, which contain the pathological response signals of multiple metabolites, so the detection model needs to have the ability to model the frequency spectrum sequence. However, traditional convolutional neural networks (CNNs) are limited by their receptive fields and lack the ability to model long distances; recurrent neural networks (RNNs) and long short-term memory networks (LSTMs) have difficulties in providing a comprehensive description of the sequence context through point-by-point sequence learning; and the Transformer model is limited in performance due to the quadratic computational complexity of its self-attention mechanism. Therefore, it is of high value to develop an efficient and high-precision lesion detection method for the characteristics of CEST MRI. SUMMARY
[0004] The application aims to provide a chemical exchange saturation transfer image anomaly detection method to solve the problem of high computational complexity in the prior art and improve detection accuracy and robustness.
[0005] To achieve the above object, the application adopts the technical scheme of a chemical exchange saturation transfer image anomaly detection method, which is implemented according to the following steps:
[0006] Step 1: Preprocess the CEST data obtained by scanning to obtain a set of spectral data of all pixels, and finally divide the spectral data into a training set and a test set.
[0007] Step 2: Construct an autoencoder model Mamba-AE based on the Mamba network.
[0008] Step 3: Construct a joint loss function of feature space and data space for Mamba-AE training.
[0009] Step 4: Input the training set into Mamba-AE and train Mamba-AE using the joint loss function.
[0010] Step 5: Construct an anomaly score calculation mechanism to judge the possibility of the pixel belonging to a lesion.
[0011] Step 6: Input the divided test set into the trained Mamba-AE, output the anomaly score of each pixel based on the anomaly score calculation mechanism, and return all anomaly scores to each corresponding pixel to form an anomaly image as the lesion detection result.
[0012] As a preferred technical scheme of the application, step 1 is specifically:
[0013] Step 1.1: Normalize the original CEST data using the signal before the application of the radio frequency saturation pulse in the CEST process to map it to the interval (0, 1).
[0014] Step 1.2: Convert the data set to a two-dimensional data format of sample size x image length x image width x spectral frequency.
[0015] Step 1.3: Divide the part of the converted data from the normal sample into the training set and the rest into the test set.
[0016] As a preferred technical scheme of the application, step 2 is specifically:
[0017] Step 2.1, constructing a Mamba module as the main unit of the Mamba-AE model, which extracts features by establishing a mapping between sequence data;
[0018] Step 2.2, constructing multiple encoder layers and decoder layers, each of which is composed of multiple Mamba modules of different scales.
[0019] As a preferred technical solution of the present application, the step 2.1 is specifically:
[0020] Step 2.1.1, constructing a state space model (SSM) with a selection mechanism for the state evolution of the spectral sequence at multiple time steps, predicting the hidden state of the next time step according to the input, and finally outputting the predicted sequence, which can be described as a constant differential state equation; a selection mechanism is constructed to convert the parameters of the equation into a function of the input through a linear layer;
[0021] Step 2.1.2, constructing a Mamba module, which includes an RMS error normalization layer, a double-branch path structure, and a residual connection structure; one of the double-branch paths includes a linear projection layer, a convolution layer, an activation function layer, and the above-mentioned SSM layer in sequence, and the other path includes a linear projection layer and an activation function layer, the outputs of the two paths are fused by point-by-point multiplication, and the fused features are input through the residual connection.
[0022] As a preferred technical solution of the present application, the step 2.2 is specifically:
[0023] Step 2.2.1, constructing multiple layers of encoders for extracting features of the input spectral sequence, each encoder layer includes multiple stacked Mamba modules, an RMS error normalization layer, and a linear projection layer for changing the size of the output sequence, and after each encoder layer, the size of the output sequence is down-sampled to half of the input;
[0024] Step 2.2.2, constructing multiple layers of decoders for reconstructing the input spectral features into the original sequence, each decoder layer includes multiple stacked Mamba modules, an RMS error normalization layer, and a linear projection layer for changing the size of the output sequence, and after each decoder layer, the size of the output sequence is up-sampled to twice the input.
[0025] As a preferred technical solution of the present application, in the step 3, specifically:
[0026] Step 3.1, calculating the Huber loss between the original sequence and the generated sequence, constructing a data reconstruction loss function, and adaptively selecting the specific calculation strategy of the loss by comparing the difference between the preset threshold and the difference between the original and reconstructed sequences;
[0027] Step 3.2, constructing the feature reconstruction loss function, for the multi-layer encoder-decoder structure, in addition to the outermost layer directly processing the input and output data, the cosine similarity between the input features of each layer of the encoder and the output features of the corresponding decoder layer is calculated pixel by pixel on different scales as the feature reconstruction loss;
[0028] Step 3.3, assigning weights to the data reconstruction loss function and the feature reconstruction loss function respectively, and weighted summing, as the total loss function for training the Mamba-AE model.
[0029] As a preferred technical solution of the present application, in the step 5, an abnormal score calculation mechanism is constructed for calculating the corresponding abnormal score according to the reconstruction spectrum of each pixel, which is used as a criterion for judging the possibility of the pixel belonging to the lesion.
[0030] As a preferred technical solution of the present application, in the step 5, specifically:
[0031] Step 5.1, constructing an abnormal score calculation method for reconstructed sequence data, using mean square error to calculate the difference between the final output of the model and the original input sequence, as the data abnormal score;
[0032] Step 5.2, constructing an abnormal score calculation method for reconstructed features, extracting the input features of each layer of the encoder and the output features of each layer of the decoder during the test process, calculating the cosine similarity of the corresponding layer features, and adding the results one by one, as the overall feature abnormal score;
[0033] Step 5.3, adding the data abnormal score and the feature abnormal score to obtain the final abnormal score.
[0034] The present application has the beneficial effects that: the chemical exchange saturation transfer image abnormality detection method of the present application is used for unsupervised detection of CEST MRI lesions, the model has strong ability to capture long-range dependencies, and effectively models the CEST spectrum sequence with low computational complexity; in addition, the present application also designs a joint loss function, which combines the reconstruction loss based on the paired features between the encoder and the decoder and the reconstruction loss in the data space, which enables the model to learn the semantic patterns of normal samples and physiological tissue structures simultaneously. The present application has high clinical application value, can help doctors identify and locate lesions in the early stage of disease, significantly improve the efficiency and accuracy of clinical diagnosis, and improve the prognosis of treatment. BRIEF DESCRIPTION OF DRAWINGS
[0035] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0036] Figure 1 A general flow chart of a chemical exchange saturation transfer image unsupervised lesion detection method provided for an embodiment of the application;
[0037] Figure 2 A structure diagram of a Mamba module provided for an embodiment of the application;
[0038] Figure 3 A structure diagram of a self-encoder and feature-data joint anomaly evaluation mechanism provided for an embodiment of the application;
[0039] Figure 4 A comparison diagram of lesion detection results of the method provided by the application and existing methods in a rat stroke data set 2 hours, 6 hours and 24 hours after ischemia. DETAILED DESCRIPTION
[0040] The technical solutions of the application will be further described in detail below with the help of the description and specific embodiments of the accompanying drawings.
[0041] Embodiment 1
[0042] As shown in the description, Figure 1 a chemical exchange saturation transfer image anomaly detection method of the application is implemented according to the following steps:
[0043] Step 1, pre-process the CEST data obtained by scanning to obtain a spectrum data set of all pixels, and finally divide the spectrum data into a training set and a test set;
[0044] Step 2, construct a self-encoder model Mamba-AE based on the Mamba network;
[0045] Step 3, construct a joint loss function of a feature space and a data space for Mamba-AE training;
[0046] Step 4, input the training set into Mamba-AE and train Mamba-AE using the joint loss function;
[0047] Step 5, construct an anomaly score calculation mechanism for calculating the corresponding anomaly score according to the reconstructed spectrum of each pixel, which is used to judge the possibility of the pixel belonging to a lesion;
[0048] Step 6, input the divided test set into the trained Mamba-AE, output the abnormal score of each pixel based on the abnormal score calculation mechanism established in step 5, and return all abnormal scores to each corresponding pixel to form an abnormal image as the lesion detection result.
[0049] The present application takes unsupervised lesion detection in CEST MRI as the research object, and in view of the shortcomings of traditional methods in detection accuracy and computational complexity, a self-encoder model Mamba-AE based on Mamba network is designed. The model reconstructs the input CEST spectrum to evaluate its abnormality, uses multiple Mamba modules to capture long-range dependencies in the spectrum to learn the signal pattern of normal tissue, and introduces reconstruction loss in the data space and latent feature space domains to jointly constrain the learning process of the model. The present application can realize accurate and robust pixel-by-pixel lesion detection.
[0050] Embodiment 2
[0051] Different from embodiment 1, in the chemical exchange saturation transfer image abnormality detection method of the present application in embodiment 2, step 1 is specifically:
[0052] Step 1.1, normalize the original CEST data using the signal before the application of the radio frequency saturation pulse in the CEST process, and map it to the (0, 1) interval;
[0053] Step 1.2, convert the dimensions of the data set. The original data set has a four-dimensional format of sample size, image length, image width, and spectral frequency. In order to adapt to the characteristics of the method of the present application, it is converted into a two-dimensional data format of sample size x image length x image width x spectral frequency;
[0054] Step 1.3, take out the part of the spectrum from the normal samples in the converted data to divide it into a training set, and the remaining spectrum is divided into a test set.
[0055] CEST MRI image data is collected and preprocessed to adapt to the data format requirements of the method of the present application. In the embodiments of the present application, the data set used comes from ischemic stroke rats, and a middle cerebral artery occlusion model (MCAO) is prepared by a thread plug method. The scanning parameter settings are: main magnetic field strength 7 Tesla, saturation radio frequency pulse intensity 1 μTelsa, scanning frequency range -10ppm to 10ppm, and scanning at four time points of before modeling, 2 hours, 6 hours and 24 hours after modeling.
[0056] For all the CEST data S sat obtained by scanning, the signal S0 before the application of the radio frequency saturation pulse in the scanning process is used for normalization to obtain normalized data S, which is expressed as:
[0057] s = S sat / S0;
[0058] Subsequently, the dataset is dimensionality transformed. For the normalized dataset D = {S1, S2, ..., S...}, the dimensionality is transformed. N The dataset contains N sets of data, each with dimensions (H, W, f), representing the length, width, and frequency of the image. These data are then converted into a set of spectral sequences with dimensions (HW, f).
[0059] In this embodiment of the invention, a dataset containing 603 frequencies and a total of 9934 pixels was obtained. Among them, 3739 were from scans of normal samples and were classified as the training dataset, while the remaining data were from scans of samples from three different pathological stages and were classified as the test dataset.
[0060] Example 3
[0061] Unlike Example 2, in Example 3, the specific process of step 2 in the chemical exchange saturation transfer image anomaly detection method of the present invention is as follows:
[0062] Step 2.1: Construct the Mamba module as the main unit of the Mamba-AE model. This module extracts features by establishing mappings between sequence data, specifically:
[0063] Step 2.1.1: Construct a state-space model (SSM) with a selection mechanism to predict the hidden state of the spectral sequence at multiple time steps, based on the input, and finally output the predicted sequence. This model can be described as an ordinary differential state equation. Construct a selection mechanism to transform the parameters of the equation into a function of the input through a linear layer.
[0064] Step 2.1.2: Construct the Mamba module, which mainly consists of a root mean square error normalization layer, a two-branch path structure, and a residual connection structure. One of the two-branch paths sequentially includes a linear projection layer, a convolutional layer, an activation function layer, and the aforementioned SSM layer. The other path includes a linear projection layer and an activation function layer. The outputs of the two paths are fused by pointwise multiplication, and the fused features are input through the residual connection.
[0065] Step 2.2 involves constructing multiple encoder and decoder layers, each consisting of multiple Mamba modules of different scales, specifically:
[0066] Step 2.2.1, a multi-layer encoder is constructed for extracting features of the input spectrum sequence, each encoder layer in turn includes a plurality of stacked Mamba modules, an RMS error normalization layer, and a linear projection layer for changing the size of the output sequence, after each encoder layer, the size of the output sequence is down-sampled to half of the input;
[0067] Step 2.2.2, a multi-layer decoder is constructed for reconstructing the input spectrum features into the original sequence, each decoder layer in turn includes a plurality of stacked Mamba modules, an RMS error normalization layer, and a linear projection layer for changing the size of the output sequence, after each decoder layer, the size of the output sequence is up-sampled to twice the input.
[0068] A Mamba-AE autoencoder model based on the Mamba network is constructed, and the Mamba-AE includes an encoder and a decoder composed of Mamba modules as the backbone. Figure 2 A Mamba module structure diagram provided by the embodiment of the application is shown, the core of the module is a state space model (SSM) with a selection mechanism, in addition to this, mainly includes a double-branch path structure and a residual connection structure, specifically including:
[0069] The SSM is used to establish the state evolution of the sequence at multiple time steps, predict the hidden state of the next time step according to the input, and finally output the target sequence, the model can be described by a common differential equation:
[0070]
[0071] y t =Ch t +Dx t ;
[0072] Wherein, A, B, C, D are all coefficient matrices of the equation set, respectively used to reflect the state change with time, the influence of the control input on the state, the output generated based on the current state, and the direct influence of the input on the output; In order to give the model resolution invariance and ensure correct normalization, a time scale parameter Δ is introduced, the continuous time system is discretized, and the continuous parameters A and B are converted into discrete parameters and In addition, in order to focus on or ignore specific inputs like attention mechanism, a selection mechanism is added to adaptively adjust the values of matrices B, C and time step Δ according to different input data, which is realized by designing these parameters as functions of the input, and the expression is:
[0073] s B (x)=Linear N (x);
[0074] s C (x) = Linear N (x) ;
[0075] s Δ (x) = Linear D (x) ;
[0076] τ Δ = softplus ;
[0077] The double-branch path structure fuses the input evolved by the SSM with the original input. The input first passes through a root mean square error normalization layer. One path specifically includes a linear projection layer, a 1x1 convolution layer, a SiLU activation function layer, and an SSM module. The other path includes a linear projection layer and a SiLU activation function layer. The inputs of the two paths are fused by point-by-point multiplication and output. This process can be represented as:
[0078]
[0079] f′ i-1 = SSM(Silu(Conv((Linear(RN(f i-1 )))))) ⊙ Silu(Linear(RN(f i-1 ))) ;
[0080] Where f i-1 and f′ i-1 represent the input into the double-branch path and its output in the i-th Mamba module, respectively.
[0081] The residual connection merges the input into the Mamba module with the output of the double-branch path structure, and performs normalization processing. Specifically, the fusion is performed in an additive manner. This process can be represented as:
[0082] f i = f i-1 + Linear(f′ i-1 ) ;
[0083] Where f i represents the output of the i-th Mamba module, and if there is a next Mamba module connected, it also serves as the input of the next Mamba module.
[0084] Figure 3 The structure diagram of the autoencoder based on the Mamba module is shown. The encoder and decoder models both use multiple stacked Mamba modules as the main body. The structure is specifically as follows:
[0085] The encoder is used for sequence feature extraction and compression. In this embodiment of the invention, for each encoder layer, four Mamba modules are stacked. In addition to the Mamba modules, the data is processed through a root mean square error normalization layer and a linear projection layer before output. The output dimension of the last linear projection layer is the floor function of the input dimension, which halves the sequence length. The input and output of each encoder can be expressed as follows:
[0086] f output =Linear(RN(MB4(MB3(MB2(MB1(f input ))))));
[0087] The decoder is used to reconstruct and restore the sequence data. Similar to the encoder, in this embodiment of the invention, for each decoder layer, four Mamba modules are stacked. In addition to the Mamba modules, the data is output after passing through a root mean square error normalization layer and a linear projection layer. The output dimension of the last linear projection layer is twice the input dimension, so that the sequence length is restored to the original size step by step. The input and output expressions of each decoder are the same as those of the encoder.
[0088] Example 4
[0089] Unlike Example 3, in Example 4 of the present invention's method for detecting abnormalities in chemical exchange saturation transfer images, the specific process of step 3 is as follows:
[0090] Construct a loss function for Mamb a The joint loss function for training the -AE model consists of two parts: a reconstruction loss calculated using paired features between the encoder and decoder, and a reconstruction loss calculated using the input and output data. Specifically, it includes:
[0091] Data space reconstruction loss: In this embodiment of the invention, the generation model is constrained by measuring the distance between the original sequence and the generated sequence. Huber loss is selected as the calculation method. The calculation strategy is adaptively selected based on the comparison between the difference between the reconstructed value and the actual value and a preset threshold, which effectively handles non-Gaussian noise while maintaining efficiency. Its expression is:
[0092]
[0093] in, These represent the original data value and the predicted value, respectively. The δ parameter is used as a weight to select the calculation formula. When the prediction error is less than δ, the mean square error (MSE) is used. Conversely, when the prediction error exceeds δ, a linear error approximating L1 is used. In this embodiment of the invention, δ = 1.
[0094] Feature space reconstruction loss: for the four-layer structure adopted in the embodiment of the application, in addition to the outermost layer directly processing the input and output data, the input features of the kth layer encoder and the corresponding output features of the kth layer decoder are utilized on different scales, the distance between the features is measured pixel by pixel as the feature reconstruction loss by calculating the cosine similarity, and the loss can be expressed by the following formula:
[0095]
[0096] wherein, is the feature of the kth layer encoder / decoder, and ||·|| represents the L2 norm;
[0097] Joint loss function: based on the above two loss functions, the overall loss of the entire model can be expressed as:
[0098]
[0099] In the embodiment of the application, the weights a and β are set to 1 and 0.4 respectively.
[0100] Example 5
[0101] Different from example 4, in the step 4 of the chemical exchange saturation transfer imaging anomaly detection method of the application in example 2, the specific process is as follows:
[0102] Mamba-AE model training: in the embodiment of the application, the model is realized using the PyTorch framework, the model parameters are optimized using the Adam optimizer, the learning rate is set to 0.0005, and other parameters include β1=0.5, β2=0.999, the model is trained for 200 rounds, and the batch size is 64 。
[0103] Example 6
[0104] Different from example 5, in the step 5 of the chemical exchange saturation transfer imaging anomaly detection method of the application in example, the specific process is as follows:
[0105] Step 5.1, construct the anomaly score calculation method of the reconstructed sequence data, calculate the difference between the reconstructed sequence output by the model and the original input sequence using the mean square error as the data anomaly score;
[0106] Step 5.2, construct the anomaly score calculation method of the reconstructed feature, extract the input feature of each layer of the encoder and the output feature of each layer of the decoder in the test process, calculate the cosine similarity of the corresponding layer features, and add the results one by one as the overall feature anomaly score;
[0107] Step 5.3, add the data anomaly score and the feature anomaly score to obtain the final anomaly score.
[0108] The construction of the anomaly score calculation method is similar to the above-mentioned loss calculation method. The anomaly score of a single pixel is composed of feature-level and data-level anomaly scores. The calculation method of the feature anomaly score is consistent with the calculation of the loss. The cosine similarity of the input feature of the kth layer encoder and the corresponding output feature of the kth layer decoder is evaluated to achieve the calculation. The data anomaly score is calculated by using the MSE measurement method. The calculation method is as follows:
[0109]
[0110] where a pair of (h, w) is used to locate the position of a single pixel in the image, is the calculated anomaly score. A larger value represents a higher possibility of lesions.
[0111] Step 6 is specifically: input the test set into the trained Mamba-AE model for testing. For the spectrum y(h, w) of each pixel, an anomaly score is output by the above-mentioned calculation method. According to the corresponding position (h, w), it is reconstructed into an anomaly image and a visual heat map is generated.
[0112] The above description shows and describes several preferred embodiments of the application, but as mentioned above, it should be understood that the application is not limited to the forms disclosed herein, should not be considered as excluding other embodiments, and can be used in various other combinations, modifications and environments, and can be modified within the scope of the inventive concept described herein by the above-mentioned teaching or related technical or knowledge. Changes and modifications made by those skilled in the art without departing from the spirit and scope of the application shall be within the scope of protection of the appended claims of the application.
Claims
1. A method for detecting abnormalities in chemical exchange saturation transfer images, characterized in that, include: Step 1: Preprocess the CEST data obtained from the scan to obtain a set of spectral data for all pixels, and finally divide the spectral data into a training set and a test set. Step 2: Construct the Mamba-AE autoencoder model based on the Mamba network; Step 3: Construct a joint loss function for the feature space and data space for Mamba-AE training; Step 3 specifically involves: Step 3.1: Calculate the Huber loss between the original sequence and the generated sequence, construct the data reconstruction loss function, and adaptively select the specific calculation strategy for the loss by comparing the difference between the preset threshold and the difference between the original and reconstructed sequences. Step 3.2: Construct the feature reconstruction loss function. For a multi-layer encoder-decoder structure, in addition to the outermost layer directly processing the input and output data, the cosine similarity between the input features of each encoder layer and the output features of the corresponding decoder layer is calculated pixel by pixel at different scales and used as the feature reconstruction loss. Step 3.3: Assign weights to the data reconstruction loss function and the feature reconstruction loss function respectively, and sum them up by weights to obtain the total loss function used for training the Mamba-AE model; Step 4: Input the training set into Mamba-AE and train Mamba-AE using the joint loss function; Step 5: Construct an anomaly scoring mechanism to assess the likelihood that the pixel belongs to a lesion; Step 6: Input the divided test set into the trained Mamba-AE, output the abnormality score pixel by pixel based on the abnormality scoring calculation mechanism, and return all abnormality scores to each corresponding pixel to form an abnormal image as the lesion detection result.
2. The method for detecting anomalies in chemical exchange saturation transfer images according to claim 1, characterized in that, Step 1 specifically includes: Step 1.1: Normalize the original CEST data using the signal before the RF saturation pulse is applied during the CEST process, and map it to the (0,1) interval; Step 1.2: Perform dimensional transformation on the dataset. The original dataset is a four-dimensional format with dimensions of sample size, image length, image width, and spectral frequency. In order to adapt to the characteristics of the method of this invention, it is converted into a two-dimensional data format of sample size × image length × image width and spectral frequency. Step 1.3: Extract the spectrum from the normal samples in the transformed data and divide it into the training set; divide the remaining spectrum into the test set.
3. The method for detecting abnormalities in chemical exchange saturation transfer images according to claim 2, characterized in that, Step 2 specifically involves: Step 2.1: Construct the Mamba module as the main unit of the Mamba-AE model. This module extracts features by establishing mappings between sequence data. Step 2.2: Construct multiple encoder and decoder layers, each of which consists of multiple Mamba modules of different scales.
4. The method for detecting abnormalities in chemical exchange saturation transfer images according to claim 3, characterized in that, Step 2.1 specifically includes: Step 2.1.1: Construct a state-space model (SSM) with a selection mechanism to predict the hidden state of the spectral sequence at multiple time steps, based on the input, and finally output the predicted sequence. This model can be described as an ordinary differential state equation. Construct a selection mechanism to transform the parameters of the equation into a function of the input through a linear layer. Step 2.1.2: Construct the Mamba module, which mainly consists of a root mean square error normalization layer, a two-branch path structure, and a residual connection structure. One of the two-branch paths sequentially includes a linear projection layer, a convolutional layer, an activation function layer, and the aforementioned SSM layer. The other path includes a linear projection layer and an activation function layer. The outputs of the two paths are fused by pointwise multiplication, and the fused features are input through the residual connection.
5. The method for detecting abnormalities in chemical exchange saturation transfer images according to claim 4, characterized in that, Step 2.2 specifically includes: Step 2.2.1: Construct a multi-layer encoder to extract features from the input spectral sequence. Each encoder layer includes multiple stacked Mamba modules, a root mean square error normalization layer, and a linear projection layer to change the size of the output sequence. After each encoder layer, the size of the output sequence is downsampled to half that of the input. Step 2.2.2: Construct a multi-layer decoder to reconstruct the input spectral features as the original sequence. Each decoder layer includes multiple stacked Mamba modules, a root mean square error normalization layer, and a linear projection layer to change the size of the output sequence. After each decoder layer, the size of the output sequence is upsampled to twice that of the input.
6. The method for detecting abnormalities in chemical exchange saturation transfer images according to claim 5, characterized in that, In step 5, an anomaly scoring calculation mechanism is constructed to calculate the corresponding anomaly score based on the reconstructed spectrum of each pixel, which is used to judge the likelihood that the pixel belongs to a lesion.
7. The method for detecting abnormalities in chemical exchange saturation transfer images according to claim 6, characterized in that, In step 5, specifically: Step 5.1: Construct a method for calculating the anomaly score of the reconstructed sequence data. The mean squared error is used to calculate the difference between the reconstructed sequence output by the model and the original input sequence, which is then used as the data anomaly score. Step 5.2: Construct an anomaly score calculation method for reconstructed features. Extract the input features of each encoder layer and the output features of each decoder layer during the testing process, calculate the cosine similarity of the corresponding inter-layer features, and add the results one by one as the overall feature anomaly score. Step 5.3: Add the data anomaly score to the feature anomaly score to obtain the final anomaly score.