A robust segmentation method and system for breast ultrasound images against adversarial attacks

By introducing the prototype vector and projection head model into the breast ultrasound image segmentation model, combined with the learning vector quantization method, the problem of the model being sensitive to adversarial attacks is solved, the accuracy and robustness of segmentation are significantly improved, and the accuracy and robustness of the segmentation are significantly improved, ensuring that the model can perform well in an adversarial noise environment. stability and security.

CN118396985BInactive Publication Date: 2024-09-03JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410823659.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing breast ultrasound image segmentation models based on deep learning are sensitive to adversarial attacks, resulting in poor segmentation accuracy and robustness in an adversarial noise environment, which poses security risks especially in the medical field.

Method used

The convolutional neural network is used to learn the nonlinear mapping of breast ultrasound images, the prototype vector and the projection head model based on the prototype vector are introduced, and the prototype vector and convolutional neural network parameters are updated through the learning vector quantization method to improve the robustness of the model.

Benefits of technology

It significantly improves the accuracy and robustness of breast ultrasound image segmentation, maintains stable segmentation results in an adversarial attack environment, enhances the reliability and security of the model, and can more accurately identify and distinguish tumors from non-tumor tissues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396985B
    Figure CN118396985B
Patent Text Reader

Abstract

A method and system for robust segmentation of breast ultrasound images against adversarial attacks, relating to the field of medical imaging technology, and in particular to an image segmentation method for breast ultrasound imaging. The method solves the problem of poor accuracy and robustness of breast ultrasound image segmentation under adversarial noise attacks in the prior art. The method comprises: using a convolutional neural network to learn the nonlinear mapping of breast ultrasound images in feature space, and obtaining a feature vector for each pixel of each image; using a prototype vector to replace the projection head function originally composed of a two-dimensional convolutional layer, and based on the projection head function, converting the category of the pixel to the category of the prototype vector with the greatest similarity thereto; using a momentum update method based on a learning vector quantization method to update the prototype vector; and using a loss function based on a generalized learning vector quantization method to update the convolutional neural network parameters. The present invention is applicable to the field of medical image processing against noise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of medical imaging, and in particular to an image segmentation method for breast ultrasound imaging. Background Art

[0002] Breast cancer is one of the most common cancers among women worldwide. Early detection and diagnosis are key to improving the survival rate of breast cancer patients. In this process, ultrasound imaging, as a non-invasive and low-cost medical imaging technology, is widely used in the screening and diagnosis of breast cancer. Accurate image segmentation is an important step in extracting tumor areas from complex breast ultrasound images, which is crucial for subsequent diagnosis and treatment planning.

[0003] In recent years, deep learning technology has demonstrated excellent performance in the field of medical image segmentation, especially in the automatic segmentation of breast ultrasound images. However, these deep learning-based models have a significant weakness: they are particularly sensitive to adversarial attacks. Adversarial attacks refer to the precise and usually imperceptible modification of input data to cause deep learning models to produce incorrect outputs. In breast ultrasound image analysis, this means that non-tumor areas may be incorrectly labeled as tumors, or tumor areas may be misidentified as normal tissue, which will directly affect the accuracy of clinical decisions.

[0004] Studies have shown that even tiny perturbations are enough to completely invalidate the segmentation model, which is particularly dangerous in the medical field because it is related to the treatment and life safety of patients. Therefore, improving the robustness of breast ultrasound image segmentation technology based on deep learning models and combating adversarial attacks has become a technical challenge that urgently needs to be solved in this field.

[0005] In addition, existing anti-adversarial attack technologies are mainly focused on the field of general image processing, and the specificity and high sensitivity of medical images are not considered enough. In particular, in special medical images such as breast ultrasound images, the attack mode may be different from that of regular images, so it is necessary to develop robust technologies specifically for such images. Summary of the invention

[0006] The present invention aims to solve the problem of poor accuracy and robustness of breast ultrasound image segmentation under adversarial noise attack in the prior art.

[0007] To achieve the above object, the present invention provides the following solutions:

