Medical debiasing large language model training method and device, electronic equipment and medium
By detecting server cluster resources and constructing feature decision trees from multimodal datasets, and combining them with a medical knowledge base for model training and deployment, the problems of data bias and resource constraints in medical large language models are solved, improving the training speed and stability of the model, and ensuring the accuracy of the output and the load balancing of the server.
Patent Information
- Application Number
- CN202511309831.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing medical large language models suffer from problems such as single data bias, limited resources, slow training speed, and poor deployment stability during training, resulting in delayed model output and low accuracy, increasing server cluster load and damage rate.
By performing resource detection on the server cluster and selecting target servers, a medical input feature decision tree is constructed using a multimodal medical feedback dataset. The model is then trained with posterior bias correction using a pre-set medical knowledge base. Real-time monitoring and migration deployment are performed to generate a counterfactual medical diagnosis scenario dataset, thereby optimizing model performance and stability.
It improves the impartiality and stability of the medical unbiased large language model, enhances the training speed of the model and the rational use of server resources, reduces server load and failure rate, and ensures the accuracy and timeliness of model output.
Smart Images

Figure CN120806048B_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, a continuous feedback and iterative updating mechanism, and real-time maintenance and improvement of the performance, fairness and stability of the output of the medical debiased large language model, as well as acceleration of 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 waste of transmission resources can be improved. Thus, the medical debiased large language model training method can effectively reduce the bias caused by a single data source, improve the fairness and stability of the output of the medical debiased large language model, and enhance the model explainability by using the multi-modal medical feedback data set and the model usage feedback data, construct a whole process from data collection to model deployment, effectively solve the risk problems in the application of the medical debiased large language model, and 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. In the drawings, the same or similar elements are denoted by the same or similar reference numerals throughout the drawings. It is to be understood that the drawings are schematic, and elements and elements 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;
[0014] Figure 2 is a schematic diagram of a medical input-output causal relationship diagram 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;
[0015] Figure 3is a comparison diagram of a medical bias-eliminated large language model and an existing scheme traditional model in multiple evaluation dimensions according to some embodiments of the medical bias-eliminated large language model training method of the present disclosure;
[0016] Figure 4 is a structural diagram of some embodiments of the medical bias-eliminated large language model training device according to the present disclosure;
[0017] Figure 5 is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0018] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein. Rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the scope of protection of the present disclosure.
[0019] In addition, it should be further noted that only parts related to the present invention are shown in the drawings for ease of description. The embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0020] 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.
[0021] It should be noted that the adjectives "one", "multiple" mentioned in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that unless otherwise explicitly stated in the context, it should be understood as "one or more".
[0022] 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 these messages or information.
[0023] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0024] Figure 1 Flow 100 of some embodiments of the medical bias-eliminated large language model training method according to the present disclosure is shown. The medical bias-eliminated large language model training method includes the following steps:
[0025] In step 101, resource detection is performed on the server cluster, and a server meeting a resource selection condition is selected from the server cluster as a target server.
[0026] In some embodiments, the execution subject (for example, an electronic device) of the above medical debiasing large language model training method can perform resource detection on the server cluster, and select a server meeting 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 running the medical debiasing large language model and the multi-modal medical feedback dataset. The target server can be the server with the most idle resources among the at least one server meeting the resource selection condition.
[0027] 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.
[0028] 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 an obtained multi-modal medical dataset and a 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 a 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, physiological data collected by a wearable device, 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 of the type of disease suffered by the patient, treatment information of the patient, and required drugs of the patient, which is predicted and output by the medical debiasing large language model.
[0029] 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 a 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 a medical suggestion 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 in the form of a score value representing the patient's satisfaction with the medical debiased large language model, and a text description of feelings and doubts.
[0030] Optionally, the control of the target server, inputting the obtained multi-modal medical feedback data set into the medical debiased large language model to obtain a medical diagnosis information set can include the following steps:
[0031] Firstly, named entity recognition is performed 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 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 by using a Bio_ClinicalBERT model.
[0032] Secondly, model using satisfaction recognition is performed on the second model using feedback data set to obtain a model using sentiment tendency information set. The model using sentiment tendency information in the model using sentiment tendency information set can represent the positive or negative tendency of the patient's sentiment when 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, a sentiment analysis model is used to perform model using satisfaction recognition on the text description data set included in the second model using feedback data set to obtain a model using 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, fixed weight summation processing is performed on each feedback conversion data in the feedback conversion data set and the corresponding model using sentiment information in the model using sentiment information set to obtain a model using sentiment tendency information set.
[0033] 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.
[0034] 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.
[0035] 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.
[0036] 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.
[0037] 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:
[0038] 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 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 related to existing sensitive attributes formed in medical diagnosis collected in advance. 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.
[0039] 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 executing 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).
[0040] 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.
[0041] 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.
[0042] 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.
[0043] 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.
[0044] 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 diagnostic information, it is difficult to improve the accuracy and performance of medical bias-free large language models, and reduce the running load of the server. In view of the above technical problems, the conventional solution is generally: determine the importance by the single index 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 the updated decision tree Model migration deployment. However, the above conventional solution still has the following problems: due to the determination of the importance by the single index, the influencing factors considered are too single, and through static pruning and updating, the accuracy of the medical input feature decision tree constructed is low, which reduces the data bias accuracy through the medical input feature decision tree, and further reduces the performance and training speed of the medical bias-free large model, increases the running load of the server, 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 of partners, we decided to adopt the following solution:
[0045] In some optional implementations of some embodiments, the above constructing a medical input feature decision tree according to the above medical diagnostic information set and the above multi-modal medical feedback data set, and migrating and deploying the trained medical bias-free large language model according to the medical input feature decision tree, can include the following steps:
[0046] First, determine the medical evidence level information, diagnosis correlation degree and diagnosis guideline frequency of citation of each multi-modal medical feedback data in the above multi-modal medical feedback data set to obtain the medical evidence level information set, the diagnosis correlation degree set and the diagnosis guideline frequency of citation 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 degree can be the correlation degree between the multi-modal medical feedback data and the medical diagnostic information quantified by the existing medical knowledge graph. The diagnosis guideline frequency of citation can be the frequency of the multi-modal medical feedback data appearing in the medical guideline set related to medicine.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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 results 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.
[0059] 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:
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] In a fourth step, an input variable difference value set is determined for the medical input variable counterfactual feature set and the medical input variable feature set. The input variable difference value in the input variable difference value set can represent 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).
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] In some embodiments, the execution subject can perform posterior deviance training on the medical deviance-eliminated large language model according to the counterfactual medical diagnosis scene dataset and the corrected medical diagnosis information set to obtain a trained medical deviance-eliminated large language model. The trained medical deviance-eliminated 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 dataset group bias elimination and avoiding false cause output deviation adjustment on the medical deviance-eliminated large language model using the counterfactual medical diagnosis scene dataset and the corrected medical diagnosis information set. The preset loss threshold can be a minimum value preset for evaluating model performance.
[0072] In the process of adopting the technical solutions to solve the technical problems mentioned in the background, the following technical problems often occur: how to accurately identify the causal relationship between the various variable features included in the medical input and the diagnosis output to improve the deviance-elimination performance of the medical deviance-eliminated large language model. In view of the above technical problems, the conventional solution is generally: only through multi-modal medical feedback dataset to construct causal relationship. However, the above conventional solution still has the following problems: only through multi-modal medical feedback dataset itself to identify the causal relationship, the identified causal relationship is one-sided, the accuracy is low, the generated medical input-output causal relationship graph has a large number of redundant and erroneous causal relationships, the quality of the medical input-output causal relationship graph is low, which further reduces the performance and training rate of the medical deviance-eliminated 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 decided to adopt the following solution:
[0073] In some optional implementations of some embodiments, the posterior deviance training of the medical deviance-eliminated large language model according to the counterfactual medical diagnosis scene dataset and the corrected medical diagnosis information set to obtain a trained medical deviance-eliminated large language model can include the following steps:
[0074] In a first step, input-output causal relationship construction is performed on the multi-modal medical feedback dataset and the medical diagnosis information set to obtain a medical input-output causal relationship graph set. 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 dataset and the output medical diagnosis information. The input-output causal relationship construction can be performed using a causal graphical model (CGM). As shown in FIG. 8, a medical input-output causal relationship graph formed by each input feature included in the multi-modal medical feedback dataset and the output medical diagnosis information is shown. Figure 2 The medical diagnosis information in FIG. 8 can be information about the use of antibiotics. The input features can include smoking history, age, pneumonia, fever, cough, and white blood cell count. Figure 2
[0075] In a second step, an initial feedback causal directed acyclic graph is generated based on 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 based on 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 and is filtered from the multi-modal medical feedback dataset based on 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 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 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 based on expert experience and the preset medical knowledge base.
[0076] Thirdly, variable independence test is performed on the feedback medical variable characteristic information set corresponding to 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 a directed acyclic graph obtained by removing the independent edges from the initial feedback causal directed acyclic graph. The independent edge can be an edge formed by two feedback medical variable characteristic information nodes independent of each other. In practice, the execution subject can first determine the independent edges of the initial feedback causal directed acyclic graph corresponding to the existing relationship edges by using the PC (Peter-Clark) algorithm to obtain an independent edge set. Then, the independent edge set is removed from the initial feedback causal directed acyclic graph to obtain the target feedback causal directed acyclic graph.
[0077] Fourthly, a confounding variable detection is performed on the feedback medical variable characteristic information set corresponding to 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 can be 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 the Backdoor Criterion algorithm to obtain the target feedback medical variable characteristic information.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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, such as 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.
[0086] Optionally, the execution subject can further perform the following steps after 107:
[0087] First, real-time acquisition of the current multi-modal medical data set as the multi-modal target medical data set.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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 The medical debiased large language model training device can be applied to various electronic devices.
[0093] 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 meeting a 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, and obtains 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, in response to detecting that the target server has a resource alarm, compresses and sends the trained medical debiasing large language model to a server meeting the resource selection condition and migrates and deploys it.
[0094] 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.
[0095] Reference is made below to Figure 5 which shows a structural schematic diagram of an electronic device (e.g., 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this 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, apparatus, or device. In some embodiments of this 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. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0100] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0101] 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.
[0102] 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).
[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0104] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a resource detection unit, a control unit, a construction unit, a generation unit, a constraint correction unit, a model posterior bias-reducing training unit, and a compression and transmission unit. The names of these units do not necessarily limit the specific unit; for example, an acquisition unit may be described as "a unit that performs resource detection on a server cluster and selects servers from the server cluster that meet the resource selection criteria as target servers."
[0105] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0106] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for training a medical unbiased large language model, comprising: Perform resource detection on the server cluster, and select servers from the server cluster that meet the resource selection criteria as target servers; The target server is controlled to input the acquired multimodal medical feedback dataset into a medical debiased large language model to obtain a medical diagnostic information set. The multimodal medical feedback dataset includes model usage feedback datasets: a first model usage feedback dataset and a second model usage feedback dataset. Named entity recognition is performed on the first model usage feedback dataset to obtain a medical feedback entity set. Model usage satisfaction is identified on the second model usage feedback dataset to obtain a model usage sentiment information set. Association matching is performed on the multimodal medical dataset, the medical feedback entity set, and the model usage sentiment information set to obtain a medical association dataset. The medical association dataset is input into the multimodal feature extraction and alignment network included in the medical debiased large language model to obtain a multimodal medical feature vector set. The medical debiased large language model further includes a medical bias detection network and an adversarial debiasing network. The multimodal 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 set is input into the adversarial debiasing network to obtain a medical diagnostic information set. Based on the medical diagnostic information set and the multimodal medical feedback dataset, a medical input feature decision tree is constructed; Based on the multimodal medical feedback dataset, the medical diagnostic information set, and the medical input feature decision tree, a counterfactual medical diagnostic scenario dataset is generated, including: extracting input variable features from the multimodal medical feedback dataset to obtain a medical input variable feature set; quantifying the feature output association of the medical input variable feature set to obtain an input variable feature association degree set; constructing counterfactual data sequentially on the medical input variable feature set based on the input variable feature association degree set to obtain a medical input variable counterfactual feature set; determining the input variable difference value set between the medical input variable counterfactual feature set and the medical input variable feature set; constructing a causal chain between the medical input variable counterfactual feature set and the medical diagnostic information set based on the input variable difference value set to obtain a variable input-output causal chain graph; and filtering features from the medical input variable counterfactual feature set based on the variable input-output causal chain graph and the medical input feature decision tree to obtain a medical input variable filtering feature set, which serves as the counterfactual medical diagnostic scenario dataset. Based on a preset medical knowledge base, the medical diagnostic information set is constrained and modified to obtain a modified medical diagnostic information set. Based on the counterfactual medical diagnosis scenario dataset and the corrected medical diagnosis information set, the medical debiased large language model is trained using posterior debiasing to obtain the trained medical debiased large language model.
2. The method according to claim 1, wherein, The method further includes: Real-time acquisition of the current multimodal medical dataset, which serves as the target multimodal medical dataset; The target medical domain information set and training medical domain information set of the multimodal medical datasets included in the multimodal target medical dataset and the multimodal medical feedback dataset are determined respectively; Determine the medical domain similarity value between each piece of target medical domain information in the target medical domain information set and the training medical domain information in the training medical domain information set to obtain a set of medical domain similarity values; In response to determining that there is at least one medical domain similarity value less than or equal to a preset similarity threshold in the medical domain 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 at least one medical domain similarity value. In response to determining that there is at least one medical domain similarity value in the set of medical domain similarity values that is greater than the preset similarity threshold, knowledge transfer learning is performed on the trained medical debiased large language model based on at least one multimodal target medical data corresponding to at least one medical domain similarity value.
3. The method according to claim 1, wherein, The step of inputting the multimodal medical feature vector set into the medical bias detection network to obtain a medical association bias detection feature vector set includes: The multimodal medical feature vector set is divided into sensitive attribute groups to obtain a medical sensitive attribute group feature vector set; Perform a statistical test on the group feature vector set of the medical sensitivity attribute group to obtain the probability value of the group feature difference; In response to determining that the probability value of the group feature difference is greater than or equal to a preset group difference probability threshold, the weights of the target medical feature group dataset included in the multimodal medical feature vector set are dynamically adjusted to obtain the target medical group weight feature vector set. Adversarial debiasing is performed on the target medical group weight feature vector set to obtain the medical association bias detection feature vector set.
4. A medical debiased large language model training device, comprising: The resource detection unit performs resource detection on the server cluster and selects servers from the server cluster that meet the resource selection criteria as target servers. The control unit controls the target server to input the acquired multimodal medical feedback dataset into a medical debiased large language model to obtain a medical diagnostic information set. The multimodal medical feedback dataset includes model usage feedback datasets: a first model usage feedback dataset and a second model usage feedback dataset. Named entity recognition is performed on the first model usage feedback dataset to obtain a medical feedback entity set; model usage satisfaction is identified on the second model usage feedback dataset to obtain a model usage sentiment information set; association matching is performed on the multimodal medical dataset, the medical feedback entity set, and the model usage sentiment information set to obtain a medical association dataset; the medical association dataset is input into the multimodal feature extraction and alignment network included in the medical debiased large language model to obtain a multimodal medical feature vector set. The medical debiased large language model further includes a medical bias detection network and an adversarial debiasing network; the multimodal 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 set is input into the adversarial debiasing network to obtain a medical diagnostic information set. The construction unit constructs a medical input feature decision tree based on the medical diagnostic information set and the multimodal medical feedback dataset; The generation unit generates a counterfactual medical diagnosis scenario dataset based on the multimodal medical feedback dataset, the medical diagnostic information set, and the medical input feature decision tree. This includes: extracting input variable features from the multimodal medical feedback dataset to obtain a medical input variable feature set; quantifying the feature output association of the medical input variable feature set to obtain an input variable feature association degree set; constructing counterfactual data sequentially on the medical input variable feature set based on the input variable feature association degree set to obtain a medical input variable counterfactual feature set; determining the input variable difference value set between the medical input variable counterfactual feature set and the medical input variable feature set; constructing a causal chain between the medical input variable counterfactual feature set and the medical diagnostic information set based on the input variable difference value set to obtain a variable input-output causal chain graph; and performing feature filtering on the medical input variable counterfactual feature set based on the variable input-output causal chain graph and the medical input feature decision tree to obtain a medical input variable filtering feature set, which serves as the counterfactual medical diagnosis scenario dataset. The constraint correction unit performs constraint correction on the medical diagnostic information set according to a preset medical knowledge base to obtain a corrected medical diagnostic information set. The model posterior debiasing training unit trains the medical debiased large language model posteriorly based on the counterfactual medical diagnosis scenario dataset and the corrected medical diagnosis information set, thereby obtaining the trained medical debiased large language model.
5. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-3.
6. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Deep learning language model fine tuning method for clinical medicine decision assistance
CN117198505A
Training method, system and equipment of medical multi-mode base model and storage medium
CN119474883A