A brain image classification method, system, terminal, and storage medium based on a fair distributed learning algorithm.
This brain tumor classification method, based on a fairness-based distributed learning algorithm, solves the model fairness problem caused by data heterogeneity, improves the accuracy and fairness of image classification, and is applicable to brain image classification and other fields where fairness is a consideration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PENG CHENG LAB
- Filing Date
- 2026-04-30
- Publication Date
- 2026-07-03
AI Technical Summary
In existing technologies, data heterogeneity among clients leads to fairness issues in joint models, reducing the accuracy of image predictions, especially in medical image classification and error threshold assessment, significantly reducing the accuracy of results.
A fairness-based distributed learning algorithm is adopted. By constructing a neural network model for brain tumor classification, the local loss function and gradient information are calculated. The update direction is determined by using fairness indicators and gradient information. Fairness constraints are added to the multi-objective optimization problem to optimize the model to improve fairness and accuracy.
It significantly improves the model's prediction accuracy for image classification results and maintains high classification accuracy in diverse brain tumor cases, while meeting the requirements for medical data privacy protection.
Smart Images

Figure CN122336436A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image classification technology, and in particular to a brain image classification method, system, terminal, and computer-readable storage medium based on a fair distributed learning algorithm. Background Technology
[0002] In recent years, deep learning technology, represented by large-scale basic models, has driven the rapid development of artificial intelligence in many fields, while also bringing challenges in terms of computational overhead and privacy protection.
[0003] However, the data distribution among clients often varies significantly. Due to the heterogeneous data distribution among clients in federated learning, certain groups of samples may have an excessively low proportion in the local data, leading to a decrease in the global model's recognition accuracy and thus a decline in fairness. This raises the issue of model fairness. In critical applications such as medical image classification or error threshold evaluation, an unfair global model may result in erroneous results, significantly reducing the accuracy of image predictions.
[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0005] The main objective of this invention is to provide a brain image classification method, system, terminal, and computer-readable storage medium based on a fair distributed learning algorithm. This invention aims to address the problem in the prior art where data heterogeneity among clients leads to fairness issues in the joint model, reducing the accuracy of the joint model in image prediction.
[0006] To achieve the above objectives, this invention provides a brain image classification method based on a fair distributed learning algorithm, which includes the following steps: Obtain brain image datasets from multiple clients, and construct a brain tumor classification neural network model based on each of the brain image datasets; The initial parameters of the brain tumor classification neural network model are transmitted to each of the clients to calculate the local loss function and gradient information for each client; A fairness index is constructed based on all the local loss functions, and the update direction of the brain tumor classification neural network model in the current iteration is determined based on the fairness index and all the gradient information. The brain tumor classification neural network model is optimized according to the update direction to obtain the iteration parameters in the current iteration round. The iteration parameters are then transmitted to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally a global classification model is obtained. The brain image data to be tested, input by the user, is fed into the global classification model for prediction, and the classification prediction result is output.
[0007] Optionally, the brain image classification method based on a fair distributed learning algorithm, wherein acquiring brain image datasets from multiple clients and constructing a brain tumor classification neural network model based on each brain image dataset specifically includes: Acquire labeled brain image datasets sent by multiple clients; An initial brain tumor classification model was constructed, and all labeled brain image datasets were input into the initial brain tumor classification model for collaborative training to obtain a brain tumor classification neural network model.
[0008] Optionally, in the brain image classification method based on a fair distributed learning algorithm, the step of transmitting the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information for each client specifically includes: Extract the initial parameters of the brain tumor classification neural network model and transmit the initial parameters to each of the clients respectively; Each client is controlled to calculate its corresponding local loss function based on the initial parameters, and the gradient information corresponding to each client is calculated based on each local loss function.
[0009] Optionally, the brain image classification method based on a fairness distributed learning algorithm, wherein constructing a fairness index based on all the local loss functions, and determining the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information, specifically includes: Calculate the variance of all the local loss functions, and use the variance to measure the fairness of the brain tumor classification neural network model to obtain a fairness index: ; in, The model parameters are: Fairness metrics in iteration rounds, Indicates the number of clients. The model parameters are: The first iteration in the iteration round The local loss function for each client. The model parameters are: The first iteration in the iteration round The local loss function for each client; Based on the fairness objective parameters and fairness index input by the user, fairness constraints are constructed and added to the constructed multi-objective optimization problem: ; ; in, , and These represent the model parameters as follows: The 1st, 2nd, and 3rd iterations in the iteration rounds The local loss function for each client. The model parameters are: Fairness constraints Indicates the fairness objective parameter, This represents a multi-objective optimization problem. This indicates that the multi-objective optimization problem is subject to fairness constraints; The multi-objective optimization problem is transformed and solved in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration.
[0010] Optionally, the brain image classification method based on a fair distributed learning algorithm, wherein the step of transforming and solving the multi-objective optimization problem in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration specifically includes: Construct an inner product using the initial direction of the current iteration and the fairness constraints, and then construct a maximum-minimum problem based on the constraints of the inner product: ; in, Indicates the initial direction of the current iteration. Represents a constant. Indicates the learning rate. Indicates the inner product. express gradient, express The decrease value; Performing a first-order Taylor expansion on the max-min problem yields its dual problem, which is then used to replace the multi-objective optimization problem. ; in, Indicates the first The optimal weight vector for each iteration round. Represents the weight vector. Indicates the first The weight of each client, Indicates the first Parameters of a neural network model for brain tumor classification after multiple iterations. The parameter is The The local loss function for each client. This represents the mean of all weights in the weight vector. The model parameters are: Fairness constraints express The gradient; Solving the dual problem yields the update direction of the brain tumor classification neural network model in the current iteration.
[0011] Optionally, in the brain image classification method based on a fair distributed learning algorithm, the dual problem is solved to obtain the update direction of the brain tumor classification neural network model in the current iteration, specifically as follows: In the current iteration, the dual problem is solved based on the optimal weights of each client to obtain the update direction of the brain tumor classification neural network model in the current iteration: ; in, Indicates the first The update direction of each iteration round. Indicates the first Round of iteration The optimal weight for each client, Indicates the first In the first iteration round The gradient of the local loss function for each client. Indicates the first The average of all weights in the weight vector of each iteration round.
[0012] Optionally, the brain image classification method based on a fair distributed learning algorithm, wherein optimizing the brain tumor classification neural network model according to the update direction to obtain the iteration parameters in the current iteration round, and transmitting the iteration parameters to all the clients to train the brain tumor classification neural network model for the next iteration round until a preset condition is met, ultimately obtaining a global classification model, specifically includes: Based on the update direction obtained in the current iteration, the brain tumor classification neural network model is optimized to obtain the iteration parameters in the current iteration: ; in, Indicates the first The iteration parameters for each iteration round. Indicates the first The iteration parameters for each iteration round. Indicates the first The learning rate for each iteration round. Indicates the first The update direction of each iteration round; The iteration parameters are input to all clients, and all clients are controlled to update the local loss function and the gradient information based on the iteration parameters. After updating the fairness index, the update direction of the brain tumor classification neural network model in the next iteration is determined to optimize the brain tumor classification neural network model until the average accuracy, worst accuracy and fairness index of the optimized brain tumor classification neural network model meet the preset standards. The brain tumor classification neural network model optimized in the current iteration is defined as a global classification model.
[0013] Furthermore, to achieve the above objectives, the present invention also provides a brain image classification system based on a fair distributed learning algorithm, wherein the brain image classification system based on the fair distributed learning algorithm includes: A joint model building module is used to acquire brain image datasets from multiple clients and build a brain tumor classification neural network model based on each of the brain image datasets; A local computing module is used to transmit the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information for each client. The direction optimization module is used to construct a fairness index based on all the local loss functions, and to determine the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information. The joint model optimization module is used to optimize the brain tumor classification neural network model according to the update direction, obtain the iteration parameters in the current iteration round, and transmit the iteration parameters to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally obtain the global classification model. The result prediction module is used to input the brain image data to be tested into the global classification model for prediction and output the classification prediction result.
[0014] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a brain image classification program based on a fair distributed learning algorithm stored in the memory and executable on the processor, wherein when the brain image classification program based on a fair distributed learning algorithm is executed by the processor, it implements the steps of the brain image classification method based on a fair distributed learning algorithm as described above.
[0015] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a brain image classification program based on a fair distributed learning algorithm, and the brain image classification program based on a fair distributed learning algorithm, when executed by a processor, implements the steps of the brain image classification method based on a fair distributed learning algorithm as described above.
[0016] In this invention, brain image datasets from multiple clients are acquired, and a brain tumor classification neural network model is constructed based on each dataset. The initial parameters of the brain tumor classification neural network model are transmitted to each client to calculate the local loss function and gradient information for each client. A fairness index is constructed based on all local loss functions, and the update direction of the brain tumor classification neural network model in the current iteration is determined based on the fairness index and all gradient information. The brain tumor classification neural network model is optimized according to the update direction to obtain the iteration parameters for the current iteration, and these iteration parameters are transmitted to all clients to train the brain tumor classification neural network model for the next iteration until a preset condition is met, ultimately resulting in a global classification model. The brain image data to be tested, input by the user, is input into the global classification model for prediction, and the classification prediction result is output. This invention combines the characteristics of distributed learning and multi-objective optimization, transforming the need to improve fairness into a constraint in the optimization problem, thus providing a significant guarantee of fairness and substantially improving the model's prediction accuracy for image classification results. Attached Figure Description
[0017] Figure 1 This is a flowchart of a preferred embodiment of the brain image classification method based on a fair distributed learning algorithm of the present invention; Figure 2 This is a structural diagram of a preferred embodiment of the brain image classification system based on a fair distributed learning algorithm of the present invention; Figure 3 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0019] The preferred embodiment of the brain image classification method based on a fair distributed learning algorithm described in this invention, such as... Figure 1 As shown, the brain image classification method based on a fair distributed learning algorithm includes the following steps: Step S10: Obtain brain image datasets from multiple clients, and construct a brain tumor classification neural network model based on each of the brain image datasets.
[0020] Distributed learning (or federated learning) effectively alleviates problems related to computational overhead and privacy protection by allowing multiple participating clients to collaboratively train a global model under the coordination of a central server and share model updates instead of the original data. In the embodiments disclosed in this invention, the goal is to minimize the average local loss of each client.
[0021] Specifically, acquire labeled brain image datasets sent by multiple clients; An initial brain tumor classification model was constructed, and all labeled brain image datasets were input into the initial brain tumor classification model for collaborative training to obtain a brain tumor classification neural network model.
[0022] Specifically, a joint model (i.e., a brain tumor classification neural network model) is constructed based on the local data of each client (i.e., the brain image dataset of each client) to achieve accurate prediction of heterogeneous data.
[0023] It should be noted that the brain image classification method based on a fairness distributed learning algorithm disclosed in this invention is not limited to predicting medical images, but can also be applied to other fields that consider fairness algorithms.
[0024] Step S20: Transmit the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information of each client.
[0025] Specifically, the initial parameters of the brain tumor classification neural network model are extracted, and the initial parameters are transmitted to each of the clients respectively; Each client is controlled to calculate its corresponding local loss function based on the initial parameters, and the gradient information corresponding to each client is calculated based on each local loss function.
[0026] One issue is the fairness of brain tumor classification neural network models. Because data distributions often differ significantly among clients, the global model, while minimizing the average loss, may perform poorly on individual clients with data distributions that deviate significantly from the mainstream. To address this, the initial parameters of the brain tumor classification neural network model are input to each client to calculate its local loss value, and gradient information is then calculated based on these local loss values.
[0027] Among them, based on the initial parameters of the neural network model for brain tumor classification, the client calculates the loss function and gradient locally based on its own data, without sharing the original medical data throughout the process. This fundamentally avoids the leakage and misuse of sensitive information during transmission and centralized storage, and strictly complies with the relevant laws and ethical requirements for medical data privacy protection.
[0028] In the subsequent model training process, allowing the client to calculate gradients locally can fully explore the feature information in these differentiated data; when the brain tumor classification neural network model is updated by aggregating gradients from multiple clients, it can absorb richer sample features, effectively improving the model's generalization ability and enabling it to maintain high classification accuracy when facing diverse brain tumor cases.
[0029] Step S30: Construct a fairness index based on all the local loss functions, and determine the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information.
[0030] While existing multi-objective optimization algorithms can improve fairness to some extent, the Pareto optimal solution set contains multiple solutions (i.e., in multi-objective optimization problems, no single solution is superior to all others in all objectives, thus giving rise to a set of solutions with "advantages" that together constitute the optimal solution set). The fairness indices corresponding to these solutions may not all meet the given fairness requirements. Therefore, this invention adds custom fairness constraints to the constructed multi-objective optimization problem, enabling the brain tumor classification neural network model to gradually converge and ultimately obtain a global classification model with high accuracy.
[0031] Specifically, the variance of all the local loss functions is calculated, and the variance is used to measure the fairness of the brain tumor classification neural network model to obtain a fairness index: ; in, The model parameters are: Fairness metrics in iteration rounds, Indicates the number of clients. The model parameters are: The first iteration in the iteration round The local loss function for each client. The model parameters are: The first iteration in the iteration round The local loss function for each client; Based on the fairness objective parameters and fairness index input by the user, fairness constraints are constructed and added to the constructed multi-objective optimization problem: ; ; in, , and These represent the model parameters as follows: The 1st, 2nd, and 3rd iterations in the iteration rounds The local loss function for each client. The model parameters are: Fairness constraints Indicates the fairness objective parameter, This represents a multi-objective optimization problem. This indicates that the multi-objective optimization problem is subject to fairness constraints; The multi-objective optimization problem is transformed and solved in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration.
[0032] In the multi-objective optimization framework, the fairness requirements among clients in distributed learning are quantified into a fairness index, and the upper bound of the growth of this index is used as a constraint condition, which is directly embedded into the direction solving problem of each iteration, thereby realizing the fairness guidance and control of the global model update direction.
[0033] Based on the fairness index constructed in the aforementioned steps, this invention uses a custom fairness objective parameter to further construct fairness constraints to constrain the multi-objective optimization problem. In solving this multi-objective optimization problem, this invention utilizes a multi-gradient descent algorithm to solve the update direction of the brain tumor classification neural network model in each iteration. This update direction can maximize the minimum descent value of all objectives.
[0034] Furthermore, using the initial direction of the current iteration round and the fairness constraints, an inner product is constructed, and a max-min problem is constructed based on the constraints of the inner product: ; in, Indicates the initial direction of the current iteration. Represents a constant. Indicates the learning rate. Indicates the inner product. express gradient, express The decrease value; Performing a first-order Taylor expansion on the max-min problem yields its dual problem, which is then used to replace the multi-objective optimization problem. ; in, Indicates the first The optimal weight vector for each iteration round. Represents the weight vector. Indicates the first The weight of each client, Indicates the first Parameters of a neural network model for brain tumor classification after multiple iterations. The parameter is The The local loss function for each client. This represents the mean of all weights in the weight vector. The model parameters are: Fairness constraints express The gradient; Solving the dual problem yields the update direction of the brain tumor classification neural network model in the current iteration.
[0035] In order to promote the fairness index to approach the target value, this invention needs to determine a lower bound between the inner product of the update direction and the fairness constraint. At this point, the above multi-objective optimization problem can be transformed into a max-min problem.
[0036] Furthermore, by constructing an inner product and transforming it into a max-min problem, the update direction can be forced to a gradient descent direction that satisfies all clients, thereby avoiding model bias towards a few clients and improving the prediction accuracy of the brain tumor classification neural network model after each iteration.
[0037] Specifically, in the current iteration, the dual problem is solved based on the optimal weights of each client to obtain the update direction of the brain tumor classification neural network model in the current iteration: ; in, Indicates the first The update direction of each iteration round. Indicates the first Round of iteration The optimal weight for each client, Indicates the first In the first iteration round The gradient of the local loss function for each client. Indicates the first The average of all weights in the weight vector of each iteration round.
[0038] Specifically, a first-order Taylor expansion is performed on the reconstructed max-min problem, thereby solving the dual problem of the max-min problem to solve the multi-objective optimization problem. Finally, the weight vector in the current iteration can be derived, and the update direction of the brain tumor classification neural network model in the current iteration can be constructed based on the weight vector.
[0039] On the server side, a fairness index reflecting target conflict is constructed based on the local gradient information uploaded by each client; a gradient direction optimization subproblem with fairness constraints is solved to obtain a model update direction that can reduce the loss of all clients without significantly impairing fairness; the brain tumor classification neural network model is updated using this direction, and the model is eventually converged to a Pareto optimal solution that balances accuracy and fairness through iteration.
[0040] Step S40: Optimize the brain tumor classification neural network model according to the update direction to obtain the iteration parameters in the current iteration round, and transmit the iteration parameters to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally obtain the global classification model.
[0041] Specifically, based on the update direction obtained in the current iteration, the brain tumor classification neural network model is optimized to obtain the iteration parameters in the current iteration: ; in, Indicates the first The iteration parameters for each iteration round. Indicates the first The iteration parameters for each iteration round. Indicates the first The learning rate for each iteration round. Indicates the first The update direction of each iteration round; The iteration parameters are input to all clients, and all clients are controlled to update the local loss function and the gradient information based on the iteration parameters. After updating the fairness index, the update direction of the brain tumor classification neural network model in the next iteration is determined to optimize the brain tumor classification neural network model until the average accuracy, worst accuracy and fairness index of the optimized brain tumor classification neural network model meet the preset standards. The brain tumor classification neural network model optimized in the current iteration is defined as a global classification model.
[0042] After solving the current round, the iteration parameters for training the next round are calculated based on the obtained update direction until the final brain tumor classification neural network model, i.e., the global classification model, is obtained to predict and classify the brain image data to be tested.
[0043] Step S50: Input the brain image data to be tested input by the user into the global classification model for prediction, and output the classification prediction result.
[0044] In order to verify the effectiveness of the algorithm described in this invention, the method was evaluated on a preset platform. The experiment showed that the method can efficiently and stably complete the training task of deep neural networks in a distributed environment, and while significantly improving the fairness of the model, it maintains convergence performance comparable to the baseline, providing reliable basic model support for upper-layer applications.
[0045] In the embodiments disclosed in this invention, experiments based on image classification tasks were conducted on the CIFAR-10 (Canadian Institute for Advanced Research-10, a 10-class image dataset) standard dataset. This invention employs a classic convolutional neural network as the model architecture and trains it under the same distributed network settings. Experimental results show that, compared with existing fairness algorithms, this method achieves a significant improvement of approximately 36% in fairness metrics. Therefore, this invention not only effectively solves the problem of imbalanced model performance caused by data heterogeneity but also possesses the technical potential for practical application in multiple fields with stringent fairness requirements.
[0046] Furthermore, in another embodiment of the present invention, an experiment of the present invention was conducted using credit assessment as an example; customer credit features from multiple databases were obtained, and then a joint model was trained based on the method disclosed in the present invention. Then, the newly input customer credit features from these databases were input into the joint model for evaluation and prediction. Finally, it was found that the joint model significantly reduced the risk misjudgment rate for "long tail" customer groups (such as farmers and micro-enterprise owners) while maintaining overall performance.
[0047] Furthermore, this invention performs an image processing classification task, comparing it with several existing methods.
[0048] For the distributed network serving 10 clients, two model architectures were trained on real-world datasets: a multilayer perceptron on the FashionMNIST dataset (Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms) and a five-layer convolutional neural network on the CIFAR-10 dataset. To simulate data heterogeneity, training data was distributed to each client by category. Under such highly heterogeneous conditions, fairness became a significant concern.
[0049] In the experiments, the FedAvg algorithm (Federated Averaging) with only a single local update was used as the baseline method and compared with two types of fairness-oriented methods: (1) weight adjustment-based methods, including qFFL (q-Fair Federated Learning) and DRFL (Digital Radiography and Fluoroscopy System Weight Adjustment Method); (2) multi-objective optimization-based methods, including FedMGDA+ (Federated Multi-GradientDescent Algorithm Plus), AdaFed (Adaptive Federated Learning), FedMDFG (Federated Learning with Multi-GradientDescent and Fair Guidance) and FedLF (Federated Learning with Layer-wise Fairness). This invention focuses on three metrics: the average accuracy of the global model output by the algorithm (for all 10 clients), the fairness metric, and the worst accuracy of the global model across multiple clients. Specific results are shown in Tables 1 and 2: Table 1: Comparison of First Results
[0050] Table 2: Comparison of Second Results
[0051] In terms of average accuracy, this method is close to existing algorithms. Regarding fairness metrics, this method significantly reduces the accuracy compared to existing algorithms, indicating that this invention can provide a substantial guarantee of fairness. In terms of worst-case accuracy, this method shows a significant improvement over existing algorithms.
[0052] This invention combines the features of distributed learning and multi-objective optimization, transforming the need to improve fairness into a constraint in the optimization problem. This provides a high degree of fairness guarantee and significantly improves the model's prediction accuracy for image classification results.
[0053] Furthermore, such as Figure 2 As shown, based on the above-mentioned brain image classification method based on a fair distributed learning algorithm, this invention also provides a brain image classification system based on a fair distributed learning algorithm, wherein the brain image classification system based on a fair distributed learning algorithm includes: The joint model building module 51 is used to acquire brain image datasets from multiple clients and build a brain tumor classification neural network model based on each of the brain image datasets. The local computing module 52 is used to transmit the initial parameters of the brain tumor classification neural network model to each of the clients to calculate the local loss function and gradient information of each client; The direction optimization module 53 is used to construct a fairness index based on all the local loss functions, and to determine the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information. The joint model optimization module 54 is used to optimize the brain tumor classification neural network model according to the update direction, obtain the iteration parameters in the current iteration round, and transmit the iteration parameters to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally obtain the global classification model. The result prediction module 55 is used to input the brain image data to be tested input by the user into the global classification model for prediction and output the classification prediction result.
[0054] Furthermore, such as Figure 3 As shown, based on the above-mentioned brain image classification method and system based on the fair distributed learning algorithm, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 3 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0055] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a brain image classification program 40 based on a fair distributed learning algorithm, which can be executed by the processor 10 to implement the brain image classification method based on a fair distributed learning algorithm in this application.
[0056] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the brain image classification method based on the fairness distributed learning algorithm.
[0057] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.
[0058] In one embodiment, when the processor 10 executes the brain image classification program 40 based on a fair distributed learning algorithm stored in the memory 20, the following steps are performed: Obtain brain image datasets from multiple clients, and construct a brain tumor classification neural network model based on each of the brain image datasets; The initial parameters of the brain tumor classification neural network model are transmitted to each of the clients to calculate the local loss function and gradient information for each client; A fairness index is constructed based on all the local loss functions, and the update direction of the brain tumor classification neural network model in the current iteration is determined based on the fairness index and all the gradient information. The brain tumor classification neural network model is optimized according to the update direction to obtain the iteration parameters in the current iteration round. The iteration parameters are then transmitted to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally a global classification model is obtained. The brain image data to be tested, input by the user, is fed into the global classification model for prediction, and the classification prediction result is output.
[0059] The step of acquiring brain image datasets from multiple clients and constructing a brain tumor classification neural network model based on each brain image dataset specifically includes: Acquire labeled brain image datasets sent by multiple clients; An initial brain tumor classification model was constructed, and all labeled brain image datasets were input into the initial brain tumor classification model for collaborative training to obtain a brain tumor classification neural network model.
[0060] Specifically, transmitting the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information for each client includes: Extract the initial parameters of the brain tumor classification neural network model and transmit the initial parameters to each of the clients respectively; Each client is controlled to calculate its corresponding local loss function based on the initial parameters, and the gradient information corresponding to each client is calculated based on each local loss function.
[0061] The step of constructing a fairness index based on all the local loss functions, and determining the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information, specifically includes: Calculate the variance of all the local loss functions, and use the variance to measure the fairness of the brain tumor classification neural network model to obtain a fairness index: ; in, The model parameters are: Fairness metrics in iteration rounds, Indicates the number of clients. The model parameters are: The first iteration in the iteration round The local loss function for each client. The model parameters are: The first iteration in the iteration round The local loss function for each client; Based on the fairness objective parameters and fairness index input by the user, fairness constraints are constructed and added to the constructed multi-objective optimization problem: ; ; in, , and These represent the model parameters as follows: The 1st, 2nd, and 3rd iterations in the iteration rounds The local loss function for each client. The model parameters are: Fairness constraints Indicates the fairness objective parameter, This represents a multi-objective optimization problem. This indicates that the multi-objective optimization problem is subject to fairness constraints; The multi-objective optimization problem is transformed and solved in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration.
[0062] Specifically, the step of transforming and solving the multi-objective optimization problem in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration includes: Construct an inner product using the initial direction of the current iteration and the fairness constraints, and then construct a maximum-minimum problem based on the constraints of the inner product: ; in, Indicates the initial direction of the current iteration. Represents a constant. Indicates the learning rate. Indicates the inner product. express gradient, express The decrease value; Performing a first-order Taylor expansion on the max-min problem yields its dual problem, which is then used to replace the multi-objective optimization problem. ; in, Indicates the first The optimal weight vector for each iteration round. Represents the weight vector. Indicates the first The weight of each client, Indicates the first Parameters of a neural network model for brain tumor classification after multiple iterations. The parameter is The The local loss function for each client. This represents the mean of all weights in the weight vector. The model parameters are: Fairness constraints express The gradient; Solving the dual problem yields the update direction of the brain tumor classification neural network model in the current iteration.
[0063] Solving the dual problem yields the update direction of the brain tumor classification neural network model in the current iteration, specifically as follows: In the current iteration, the dual problem is solved based on the optimal weights of each client to obtain the update direction of the brain tumor classification neural network model in the current iteration: ; in, Indicates the first The update direction of each iteration round. Indicates the first Round of iteration The optimal weight for each client, Indicates the first In the first iteration round The gradient of the local loss function for each client. Indicates the first The average of all weights in the weight vector of each iteration round.
[0064] Specifically, the process of optimizing the brain tumor classification neural network model according to the update direction to obtain the iteration parameters in the current iteration round, and transmitting the iteration parameters to all clients to train the brain tumor classification neural network model for the next iteration round, until a preset condition is met, ultimately obtaining a global classification model, includes: Based on the update direction obtained in the current iteration, the brain tumor classification neural network model is optimized to obtain the iteration parameters in the current iteration: ; in, Indicates the first The iteration parameters for each iteration round. Indicates the first The iteration parameters for each iteration round. Indicates the first The learning rate for each iteration round. Indicates the first The update direction of each iteration round; The iteration parameters are input to all clients, and all clients are controlled to update the local loss function and the gradient information based on the iteration parameters. After updating the fairness index, the update direction of the brain tumor classification neural network model in the next iteration is determined to optimize the brain tumor classification neural network model until the average accuracy, worst accuracy and fairness index of the optimized brain tumor classification neural network model meet the preset standards. The brain tumor classification neural network model optimized in the current iteration is defined as a global classification model.
[0065] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a brain image classification program based on a fair distributed learning algorithm, and the brain image classification program based on a fair distributed learning algorithm, when executed by a processor, implements the steps of the brain image classification method based on a fair distributed learning algorithm as described above.
[0066] In summary, this invention provides a brain image classification method and related equipment based on a fairness-based distributed learning algorithm. The method includes: acquiring brain image datasets from multiple clients and constructing a brain tumor classification neural network model based on each brain image dataset; transmitting the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information for each client; constructing a fairness index based on all the local loss functions, and determining the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information; optimizing the brain tumor classification neural network model according to the update direction to obtain the iteration parameters in the current iteration, and transmitting the iteration parameters to all the clients to train the brain tumor classification neural network model for the next iteration until a preset condition is met, ultimately obtaining a global classification model; inputting the brain image data to be tested by the user into the global classification model for prediction, and outputting the classification prediction result. This invention combines the characteristics of distributed learning and multi-objective optimization, transforming the need to improve fairness into a constraint in the optimization problem, which can provide a large degree of fairness guarantee and significantly improve the prediction accuracy of the model for image classification results.
[0067] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0068] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.
[0069] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A brain image classification method based on a fair distributed learning algorithm, characterized in that, The brain image classification method based on a fair distributed learning algorithm includes: Obtain brain image datasets from multiple clients, and construct a brain tumor classification neural network model based on each of the brain image datasets; The initial parameters of the brain tumor classification neural network model are transmitted to each of the clients to calculate the local loss function and gradient information for each client; A fairness index is constructed based on all the local loss functions, and the update direction of the brain tumor classification neural network model in the current iteration is determined based on the fairness index and all the gradient information. The brain tumor classification neural network model is optimized according to the update direction to obtain the iteration parameters in the current iteration round, and the iteration parameters are transmitted to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally a global classification model is obtained. The brain image data to be tested, input by the user, is fed into the global classification model for prediction, and the classification prediction result is output.
2. The brain image classification method based on a fair distributed learning algorithm according to claim 1, characterized in that, The process of acquiring brain image datasets from multiple clients and constructing a brain tumor classification neural network model based on each brain image dataset specifically includes: Acquire labeled brain image datasets sent by multiple clients; An initial brain tumor classification model was constructed, and all labeled brain image datasets were input into the initial brain tumor classification model for collaborative training to obtain a brain tumor classification neural network model.
3. The brain image classification method based on a fair distributed learning algorithm according to claim 1, characterized in that, The step of transmitting the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information for each client specifically includes: Extract the initial parameters of the brain tumor classification neural network model and transmit the initial parameters to each of the clients respectively; Each client is controlled to calculate its corresponding local loss function based on the initial parameters, and the gradient information corresponding to each client is calculated based on each local loss function.
4. The brain image classification method based on a fair distributed learning algorithm according to claim 1, characterized in that, The step of constructing a fairness index based on all the local loss functions, and determining the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information, specifically includes: Calculate the variance of all the local loss functions, and use the variance to measure the fairness of the brain tumor classification neural network model to obtain a fairness index: ; in, The model parameters are: Fairness metrics in iteration rounds, Indicates the number of clients. The model parameters are: The first iteration in the iteration round The local loss function for each client. The model parameters are: The first iteration in the iteration round The local loss function for each client; Based on the fairness objective parameters and fairness index input by the user, fairness constraints are constructed and added to the constructed multi-objective optimization problem: ; ; in, , and These represent the model parameters as follows: The 1st, 2nd, and 3rd iterations in the iteration rounds The local loss function for each client. The model parameters are: Fairness constraints Indicates the fairness objective parameter, This represents a multi-objective optimization problem. This indicates that the multi-objective optimization problem is subject to fairness constraints; The multi-objective optimization problem is transformed and solved in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration.
5. The brain image classification method based on a fair distributed learning algorithm according to claim 4, characterized in that, The process of transforming and solving the multi-objective optimization problem in the current iteration to obtain the update direction of the brain tumor classification neural network model in the current iteration specifically includes: Construct an inner product using the initial direction of the current iteration and the fairness constraints, and then construct a maximum-minimum problem based on the constraints of the inner product: ; in, Indicates the initial direction of the current iteration. Represents a constant. Indicates the learning rate. Indicates the inner product. express gradient, express The decrease value; Performing a first-order Taylor expansion on the max-min problem yields its dual problem, which is then used to replace the multi-objective optimization problem. ; in, Indicates the first The optimal weight vector for each iteration round. Represents the weight vector. Indicates the first The weight of each client, Indicates the first Parameters of a neural network model for brain tumor classification after multiple iterations. The parameter is The The local loss function for each client. This represents the mean of all weights in the weight vector. The model parameters are: Fairness constraints express The gradient; Solving the dual problem yields the update direction of the brain tumor classification neural network model in the current iteration.
6. The brain image classification method based on a fair distributed learning algorithm according to claim 5, characterized in that, Solving the dual problem yields the update direction of the brain tumor classification neural network model in the current iteration, specifically: In the current iteration, the dual problem is solved based on the optimal weights of each client to obtain the update direction of the brain tumor classification neural network model in the current iteration: ; in, Indicates the first The update direction of each iteration round. Indicates the first Round of iteration The optimal weight for each client, Indicates the first In the first iteration round The gradient of the local loss function for each client. Indicates the first The average of all weights in the weight vector of each iteration round.
7. The brain image classification method based on a fair distributed learning algorithm according to claim 1, characterized in that, The process of optimizing the brain tumor classification neural network model according to the update direction to obtain the iteration parameters in the current iteration round, and transmitting the iteration parameters to all clients to train the brain tumor classification neural network model for the next iteration round, until a preset condition is met, and finally a global classification model is obtained, specifically includes: Based on the update direction obtained in the current iteration, the brain tumor classification neural network model is optimized to obtain the iteration parameters in the current iteration: ; in, Indicates the first The iteration parameters for each iteration round. Indicates the first The iteration parameters for each iteration round. Indicates the first The learning rate for each iteration round. Indicates the first The update direction of each iteration round; The iteration parameters are input to all clients, and all clients are controlled to update the local loss function and the gradient information based on the iteration parameters. After updating the fairness index, the update direction of the brain tumor classification neural network model in the next iteration is determined to optimize the brain tumor classification neural network model until the average accuracy, worst accuracy and fairness index of the optimized brain tumor classification neural network model meet the preset standards. The brain tumor classification neural network model optimized in the current iteration is defined as a global classification model.
8. A brain image classification system based on a fair distributed learning algorithm, characterized in that, The brain image classification system based on the fair distributed learning algorithm is used to implement the brain image classification method based on the fair distributed learning algorithm as described in any one of claims 1-7, wherein the brain image classification system based on the fair distributed learning algorithm comprises: A joint model building module is used to acquire brain image datasets from multiple clients and build a brain tumor classification neural network model based on each of the brain image datasets; A local computing module is used to transmit the initial parameters of the brain tumor classification neural network model to each client to calculate the local loss function and gradient information for each client. The direction optimization module is used to construct a fairness index based on all the local loss functions, and to determine the update direction of the brain tumor classification neural network model in the current iteration based on the fairness index and all the gradient information. The joint model optimization module is used to optimize the brain tumor classification neural network model according to the update direction, obtain the iteration parameters in the current iteration round, and transmit the iteration parameters to all the clients to train the brain tumor classification neural network model for the next iteration round until the preset conditions are met, and finally obtain the global classification model. The result prediction module is used to input the brain image data to be tested into the global classification model for prediction and output the classification prediction result.
9. A terminal, characterized in that, The terminal includes: a memory, a processor, and a brain image classification program based on a fair distributed learning algorithm stored in the memory and executable on the processor. When the brain image classification program based on a fair distributed learning algorithm is executed by the processor, it implements the steps of the brain image classification method based on a fair distributed learning algorithm as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a brain image classification program based on a fair distributed learning algorithm, which, when executed by a processor, implements the steps of the brain image classification method based on a fair distributed learning algorithm as described in any one of claims 1-7.