[0008] The present invention provides a breast ultrasound image robust segmentation method against adversarial attacks, the method comprising:

[0009] S1: Use convolutional neural network to learn the nonlinear mapping of breast ultrasound images in feature space and obtain the feature vector of each pixel in each image;

[0010] S2: The prototype vector is used to replace the projection head function originally composed of a two-dimensional convolutional layer. According to the feature vector of each pixel point and based on the projection head function, the category of the pixel is converted to the category of the prototype vector with the greatest similarity to it;

[0011] S3: updating the prototype vector using a momentum update method based on a learning vector quantization method;

[0012] S4: Update the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method.

[0013] Furthermore, in another preferred embodiment, the above step S1 is specifically as follows:

[0014] S11: using a UNet U-shaped neural network or a variant network model based on a transformer model as a skeleton function, inputting the breast ultrasound image into the skeleton function, and obtaining pixel-level features of the breast ultrasound image;

[0015] S12: Use the convolutional neural network model to perform deep feature extraction on each pixel level and output the feature vector of each pixel.

[0016] Furthermore, in another preferred embodiment, the above step S2 is specifically as follows:

[0017] S21: Each category is replaced by multiple prototype vectors, so that one category forms multiple cluster centers, replacing the projection head function originally composed of a two-dimensional convolutional layer;

[0018] S22: Calculate the similarity between the feature vector of each pixel and the prototype vector, so that the category of the pixel is converted to the category of the prototype vector with the greatest similarity.

[0019] Furthermore, in a preferred embodiment, the above-mentioned prototype vector is learnable.

[0020] Furthermore, in another preferred embodiment, the above step S3 is specifically as follows:

[0021] S31: For a C-class segmentation task, the category of each prototype is ,in, , assign K prototype vectors to each category, where , Represents one of the prototype vectors, specifically the first in the cth class prototype vectors, each with a dimension of D;

[0022] The set of prototype vectors of class c is , represents the kth prototype vector of the cth class, and the set of all prototype vectors is ,in, , indicating the category;

[0023] S32: Order Represents the feature vector of each pixel, and the prototype vector correspond, Indicates that it is assigned to The feature vector of the pixels, where the category of each pixel is , ; Assigned to the first prototype vectors, where ;

[0024] S33: Update the prototype vector by the feature value of the pixel. The update formula is:

[0025] ;

[0026] in, indicates that it is correctly assigned to the prototype vector The average value of the vector, Indicates that the error is assigned to the prototype vector The average value of the vector, is a hyperparameter, representing the scale of controlling the momentum update method.

[0027] Furthermore, in another preferred embodiment, the above step S4 is specifically as follows:

[0028] S41: Pixel feature vector With prototype vector Through the function Perform similarity calculation;

[0029] S42: Using the loss function formula The similarity calculation results are calculated and the convolutional neural network parameters are updated according to the calculation results.

[0030] The method for robust segmentation of breast ultrasound images against adversarial attacks described in the present invention can be implemented entirely by computer software. Therefore, correspondingly, the present invention also provides a system for robust segmentation of breast ultrasound images against adversarial attacks, the system comprising:

[0031] A storage device for learning the nonlinear mapping of breast ultrasound images in feature space using a convolutional neural network to obtain a feature vector for each pixel point of each image;

[0032] A storage device for replacing the projection head function originally composed of a two-dimensional convolutional layer with a prototype vector, and converting the category of the pixel into the category of the prototype vector with the greatest similarity to the pixel based on the feature vector of each pixel and the projection head function;

[0033] A storage device for updating the prototype vector using a momentum update method based on a learning vector quantization method;

[0034] A storage device for updating the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method.

[0035] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes any one of the above-mentioned methods for robust segmentation of breast ultrasound images against adversarial attacks.

[0036] The present invention also provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes any one of the above-mentioned methods for robust segmentation of breast ultrasound images against adversarial attacks.

[0037] The beneficial effects of the present invention are:

