Medical prejudice removal big language model training method and device, electronic equipment and medium
By performing resource detection on server clusters and building decision trees based on multimodal data sets, and combining them with medical knowledge bases for model training and deployment, we solved the data bias and training speed issues of large medical language models, improved the fairness and stability of the model, and optimized server resource usage.
Patent Information
- Application Number
- CN202511309831.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing large medical language models suffer from data bias, resource constraints, and slow training speeds during training. These problems lead to delayed model output, low accuracy, increased server cluster load and damage rate, and a lack of effective monitoring and calibration.
By performing resource detection on the server cluster and screening the target servers, a medical input feature decision tree is constructed using a multimodal medical feedback dataset. Constraint correction is performed in combination with a preset medical knowledge base, and posterior model debiasing training is performed. Finally, the model is migrated and deployed on a server with sufficient resources.
It improves the fairness and stability of the medical debiasing large language model, enhances the model training speed and the rational use of server resources, reduces the server's operating load and damage rate, and ensures the accuracy and timeliness of the model output.
Smart Images

Figure CN120806048A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of computer technology, and in particular, to a medical debiased large language model training method and device, electronic equipment and medium. BACKGROUND
[0002] Due to the data differences of medical data caused by regional medical habits, disease epidemic characteristics, and the continuous updating of medical knowledge and treatment plans, the large language model cannot adapt in time, resulting in output lag and low output accuracy, and cannot adapt to the growing medical needs. For the training of a medical debiased large language model, the commonly used method is to debias the large language model to debias the multi-modal medical data set and obtain a debiased medical data set.
[0003] However, in practice, it is found that when the above method is used to train the medical debiased large language model, the following technical problems often exist: due to the single data source itself having a single data bias problem, and only using the large language model for model debiasing, and the multi-modal medical data set being updated in real time, it is possible that the training of the large language model cannot be performed or is delayed on a resource-limited server, reducing the model performance, and further lacking monitoring and adjustment after the training of the large language model is completed, resulting in low data debiasing accuracy, low large language model debiasing accuracy, reducing the training speed of the model, increasing the running load of the server cluster, prolonging the model deployment time, reducing the stability of the server cluster, and increasing the damage rate.
[0004] The above information disclosed in this BACKGROUND section is only for the purpose of enhancing the understanding of the background of the present disclosure, and therefore, it can contain information that is not prior art known to those of ordinary skill in the art in the country to which this patent belongs. SUMMARY
[0005] The summary section of the present disclosure is presented in a brief form to introduce the concepts that will be described in detail in the following detailed description section. The summary section of the present disclosure is not intended to identify key or essential features of the claimed technology, nor is it intended to be used to limit the scope of the claimed technology.
[0006] Some embodiments of the present disclosure propose a medical debiased large language model training method, device, electronic equipment and medium to solve one or more of the technical problems mentioned in the background section.
[0007] In a first aspect, some embodiments of the present disclosure provide a medical debiased large language model training method, comprising: performing resource detection on a server cluster, and screening servers meeting resource selection conditions from the server cluster as target servers; controlling the target servers to input an obtained multi-modal medical feedback dataset into a medical debiased large language model to obtain a medical diagnosis information set; constructing a medical input feature decision tree according to the medical diagnosis information set and the multi-modal medical feedback dataset; generating an counterfactual medical diagnosis scenario dataset according to the multi-modal medical feedback dataset, the medical diagnosis information set and the medical input feature decision tree; performing constraint correction on the medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set; performing model posterior debiased training on the medical debiased large language model according to the counterfactual medical diagnosis scenario dataset and the corrected medical diagnosis information set to obtain a trained medical debiased large language model; and in response to detecting that a resource alarm occurs in the target servers, compressing and sending the trained medical debiased large language model to servers meeting the resource selection conditions and migrating and deploying the trained medical debiased large language model.
[0008] In a second aspect, some embodiments of the present disclosure provide a medical debiased large language model training apparatus, comprising: a resource detection unit configured to perform resource detection on a server cluster, and screen servers meeting resource selection conditions from the server cluster as target servers; a control unit configured to control the target servers to input an obtained multi-modal medical feedback dataset into a medical debiased large language model to obtain a medical diagnosis information set; a construction unit configured to construct a medical input feature decision tree according to the medical diagnosis information set and the multi-modal medical feedback dataset; a generation unit configured to generate an counterfactual medical diagnosis scenario dataset according to the multi-modal medical feedback dataset, the medical diagnosis information set and the medical input feature decision tree; a constraint correction unit configured to perform constraint correction on the medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set; a model posterior debiased training unit configured to perform model posterior debiased training on the medical debiased large language model according to the counterfactual medical diagnosis scenario dataset and the corrected medical diagnosis information set to obtain a trained medical debiased large language model; and a compression sending unit configured to, in response to detecting that a resource alarm occurs in the target servers, compress and send the trained medical debiased large language model to servers meeting the resource selection conditions and migrate and deploy the trained medical debiased large language model.
[0009] In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect.
[0010] In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method described in any implementation manner of the first aspect.
[0011] The above various embodiments of the present disclosure have the following beneficial effects: the medical debiasing large language model training method of some embodiments of the present disclosure can improve the fairness and stability of the medical debiasing large language model, improve the training speed of the medical debiasing large language model, and improve the rational use of server resources and the load balancing of the server. Specifically, the reason for the low accuracy of data debiasing, the low accuracy of large language model training, the low training speed of the model, the high running load of the server cluster, the long model deployment time, the low stability of the server cluster, and the high damage rate is that: due to the single bias problem of the single data source itself, and only using the large language model for model debiasing processing, and the real-time update of the multi-modal medical data set, it may not be possible to execute or extend the training of the large language model on the resource-limited server, which reduces the performance of the model, and further lacks monitoring and adjustment after the training of the large language model is completed, resulting in low data debiasing accuracy, low large language model debiasing accuracy, low model training speed, high server cluster running load, long model deployment time, low server cluster stability, and high damage rate. Based on this, the medical debiasing large language model training method of some embodiments of the present disclosure can first perform resource detection on the server cluster, and select servers that meet the resource selection conditions from the above server cluster as target servers. Here, the load balancing of the server cluster can be improved, and the training efficiency of the subsequent medical debiasing large language model on the resource-rich service can be improved, and the model training speed can be accelerated. Secondly, the target server controls the multi-modal medical feedback data set obtained to be input into the medical debiasing large language model to obtain a medical diagnosis information set. Here, the diversity of the data can be improved by using the multi-modal medical data set, which effectively reduces the bias generated by the single data source, and the performance of the medical debiasing large language model can be continuously optimized by using the real-time feedback data set, which reduces the accumulation of bias in the model to improve the performance of the model, and improves the fairness of the medical debiasing large language model. Thirdly, according to the medical diagnosis information set and the multi-modal medical feedback data set, a medical input feature decision tree is constructed. Here, the importance of each medical input feature in the medical input feature decision tree can be accurately determined in order to judge the rationality and fairness of the medical debiasing large language model output. Subsequently, according to the multi-modal medical feedback data set, the medical diagnosis information set, and the medical input feature decision tree, an counterfactual medical diagnosis scene data set is generated. Here, the accuracy of the generated counterfactual medical diagnosis scene data set can be improved, and the reasoning ability of the medical debiasing large language model can be combined to provide accurate counterfactual explanations for each multi-modal medical feedback data, which can improve the accuracy of subsequent debiasing. Then, according to a preset medical knowledge base, the medical diagnosis information set is constrained and corrected to obtain a corrected medical diagnosis information set.Here, the constraint correction can be used as prior knowledge by a preset medical knowledge base, which can effectively reduce the biased output caused by the illusion problem of the medical debiased large language model. Then, according to the above counterfactual medical diagnosis scene data set and the above corrected medical diagnosis information set, the medical debiased large language model is subjected to post-hoc debiased training to obtain a trained medical debiased large language model. Here, through the post-hoc debiased training method of the medical debiased large language model, a debiased processing from data collection to model training and deployment is constructed, which reduces the generation of biased models due to the deviation of the obtained data. The post-hoc debiased training can adapt to the dynamic changes of multi-modal medical data, and has a continuous feedback and iterative updating mechanism, which can real-time maintain and improve the performance, fairness and stability of the medical debiased large language model output, and accelerate the speed and efficiency of the medical debiased large language model training. Finally, in response to detecting that the target server has a resource alarm, the trained medical debiased large language model is compressed and sent to the server that meets the resource selection condition and migrated and deployed. Here, the running load of the target server can be reduced, and the model deployment speed and the waste of transmission resources can be improved. Therefore, the medical debiased large language model training method can effectively reduce the bias caused by a single data source by using multi-modal medical feedback data sets and model usage feedback data, improve the fairness and stability of the medical debiased large language model output, and enhance the model interpretability. The medical debiased large language model training method constructs a whole process from data collection to model deployment, effectively solves the risk problem in the application of the medical debiased large language model, and the model usage feedback data set can enable the model to quickly adapt to the dynamic changes of medical data and timely integrate the latest medical knowledge to maintain the accuracy and timeliness of the model output. BRIEF DESCRIPTION OF DRAWINGS
[0012] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail some embodiments thereof with reference to the attached drawings. The same or similar components have the same or similar reference labels throughout the drawings. It is to be understood that the drawings are schematic, and elements and components are not necessarily drawn to scale.
[0013] Figure 1 is a flowchart of some embodiments of the medical debiased large language model training method according to the present disclosure; Figure 2 is a schematic diagram of a medical input-output causal relationship formed by each input feature and output medical diagnosis information included in the multi-modal medical feedback data set in some embodiments of the medical debiased large language model training method according to the present disclosure; Figure 3 is a comparison schematic diagram of the medical debiased large language model and the existing scheme traditional model in multiple evaluation dimensions based on the medical debiased large language model in some embodiments of the medical debiased large language model training method according to the present disclosure; Figure 4 is a structural schematic diagram of some embodiments of a medical debiasing large language model training apparatus according to the present disclosure; Figure 5 is a structural schematic diagram of an electronic device suitable for use to implement some embodiments of the present disclosure. DETAILED DESCRIPTION
[0014] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0015] It should also be noted that, for ease of description, only parts related to the present application are shown in the drawings. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0016] It should be noted that the terms "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
[0017] It should be noted that the terms "one", "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless otherwise explicitly stated in the context, it should be understood as "one or more".
[0018] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0019] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0020] Figure 1 Flow 100 of some embodiments of a medical debiasing large language model training method according to the present disclosure is shown. The medical debiasing large language model training method comprises the following steps: Step 101, resource detection is performed on a server cluster, and servers that meet resource selection conditions are selected from the server cluster as target servers.
[0021] In some embodiments, the execution subject (e.g., an electronic device) of the above medical debiasing large language model training method can perform resource detection on a server cluster, and select a server that meets a resource selection condition from the server cluster as a target server. The resource selection condition can be that the idle resources of the server are greater than or equal to the resources required for the medical debiasing large language model and the multi-modal medical feedback dataset to run. The target server can be the server with the most idle resources among the at least one server that meets the resource selection condition.
[0022] In step 102, the target server is controlled to input the multi-modal medical feedback dataset into the medical debiasing large language model to obtain a medical diagnosis information set.
[0023] In some embodiments, the execution subject can control the target server to input the obtained multi-modal medical feedback dataset into the medical debiasing large language model to obtain a medical diagnosis information set. The multi-modal medical feedback dataset can be generated based on the obtained multi-modal medical dataset and the model usage feedback dataset. The multi-modal medical data in the multi-modal medical dataset can be medical data of different data formats representing patient physical state information. The model usage feedback data in the model usage feedback dataset can be feedback information given by the user after using the model. The multi-modal medical data can include patient basic information (age, gender, race, etc.), symptom description, diagnosis result, treatment plan, medical image data, and wearable device collected physiological data such as heart rate, blood pressure, blood glucose, and time series data. Different sources can include at least one of the following: a hospital, a medical research institution, and a public medical dataset. The model usage feedback dataset can be data collected through a feedback interface, reflecting the use experience and feedback of the user of the medical debiasing large language model. The obtaining can be performed through wired or wireless encrypted transmission. The medical debiasing large language model can be a large language model that outputs diagnosis information after debiasing prediction on the input multi-modal medical feedback dataset. The medical debiasing large language model can be a Deepseek model or a GPT (Generative Pre-Trained Transformer) model. The medical diagnosis information in the medical diagnosis information set can be diagnosis information such as the type of disease suffered by the patient, the treatment information of the patient, and the required drugs of the patient predicted and output by the medical debiasing large language model.
[0024] In some optional implementations of some embodiments, the model using feedback data set includes: a first model using feedback data set and a second model using feedback data set. The first model using feedback data in the first model using feedback data set can be information of a doctor's feedback evaluation on the result output by the medical debiased large language model. The first model using feedback data can include feedback data of the doctor on whether the medical diagnosis information output by the medical debiased large language model is accurate and reasonable, and the medical advice given for the output result. The second model using feedback data in the second model using feedback data set can be feedback data of a patient's satisfaction with the medical debiased large language model in the form of a score value, and a text description of feelings and doubts.
[0025] Optionally, the control of the target server, the input of the obtained multi-modal medical feedback data set to the medical debiased large language model, and the obtaining of the medical diagnosis information set can include the following steps: First, perform named entity recognition on the first model using feedback data set to obtain a medical feedback entity set. The medical feedback entity in the medical feedback entity set can be a medical entity related to the diagnosis information extracted from the first model using feedback data. The medical entity can include at least one of the following: disease diagnosis category entity, treatment plan entity, model output entity, and feedback emotion entity. The named entity recognition can be performed using a Bio_ClinicalBERT model.
[0026] Second, perform model usage satisfaction recognition on the second model using feedback data set to obtain a model usage sentiment tendency information set. The model usage sentiment tendency information in the model usage sentiment tendency information set can represent the positive or negative tendency of the patient's sentiment using the medical debiased large language model. In practice, the execution subject can first perform numerical conversion on the score data set included in the second model using feedback data set to obtain a feedback conversion data set. The feedback conversion data in the feedback conversion data set can be data representing the patient's satisfaction with the medical debiased large language model in numerical form. Then, using a sentiment analysis model, perform model usage satisfaction recognition on the text description data set included in the second model using feedback data set to obtain a model usage information set. The sentiment analysis model can include at least one of the following: a Transformer model and a bidirectional long short-term memory neural network model. Finally, perform fixed weight summation processing on each feedback conversion data in the feedback conversion data set and the corresponding model usage sentiment information in the model usage sentiment information set to obtain a model usage sentiment tendency information set.
[0027] In the third step, the multi-modal medical data set, the medical feedback entity set, and the model usage sentiment information set are associated and matched to obtain a medical association data set. The medical association data in the medical association data set can be medical data obtained by keyword matching the medical feedback entity, the model usage sentiment information, and the multi-modal medical data set, and then data fusion through the matched keywords.
[0028] In the fourth step, the medical association data set is input into a multi-modal feature extraction alignment network included in the medical debiased large language model to obtain a multi-modal medical feature vector set. The medical debiased large language model further includes a medical bias detection network and an adversarial debiasing network. The multi-modal feature extraction alignment network can perform multi-modal feature extraction alignment processing through the following steps: using a word embedding model in natural language processing technology to convert text included in the medical association data set into vector representation to extract semantic features in the text. A convolutional neural network model (for example, a residual network model or a dense connection network) in deep learning is used to extract features of medical images included in the medical association data set to obtain feature vectors of the medical images. Through signal processing methods such as Fourier transform and wavelet transform, time domain and frequency domain features of physiological sensor data included in the medical association data set are extracted. Using a cross-attention mechanism, the features of different modal data are aligned in the semantic and time dimensions, so that different modal data can be associated and aligned. The word embedding model can include but is not limited to at least one of the following: BERT (Bidirectional Encoder Representation of Transformer), GPT (Generative Pre-trained Transformer). The medical bias detection network can be a deep neural network model that uses a GRL (Gradient Reversal Layer) to identify sensitive attributes of the multi-modal medical feature vector set output by the multi-modal feature extraction alignment network to detect differences in group feature distribution between different groups. The adversarial debiasing network can be a deep neural network that uses a generative adversarial network to perform adversarial debiasing on the feature vector set output by the medical bias detection network.
[0029] In the fifth step, the multi-modal medical feature vector set is input into the medical bias detection network to obtain a medical association bias detection feature vector set. The medical association bias detection feature vector in the medical association bias detection feature vector set can be a feature vector obtained by removing a feature group with a group feature distribution difference greater than or equal to a preset group feature distribution difference threshold from the multi-modal medical feature vector set. The preset group feature distribution difference threshold can be a preset minimum value for determining the group feature distribution difference that forms bias.
[0030] In the sixth step, the medical association bias detection feature vector set is input into the adversarial debiasing network to obtain a medical diagnosis information set.
[0031] Optionally, the inputting of the multi-modal medical feature vector set into the medical bias detection network to obtain the medical association bias detection feature vector set can include the following steps: In the first step, the multi-modal medical feature vector set is subjected to sensitive attribute group division to obtain a medical sensitive attribute group feature vector set. The medical sensitive group feature vector in the medical sensitive attribute group feature vector set can be a feature vector that is recognized as a sensitive attribute feature and is grouped into a group by clustering from the multi-modal medical feature vector set. The medical sensitive attribute feature can represent semantic information of the sensitive attribute feature information. The sensitive attribute feature information can be attribute information obtained by matching and recognizing the medical association data set through a preset sensitive attribute form. The preset sensitive attribute form can be a form of existing sensitive attributes related to medical diagnosis formed by pre-collection. For example, the sensitive attributes included in the preset sensitive attribute form can include but are not limited to at least one of the following: gender, age, residence, medical level information.
[0032] In the second step, the medical sensitive attribute group feature vector set is subjected to group feature difference statistical test to obtain a group feature difference probability value set. The group feature difference probability value in the group feature difference probability value set can represent the degree of influence of the medical sensitive attribute group feature vector on the output medical diagnosis information. In practice, the execution subject can utilize a statistical test algorithm to perform group feature difference statistical test on the medical sensitive attribute group feature vector set to obtain a group feature difference probability value set. The statistical test algorithm can include but is not limited to at least one of the following: Bayesian t-test algorithm, MANOVA (Multivariate Analysis Of VAriance, multivariate analysis of variance algorithm).
[0033] In the third step, in response to determining that the group feature difference probability value is greater than or equal to the preset group difference probability threshold, the target medical feature group data set included in the multi-modal medical feature vector set is dynamically adjusted in weight to obtain a target medical group weight feature vector set. The preset group difference probability threshold can be a preset minimum value of the group difference probability for determining whether there is bias. The target medical feature group data in the target medical feature group data set can be a group whose number of multi-modal medical data included in the sensitive group is less than a preset sample quantity threshold. The preset sample quantity threshold can be a preset critical value for distinguishing a majority group from a minority group. The dynamic adjustment of the weight can be weight adjustment by an incremental learning algorithm.
[0034] In the fourth step, the target medical group weight feature vector set is subjected to adversarial debiasing processing to obtain a medical correlation bias detection feature vector set. In practice, the execution subject can perform adversarial debiasing processing on the target medical group weight feature vector set through a gradient inversion layer included in the medical bias detection network to obtain the medical correlation bias detection feature vector set.
[0035] In step 103, a medical input feature decision tree is constructed according to the medical diagnosis information set and the multi-modal medical feedback data set.
[0036] In some embodiments, the execution subject can construct a medical input feature decision tree according to the medical diagnosis information set and the multi-modal medical feedback data set. The medical input feature decision tree can be a decision tree formed by the importance of each input feature in the multi-modal medical feedback data set to the medical diagnosis information. The nodes in the medical input feature decision tree can be input features. The non-leaf nodes can include but are not limited to at least one of the following: blood glucose value, glycosylated hemoglobin, insulin level. The leaf nodes can be diagnosis information. The medical feature decision tree construction can be performed by an ID3 algorithm.
[0037] In the process of adopting technical solutions to solve the technical problems mentioned in the background, the following technical problems often accompany: due to the inability to accurately identify the influence degree and importance of each input medical feature included in the multi-modal medical feedback data set on diagnosis information, it is difficult to improve the accuracy and performance of medical bias removal based on large language models, and reduce the running load of the server. To solve the above technical problems, the conventional solution is generally: determine the importance by the single indicator of each medical input feature included in the multi-modal medical data set to construct a medical input feature decision tree, and through static pruning and updating by limiting the tree depth or leaf node, and through model migration deployment by updating the decision tree. However, the above conventional solution still has the following problems: due to the determination of importance by only the single indicator, the influencing factors considered are too single, and through static pruning and updating, the accuracy of the constructed medical input feature decision tree is low, which reduces the data bias removal accuracy through the medical input feature decision tree, and further reduces the performance and training speed of the medical bias removal large model, increases the running load of the server, and reduces the stability and performance of the server. Considering the shortcomings of the above conventional solution, and combining the advantages / technical status of the decision tree construction technology possessed by the research institutes in the field, we decided to adopt the following solution: In some optional implementations of some embodiments, the above constructing a medical input feature decision tree according to the medical diagnosis information set and the multi-modal medical feedback data set, and migrating and deploying the trained medical bias removal large language model according to the medical input feature decision tree, can include the following steps: First, determine the medical evidence level information, diagnosis correlation and diagnosis guideline frequency of each multi-modal medical feedback data in the multi-modal medical feedback data set to obtain the medical evidence level information set, diagnosis correlation set and diagnosis guideline frequency set. Wherein, the medical evidence level information can be the level information of the multi-modal medical feedback data determined by the EBM (Evidence-based medicine, evidence-based medicine) method. The diagnosis correlation can be the correlation between the multi-modal medical feedback data and the medical diagnosis information. The diagnosis guideline frequency can be the frequency of the multi-modal medical feedback data appearing in the medical guideline set related to medicine.
[0038] Secondly, according to the medical evidence level information set, the diagnosis correlation set and the diagnosis guideline reference set, the medical feature multi-dimensional weight of each multi-modal medical feedback data in the multi-modal medical feedback data set is determined to obtain a medical feature multi-dimensional weight set. The medical feature multi-dimensional weight in the medical feature multi-dimensional weight set can represent the importance of the medical evidence level information or the diagnosis correlation or the diagnosis guideline reference. As an example, the execution subject can calculate the medical feature multi-dimensional weight of each multi-modal medical feedback data in the multi-modal medical feedback data set according to the medical evidence level information set, the diagnosis correlation set and the diagnosis guideline reference set by using the information gain formula to obtain the medical feature multi-dimensional weight set.
[0039] Thirdly, the multi-modal medical feedback data is converted into a medical coding vector set. The medical coding vector in the medical coding vector set can represent the feature information of the multi-modal medical feedback data in the form of a vector. In practice, the execution subject can use the SNOMED-CT (Systematized Nomenclature of Medicine-Clinical Terms) concept mapping model or LOINC (Logical Observation Identifiers Names and Codes) to convert the multi-modal medical feedback data into a medical coding vector set.
[0040] Fourthly, according to the medical feature multi-dimensional weight set, the node position information of each multi-modal medical feedback data in the multi-modal medical feedback data set in the medical input feature decision tree is determined to obtain a node position information set. The node position information in the node position information set can be the information of the position of the node where the multi-modal medical feedback data is located in the medical input feature decision tree.
[0041] As an example, the above execution subject can first use the entropy weight method or AHP (Analytic Hierarchy Process) to adaptively weight and sum the above medical feature multi-dimensional weight set, medical evidence level information set, diagnosis correlation set, and diagnosis guideline citation set to obtain a feature node correlation value set. The feature node correlation value in the feature node correlation value set can represent the importance of the multi-modal medical feedback data on the medical diagnosis information. Then, the feature node correlation value set is sorted in descending order to obtain a feature node correlation value sequence. Finally, the feature node correlation value sequence is mapped to the hierarchical traversal order corresponding to the medical input feature decision tree to obtain a node position information set.
[0042] In the fifth step, a medical diagnosis decision tree is constructed according to the node position information set and the multi-modal medical feedback data set. The medical diagnosis decision tree can be a decision tree obtained by inputting the multi-modal medical feedback data set to the medical input feature decision tree according to the node position information set.
[0043] In the sixth step, the medical diagnosis decision tree is dynamically pruned and updated to obtain an updated medical diagnosis decision tree as the medical input feature decision tree. In practice, the execution subject can first dynamically prune the medical diagnosis decision tree by a preset pruning strategy to obtain a pruned medical diagnosis decision tree. The preset pruning strategy can be a pruning strategy that satisfies the pruning. The preset pruning strategy can be a pruning strategy of "keeping at least one path containing a guideline mandatory feature" or "deleting branches that cause treatment conflicts (such as drug interactions)". Then, the pruned medical diagnosis decision tree is dynamically updated by node medical feature to obtain an updated medical diagnosis decision tree as the medical input feature decision tree. The node medical feature dynamic update can be to determine the feature node correlation value of the multi-modal medical feedback data by real-time feedback data to dynamically update the node adjustment of the medical input feature decision tree.
[0044] In the seventh step, the multi-modal medical feedback data set is de-biased according to the medical input feature decision tree to obtain a de-biased multi-modal medical feedback data set, and the medical debiased large language model is trained by the de-biased multi-modal medical feedback data set to obtain a trained medical debiased large language model. The de-biased multi-modal medical feedback data in the de-biased multi-modal medical feedback data set can be obtained by deleting the data in the multi-modal medical feedback data set that is irrelevant to the medical input feature decision tree through the medical input feature decision tree.
[0045] In the eighth step, in response to detecting that the target server has a resource alarm, the trained medical debiased large language model compression is sent to the server that meets the resource selection condition and is migrated and deployed.
[0046] The technical solution and related content described above are an invention point of an embodiment of the present disclosure, which solves the technical problem mentioned in the background art. The factors that lead to the reduction of the performance and training speed of the medical debiased large model, the increase of the running load and damage rate of the server, and the reduction of the stability and performance of the server are often as follows: due to the determination of the importance degree only through a single indicator of itself, the influence factors considered are too single, and through static pruning and updating, the accuracy of the constructed medical input feature decision tree is low, the data debiasing accuracy through the medical input feature decision tree is reduced, the performance and training speed of the medical debiased large model are reduced, the running load of the server is increased, and the stability and performance of the server are reduced. If the above factors are solved, the accuracy of the constructed medical input feature decision tree can be improved, the data debiasing through the medical input feature decision tree can be improved, the performance and training speed of the medical debiased large model can be improved, the running load and damage rate of the server can be reduced, and the stability and performance of the server can be increased. In order to achieve this effect, the present disclosure first combines the medical evidence level information, the diagnosis correlation degree, and the diagnosis guideline citation frequency to form a multi-dimensional weight distribution system, which can break through the limitations of traditional single-dimensional feature selection, make the identification of the importance degree of multi-modal medical feedback data more accurate and comprehensive, calculate the multi-dimensional weight through the information gain formula, and dynamically sort the feature node correlation degree values to realize the fine evaluation of feature importance. Secondly, the dynamic pruning rules of retaining the guideline mandatory feature path and deleting the treatment conflict branch are introduced, which can ensure that the decision tree conforms to the clinical practice specification, avoid the blindness and precision of traditional pruning methods, recalculate the feature correlation degree through real-time feedback data, dynamically adjust the decision tree structure, realize the continuous optimization of the model, and further improve the accuracy and quality of the constructed medical input feature decision tree. Then, based on the medical input feature decision tree, irrelevant data can be deleted to reduce bias directly from the data source and improve the efficiency and interpretability of the debiasing method. Finally, the optimal migration path is automatically selected based on the server cluster state, the deployment efficiency is improved through model compression, the limitations of traditional fixed resource allocation are solved, the load balancing of the server cluster is improved, the performance and training speed of the medical debiased large model are improved, the running load and damage rate of the server are reduced, and the stability and performance of the server are increased.
[0047] In step 104, the counterfactual medical diagnosis scenario dataset is generated according to the multi-modal medical feedback dataset, the medical diagnosis information set and the medical input feature decision tree.
[0048] In some embodiments, the execution subject can generate a counterfactual medical diagnosis scenario dataset according to the multi-modal medical feedback dataset, the medical diagnosis information set and the medical input feature decision tree. The counterfactual medical diagnosis scenario data in the counterfactual medical diagnosis scenario dataset can be a scenario dataset obtained by taking the opposite of the attribute values of each input feature included in the multi-modal medical feedback dataset.
[0049] As an example, the execution subject can first perform group classification on the input features of the multi-modal medical feedback dataset to obtain an input feature group set. For example, the input feature groups in the input feature group set can be gender groups or age groups. Subsequently, the medical feature group distribution difference set of the multi-modal medical feedback dataset and the medical diagnosis information set is determined by a statistical hypothesis testing method. The medical feature group distribution difference in the medical feature group distribution difference set can represent the influence degree of the groups composed of each input feature included in the multi-modal medical feedback dataset on the medical diagnosis information. The statistical hypothesis testing method can include but is not limited to at least one of the following: t-test algorithm, variance test algorithm. It should be noted that the statistical hypothesis testing method can dynamically evaluate the distribution difference of the output result among different groups, ensure that the model output is fair to different groups, and eliminate potential group bias. Then, in response to determining that there is data in the multi-modal medical feedback dataset that does not satisfy the parameter test hypothesis condition, a non-parametric test method is used to determine the medical feature group distribution difference set of the multi-modal medical feedback dataset and the medical diagnosis information set. The non-parametric test method can include but is not limited to at least one of the following: Mann-Whitney U test algorithm (Mann-Whitney U test) algorithm, Kruskal-Wallis test algorithm (Kruskal-Wallis test). Subsequently, the counterfactual dataset is generated according to the multi-modal medical feedback dataset and the medical diagnosis information set by a counterfactual reasoning algorithm. Finally, the counterfactual medical diagnosis scenario dataset is obtained by filtering the counterfactual dataset through the medical input feature decision tree.
[0050] In some optional implementations of some embodiments, the generation of the counterfactual medical diagnosis scenario dataset according to the multi-modal medical feedback dataset, the medical diagnosis information set and the medical input feature decision tree can include the following steps: In a first step, input variable feature extraction is performed on the multi-modal medical feedback dataset to obtain a medical input variable feature set. The medical input variable features in the medical input variable feature set can be feature information included in the multi-modal medical feedback dataset that affects medical diagnosis information. The medical input variable feature set can include, but is not limited to, at least one of the following: age, gender, and place of residence. The input variable feature extraction can be performed using the multi-modal feature extraction alignment network.
[0051] In a second step, feature output correlation quantification is performed on the medical input variable feature set to obtain an input variable feature correlation set. The input variable feature correlation in the input variable feature correlation set can represent the contribution of the medical input variable feature to the decision of the output medical diagnosis information. In practice, the execution subject can use a model explanation algorithm to perform feature output correlation quantification on the medical input variable feature set to obtain an input variable feature correlation set. The model explanation algorithm can be a SHAP (Shapley Additive Explanations) algorithm or a LIME (Local Interpretable Model-agnostic Explanations) algorithm.
[0052] In a third step, counterfactual data is constructed for the medical input variable feature set based on the input variable feature correlation set to obtain a medical input variable counterfactual feature set. The medical input variable counterfactual feature in the medical input variable counterfactual feature set can be a counterfactual feature that modifies the attribute value of the medical input variable feature to the opposite attribute value, or a counterfactual feature that has a feature similarity greater than a pre-set similarity value to the medical input variable feature but has opposite output diagnosis information.
[0053] As an example, the execution subject can use a minimum perturbation algorithm to construct counterfactual data for the medical input variable feature set based on the input variable feature correlation set to obtain a medical input variable counterfactual feature set.
[0054] In a fourth step, an input variable difference value set of the medical input variable counterfactual feature set and the medical input variable feature set is determined. The input variable difference value in the input variable difference value set can be the difference in accuracy of the output diagnosis information between the medical input variable counterfactual feature vector and the medical input variable feature. The determination can be performed by an LLM (Large Language Model).
[0055] In the fifth step, according to the set of input variable difference values, the set of medical input variable counterfactual features and the set of medical diagnosis information are used to construct a causal chain to obtain a variable input-output causal chain graph. The variable input-output causal chain graph can be a directed weighted graph showing the causal relationship between the medical input variable counterfactual features and the medical diagnosis information. The causal chain construction can be performed by a dynamic graph generation tool. The dynamic graph generation tool can be a Graphviz tool.
[0056] As an example, the execution subject can first screen at least one medical input variable counterfactual feature from the set of medical input variable counterfactual features, where the input variable difference value of the at least one medical input variable counterfactual feature is less than a preset variable difference threshold. Then, using a latent variable causal model, the at least one medical input variable counterfactual feature and the set of medical diagnosis information are used to construct a causal chain to obtain a set of variable input-output causal chain graphs. The latent variable causal model can be a SEM model (Structural Equation Modeling), a causal diagram model, and a Bayesian network serial connection model.
[0057] In the sixth step, the medical input variable counterfactual feature set is filtered according to the variable input-output causal chain diagram and the medical input feature decision tree to obtain a medical input variable filtered feature set as a counterfactual medical diagnosis scene dataset. In practice, the execution subject can first, for each variable input-output causal chain diagram in the variable input-output causal chain diagram set, perform the following rationality detection steps: in the first step, the variable input-output causal chain diagram is input into a large language model to obtain a causal text explanation information set for the variable input-output causal chain diagram. In the second step, the causal text explanation information set is subjected to keyword extraction to obtain a causal keyword set. In the third step, the pre-set medical knowledge base is searched through the causal keyword set to obtain a search result information set. In the fourth step, in response to determining that the search result information set all represents that the pre-set medical knowledge base can be searched, the causal relationship reasonable detection information set is determined as a rationality detection result information set. In response to determining that there is detection information set representing that the causal relationship is unreasonable in the search result information set, the causal relationship unreasonable detection information set is determined as an irrationality detection result information set. The rationality detection result information in the rationality detection result information set can be a detection result of determining whether the causal relationship in the variable input-output causal chain diagram is reasonable. Subsequently, at least one medical input variable counterfactual feature corresponding to at least one rationality detection result representing that the detection passes is filtered from the rationality detection result information set as a target medical input variable counterfactual feature set. Finally, the medical input variable counterfactual feature set located in the front first pre-set number of medical feature multi-dimensional weight corresponding medical input variable counterfactual features is filtered from the target medical input variable counterfactual feature set through the medical feature decision tree corresponding medical feature multi-dimensional weight set as a medical input variable filtered feature set as a counterfactual medical diagnosis scene dataset. The first pre-set number can be a pre-set number. For example, the first pre-set number can be 10.
[0058] In step 105, the medical diagnosis information set is constrained and corrected according to the pre-set medical knowledge base to obtain a corrected medical diagnosis information set.
[0059] In some embodiments, the execution subject can correct the medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set. The preset medical knowledge base can be an existing medical-related knowledge base or a knowledge base formed by a knowledge graph. The corrected medical diagnosis information in the corrected medical diagnosis information set can be information obtained by adjusting or supplementing the output medical diagnosis information set with prior knowledge in the preset medical knowledge base to enhance the credibility of the output of the medical debiased large language model. In practice, the execution subject can first evaluate the medical diagnosis information set by a model output evaluation formula to obtain a model output fairness value set. The model output fairness value in the model output fairness value set can represent the diagnosis accuracy, recall rate, quality and reliability of the output diagnosis information of the medical debiased large language model. The model output evaluation formula can include but is not limited to at least one of the following: an index evaluation formula of mDISCERN (modified DISCERN, modified difference matrix), an index evaluation formula of F-score (F1 score). Secondly, using a fairness calibration layer (Fairness Calibration Layer), the diagnosis probability distribution corresponding to the medical diagnosis information set is linearly adjusted according to the model output fairness value set to obtain an adjusted medical diagnosis information set. The fairness calibration layer can be a neural network model for debiased fairness test by a radio transformation formula, a fairness index calculation based on statistical singularity difference and opportunity equality difference. The medical diagnosis information can be taken as an example of a drug recommendation task. When the medical debiased large language model recommends drugs for male and female patients, the probability of recommending drugs has obvious differences, and such differences are considered unfair. The adjusted medical diagnosis information can be diagnosis information that weights and adjusts the drug recommendation prediction output probability for men and women to make the recommendation result more fair. Subsequently, the adjusted medical diagnosis information is subjected to keyword extraction to obtain a diagnosis keyword set. Then, the diagnosis keyword set is used to search for a disease diagnosis guideline information set corresponding to the diagnosis keyword set in the preset medical knowledge base. Then, the medical diagnosis information set is corrected by the disease diagnosis guideline information set to obtain a corrected medical diagnosis information set.
[0060] Step 106, performing model posterior debiasing training on the medical debiased large language model according to the counterfactual medical diagnosis scene data set and the corrected medical diagnosis information set to obtain a trained medical debiased large language model.
[0061] In some embodiments, the above execution subject can perform model posterior debiasing training on the above medical debiased large language model according to the above counterfactual medical diagnosis scene data set and the above revised medical diagnosis information set, to obtain a trained medical debiased large language model. Wherein, the trained medical debiased large language model can be a large language model whose predicted diagnosis output information and real diagnosis information loss value is less than a preset loss threshold by performing multi-modal medical data set group bias elimination and avoiding false cause output deviation adjustment on the medical debiased large language model through the above counterfactual medical diagnosis scene data set and the above revised medical diagnosis information set. The above preset loss threshold can be a minimum value preset to evaluate the performance of the model.
[0062] In the process of adopting the technical solutions to solve the technical problems mentioned in the background, the following technical problems often accompany: how to accurately identify the causal relationship between the various variable features included in the medical input and the diagnosis output, in order to improve the debiasing performance of the medical debiased large language model. In view of the above technical problems, the conventional solution is generally: only through multi-modal medical feedback data set to construct the causal relationship. However, the above conventional solution still has the following problems: only through the multi-modal medical feedback data set itself to identify the causal relationship, the identified causal relationship is one-sided, the accuracy is low, resulting in a large number of redundant and erroneous causal relationships in the generated medical input-output causal relationship graph, the quality of the medical input-output causal relationship graph is low, which further reduces the performance and training rate of the medical debiased large language model, increases the running load of the server cluster, reduces the performance of the server and increases the damage rate. Considering the disadvantages of the above conventional solution, and combining the advantages / technical status of the causal relationship identification technology possessed by the research institutes in the field, we decide to adopt the following solution: In some optional implementations of some embodiments, the above model posterior debiasing training on the above medical debiased large language model according to the above counterfactual medical diagnosis scene data set and the above revised medical diagnosis information set to obtain a trained medical debiased large language model can include the following steps: First, input-output causal relationship construction is performed on the multi-modal medical feedback data set and the medical diagnosis information set to obtain a medical input-output causal relationship graph set. Wherein, the medical input-output causal relationship graph in the medical input-output causal relationship graph set can be a directed acyclic graph of the cause-and-effect association relationship formed by each input feature included in the multi-modal medical feedback data set and the output medical diagnosis information. The input-output causal relationship construction can be constructed by using a causal graph model (Causal Graphical Model, CGM). For example, Figure 2As shown, a medical input-output causal graph is shown, which is formed by various input features and output medical diagnosis information included in the multi-modal medical feedback dataset, Figure 2 The medical diagnosis information in the multi-modal medical feedback dataset can be information of antibiotic use. The various input features can include smoking history, age, pneumonia, fever, cough, and white blood cell count.
[0063] In a second step, an initial feedback causal directed acyclic graph is generated according to the preset medical knowledge base and the multi-modal medical feedback dataset. The initial feedback causal directed acyclic graph can be a directed acyclic graph that displays the causal relationship of the feedback data corresponding to the multi-modal medical feedback dataset in the form of a graph. As an example, the execution subject can first extract key medical features from the multi-modal medical feedback dataset through the preset medical knowledge base to obtain a feedback medical variable feature information set. The feedback medical variable feature information in the feedback medical variable feature information set can be core variable feature information that affects the medical diagnosis information, which is filtered from the multi-modal medical feedback dataset according to the preset medical knowledge base. The core variables can be the first second preset number of variable feature information obtained based on the preset medical knowledge base. The second preset number can be a preset number. For example, the second preset number can be 50. For example, for fever information as the medical diagnosis information, the core variable feature information can include but is not limited to at least one of the following: fever, cough, white blood cell count, pneumonia, and antibiotic use. Then, an initial feedback causal directed acyclic graph is generated for the feedback medical variable feature information set. The generation can be graph generation using a causal graphical model (CGM). The causal relationship included in the initial feedback directed acyclic graph can include but is not limited to at least one of the following: pneumonia- fever, pneumonia- cough, pneumonia- white blood cell count increase, and pneumonia- antibiotic use. The left side of “-” is the cause and the right side is the result. The nodes of the initial feedback causal directed acyclic graph can be the feedback medical variable feature information set and the output medical diagnosis information, and the weight of the edge can be the weight of the edge with the causal relationship determined by the Delphi method algorithm through expert experience and the preset medical knowledge base.
[0064] Thirdly, variable independence test is performed on the initial feedback causal directed acyclic graph to obtain a target feedback causal directed acyclic graph. The target feedback causal directed acyclic graph can be obtained by removing the edges with no dependence from the initial feedback causal directed acyclic graph. The edges with no dependence can be edges with two feedback medical variable characteristic information nodes that are independent of each other. In practice, the execution subject can first determine the edges with no dependence between any two feedback medical variable characteristic information nodes of the edges with existing relationships in the initial feedback causal directed acyclic graph by using a PC (Peter-Clark) algorithm to obtain a set of edges with no dependence. Then, the set of edges with no dependence is removed from the initial feedback causal directed acyclic graph to obtain the target feedback causal directed acyclic graph.
[0065] Fourthly, confounding variable detection is performed on the target feedback causal directed acyclic graph to obtain a target feedback medical variable characteristic information set. The target feedback medical variable characteristic information in the target feedback medical variable characteristic information set can be a feedback medical variable characteristic information that simultaneously affects the feedback medical variable characteristic information and the medical diagnosis information. For example, if the path of the medical diagnosis information to the feedback medical variable characteristic information is gender-age-medical diagnosis information, the target feedback medical variable characteristic information can be age. In practice, the execution subject can perform confounding variable detection on the feedback medical variable characteristic information set by using a Backdoor Criterion algorithm to obtain the target feedback medical variable characteristic information.
[0066] In the fifth step, a two-stage causal effect analysis is performed on the causal edge set corresponding to the target feedback medical variable feature information set and the at least one counterfactual medical diagnosis scenario data to obtain a target feedback causal directed acyclic graph, a causal edge probability value set existing in the target feedback causal directed acyclic graph, and a counterfactual causal edge probability value set. The at least one counterfactual medical diagnosis scenario data can be a data set selected from the counterfactual medical diagnosis scenario data set and corresponding to the target feedback medical variable feature information set in the causal edge probability value set. The causal edge probability in the causal edge probability value set can be a probability value representing whether a causal edge exists. In practice, the execution subject can determine the intervention acceptance probability of each target feedback medical variable feature information by using PSM (Propensity Score Matching) to obtain an intervention acceptance probability set, so as to balance the confounding factors between groups. The intervention acceptance probability can represent the predicted probability of the target feedback medical variable feature information under the condition of a given feature information (for example, age, gender, and medical condition information) accepting intervention (for example, residence). Then, the confounding intervention acceptance probability of each target feedback medical variable feature information is determined by using DML (Double Machine Learning) to obtain a confounding intervention acceptance probability set. The confounding intervention acceptance probability can be the probability of the target feedback medical variable feature information accepting intervention after removing any target feedback medical variable feature information. Finally, the confounding intervention acceptance probability and the intervention acceptance probability are weighted and summed to obtain the causal edge probability value set. The weight in the weighted sum can be a pre-defined weight value. The counterfactual causal edge probability value in the counterfactual causal edge probability value set can represent the influence degree of the counterfactual variable feature information on the causal relationship. The counterfactual variable feature information can be the feature information extracted from the counterfactual medical diagnosis scenario data.
[0067] In the sixth step, a medical variable feature causal relationship graph is generated according to the causal edge probability value set and the counterfactual causal edge probability value set. The weight of the causal edge in the medical variable feature causal relationship graph can be a relationship graph composed of a causal edge set and a node set greater than or equal to a preset causal probability value obtained by weighting and summing each causal edge probability value in the causal edge probability value set and the corresponding counterfactual causal edge probability value in the counterfactual causal edge probability value set. The preset causal probability value can be a pre-defined minimum value for evaluating whether a causal relationship exists.
[0068] In the seventh step, according to the large language model and the preset medical knowledge base, a set of causal explanation text information for each causal edge included in the medical variable characteristic causal relationship graph is generated. The causal explanation text information in the set of causal explanation text information can be information explaining the causal relationship of the causal edge in the form of text. In practice, the execution subject can first generate a set of input variable causal explanation text information for each causal edge included in the medical variable characteristic causal relationship graph by using the large language model. Then, the set of input variable causal explanation text information is filtered by the preset medical knowledge base to obtain at least one input variable causal explanation text information as the set of causal explanation text information. The filtering can be determining whether the set of causal explanation text information exists or conflicts in the preset medical knowledge base, deleting the causal explanation text information that does not exist or conflicts, and obtaining at least one causal explanation text information. It should be noted that through the first to seventh steps, the rationality of causal inference can be ensured by complex algorithm logic, and the biased output caused by false association can be effectively avoided. The causal explanation text information can accurately understand and judge the rationality and fairness of the model prediction, and the efficiency and accuracy of the model output review are improved.
[0069] In the eighth step, according to the set of medical input-output causal relationship graphs corresponding to the set of causal explanation text information and the set of corrected medical diagnosis information, the medical debiased large language model is subjected to model posterior debiased training to obtain a trained medical debiased large language model, and in response to detecting that a target service occurs resource alarm, the trained medical debiased large language model is compressed and sent to a server satisfying a resource selection condition and migrated and deployed. The medical input-output causal relationship graph in the set of corresponding medical input-output causal relationship graphs can be a relationship graph obtained by graphically visualizing the causal explanation text information.
[0070] In practice, the execution subject can first filter at least one corrected medical diagnosis information corresponding to a comparison similarity value greater than or equal to a preset comparison similarity threshold from the set of corrected medical diagnosis information. The comparison similarity value can be the cosine similarity of the disease diagnosis guideline information and the medical diagnosis information. The preset comparison similarity threshold can be a critical value for determining the degree of similarity. Then, the set of medical input-output causal relationship graphs and the at least one corrected medical diagnosis information are input into the medical debiased large language model for model posterior debiased training to obtain a trained medical debiased large language model.
[0071] The technical solution and related content thereof serve as one of the invention points of the embodiments of the present disclosure, and solve the technical problems mentioned in the background art, i.e., the identified causal relationship is one-sided and has a low accuracy rate only by identifying the causal relationship from the multi-modal medical feedback dataset itself, resulting in a large number of redundant and erroneous causal relationships in the generated medical input-output causal relationship graph, a low quality of the medical input-output causal relationship graph, and a reduced performance and training rate of the medical debiased large language model, an increased operation load of the server cluster, a reduced performance and an increased damage rate of the server. The factors that result in a large number of redundant and erroneous causal relationships in the generated medical input-output causal relationship graph, a low quality of the medical input-output causal relationship graph, and a reduced performance and training rate of the medical debiased large language model, an increased operation load of the server cluster, a reduced performance and an increased damage rate of the server are often as follows: the identified causal relationship is one-sided and has a low accuracy rate only by identifying the causal relationship from the multi-modal medical feedback dataset itself. If the above factors are solved, the quality of the medical input-output causal relationship graph can be improved. To achieve this effect, the present disclosure first extracts key medical features and generates an initial feedback causal directed acyclic graph through a preset medical knowledge graph, which can ensure the medical accuracy and consistency of the feedback medical variable feature information, avoid inference bias caused by term ambiguity, predefine the causal direction between variables, reduce the search space of the data-driven method, and improve the modeling efficiency. Secondly, the initial feedback causal directed acyclic graph is subjected to variable independence testing and confounding variable detection. The variable independence testing can automatically discover the causal relationship implied in the data, supplement the associations not covered by the prior knowledge, the confounding variable detection can identify confounding factors (such as age and gender) that affect causal inference, and avoid effect estimation bias caused by uncontrolled confounding, so as to provide accurate variable screening basis for subsequent causal effect estimation. With two-stage causal effect analysis on the target feedback medical variable feature information set, the selection bias problem in the observational data can be solved, and the bias of the model parameter estimation is reduced, especially in the high-dimensional confounding variable scenario. Then, the counterfactual medical diagnosis scenario dataset is subjected to screening, two-stage effect analysis and weighted summation. By simulating the counterfactual scenario of “no intervention”, the causal effect of the intervention is quantified, and the low accuracy rate of causal identification caused by missing important confounding variables is avoided.Finally, the causal explanation text information set is generated, filtered and visualized, and the model is post-hoc debiased trained with the revised medical diagnosis information set, and the medical debiased large language model is migrated and deployed in response to detecting a resource alarm of the target service, which can improve the explainability of the causal relationship, reduce the causal ambiguity, and further filtering can further improve the accuracy of causal identification, improve the quality of the generated medical input-output causal relationship graph set, and reduce the running load and damage rate of the target server, improve the execution efficiency and performance of the medical debiased large language model, and improve the performance and stability of the server.
[0072] Step 107, in response to detecting a resource alarm of the target server, the trained medical debiased large language model is compressed and sent to the server that meets the resource selection condition and migrated and deployed.
[0073] In some embodiments, the above execution subject can send the trained medical debiased large language model compression to the server that meets the resource selection condition and migrate and deploy in response to detecting a resource alarm of the target server. Wherein, the resource alarm can be an alarm that reminds the user that the target server is not enough to support the medical debiased large language model to perform and train by sound and light. As shown in Figure 3 As shown, the comparison diagram of the fairness and stability, explainability, ethical security and dynamic adaptability of the medical debiased large language model and the existing scheme traditional model based on the medical debiased large language model is shown. The ethical security can refer to a strict ethical review system throughout the whole life cycle from data collection to model deployment, to ensure that the patient's privacy is fully respected and protected during the whole research and application process of the medical debiased large language model, and the fairness and safety of the model output are guaranteed.
[0074] Optionally, the execution subject can further perform the following steps after 107: First, real-time acquisition of the current multi-modal medical data set as the multi-modal target medical data set.
[0075] Second, determine the target medical field information set and the training medical field information set of the multi-modal medical data set included in the multi-modal target medical data set and the multi-modal medical feedback data set, respectively. Wherein, the target medical field information in the target medical field information set can be the category information of the disease diagnosis to which the multi-modal target medical data belongs. The training medical field information in the training medical field information set can be the category information of the disease diagnosis to which the multi-modal medical data belongs.
[0076] In the third step, a medical field similarity value of each target medical field information in the target medical field information set and a training medical field information in the training medical field information set is determined to obtain a medical field similarity value group set. The medical field similarity value in the medical field similarity value group set can represent a probability value of the target medical field information and the training medical field information belonging to the same disease diagnosis field. The determination can be performed by calculating the cosine similarity based on the Euclidean distance.
[0077] In the fourth step, in response to determining that there is at least one medical field similarity value less than or equal to a preset similarity threshold in the medical field similarity value group set, the at least one multi-modal target medical data corresponding to the at least one medical field similarity value is used to perform incremental learning on the trained medical debiased large language model. The preset similarity threshold can be a maximum value preset for determining whether it belongs to the same field. As an example, the execution subject can use an incremental learning algorithm to perform incremental learning on the trained medical debiased large language model according to the at least one multi-modal target medical data corresponding to the at least one medical field similarity value.
[0078] In the fifth step, in response to determining that there is at least one medical field similarity value greater than the preset similarity threshold in the medical field similarity value group set, the at least one multi-modal target medical data corresponding to the at least one medical field similarity value is used to perform knowledge transfer learning on the trained medical debiased large language model. In practice, the execution subject can use a knowledge transfer learning algorithm to perform knowledge transfer learning on the trained medical debiased large language model according to the at least one multi-modal target medical data corresponding to the at least one medical field similarity value. It should be noted that through incremental learning and knowledge transfer learning, the feature differences between the real-time collected multi-modal medical data set and the multi-modal medical data set obtained before real-time collection can be basically and comprehensively covered, the speed of learning difference data by the medical debiased large language model can be improved, the performance of the medical debiased large language model can be continuously optimized, the accumulation of possible bias of the medical debiased large language model in the long-term use process can be effectively reduced, and the model can always be kept in the best operating state.
[0079] Further referring to Figure 4 , as an implementation of the method shown in the above figures, the disclosure provides some embodiments of a medical debiased large language model training device, which corresponds to the method embodiments shown in Figure 1 , and the medical debiased large language model training device can be applied in various electronic devices.
[0080] As Figure 4As shown, the medical debiasing large language model training apparatus 400 comprises a resource detection unit 401, a control unit 402, a construction unit 403, a generation unit 404, a constraint correction unit 405, a model posterior debiasing training unit 406, and a compression sending unit 407. Among them, the resource detection unit 401 performs resource detection on a server cluster, and selects a server that meets the resource selection condition from the above-mentioned server cluster as a target server. The control unit 402 controls the above-mentioned target server, inputs the obtained multi-modal medical feedback data set to the medical debiasing large language model, and obtains a medical diagnosis information set. The construction unit 403 constructs a medical input feature decision tree according to the above-mentioned medical diagnosis information set and the above-mentioned multi-modal medical feedback data set. The generation unit 404 generates a counterfactual medical diagnosis scene data set according to the above-mentioned multi-modal medical feedback data set, the above-mentioned medical diagnosis information set and the above-mentioned medical input feature decision tree. The constraint correction unit 405 corrects the above-mentioned medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set. The model posterior debiasing training unit 406 performs model posterior debiasing training on the above-mentioned medical debiasing large language model according to the above-mentioned counterfactual medical diagnosis scene data set and the above-mentioned corrected medical diagnosis information set, and obtains a trained medical debiasing large language model. The compression sending unit 407 responds to detecting that the target server has a resource alarm, and compresses and sends the trained medical debiasing large language model to a server that meets the resource selection condition and migrates and deploys it.
[0081] It can be understood that the units described in the medical debiasing large language model training apparatus 400 correspond to the respective steps in the method described above. Figure 1 The operations, features and beneficial effects described above for the method also apply to the medical debiasing large language model training apparatus 400 and the units contained therein, which will not be described here.
[0082] Reference is made below to Figure 5 which shows a structural schematic diagram of an electronic device (for example, an electronic device) 500 suitable for implementing some embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not impose any limitation on the function and use range of the embodiments of the present disclosure.
[0083] As Figure 5As shown, the electronic device 500 can include a processing device (e.g., a central processor, a graphics processor, etc.) 501 that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 502 or loaded into a random access memory (RAM) 503 from a storage device 508. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0084] Generally, the following devices can be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 can allow the electronic device 500 to exchange data with other devices wirelessly or wiredly. Although Figure 5 The electronic device 500 is shown with various devices, but it is understood that all of the shown devices are not required to be implemented or present. More or fewer devices can alternatively be implemented or present. Figure 5 Each block shown in the flowcharts can represent a device or multiple devices as needed.
[0085] In particular, processes described above with reference to the flowcharts can be implemented as a computer software program according to some embodiments of the present disclosure. For example, some embodiments of the present disclosure include a computer program product including a computer program carried on a computer readable medium, the computer program containing program codes for performing the methods shown in the flowcharts. In some such embodiments, the computer program can be downloaded and installed from a network through the communication devices 509, or installed from the storage devices 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-described functions defined in the methods of some embodiments of the present disclosure are performed.
[0086] It should be noted that in some embodiments of the present disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. Furthermore, in some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.
[0087] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0088] The computer readable medium can be included in the electronic device, or can exist separately from the electronic device. The computer readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the following operations: performing resource detection on a server cluster, and selecting a server that meets a resource selection condition from the server cluster as a target server; controlling the target server to input a plurality of modal medical feedback data sets obtained to a medical debiased large language model to obtain a medical diagnosis information set; constructing a medical input feature decision tree according to the medical diagnosis information set and the plurality of modal medical feedback data sets; generating an counterfactual medical diagnosis scene data set according to the plurality of modal medical feedback data sets, the medical diagnosis information set, and the medical input feature decision tree; performing constraint correction on the medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set; performing model posterior debiased training on the medical debiased large language model according to the counterfactual medical diagnosis scene data set and the corrected medical diagnosis information set to obtain a trained medical debiased large language model; and in response to detecting that the target server has a resource alarm, compressing and sending the trained medical debiased large language model to a server that meets the resource selection condition and performing migration deployment.
[0089] Computer program code for carrying out operations of some embodiments of the disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0090] The computer program product of the first aspect can include a computer readable storage medium. The computer readable storage medium can include instructions. The instructions can include one or both of: instructions for causing a computer to implement a method as described above; and instructions for causing a computer to operate based on a system as described above. The computer readable storage medium can include one or more of: a magnetic disk; a magnetic tape; a magneto-optical disk; a semiconductor memory (e.g., a RAM, a ROM, a flash memory, etc.); an optical disk; a hard disk drive; a solid state drive; a RAM; a ROM; a flash memory; an optical disk; a hard disk drive; a solid state drive; a RAM; a ROM; a flash memory; an optical disk; a hard disk drive; and a solid state drive. The computer readable storage medium can include one or more of: a computer readable storage medium having instructions for causing a computer to implement a method as described above; and a computer readable storage medium having instructions for causing a computer to operate based on a system as described above.
[0091] The units described in some embodiments of the present disclosure can be implemented by means of software, or by means of hardware. The described units can also be arranged in a processor, for example, a processor can be described as including a resource detection unit, a control unit, a construction unit, a generation unit, a constraint correction unit, a model posterior debiasing training unit, and a compression sending unit. Among them, the names of these units do not constitute a limitation to the units themselves in some cases, for example, the acquisition unit can also be described as "a unit that detects resources from a server cluster, and selects a server that meets the resource selection condition from the above-mentioned server cluster as a target server".
[0092] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, example types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0093] The above description is merely some embodiments of the present disclosure and a description of the principles of the technology used. Those skilled in the art should understand that the scope of the application involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the above inventive concept. For example, the above technical features can be replaced with technical features disclosed in the embodiments of the present disclosure (but not limited to) having similar functions to form technical solutions.
Claims
1. A method for training a large language model for medical debiasing, comprising: Performing resource detection on the server cluster, and selecting a server that meets the resource selection conditions from the server cluster as a target server; Controlling the target server to input the acquired multimodal medical feedback dataset into a medical debiasing large language model to obtain a medical diagnosis information set; Constructing a medical input feature decision tree based on the medical diagnosis information set and the multimodal medical feedback data set; generating a counterfactual medical diagnosis scenario dataset based on the multimodal medical feedback dataset, the medical diagnosis information set, and the medical input feature decision tree; performing constraint correction on the medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set; Performing model posterior debiasing training on the medical debiasing large language model based on the counterfactual medical diagnosis scenario dataset and the corrected medical diagnosis information set to obtain a trained medical debiasing large language model; In response to detecting a resource alarm on the target server, the trained medical debiasing large language model is compressed and sent to a server that meets the resource selection conditions and migrated for deployment.
2. The method according to claim 1, wherein The method further comprises: Collect the current multimodal medical dataset in real time as the multimodal target medical dataset; respectively determining a target medical domain information set and a training medical domain information set of the multimodal medical dataset included in the multimodal target medical dataset and the multimodal medical feedback dataset; determining a medical field similarity value between each target medical field information in the target medical field information set and the training medical field information in the training medical field information set to obtain a medical field similarity value set; In response to determining that at least one medical field similarity value that is less than or equal to a preset similarity threshold exists in the medical field similarity value set, incremental learning is performed on the trained medical debiased large language model based on at least one multimodal target medical data corresponding to the at least one medical field similarity value; In response to determining that there is at least one medical field similarity value greater than the preset similarity threshold in the medical field similarity value group, knowledge transfer learning is performed on the trained medical debiased large language model based on at least one multimodal target medical data corresponding to the at least one medical field similarity value.
3. The method according to claim 1, wherein The model usage feedback dataset included in the multimodal medical feedback dataset includes: a first model usage feedback dataset and a second model usage feedback dataset; and The control of the target server inputs the acquired multimodal medical feedback data set into a medical debiasing large language model to obtain a medical diagnosis information set, including: Performing named entity recognition on the first model using the feedback dataset to obtain a medical feedback entity set; Performing model usage satisfaction identification on the second model usage feedback dataset to obtain a model usage sentiment tendency information set; performing association matching on the multimodal medical dataset, the medical feedback entity set, and the model using the sentiment tendency information set included in the multimodal medical feedback dataset to obtain a medical association dataset; Inputting the medical-related dataset into a multimodal feature extraction and alignment network included in the medical debiasing large language model to obtain a multimodal medical feature vector set, wherein the medical debiasing large language model further includes: a medical bias detection network and an adversarial debiasing network; inputting the multimodal medical feature vector set into the medical bias detection network to obtain a medical association bias detection feature vector set; The medical association bias detection feature vector set is input into the adversarial debiasing network to obtain a medical diagnosis information set.
4. The method according to claim 3, wherein: Inputting the multimodal medical feature vector set into the medical bias detection network to obtain a medical association bias detection feature vector set includes: Dividing the multimodal medical feature vector set into sensitive attribute groups to obtain a medical sensitive attribute group feature vector set; Performing a statistical test on group characteristic differences on the medical sensitive attribute group characteristic vector set to obtain a group characteristic difference probability value; In response to determining that the population feature difference probability value is greater than or equal to a preset population feature difference probability threshold, dynamically adjusting the weight of the target medical feature population data set included in the multimodal medical feature vector set to obtain a target medical population weight feature vector set; The target medical group weight feature vector set is subjected to adversarial debiasing processing to obtain a medical association bias detection feature vector set.
5. The method according to claim 1, wherein Generating a counterfactual medical diagnosis scenario dataset based on the multimodal medical feedback dataset, the medical diagnosis information set, and the medical input feature decision tree includes: Performing input variable feature extraction on the multimodal medical feedback data set to obtain a medical input variable feature set; quantifying the feature output correlation of the medical input variable feature set to obtain an input variable feature correlation degree set; According to the input variable feature correlation set, counterfactual data is constructed for the medical input variable feature set in sequence to obtain a medical input variable counterfactual feature set; Determining a counterfactual feature set of the medical input variables and a numerical value set of input variable differences between the feature set of the medical input variables; According to the input variable difference value set, a causal chain is constructed for the medical input variable counterfactual feature set and the medical diagnosis information set to obtain a variable input-output causal chain diagram; According to the variable input-output causal chain diagram and the medical input feature decision tree, the counterfactual feature set of the medical input variable is subjected to feature screening to obtain a medical input variable screening feature set as a counterfactual medical diagnosis scenario dataset.
6. A medical debiasing large language model training device, comprising: A resource detection unit, which performs resource detection on the server cluster and selects a server that meets the resource selection conditions from the server cluster as a target server; a control unit, controlling the target server to input the acquired multimodal medical feedback dataset into a medical debiasing large language model to obtain a medical diagnosis information set; A construction unit, constructing a medical input feature decision tree based on the medical diagnosis information set and the multimodal medical feedback data set; a generating unit, generating a counterfactual medical diagnosis scenario dataset based on the multimodal medical feedback dataset, the medical diagnosis information set, and the medical input feature decision tree; a constraint correction unit, performing constraint correction on the medical diagnosis information set according to a preset medical knowledge base to obtain a corrected medical diagnosis information set; a model posterior debiasing training unit, performing model posterior debiasing training on the medical debiasing large language model based on the counterfactual medical diagnosis scenario dataset and the corrected medical diagnosis information set to obtain a trained medical debiasing large language model; The compression and sending unit, in response to detecting a resource alarm on the target server, compresses and sends the trained medical debiasing large language model to a server that meets the resource selection conditions and migrates the deployment.
7. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer-readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Deep learning language model fine tuning method for clinical medicine decision assistance
CN117198505A
Decision tree generation method based on large language model and related equipment
CN119227784A
Method and device for training debiased multi-modal large language model for medical care
CN119361165A
Training method, system and equipment of medical multi-mode base model and storage medium
CN119474883A
Facilitating medical diagnostics with a prediction model
US20190139643A1
Cited By
Large model illusion suppression training method and system fused with real-time fact library verification
CN121257756A