[0038] 1. The present invention provides a method for robust segmentation of breast ultrasound images against adversarial attacks. By introducing prototype vectors and a projection head model based on prototype vectors, pixel feature vectors of the same category are more clustered, thereby significantly improving the accuracy of breast ultrasound image segmentation. The prototype vector, as a typical representative of the category, can more accurately capture the characteristics of each category, helping the model to more accurately identify and distinguish tumors from non-tumor tissues in complex medical images. At the same time, in an adversarial attack environment, even in the face of subtle noise disturbances that are difficult for the human eye to detect, the present invention uses adversarial training and a dynamic update mechanism of prototype vectors to enable the model to effectively respond to small changes in input data and maintain stable segmentation results, thereby improving the reliability and security of the model in practical applications.

[0039] Furthermore, compared with the prior art, the present invention can more accurately capture the features of each category, help the model to more accurately identify and distinguish tumors and non-tumor tissues in complex medical images, and solve the problem of poor accuracy of breast ultrasound image segmentation under adversarial noise attacks in the prior art.

[0040] Furthermore, compared with the prior art, the present invention, while updating the prototype vector parameters, combines the deep model updating method based on the loss function, constrains the pixel features in the feature space, and forms a cluster classification centered on the prototype vector, which not only improves the accuracy of segmentation, but also enhances the robustness of the algorithm in adversarial attack environments.

[0041] Furthermore, compared with the prior art, since each category is represented by multiple prototype vectors, the present invention can flexibly handle diverse intra-category variations, thereby making the model more effective in processing medical images with inherent diversity, such as different types of tumor tissues, and providing more detailed analysis and segmentation.

[0042] 2. The present invention provides a robust segmentation method for breast ultrasound images against adversarial attacks, which can not only effectively identify and segment breast tumors, but also resist adversarial attacks that may interfere with diagnostic accuracy. This comprehensive technical approach not only improves the accuracy and security of medical image processing, but also promotes the application of medical imaging technology in ensuring patient well-being.

[0043] Furthermore, the present invention is not limited to breast ultrasound images, but can be extended to other types of medical image analysis, such as CT, MRI, etc., and can even be applied to image processing tasks in non-medical fields. The universality of the prototype vector and the projection head model makes the present invention potentially effective in a wide range of application scenarios.

[0044] The present invention has significant practical value in the field of breast ultrasound image segmentation, and is particularly suitable for the field of medical image processing against noise. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0046] Figure 1 is a schematic diagram of the segmentation result of the breast ultrasound image after noise attack according to the eleventh embodiment;

[0047] Figure 2 is a schematic diagram of a process of updating a pixel feature vector based on a prototype feature vector according to an eleventh embodiment;

[0048] Figure 3 It is a schematic diagram of segmentation results based on three skeleton architectures: UNet, UNeXt and TransUNet according to the eleventh embodiment;

[0049] Figure 4This is a comparison diagram of the segmentation results after applying PGD noise attack under the UNet skeleton framework described in Implementation 11;

[0050] Figure 5 This is a comparison chart of segmentation results after applying PGD-CE noise attack under the UNet skeleton framework as described in Implementation Example 11. DETAILED DESCRIPTION

[0051] The specific implementation mode of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention.

[0052] Embodiment 1: This embodiment provides a method for robust segmentation of breast ultrasound images against adversarial attacks, the method comprising:

[0053] S1: Use convolutional neural network to learn the nonlinear mapping of breast ultrasound images in feature space and obtain the feature vector of each pixel in each image;

[0054] S2: The prototype vector is used to replace the projection head function originally composed of a two-dimensional convolutional layer. According to the feature vector of each pixel point and based on the projection head function, the category of the pixel is converted to the category of the prototype vector with the greatest similarity to it;

[0055] S3: updating the prototype vector using a momentum update method based on a learning vector quantization method;

[0056] S4: Update the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method.

[0057] In practical application, before the breast ultrasound image is input into the model, it is necessary to perform a preprocessing operation on the breast ultrasound image, and the preprocessing operation includes normalization, noise reduction and contrast enhancement, which is used to improve the model's ability to recognize image details. Then, the robust segmentation method of the breast ultrasound image is started, which is specifically:

[0058] Step S1: Use a convolutional neural network to learn the nonlinear mapping of the preprocessed breast ultrasound image in the feature space, and obtain the feature vector of each pixel point in each image to provide basic data for subsequent prototype vector matching and classification.

[0059] Step S2: The prototype vector is used to replace the projection head function originally composed of the two-dimensional convolutional layer. According to the feature vector of each pixel point and based on the projection head function, the category of the pixel is converted into the category of the prototype vector with the greatest similarity, so that the pixel feature vectors of the same category are more clustered, thereby significantly improving the accuracy of breast ultrasound image segmentation. Among them, the prototype vector, as a typical representative of the category, can more accurately capture the characteristics of each category, helping the model to more accurately identify and distinguish tumors and non-tumor tissues in complex medical images.

[0060] Step S3: The prototype vector is updated by using a momentum update method based on a learning vector quantization method, so that the projection head function model composed of the prototype vector can effectively cope with small changes in the input data and maintain a stable segmentation result, thereby improving the reliability and security of the model in practical applications.

[0061] Step S4: Update the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method. The loss function takes into account the relative similarity between positive and negative samples and the prototype vector, processes the similarity relationship through LogSumExp operation, and optimizes the parameter update process. Through the back propagation algorithm, adjust the convolutional neural network parameters and the position of the prototype vector according to the result of the loss function to ensure that the model gradually converges to the optimal solution during the training process.

[0062] This embodiment updates the prototype vector value by using the momentum update method based on the learning vector quantization method, and uses the loss function based on the generalized learning vector quantization method to constrain the pixel features in the feature space, so that the pixels are characterized by the prototype vector in the feature space to form clusters, and the pixel features can be classified to achieve pixel-level segmentation effects. This method not only improves the accuracy of segmentation, but also makes the algorithm more robust due to the decoupled update method of the prototype vector and the pixel feature vector.

[0063] This embodiment provides a method for robust segmentation of breast ultrasound images against adversarial attacks. By introducing prototype vectors and a projection head model based on prototype vectors, pixel feature vectors of the same category are more clustered, thereby significantly improving the accuracy of breast ultrasound image segmentation. Among them, the prototype vector, as a typical representative of the category, can more accurately capture the characteristics of each category, helping the model to more accurately identify and distinguish tumors and non-tumor tissues in complex medical images.

[0064] At the same time, in an adversarial attack environment, even when faced with subtle noise disturbances that are imperceptible to the human eye, this implementation uses adversarial training and a dynamic update mechanism of prototype vectors to enable the model to effectively respond to small changes in input data and maintain stable segmentation results, thereby improving the reliability and security of the model in practical applications.

[0065] Embodiment 2: This embodiment is to illustrate step S1 in the method for robust segmentation of breast ultrasound images against attacks described in embodiment 1 by way of example. Step S1 is specifically as follows:

[0066] S11: using a UNet U-shaped neural network or a variant network model based on a transformer model as a skeleton function, inputting the breast ultrasound image into the skeleton function, and obtaining pixel-level features of the breast ultrasound image;

[0067] S12: Use the convolutional neural network model to perform deep feature extraction on each pixel level and output the feature vector of each pixel.

[0068] In practical applications, this embodiment first uses a UNet U-type neural network or a variant network model based on a transformer model as a skeleton function, and inputs the preprocessed breast ultrasound image into the skeleton function to obtain pixel-level features of the breast ultrasound image; then a feature extraction process is performed, and deep features are extracted for each pixel through a deep network model, and a feature vector of each pixel is output to provide basic data for subsequent prototype vector matching and classification.

[0069] Embodiment 3: This embodiment is an example of the construction of the skeleton function in the method for robust segmentation of breast ultrasound images against counterattacks described in Embodiment 2;

[0070] A variant network model based on the transformer converter model can also be used as a skeleton function.

[0071] Embodiment 4: This embodiment is to illustrate step S2 in the method for robust segmentation of breast ultrasound images against countermeasure attacks described in embodiment 1 by way of example. Step S2 is specifically as follows:

[0072] S21: Each category is replaced by multiple prototype vectors, so that one category forms multiple cluster centers, replacing the projection head function originally composed of a two-dimensional convolutional layer;

[0073] S22: Calculate the similarity between the feature vector of each pixel and the prototype vector, so that the category of the pixel is converted to the category of the prototype vector with the greatest similarity.

[0074] In actual application, this embodiment uses a prototype vector to replace the original projection head function composed of a two-dimensional convolutional layer. That is, in the final stage of the network, a prototype vector is introduced as the basis for classification. Multiple prototype vectors are set for each category (such as tumor, non-tumor) to represent the different feature centers of the category. Each category is replaced by multiple prototype vectors, and multiple clustering centers are formed for one category. The pixel-level features are similar to the prototype vector, so that the category of the pixel is the category of the prototype vector with the greatest similarity. Through an iterative optimization process, the position of the prototype vector is adjusted so that the pixel feature vectors of the same category are more clustered, thereby improving the accuracy and consistency of the segmentation. At the same time, since each category is represented by multiple prototype vectors, it is possible to flexibly handle diverse intra-category variations, making the model more effective in processing medical images with inherent diversity, such as different types of tumor tissues, providing more detailed analysis and segmentation.

[0075] Embodiment 5: This embodiment is an example of the prototype vector in the method for robust segmentation of breast ultrasound images against adversarial attacks described in Embodiment 4.

[0076] The prototype vector is learnable.

[0077] In actual application of this embodiment, the prototype vector is learnable, that is, the prototype vector refers to a predefined central or typical feature vector representing each category (such as tumor and non-tumor). These vectors are learned during the model training process and are used to guide the image segmentation task in the test phase. The projection head is a network structure that accepts features from the deep model and projects them into a space defined by the prototype vector. The purpose of this is to align the features of the image with each prototype vector and enhance the category distinction ability of the features. By calculating the distance or similarity between the input feature and each prototype vector, the projection head can evaluate the probability that each pixel belongs to each category, thereby achieving more accurate image segmentation. In the test phase, combined with the stability of the prototype vector, the projection head can improve the insensitivity of the model to input perturbations and enhance the robustness in the segmentation task.

[0078] Embodiment 6: This embodiment is to illustrate step S3 in the method for robust segmentation of breast ultrasound images against attacks described in embodiment 1 by way of example. Step S3 is specifically as follows:

[0079] S31: For a C-class segmentation task, the category of each prototype is ,in, , assign K prototype vectors to each category, where , Represents one of the prototype vectors, specifically the first in the cth class prototype vectors, each with a dimension of D;

[0080] The set of prototype vectors of class c is , represents the kth prototype vector of the cth class, and the set of all prototype vectors is ,in, , indicating the category;

[0081] S32: Order Represents the feature vector of each pixel, and the prototype vector correspond, Indicates that it is assigned to The feature vector of the pixels, where the category of each pixel is , ; Assigned to the first prototype vectors, where ;

[0082] S33: Update the prototype vector by the feature value of the pixel. The update formula is:

[0083] ;

[0084] in, indicates that it is correctly assigned to the prototype vector The average value of the vector, Indicates that the error is assigned to the prototype vector The average value of the vector, is a hyperparameter, representing the scale of controlling the momentum update method.

[0085] This enables the projection head function model composed of prototype vectors to effectively cope with small changes in input data and maintain stable segmentation results, thereby improving the reliability and security of the model in practical applications.

[0086] Embodiment 7: This embodiment is to illustrate step S4 in the method for robust segmentation of breast ultrasound images against attacks described in embodiment 6 by way of example. Step S4 is specifically as follows:

[0087] S41: Pixel feature vector With prototype vector Through the function Perform similarity calculation;

[0088] S42: Using the loss function formula The similarity calculation results are calculated and the convolutional neural network parameters are updated according to the calculation results.

[0089] In practical applications, this embodiment uses a loss function based on a generalized learning vector quantization method. This function considers the relative similarity between positive and negative samples and the prototype vector, processes the similarity relationship through LogSumExp operation, and optimizes the parameter update process. Through the back propagation algorithm, the network parameters and the position of the prototype vector are adjusted according to the results of the loss function to ensure that the model gradually converges to the optimal solution during the training process.

[0090] Specifically:

[0091] Step S41: The feature vector extracted by the neural network in step 3 above With prototype vector Through the function To calculate the similarity, the function Choose between cosine similarity calculation or Euclidean distance similarity calculation.

[0092] Step S42: Through the loss function formula , calculate the similarity calculated in step S41.

[0093] formula for:

[0094] ;

[0095] in, The function uses the sigmoid function as the activation function. Represents the prototype vector, and its range is as shown in step S31. Indicates that the correct assignment The set d of pixel feature vectors, Indicates that the error is assigned to A collection of pixel feature vectors. The prototype vector is solved With pixel collection and The sum of the similarity relationships between the elements in . The formula is as follows:

[0096] ;

[0097] in, It is represented by the LogSumExp function, that is , which is an approximate function of the maximum value function.

[0098] This embodiment updates the prototype vector value by using the momentum update method based on the learning vector quantization method, and uses the loss function based on the generalized learning vector quantization method to constrain the pixel features in the feature space, so that the pixels are characterized by the prototype vector in the feature space to form clusters, and the pixel features can be classified to achieve pixel-level segmentation effects. This method not only improves the accuracy of segmentation, but also makes the algorithm more robust due to the decoupled update method of the prototype vector and the pixel feature vector.

[0099] Embodiment 8: This embodiment provides a breast ultrasound image robust segmentation system against adversarial attacks, the system comprising:

[0100] A storage device for learning the nonlinear mapping of breast ultrasound images in feature space using a convolutional neural network to obtain a feature vector for each pixel point of each image;

[0101] A storage device for replacing the projection head function originally composed of a two-dimensional convolutional layer with a prototype vector, and converting the category of the pixel into the category of the prototype vector with the greatest similarity to the pixel based on the feature vector of each pixel and the projection head function;

[0102] A storage device for updating the prototype vector using a momentum update method based on a learning vector quantization method;

[0103] A storage device for updating the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method.

[0104] Embodiment 9. This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for robust segmentation of breast ultrasound images against adversarial attacks as described in any one of embodiments 1 to 7 is executed.

[0105] Embodiment 10. This embodiment provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes a method for robust segmentation of breast ultrasound images against adversarial attacks as described in any one of embodiments 1 to 7.

[0106] Implementation Method 11: See Figures 1 to 5 This embodiment is described. This embodiment is to verify and illustrate a method for robust segmentation of breast ultrasound images against attacks described in any one of Embodiments 1 to 7.

[0107] like Figure 1As shown in the figure, the image shows the processing process of breast ultrasound images and the segmentation performance in an adversarial attack noise environment.

[0108] Among them, the picture shows the original state of the breast ultrasound image at the beginning. There is an area suspected of being a tumor circled by lines, which is the region of interest (ROI) initially marked by the doctor. Then adversarial attack noise is applied to the original image. These noises are usually random, colored pixels, which are intended to mislead the image processing algorithm, but have little impact on human vision. Without the influence of adversarial attack noise, the algorithm is used to segment the image. It can be seen from the figure that the boundary of the tumor is relatively clear. However, when the adversarial attack noise is applied, the algorithm is used to segment the image. It can be seen from the figure that the boundary annotation of the tumor is not as clear as the original image. It can be seen that it is important for the existing breast ultrasound image processing to maintain high accuracy and robustness under the condition of adversarial noise.

[0109] like Figure 2 As shown, the black box represents the calculation relationship between the prototype feature vector and the pixel feature vector in the above step S31, as well as their distribution within the classification decision boundary. Among them, the smiley face icon represents the correctly classified pixel feature vector, which is close to the corresponding prototype feature vector. The crying face icon represents the wrongly classified pixel feature vector, which is far away from the prototype feature vector, close to the boundary of other categories or located in the wrong area. The method fixes the prototype feature vector and considers the pixel features related to the prototype vector. This method using the prototype vector as the anchor point focuses on constraining the distribution of outlier features, and effectively controls the pixel features through the constraint algorithm described in step S31.

[0110] like Figure 3 As shown in the figure, the specific experimental results are listed. The table compares the performance of several different deep learning models on the breast ultrasound image segmentation task, especially in terms of computational resource consumption and segmentation accuracy. These models include UNet, its improved UNeXt, and Transformer-based TransUNet. The table contains the name of the model, model size (in MB), computational complexity (in GFLOPs), and two performance indicators: F1 score and mIoU. It can be seen from the figure that UNet and its improved version are not much different in F1 score, but in mIoU, the performance of the improved version is slightly higher, which may indicate that the improved version is slightly better than the standard UNet in the consistency of segmentation tasks. TransUNet has higher scores on both performance indicators, indicating that despite its high computational complexity, it provides improvements in image segmentation accuracy and consistency.

[0111] After applying adversarial noise, the algorithm uses UNet as the skeleton framework to compare the specific results. Figure 4 and Figure 5 These two tables show the impact of different levels of PGD noise and PGD-CE noise on algorithm performance. PGD (Projected Gradient Descent) and PGD-CE (PGD with Cross-Entropy) are common adversarial attack methods used to generate adversarial samples to test the robustness of machine learning models. Figure 4 It represents the situation under PGD noise conditions. It can be seen from the figure that when there is no noise (noise level is 0), the performance of the model after the UNet framework and the robustness algorithm are applied is almost the same. However, as the noise level increases, the effect of the robustness algorithm becomes more significant. The algorithm proposed by the surface is better than the basic skeleton UNet at all noise levels, indicating that the robustness algorithm effectively improves the performance of the model under adversarial noise. Figure 5 In the case of PGD-CE noise, a similar trend is shown. The model after the algorithm is applied significantly outperforms the standard UNet framework at all noise levels, which shows that the robustness algorithm is not only effective for standard PGD noise, but also for PGD-CE noise. The robustness algorithm significantly improves the performance of the UNet framework against PGD and PGD-CE noise. The impact of PGD-CE noise on model performance is more drastic than PGD noise, but even so, the robustness algorithm can provide better protection and reduce performance degradation. By comparing the performance differences under different noise levels, it can be seen that the effect of the robustness algorithm increases with the increase of noise level. These findings verify the importance of robustness algorithms in improving the robustness of medical image segmentation models, especially in high-level adversarial attack environments.

[0112] In summary, the present embodiment provides a method for robust segmentation of breast ultrasound images against adversarial attacks. By introducing prototype vectors and a projection head model based on prototype vectors, pixel feature vectors of the same category are more clustered, thereby significantly improving the accuracy of breast ultrasound image segmentation. The prototype vector, as a typical representative of the category, can more accurately capture the characteristics of each category, helping the model to more accurately identify and distinguish tumors from non-tumor tissues in complex medical images. At the same time, in an adversarial attack environment, even in the face of subtle noise disturbances that are difficult for the human eye to detect, the present invention uses adversarial training and a dynamic update mechanism of prototype vectors to enable the model to effectively respond to small changes in input data and maintain stable segmentation results, thereby improving the reliability and security of the model in practical applications.

[0113] The above descriptions are merely embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may be modified and varied in various ways.

Claims

1. A method for robust segmentation of breast ultrasound images against adversarial attacks, characterized in that: The method is: S1: Use convolutional neural network to learn the nonlinear mapping of breast ultrasound images in feature space and obtain the feature vector of each pixel in each image; S2: The prototype vector is used to replace the projection head function originally composed of a two-dimensional convolutional layer. According to the feature vector of each pixel point and based on the projection head function, the category of the pixel is converted to the category of the prototype vector with the greatest similarity to it; S3: updating the prototype vector using a momentum update method based on a learning vector quantization method; S3 is specifically: S31: For a C-class segmentation task, the category of each prototype is ,in, , assign K prototype vectors to each category, where , Represents one of the prototype vectors, specifically the first in the cth class prototype vectors, each with a dimension of D; The set of prototype vectors of class c is , represents the kth prototype vector of the cth class, and the set of all prototype vectors is ,in, , indicating the category; S32: Order Represents the feature vector of each pixel, and the prototype vector correspond, Indicates that it is assigned to The feature vector of the pixels, where the category of each pixel is , ; Assigned to the first prototype vectors, where ; S33: Update the prototype vector by the feature value of the pixel. The update formula is: ; in, indicates that it is correctly assigned to the prototype vector The average value of the vector, Indicates that the error is assigned to the prototype vector The average value of the vector, is a hyperparameter, representing the scale of controlling the momentum update method; S4: Update the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method.

2. The method for robust segmentation of breast ultrasound images against adversarial attacks according to claim 1, characterized in that: The step S1 is specifically as follows: S11: using UNet and its variant network models as skeleton functions, inputting breast ultrasound images into the skeleton functions, and obtaining pixel-level features of the breast ultrasound images; S12: Use the convolutional neural network model to perform deep feature extraction on each pixel level and output the feature vector of each pixel.

3. The method for robust segmentation of breast ultrasound images against adversarial attacks according to claim 2, characterized in that: In the step S11, a variant network model based on a transformer converter model may also be used as a skeleton function.

4. The method for robust segmentation of breast ultrasound images against adversarial attacks according to claim 1, characterized in that: The step S2 is specifically as follows: S21: Each category is replaced by multiple prototype vectors, so that one category forms multiple cluster centers, replacing the projection head function originally composed of a two-dimensional convolutional layer; S22: Calculate the similarity between the feature vector of each pixel and the prototype vector, so that the category of the pixel is converted to the category of the prototype vector with the greatest similarity.

5. The method for robust segmentation of breast ultrasound images against adversarial attacks according to claim 4, characterized in that: The prototype vector is learnable.

6. The method for robust segmentation of breast ultrasound images against adversarial attacks according to claim 1, characterized in that: The step S4 is specifically as follows: S41: Pixel feature vector With prototype vector Through the function Perform similarity calculation; S42: Using the loss function formula The similarity calculation results are calculated and the convolutional neural network parameters are updated according to the calculation results.

7. A breast ultrasound image robust segmentation system against adversarial attacks, characterized in that: The system comprises: A storage device for learning the nonlinear mapping of breast ultrasound images in feature space using a convolutional neural network to obtain a feature vector for each pixel point of each image; A storage device for replacing the projection head function originally composed of a two-dimensional convolutional layer with a prototype vector, and converting the category of the pixel into the category of the prototype vector with the greatest similarity to the pixel based on the feature vector of each pixel and the projection head function; A storage device for updating the prototype vector using a momentum update method based on a learning vector quantization method; The momentum update method based on the learning vector quantization method updates the prototype vector specifically as follows: For a C-class segmentation task, the category of each prototype is ,in, , assign K prototype vectors to each category, where , Represents one of the prototype vectors, specifically the first in the cth class prototype vectors, each with a dimension of D; The set of prototype vectors of class c is , represents the kth prototype vector of the cth class, and the set of all prototype vectors is ,in, , indicating the category; make Represents the feature vector of each pixel, and the prototype vector correspond, Indicates that it is assigned to The feature vector of the pixels, where the category of each pixel is , ; Assigned to the first prototype vectors, where ; The prototype vector is updated by the feature value of the pixel, and the update formula is: ; in, indicates that it is correctly assigned to the prototype vector The average value of the vector, Indicates that the error is assigned to the prototype vector The average value of the vector, is a hyperparameter, representing the scale of controlling the momentum update method; A storage device for updating the convolutional neural network parameters using a loss function based on a generalized learning vector quantization method.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for robust segmentation of breast ultrasound images against adversarial attacks as described in any one of claims 1 to 6 is executed.

9. A computer device, characterized in that: The device includes a memory and a processor, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the breast ultrasound image robust segmentation method against adversarial attacks as described in any one of claims 1-6.