CN117786536A - Training method, device, equipment and medium for large language model - Google Patents

Training method, device, equipment and medium for large language model Download PDF

Info

Publication number
CN117786536A
CN117786536A CN202410199335.4A CN202410199335A CN117786536A CN 117786536 A CN117786536 A CN 117786536A CN 202410199335 A CN202410199335 A CN 202410199335A CN 117786536 A CN117786536 A CN 117786536A
Authority
CN
China
Prior art keywords
task
tasks
medical
efficacy evaluation
language model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410199335.4A
Other languages
Chinese (zh)
Other versions
CN117786536B (en
Inventor
张程剀
刘泽恩
刘晓华
陈小梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Yiyong Technology Co ltd
Original Assignee
Beijing Yiyong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Yiyong Technology Co ltd filed Critical Beijing Yiyong Technology Co ltd
Priority to CN202410199335.4A priority Critical patent/CN117786536B/en
Publication of CN117786536A publication Critical patent/CN117786536A/en
Application granted granted Critical
Publication of CN117786536B publication Critical patent/CN117786536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention provides a large language model training method, device, equipment and medium for evaluating tumor curative effect. The method comprises the following steps: generating a plurality of tasks based on the tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, the plurality of tasks including an efficacy evaluation task targeting the tumor efficacy evaluation, a plurality of dimension judgment tasks targeting the plurality of medical judgment dimensions, respectively, and a sharing task targeting two or more of the tumor efficacy evaluation and the plurality of medical judgment dimensions together; respectively inputting the medical text data into a plurality of dimension judgment tasks and sharing tasks to obtain a dimension judgment task gradient, a dimension judgment task result, a sharing task gradient and a sharing task result; inputting the medical text data, the dimension judging task result and the sharing task result into a efficacy evaluation task to obtain efficacy evaluation task gradients of the efficacy evaluation task; and updating parameters of the large language model based on the task gradients of the respective plurality of tasks.

Description

Training method, device, equipment and medium for large language model
Technical Field
The invention relates to the field of data processing, in particular to a training method, a training device, training equipment and training media based on a large language model for evaluating tumor curative effect.
Background
The evaluation of the curative effect after tumor treatment is the basis for changing the treatment scheme and is also an objective index for comparing the effects of various treatment schemes. The treatment efficacy evaluation criteria for solid tumors mainly include WHO criteria and solid efficacy evaluation criteria (RECIST). At present, the efficacy evaluation standard (RECIST) of solid tumors replaces the WHO standard adopted originally, and becomes a universal efficacy evaluation standard in the international tumor world.
According to the evaluation standard (RECIST) of the curative effect of the solid tumor, doctors/algorithms need to combine comprehensive analysis of knowledge in various dimensions and various fields to obtain accurate evaluation and judgment of the curative effect. Because of the diversity and diversity of the patient conditions and the diversity of medical record recording modes such as patient medical records/ward-round records recorded by doctors, more barriers are encountered when judging the curative effect evaluation, the burden of the tumor specialist doctor is more easily increased, and the situation of misjudgment of the tumor curative effect evaluation is caused.
A large language model is an artificial intelligence model that aims to understand and generate human language. They train on a large amount of text data and can perform a wide range of tasks including text summarization, translation, emotion analysis, and so forth. In view of the strong summarization, logic understanding and reasoning capability of the large language model, the model is an ideal tool for realizing automatic auxiliary judgment of curative effect evaluation and reducing the workload of a tumor specialist doctor.
However, current large language models rely primarily on instruction-based optimization in which the setting of a generic multi-headed attentiveness mechanism at the same time enables the large language model to better understand user input, understand semantic logical links between sentences and words. This approach has a good optimization effect for unidirectional-multitasking (e.g. for multi-dimensional information extraction for the same input). However, for a multidirectional single task such as tumor efficacy evaluation, the method cannot well focus attention on only a few sub-indexes of the specific task of efficacy evaluation, so that a large language model cannot realize accurate understanding of sub-indexes/dimensions in the field of tumor efficacy evaluation when the large language model is used for tumor efficacy evaluation.
Therefore, a large language model training method for evaluating tumor efficacy is needed to solve the above technical problems.
Disclosure of Invention
In view of the above problems, the present invention provides a large language model training method, apparatus, device and medium for tumor efficacy evaluation, which generates a plurality of tasks based on tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, obtains task gradients and task results corresponding to the plurality of dimension judgment tasks and the sharing task by inputting medical text data into the plurality of dimension judgment tasks and the sharing task, respectively, then inputs the medical text data and the task results into the efficacy evaluation tasks among the plurality of tasks to obtain efficacy evaluation task gradients, and finally updates parameters of the large language model based on the gradients of the respective tasks. Through the method, a multi-head attention mechanism is reserved to understand global semantics, and understanding of a specific task of tumor efficacy evaluation can be enhanced, so that accuracy of tumor efficacy evaluation is improved.
According to one aspect of the present invention, there is provided a large language model training method for tumor efficacy evaluation, comprising: generating a plurality of tasks based on a tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, wherein the plurality of tasks include an efficacy evaluation task targeting the tumor efficacy evaluation, a plurality of dimension judgment tasks targeting the plurality of medical judgment dimensions, respectively, and a shared task targeting two or more of the tumor efficacy evaluation and the plurality of medical judgment dimensions together; respectively inputting the medical text data into the plurality of dimension judgment tasks to obtain a plurality of dimension judgment task gradients and a plurality of dimension judgment task results corresponding to the plurality of dimension judgment tasks; inputting the medical text data into the sharing task to obtain a sharing task gradient and a sharing task result of the sharing task; in response to obtaining the multiple dimension determination task results and the sharing task results, inputting the medical text data, the multiple dimension determination task results and the sharing task results into the efficacy evaluation task to obtain an efficacy evaluation task gradient of the efficacy evaluation task; and updating parameters of the large language model based on the task gradients of the respective plurality of tasks.
According to some embodiments of the invention, to obtain the task results and task gradients of each of the plurality of tasks, the method further comprises: extracting task labels of the tasks from the medical text data based on task targets of the tasks, wherein the task labels identify keywords associated with the task targets of the tasks in the medical text data; and respectively performing supervision training on the tasks based on the task labels of the tasks so as to obtain task results and task gradients of the tasks.
According to some embodiments of the invention, performing supervisory training on the plurality of tasks based on the task labels of the plurality of tasks, respectively, to obtain task results and task gradients of the plurality of tasks, respectively, further includes: determining respective loss functions of the plurality of tasks based on respective task labels of the plurality of tasks; and determining respective task gradients of the plurality of tasks based on respective loss functions of the plurality of tasks.
According to some embodiments of the invention, wherein the respective loss functions of the plurality of tasks are determined based on the following formula:
Wherein,is a one-hot encoded vector of a task tag of each of the plurality of tasks,/for each of the plurality of tasks>Is a predicted probability distribution for each of said plurality of tasks,/>Is the number of task labels for each of the plurality of tasks.
According to some embodiments of the invention, wherein the task gradient for each of the plurality of tasks is determined based on the following formula:
wherein,δis the gradient that is passed back from the latter layer,is the weight matrix of each of the plurality of tasks,>and->Is a low rank matrix for updating the weight matrix of each of the plurality of tasks.
According to some embodiments of the invention, wherein the weight matrix of the plurality of tasks is determined based on the following formula: weight matrix of the multiple dimension judging taskWherein->Judging the number of tasks of the task for the plurality of dimensions, < > for>For initial weight, ++>A low rank matrix for each of the plurality of dimension determination tasks; weight matrix of the shared task>WhereinLow rank matrix sums for one or more of the plurality of dimension determination tasks, +.>A low rank matrix for the shared task; weight matrix of the efficacy evaluation taskWherein- >And a low-rank matrix for the efficacy evaluation task.
According to some embodiments of the invention, wherein updating parameters of the large language model based on the task gradients of each of the plurality of tasks further comprises: updating a low rank matrix of the plurality of tasks based on respective task gradients of the plurality of tasks.
According to some embodiments of the invention, wherein the shared tasks include an overall shared task targeting all of the tumor efficacy assessment and the plurality of medical judgment dimensions and a partial shared task targeting portions of the tumor efficacy assessment and the plurality of medical judgment dimensions.
According to some embodiments of the invention, wherein the plurality of medical judgment dimensions comprises two or more of: measurement for and judgment of cancer type; a judgment of a kind of treatment performed with respect to the determined kind of cancer; a judgment of the kind of examination performed for the determined kind of cancer; judgment of tumor efficacy evaluation based on the kind of cancer, the kind of treatment and/or the kind of examination.
According to some embodiments of the invention, to obtain the task results and task gradients of each of the plurality of tasks, the method further comprises: extracting one or more keywords associated with the medical knowledge from the medical text data based on medical knowledge; one or more keywords associated with the medical knowledge are entered into the plurality of tasks to obtain task results and task gradients for the plurality of tasks.
According to another aspect of the present invention, a large language model training apparatus for tumor efficacy evaluation is provided. The large language model training device comprises: a task generating unit configured to generate a plurality of tasks based on a tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, wherein the plurality of tasks include an efficacy evaluation task with the tumor efficacy evaluation as a task target, a plurality of dimension judgment tasks with the plurality of medical judgment dimensions as task targets, respectively, and a shared task with two or more of the tumor efficacy evaluation and the plurality of medical judgment dimensions collectively as task targets; a training unit configured to input medical text data into the plurality of dimension-judging tasks respectively to obtain a plurality of dimension-judging task gradients corresponding to the plurality of dimension-judging tasks and a plurality of dimension-judging task results; inputting the medical text data into a sharing task to obtain a sharing task gradient and a sharing task result of the sharing task; and in response to obtaining the multiple dimension determination task results and the sharing task results, inputting the medical text data, the multiple dimension determination task results, and the sharing task results into the efficacy evaluation task to obtain an efficacy evaluation task gradient of the efficacy evaluation task; and a parameter updating unit configured to update parameters of the large language model based on the task gradients of the respective tasks.
According to some embodiments of the invention, wherein, to obtain the task results and the task gradients of each of the plurality of tasks, the training unit is further configured to: extracting task labels of the tasks from the medical text data based on task targets of the tasks, wherein the task labels identify keywords associated with the task targets of the tasks in the medical text data; and respectively performing supervision training on the tasks based on the task labels of the tasks so as to obtain task results and task gradients of the tasks.
According to some embodiments of the invention, in order to perform supervisory training on the plurality of tasks based on their respective task labels, respectively, to obtain task results and task gradients of the plurality of tasks, the training unit is further configured to: determining respective loss functions of the plurality of tasks based on respective task labels of the plurality of tasks; and determining respective task gradients of the plurality of tasks based on respective loss functions of the plurality of tasks.
According to some embodiments of the invention, wherein the respective loss functions of the plurality of tasks are determined based on the following formula:
Wherein,is a one-hot encoded vector of a task tag of each of the plurality of tasks,/for each of the plurality of tasks>Is a predicted probability distribution for each of said plurality of tasks,/>Is the number of task labels for each of the plurality of tasks.
According to some embodiments of the invention, wherein the task gradient for each of the plurality of tasks is determined based on the following formula:
wherein,δis the gradient that is passed back from the latter layer,is the weight matrix of each of the plurality of tasks,>and->Is a low rank matrix for updating the weight matrix of each of the plurality of tasks.
According to some embodiments of the invention, wherein the weight matrix of the plurality of tasks is determined based on the following formula: weight matrix of the multiple dimension judging taskWherein->Judging the number of tasks of the task for the plurality of dimensions, < > for>For initial weight, ++>A low rank matrix for each of the plurality of dimension determination tasks; weight matrix of the shared task>WhereinLow rank matrix sums for one or more of the plurality of dimension determination tasks, +.>A low rank matrix for the shared task; weight matrix of the efficacy evaluation taskWherein- >And a low-rank matrix for the efficacy evaluation task.
According to some embodiments of the invention, wherein the parameter updating unit is further configured to: updating a low rank matrix of the plurality of tasks based on respective task gradients of the plurality of tasks.
According to some embodiments of the invention, wherein the shared tasks include an overall shared task targeting all of the tumor efficacy assessment and the plurality of medical judgment dimensions and a partial shared task targeting portions of the tumor efficacy assessment and the plurality of medical judgment dimensions.
According to some embodiments of the invention, wherein the plurality of medical judgment dimensions comprises two or more of: measurement for and judgment of cancer type; a judgment of a kind of treatment performed with respect to the determined kind of cancer; a judgment of the kind of examination performed for the determined kind of cancer; judgment of tumor efficacy evaluation based on the kind of cancer, the kind of treatment and/or the kind of examination.
According to some embodiments of the invention, wherein, to obtain the task results and the task gradients of each of the plurality of tasks, the training unit is further configured to: extracting one or more keywords associated with the medical knowledge from the medical text data based on medical knowledge; one or more keywords associated with the medical knowledge are entered into the plurality of tasks to obtain task results and task gradients for the plurality of tasks.
According to another aspect of the present invention, there is provided an electronic apparatus including: a processor; and a memory, wherein the memory stores computer readable code that, when executed by the processor, implements the foregoing large language model training method for tumor efficacy assessment.
According to another aspect of the present invention, there is provided a non-transitory computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the foregoing large language model training method for tumor efficacy assessment.
Therefore, according to the large language model method, device, equipment and medium for tumor efficacy evaluation of the embodiment of the invention, a plurality of tasks can be generated based on tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, task gradients and task results corresponding to the plurality of dimension judgment tasks and the sharing tasks are obtained by respectively inputting medical text data into the plurality of dimension judgment tasks and the sharing tasks, then medical text data and the task results are input into the efficacy evaluation tasks in the plurality of tasks to obtain efficacy evaluation task gradients, and finally parameters of the large language model are updated based on the gradients of the tasks, so that a multi-head attention mechanism is reserved to understand global semantics, understanding of a specific task of tumor efficacy evaluation can be enhanced, and accuracy of tumor efficacy evaluation is improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings that are used in the description of the embodiments will be briefly described. It should be apparent that the drawings in the following description are merely exemplary embodiments of the present invention, and that other drawings may be obtained from these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 illustrates a flow chart of a large language model training method according to some embodiments of the invention;
FIG. 2 illustrates a schematic diagram of a large language model training method according to some embodiments of the invention;
FIG. 3 illustrates a schematic diagram of parameter updating for a large language model training method, according to some embodiments of the invention;
FIG. 4 illustrates a block diagram of a large language model training apparatus, according to some embodiments of the invention;
fig. 5 illustrates a block diagram of an electronic device according to some embodiments of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without creative efforts, based on the described embodiments of the present invention fall within the protection scope of the present invention.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The terms "first," "second," and the like, as used herein, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed. In order to keep the following description of the embodiments of the present invention clear and concise, a detailed description of some known functions and known components have been omitted.
A flowchart is used in the present invention to describe the steps of a method according to an embodiment of the present invention. It should be understood that the steps that follow or before do not have to be performed in exact order. Rather, the various steps may be processed in reverse order or simultaneously. Also, other operations may be added to or removed from these processes.
In the description and drawings of the present invention, elements are described in the singular or plural form according to the embodiments. However, the singular and plural forms are properly selected for the proposed case only for convenience of explanation and are not intended to limit the present invention thereto. Accordingly, the singular may include the plural and the plural may include the singular unless the context clearly indicates otherwise.
The training and reasoning method, device, equipment and medium for training the large language model provided by the invention are described in detail below with reference to the accompanying drawings.
First embodiment
In the current medical application scene/business, medical workers need to combine observation/measurement/judgment of each dimension for evaluating the tumor curative effect, and finally integrate multiple dimension information to perform multiple rounds of judgment, so as to finally obtain the tumor curative effect evaluation. The ability of large language models in general language logic understanding is now well documented, however, advanced knowledge of specific medical fields such as tumor efficacy assessment still requires model capacity enhancement by way of model fine-tuning. Aiming at the custom fine adjustment of a large language model in a tumor curative effect evaluation scene, the custom fine adjustment is still realized by general single-task frameworks such as lora, peft and the like, wherein the attention mechanism of the large language model is still mainly multi-head and general. Because the curative effect evaluation needs to be carried out by combining multi-dimensional information to carry out multi-round judgment, and a customized fine tuning method based on general language logic and a multi-head attention mechanism is adopted, the final curative effect evaluation is obtained by carrying out deep analysis on the judgment result of each round, the deep knowledge of a large language model in a specific medical field cannot be completely realized, and the specific medical indexes/observation/measurement/judgment cannot be combined. In addition, multiple rounds of fine-tuning customization are required with current large language model tuning/customization schemes, and the customization model requires multiple rounds of dialog/interpretation to achieve the desired results. The process increases the calculation cost and calculation time, simultaneously expands the disturbance of the prediction deviation of each round, and the accuracy of the final output round curative effect evaluation effect is greatly influenced by the multi-round conduction, so that the effect of the large language model on the task in the specific medical field cannot be improved. Meanwhile, due to the fact that medical training data with stronger professionals are introduced, the capability of a large language model for general language logic processing can be influenced, and the effect of the model after fine adjustment is poor.
In view of the above, FIGS. 1 and 2 illustrate a flowchart and a schematic diagram, respectively, of a large language model training method according to some embodiments of the present invention. The improved large language model training method of the present invention will be described in detail with reference to fig. 1 and 2.
First, in step S102, a plurality of tasks may be generated based on the tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation. The plurality of tasks may include a efficacy evaluation task targeting a tumor efficacy evaluation, a plurality of dimension determination tasks targeting a plurality of medical determination dimensions, respectively, and a shared task targeting two or more of the tumor efficacy evaluation and the plurality of medical determination dimensions together.
According to one embodiment of the present disclosure, the plurality of medical judgment dimensions for tumor efficacy evaluation may include two or more of the following: measurement for and judgment of cancer type; a judgment of a kind of treatment performed with respect to the determined kind of cancer; judgment of the kind of examination (imaging, medical observation, etc.) performed with respect to the determined kind of cancer; judgment of tumor efficacy evaluation based on the kind of cancer, the kind of treatment and/or the kind of examination.
According to one embodiment of the present disclosure, the sharing task may include an overall sharing task targeting all of the tumor efficacy evaluation and the plurality of medical judgment dimensions and a partial sharing task targeting portions of the tumor efficacy evaluation and the plurality of medical judgment dimensions. By combining different tasks, the relation between the different tasks can be further obtained, so that the effect of depth analysis/information mining can be realized.
As shown in the example of fig. 2, the multiple medical judgment dimensions for tumor efficacy evaluation may include target lesion (cancer species) measurement and validation analysis, target lesion (cancer species) treatment analysis, target lesion (cancer species) examination result analysis. Furthermore, the medical judgment dimension may also include an overall analysis. Then, based on the tumor efficacy evaluation and the plurality of medical judgment dimensions shown in fig. 2, a plurality of tasks may be generated, including an overall shared task (i.e., all task sharing) with all of the tumor efficacy evaluation and the plurality of medical judgment dimensions as task targets, and a partial shared task (partial task sharing) with parts of the tumor efficacy evaluation and the plurality of medical judgment dimensions as task targets, and a task (specific task 1-4) with each of the plurality of medical judgment dimensions and the tumor efficacy evaluation as task targets.
After generating the plurality of tasks, the medical text data may be input to the plurality of tasks to train the large language model to obtain gradients and results for each task, wherein the gradient for each task may be used to update parameters corresponding to the task and the results for each task may be used for input for use by medical workers. Specifically, in step S104, the medical text data may be input into the plurality of dimension determination tasks, respectively, to obtain a plurality of dimension determination task gradients corresponding to the plurality of dimension determination tasks and a plurality of dimension determination task results.
According to one example of the invention, the medical text data may be text data describing the condition of a user visit, disease diagnosis, examination, medical history, etc. In one example, the medical text data may be a medical record, prescription, exam report, etc. of the user. For example, one medical text data may include the following:
"patients underwent radical treatment for right breast cancer in XX-day XX Hospital; postoperative pathology shows: invasive carcinoma grade II, mixed carcinoma (invasive lobular carcinoma and invasive ductal carcinoma), tumor size of 3 x2cm, no cancer in axillary lymph node 0/6, immunohistochemistry of ER100% + PR 10% + her-2 2+, ki-67% 30+. Further chemotherapy is now being offered to "right breast cancer" to I'm.
According to one example of the present invention, the medical text data is desensitized to ensure user data security. In one example, the medical text data may be obtained by a patient master index (EMPI), for example, based on the patient's identity information. EMPI refers to providing the same patient with a mutual index between different IDs. According to the identity information of the user, the EMPI is used for acquiring medical data related to the user, so that the safety of privacy of the patient can be ensured.
According to one example of the invention, the medical text data may be a collection, which may include one or more medical text data, each of which may contain unstructured text information.
In one example, there may be multiple medical text data for training a large language model training. The plurality of medical text data may include medical text data associated with a plurality of users or a plurality of medical text data associated with the same user, or both.
According to one example of the present invention, in order to ensure accuracy and diversity of data, medical text information associated with the same user may be acquired from a plurality of data sources, wherein the medical text information associated with the same user acquired from the plurality of data sources has different dimensions; and medical text information associated with the same user acquired from multiple data sources may be consolidated to generate unstructured medical text data.
According to one example of the invention, the medical text data may be medical text data after data cleansing and Natural Language Processing (NLP) preprocessing to avoid unwanted information in raw medical text data interfering with the training process. According to one example of the invention, the medical text data can be further subjected to data cleaning to filter messy codes and special characters in the medical text data; the filtered medical text data is then obtained for input into a large language model.
In step S106, medical text data may also be input into the shared task to obtain a shared task gradient of the shared task and a shared task result.
In one example, the medical text data may be input into the plurality of dimension determination tasks to obtain a plurality of dimension determination task gradients and a plurality of dimension determination task results corresponding to the plurality of dimension determination tasks, respectively, at step S104, and then input into the sharing task to obtain a sharing task gradient and a sharing task result of the sharing task at step S106; alternatively, the medical text data may be input to the sharing task at step S106 to obtain a sharing task gradient and a sharing task result of the sharing task, and then the medical text data may be input to the multiple dimension judgment tasks at step S104 to obtain multiple dimension judgment task gradients and multiple dimension judgment task results corresponding to the multiple dimension judgment tasks, respectively; alternatively, there may be a case of parallelism in steps S104 and S106, for example, while step S104 inputs the medical text data into the plurality of dimension determination tasks to obtain the plurality of dimension determination task gradients and the plurality of dimension determination task results corresponding to the plurality of dimension determination tasks, respectively, step S106 may simultaneously input the medical text data into the sharing task to obtain the sharing task gradient and the sharing task results of the sharing task. Therefore, the order in which steps S104 and S106 are performed is not necessarily precisely in order. Rather, the steps may be processed in reverse order or simultaneously.
Similarly, other steps may be performed in a similar manner as steps S104 and S106, without depending on the results of the preceding steps, and the order in which they are performed is not necessarily precisely sequential. Rather, the steps may be processed in reverse order or in parallel.
Then, in step S108, in response to obtaining the plurality of dimension determination task results and the sharing task results, the medical text data, the plurality of dimension determination task results, and the sharing task results may be input into the efficacy evaluation task to obtain an efficacy evaluation task gradient of the efficacy evaluation task. In view of the need for tumor efficacy assessment based on multiple medical judgment dimensions, the effectiveness of tumor efficacy assessment is facilitated by generating multiple tasks and then cross-coupling the multiple tasks.
According to an embodiment of the present disclosure, in order to obtain the task results and the task gradients of the tasks in steps S104, S106, and S108, the large language model training method as shown in fig. 1 and fig. 2 may further extract task labels of the tasks from the medical text data based on the task targets of the tasks, and then perform supervised training on the tasks based on the task labels of the tasks, so as to obtain the task results and the task gradients of the tasks. By using task tags, the relationship between the entered medical text/record and the corresponding task for which the tag is directed can be deeply explored. According to one embodiment of the present disclosure, a task tag may identify keywords in medical text data associated with task goals of a plurality of tasks. In one example, the task tag may include information identified by a medical professional.
In the example of fig. 2, the labels in the medical text data may include labels for each of a plurality of tasks, such as measurement and validation of doctor-labeled patient target lesions/cancer species; treatment of the patient with doctor-labeled target lesion/cancer species; the doctor-labeled patient performs examination (imaging, medical observation, etc.) on the designated cancer species, and the doctor-labeled tumor efficacy evaluation judgment and judgment basis, etc.
According to one embodiment of the present disclosure, one or more keywords associated with medical knowledge may also be extracted from medical text data based on medical knowledge, and then one or more keywords associated with medical knowledge may be input into a plurality of tasks instead of the entire medical text data to obtain task results and task gradients for the plurality of tasks to reduce the amount of invalid data for training and improve the processing speed and accuracy of the large language model. In one example, the keywords may include: desensitizing medical texts/recordings-including age, regional, family tumor history, smoking history, drinking history, imaging exams, pathology exams, and surgical treatments, radiation treatments, systemic medication treatments, etc. -are obtained from oncological medical data centers and related systems.
According to one example of the present disclosure, keywords in medical text data may be extracted based on regular expressions generated with predetermined medical rules, where the keywords may be categorized as one or more topics. The predetermined medical rules may include one or more of the following: inspection projects, radiotherapy, diagnosis names, operation names, pathological diagnosis, drug common name standardized treatment, site standardized treatment and differentiation degree standardized treatment. According to one embodiment of the present invention, contents including a specific topic may be determined from medical text data based on regular expressions generated with predetermined medical rules, and keywords in the medical text data may be determined based on the contents including the specific topic. Wherein, determining regular expressions based on predetermined medical rules can more accurately extract keywords in medical text data.
In one example, topics for classifying keywords may be classified based on one or more of medical documents, drug forms, symptom signs forms, pathology encyclopedia information, and the like, for example. In one example, the category of the subject of the keyword may be, for example, breast cancer, liver cancer. The topics of the keywords may also be categorized in other categories or may be categorized by sub-categories under a certain broad class (e.g., according to a subtype of a certain type of cancer, etc.). In one example, one keyword may belong to different categories according to the classification scheme to address different training and/or different classification purposes.
In order to extract keywords further accurately, according to one embodiment of the present invention, word frequency analysis may also be performed on the medical text data using, for example, TF-IDF (term frequency-inverse document frequency) to determine the vocabulary frequency in the medical text data. Keywords in the medical text data may then be optimized based on the lexical frequency in the medical text data. Specifically, for example, words in the medical text data having a word frequency higher than a threshold value may be identified, and then the keywords in the medical text data are updated based on words that are not included in the keywords in the medical text data extracted based on the regular expression and have a word frequency higher than the threshold value. In one example, the threshold vocabulary frequency may be modified based on a desired accuracy.
According to an embodiment of the present disclosure, in the case where the plurality of tasks are respectively supervised trained based on the task labels of the plurality of tasks, the respective loss functions of the plurality of tasks may be respectively determined based on the task labels of the plurality of tasks, and the respective task gradients of the plurality of tasks may be respectively determined based on the respective loss functions of the plurality of tasks.
Wherein the loss function for each of the plurality of tasks may be independent and may be determined based on the following formula:
wherein,a one-hot (one-hot) encoding vector, which is a task tag for each of a plurality of tasks,>is a predicted probability distribution for each of a plurality of tasks,/->Is the number of task labels for each of the plurality of tasks.
Based on the respective loss functions of the plurality of tasks, the respective task gradients of the plurality of tasks may be determined based on the following formula:
wherein,δis the gradient that is passed back from the latter layer,is a weight matrix for each of a plurality of tasks, < >>And->Is a low rank matrix for updating the weight matrix of each of a plurality of tasks.
Wherein the weight matrix for the plurality of tasks is determined based on the following formula:
weight matrix of multiple dimension judging taskWherein->Judging the number of tasks of the task for a plurality of dimensions, < >>For initial weight, ++>A low rank matrix for each of the plurality of dimension determination tasks; weight matrix of shared task->Wherein->Low rank matrix sum for one or more of the plurality of dimension determination tasks, +.>,/>A low rank matrix that is a shared task; weight matrix of efficacy evaluation task >WhereinA low rank matrix for efficacy evaluation tasks. The optimal curative effect evaluation and judgment effect can be achieved by updating the low-rank matrix according to different weights. According to one example of the present disclosure, a different low rank matrix may be used for each task.
Turning now to the example of fig. 2, for target lesion (cancer species) inspection result analysis, in this task, medical records/text may be taken as input, and only target lesion (cancer species) inspection results are analyzed as input tasks. Furthermore, the loss of this task can be calculated based on the label analyzed for the target lesion (cancer species) examination resultA gradient of a function, wherein the weight matrix of the task is
For target lesion (cancer species) treatment analysis, in this task, medical records/text may be taken as input, and only target lesion (cancer species) treatment is analyzed as input task. Furthermore, the gradient of the loss function of the task can be calculated based on the labels analyzed for the target lesion (cancer species) treatment, wherein the weight matrix of the task is
For target lesion (cancer species) measurement and validation analysis, in this task, medical records/text may be taken as input, and target lesion (cancer species) measurement and validation analysis may be taken as input. Furthermore, the gradient of the loss function of the task can be calculated based on the labels for target lesion (cancer species) measurement and validation analysis, wherein the weight matrix of the task is
For all task sharing, in this task, medical records/text may be taken as input, and all subtasks+tumor efficacy evaluation decisions may be taken as input tasks. Furthermore, the task calculates the loss and gradient by taking the labels of all tasks as labels of the task, wherein the weight matrix of the task is
For tumor efficacy assessment tasks (i.e., task-specific 4), the design may be in a mode of cross-coupling of shared task modules and task-specific modules. In this task, its input may include task results from other tasks (all task sharing, part task sharing, specific tasks 1-3) in addition to the medical text data/record. The weight matrix of the task is. Then, based on the medical text data and task results of other tasks and labels for tumor efficacy evaluation, gradients and results of the tumor efficacy evaluation task can be obtained.
The tumor efficacy evaluation task module can deeply extract and analyze the evidence for evaluating and judging the tumor efficacy based on the enhancement task of target focus (cancer species) measurement and confirmation analysis, target focus (cancer species) treatment analysis and target focus (cancer species) inspection result analysis, and help the large language model to obtain more evidence related to efficacy evaluation. Because these specific tasks, tumor efficacy evaluation tasks and specific tasks (target lesion (cancer species) measurement and confirmation analysis, target lesion (cancer species) treatment analysis, target lesion (cancer species) inspection result analysis) have strong correlation and logical connection, the effect of the customized and fine-tuned large language model on tumor efficacy evaluation can be finally improved by utilizing the design mode of purification and coupling of a plurality of enhancement tasks. In addition, through the large language model training method shown in fig. 1 and 2, the condition that a required result can be obtained only through multiple rounds of dialogue/interpretation is avoided, the calculation cost and calculation time are reduced, and meanwhile, disturbance of prediction deviation of each round is reduced, so that the accuracy of the large language model in the aspect of tumor curative effect evaluation is further improved.
FIG. 3 also shows a schematic diagram of the task parameter updates in the example shown in FIG. 2. As shown in fig. 3, for each task, a respective loss function may be determined, and then the gradient returned from the subsequent layer is obtained to update the loss function. The latest gradient for the task may then be calculated based on the updated loss function.
After obtaining the task gradients of the tasks, in step S110, parameters of the large language model may be updated based on the task gradients of the tasks, so as to improve accuracy of the large language model.
According to one embodiment of the present disclosure, a low rank matrix of a plurality of tasks may be updated based on their respective task gradients. In one example, after the gradient is obtained, the weight matrix may be updated using an optimization algorithm such as Adam or the like.
In one example, after obtaining the task gradients of each of the plurality of tasks, the task gradient of the whole large language model may be determined by setting the weight on each task, and the parameters of the related tasks may be updated. As shown in fig. 3, the task gradient of the large language model as a whole can be obtained based on the following equation:
The optimal weight of each task may be determined by parameter tuning methods, including but not limited to grid search (grid search), random search, bayesian optimization, and the like.
The large language model training method for tumor efficacy evaluation is described in detail above with reference to fig. 1 to 3, which generates a plurality of tasks based on tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, obtains task gradients and task results corresponding to the plurality of dimension judgment tasks and the sharing task by inputting medical text data into the plurality of dimension judgment tasks and the sharing task, respectively, then inputs the medical text data and the task results into the efficacy evaluation tasks among the plurality of tasks to obtain efficacy evaluation task gradients, and finally updates parameters of the large language model based on the gradients of the respective tasks, thus not only preserving a multi-head attention mechanism to understand global semantics, but also enhancing understanding of the specific task for tumor efficacy evaluation, thereby improving accuracy of tumor efficacy evaluation.
Second embodiment
The present invention provides a large language model training apparatus for tumor efficacy evaluation in addition to the above-described large language model training method for tumor efficacy evaluation, which will be described in detail below with reference to fig. 4.
FIG. 4 illustrates a block diagram of a large language model training apparatus according to some embodiments of the invention. As shown in fig. 4, the large language model training apparatus 400 according to the present invention may include a task generating unit 410, a training unit 420, and a parameter updating unit 430.
According to some embodiments of the present invention, the task generating unit 410 may be configured to generate a plurality of tasks based on the tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, wherein the plurality of tasks include an efficacy evaluation task targeting the tumor efficacy evaluation, a plurality of dimension judgment tasks targeting the plurality of medical judgment dimensions respectively, and a shared task targeting two or more of the tumor efficacy evaluation and the plurality of medical judgment dimensions together.
The training unit 420 may be configured to input the medical text data into the plurality of dimension-judging tasks to obtain a plurality of dimension-judging task gradients corresponding to the plurality of dimension-judging tasks and a plurality of dimension-judging task results, respectively; inputting the medical text data into the sharing task to obtain a sharing task gradient of the sharing task and a sharing task result; and in response to obtaining the multiple dimension determination task results and the shared task results, inputting the medical text data, the multiple dimension determination task results and the shared task results into the efficacy evaluation task to obtain an efficacy evaluation task gradient of the efficacy evaluation task.
The parameter updating unit 430 may be configured to update the parameters of the large language model based on the task gradients of the respective plurality of tasks.
According to some embodiments of the invention, to obtain task results and task gradients for each of the plurality of tasks, the training unit 420 is further configured to extract task labels for each of the plurality of tasks from the medical text data based on task targets for each of the plurality of tasks, wherein the task labels identify keywords in the medical text data associated with the task targets for the plurality of tasks; and respectively performing supervision training on the plurality of tasks based on the task labels of the plurality of tasks so as to obtain the task results and task gradients of the plurality of tasks.
According to some embodiments of the present invention, in order to perform supervisory training on the plurality of tasks based on the task labels of the plurality of tasks, respectively, to obtain task results and task gradients of the plurality of tasks, respectively, the training unit 420 may be further configured to determine loss functions of the plurality of tasks, respectively, based on the task labels of the plurality of tasks, respectively; and determining respective task gradients of the plurality of tasks based on the respective loss functions of the plurality of tasks.
According to some embodiments of the invention, the respective loss functions for the plurality of tasks may be determined based on the following formula:
Wherein,a one-hot encoded vector, which is a task tag for each of a plurality of tasks,>is a predicted probability distribution for each of a plurality of tasks,/->Is the number of task labels for each of the plurality of tasks.
According to some embodiments of the invention, the task gradient for each of the plurality of tasks may be determined based on the following formula:
wherein,δis the gradient that is passed back from the latter layer,is a weight matrix for each of a plurality of tasks, < >>And->Is a low rank matrix for updating the weight matrix of each of a plurality of tasks.
According to some embodiments of the invention, the weight matrix for the plurality of tasks may be determined based on the following formula:
weight matrix of multiple dimension judging taskWherein->Judging the number of tasks of the task for a plurality of dimensions, < >>For initial weight, ++>A low rank matrix for each of the plurality of dimension determination tasks;
weight matrix for shared tasksWherein->Low rank matrix sum for one or more of the plurality of dimension determination tasks, +.>,/>A low rank matrix that is a shared task;
weight matrix for efficacy evaluation taskWherein->A low rank matrix for efficacy evaluation tasks.
According to some embodiments of the invention, the parameter updating unit 430 may be further configured to update the low rank matrix of the plurality of tasks based on respective task gradients of the plurality of tasks.
According to some embodiments of the invention, the shared tasks may include an overall shared task targeting all of the tumor efficacy assessment and the plurality of medical judgment dimensions and a partial shared task targeting portions of the tumor efficacy assessment and the plurality of medical judgment dimensions.
According to some embodiments of the invention, the plurality of medical judgment dimensions may include two or more of: measurement for and judgment of cancer type; a judgment of a kind of treatment performed with respect to the determined kind of cancer; a judgment of the kind of examination performed for the determined kind of cancer; judgment of tumor efficacy evaluation based on the kind of cancer, the kind of treatment and/or the kind of examination.
According to some embodiments of the present invention, to obtain the task results and task gradients for each of the plurality of tasks, the training unit 420 may be further configured to extract one or more keywords associated with medical knowledge from the medical text data based on the medical knowledge; one or more keywords associated with medical awareness are entered into a plurality of tasks to obtain task results and task gradients for the plurality of tasks.
For some specific details regarding the large language model training apparatus shown in fig. 4, reference may also be made to the content of the large language model training method shown in fig. 1 to 3.
Fig. 5 illustrates a block diagram of an electronic device according to some embodiments of the invention.
Referring to fig. 5, an electronic device 500 may include a processor 501 and a memory 502. The processor 501 and the memory 502 may be connected by a bus 503. The electronic device 500 may be any type of portable device (e.g., smart camera, smart phone, tablet, etc.) or any type of stationary device (e.g., desktop computer, server, etc.).
The processor 501 may perform various actions and processes in accordance with programs stored in the memory 502. In particular, the processor 501 may be an integrated circuit chip with signal processing capabilities. The processor may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and may be of the X86 architecture or ARM architecture.
The memory 502 stores computer executable instructions that, when executed by the processor 501, implement the large language model training method described above. The memory 502 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (ddr SDRAM), enhanced Synchronous Dynamic Random Access Memory (ESDRAM), synchronous Link Dynamic Random Access Memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
Further, the large language model training method according to the present invention may be recorded in a computer-readable recording medium. In particular, according to the present invention, there may be provided a computer-readable recording medium storing computer-executable instructions which, when executed by a processor, cause the processor to perform the large language model training method as described above.
It is noted that the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises at least one executable instruction for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In general, the various example embodiments of the invention may be implemented in hardware or special purpose circuits, software, firmware, logic or any combination thereof. Some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device. While aspects of the embodiments of the invention are illustrated or described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that the blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The foregoing is illustrative of the present invention and is not to be construed as limiting thereof. Although a few exemplary embodiments of this invention have been described, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this invention. Accordingly, all such modifications are intended to be included within the scope of this invention as defined in the following claims. It is to be understood that the foregoing is illustrative of the present invention and is not to be construed as limited to the specific embodiments disclosed, and that modifications to the disclosed embodiments, as well as other embodiments, are intended to be included within the scope of the appended claims. The invention is defined by the claims and their equivalents.

Claims (22)

1. A large language model training method for tumor efficacy evaluation, comprising:
generating a plurality of tasks based on a tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, wherein the plurality of tasks include an efficacy evaluation task targeting the tumor efficacy evaluation, a plurality of dimension judgment tasks targeting the plurality of medical judgment dimensions, respectively, and a shared task targeting two or more of the tumor efficacy evaluation and the plurality of medical judgment dimensions together;
Respectively inputting the medical text data into the plurality of dimension judgment tasks to obtain a plurality of dimension judgment task gradients and a plurality of dimension judgment task results corresponding to the plurality of dimension judgment tasks;
inputting the medical text data into the sharing task to obtain a sharing task gradient and a sharing task result of the sharing task;
in response to obtaining the multiple dimension determination task results and the sharing task results, inputting the medical text data, the multiple dimension determination task results and the sharing task results into the efficacy evaluation task to obtain an efficacy evaluation task gradient of the efficacy evaluation task; and
parameters of the large language model are updated based on the task gradients of the respective plurality of tasks.
2. The large language model training method of claim 1, to obtain task results and task gradients for each of the plurality of tasks, the method further comprising:
extracting task labels of the tasks from the medical text data based on task targets of the tasks, wherein the task labels identify keywords associated with the task targets of the tasks in the medical text data;
And respectively performing supervision training on the tasks based on the task labels of the tasks so as to obtain task results and task gradients of the tasks.
3. The large language model training method of claim 2, wherein performing supervisory training on the plurality of tasks based on the task labels of the plurality of tasks, respectively, to obtain task results and task gradients of the plurality of tasks, respectively, further comprises:
determining respective loss functions of the plurality of tasks based on respective task labels of the plurality of tasks; and
and determining the task gradient of each of the plurality of tasks based on the loss function of each of the plurality of tasks.
4. A large language model training method according to claim 3, wherein the respective loss functions of the plurality of tasks are determined based on the following formula:
wherein (1)>Is a one-hot encoded vector of a task tag of each of the plurality of tasks,/for each of the plurality of tasks>Is a predicted probability distribution for each of said plurality of tasks,/>Is the number of task labels for each of the plurality of tasks.
5. The large language model training method of claim 4, wherein the task gradient of each of the plurality of tasks is determined based on the following formula:
Wherein,δis the gradient back from the latter layer, < >>Is the weight matrix of each of the plurality of tasks,>and->Is a low rank matrix for updating the weight matrix of each of the plurality of tasks.
6. The large language model training method of claim 5, wherein the weight matrix of the plurality of tasks is determined based on the following formula:
weight matrix of the multiple dimension judging taskWherein->Judging the number of tasks of the task for the plurality of dimensions, < > for>For initial weight, ++>A low rank matrix for each of the plurality of dimension determination tasks;
weight matrix of the shared taskWherein->Low rank matrix sums for one or more of the plurality of dimension determination tasks, +.>,/>A low rank matrix for the shared task;
weight matrix of the efficacy evaluation taskWhereinAnd a low-rank matrix for the efficacy evaluation task.
7. The large language model training method of claim 6, wherein updating parameters of the large language model based on the task gradients of the respective plurality of tasks further comprises:
updating a low rank matrix of the plurality of tasks based on respective task gradients of the plurality of tasks.
8. The large language model training method of claim 1, wherein the shared tasks include an overall shared task targeting all of the tumor efficacy assessment and the plurality of medical judgment dimensions and a partial shared task targeting portions of the tumor efficacy assessment and the plurality of medical judgment dimensions.
9. The large language model training method of claim 1, wherein the plurality of medical judgment dimensions comprises two or more of:
measurement for and judgment of cancer type;
a judgment of a kind of treatment performed with respect to the determined kind of cancer;
a judgment of the kind of examination performed for the determined kind of cancer;
judgment of tumor efficacy evaluation based on the kind of cancer, the kind of treatment and/or the kind of examination.
10. The large language model training method of claim 1, to obtain task results and task gradients for each of the plurality of tasks, the method further comprising:
extracting one or more keywords associated with the medical knowledge from the medical text data based on medical knowledge;
one or more keywords associated with the medical knowledge are entered into the plurality of tasks to obtain task results and task gradients for the plurality of tasks.
11. A large language model training device for tumor efficacy evaluation, comprising:
a task generating unit configured to generate a plurality of tasks based on a tumor efficacy evaluation and a plurality of medical judgment dimensions for the tumor efficacy evaluation, wherein the plurality of tasks include an efficacy evaluation task with the tumor efficacy evaluation as a task target, a plurality of dimension judgment tasks with the plurality of medical judgment dimensions as task targets, respectively, and a shared task with two or more of the tumor efficacy evaluation and the plurality of medical judgment dimensions collectively as task targets;
a training unit configured to input medical text data into the plurality of dimension-judging tasks respectively to obtain a plurality of dimension-judging task gradients corresponding to the plurality of dimension-judging tasks and a plurality of dimension-judging task results; inputting the medical text data into a sharing task to obtain a sharing task gradient and a sharing task result of the sharing task; and in response to obtaining the multiple dimension determination task results and the sharing task results, inputting the medical text data, the multiple dimension determination task results, and the sharing task results into the efficacy evaluation task to obtain an efficacy evaluation task gradient of the efficacy evaluation task; and
And a parameter updating unit configured to update parameters of the large language model based on the task gradients of the respective tasks.
12. The large language model training apparatus of claim 11, wherein to obtain the task results and task gradients of each of the plurality of tasks, the training unit is further configured to:
extracting task labels of the tasks from the medical text data based on task targets of the tasks, wherein the task labels identify keywords associated with the task targets of the tasks in the medical text data;
and respectively performing supervision training on the tasks based on the task labels of the tasks so as to obtain task results and task gradients of the tasks.
13. The large language model training apparatus of claim 12, wherein to perform supervisory training on the plurality of tasks based on the task labels of the respective plurality of tasks to obtain task results and task gradients of the respective plurality of tasks, respectively, the training unit is further configured to:
determining respective loss functions of the plurality of tasks based on respective task labels of the plurality of tasks; and
And determining the task gradient of each of the plurality of tasks based on the loss function of each of the plurality of tasks.
14. The large language model training apparatus of claim 13 wherein the respective loss functions of the plurality of tasks are determined based on the following formula:
wherein (1)>Is a one-hot encoded vector of a task tag of each of the plurality of tasks,/for each of the plurality of tasks>Is a predicted probability distribution for each of said plurality of tasks,/>Is the number of task labels for each of the plurality of tasks.
15. The large language model training apparatus of claim 14 wherein the task gradient of each of the plurality of tasks is determined based on the following formula:
wherein,δis the gradient back from the latter layer, < >>Is the weight matrix of each of the plurality of tasks,>and->Is a low rank matrix for updating the weight matrix of each of the plurality of tasks.
16. The large language model training apparatus of claim 15 wherein the weight matrix of the plurality of tasks is determined based on the following formula:
weight matrix of the multiple dimension judging taskWherein->Judging the number of tasks of the task for the plurality of dimensions, < > for>For initial weight, ++>A low rank matrix for each of the plurality of dimension determination tasks;
Weight matrix of the shared taskWherein->Low rank matrix sums for one or more of the plurality of dimension determination tasks, +.>,/>A low rank matrix for the shared task;
weight matrix of the efficacy evaluation taskWhereinAnd a low-rank matrix for the efficacy evaluation task.
17. The large language model training apparatus of claim 16, wherein the parameter updating unit is further configured to:
updating a low rank matrix of the plurality of tasks based on respective task gradients of the plurality of tasks.
18. The large language model training apparatus of claim 11, wherein the shared tasks comprise an overall shared task targeting all of the tumor efficacy assessment and the plurality of medical judgment dimensions and a partial shared task targeting portions of the tumor efficacy assessment and the plurality of medical judgment dimensions.
19. The large language model training apparatus of claim 11, wherein the plurality of medical judgment dimensions comprises two or more of:
measurement for and judgment of cancer type;
a judgment of a kind of treatment performed with respect to the determined kind of cancer;
A judgment of the kind of examination performed for the determined kind of cancer;
judgment of tumor efficacy evaluation based on the kind of cancer, the kind of treatment and/or the kind of examination.
20. The large language model training apparatus of claim 11, wherein to obtain the task results and task gradients of each of the plurality of tasks, the training unit is further configured to:
extracting one or more keywords associated with the medical knowledge from the medical text data based on medical knowledge;
one or more keywords associated with the medical knowledge are entered into the plurality of tasks to obtain task results and task gradients for the plurality of tasks.
21. An electronic device, comprising:
a processor; and
a memory, wherein the memory has stored therein computer readable code which, when executed by the processor, implements the large language model training method of any one of claims 1-10.
22. A non-transitory computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the large language model training method of any one of claims 1-10.
CN202410199335.4A 2024-02-23 2024-02-23 Training method, device, equipment and medium for large language model Active CN117786536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410199335.4A CN117786536B (en) 2024-02-23 2024-02-23 Training method, device, equipment and medium for large language model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410199335.4A CN117786536B (en) 2024-02-23 2024-02-23 Training method, device, equipment and medium for large language model

Publications (2)

Publication Number Publication Date
CN117786536A true CN117786536A (en) 2024-03-29
CN117786536B CN117786536B (en) 2024-05-10

Family

ID=90401951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410199335.4A Active CN117786536B (en) 2024-02-23 2024-02-23 Training method, device, equipment and medium for large language model

Country Status (1)

Country Link
CN (1) CN117786536B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112164476A (en) * 2020-09-28 2021-01-01 华南理工大学 Medical consultation conversation generation method based on multitask and knowledge guidance
WO2021103287A1 (en) * 2019-11-28 2021-06-03 南京邮电大学 Brain disease progression prediction method and system based on weak supervision multi-task matrix completion
US20220245490A1 (en) * 2021-02-03 2022-08-04 Royal Bank Of Canada System and method for heterogeneous multi-task learning with expert diversity
CN114882996A (en) * 2022-03-17 2022-08-09 深圳大学 Hepatocellular carcinoma CK19 and MVI prediction method based on multitask learning
CN117577350A (en) * 2023-11-20 2024-02-20 北京壹永科技有限公司 Training and reasoning method, device, equipment and medium of medical large language model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021103287A1 (en) * 2019-11-28 2021-06-03 南京邮电大学 Brain disease progression prediction method and system based on weak supervision multi-task matrix completion
CN112164476A (en) * 2020-09-28 2021-01-01 华南理工大学 Medical consultation conversation generation method based on multitask and knowledge guidance
US20220245490A1 (en) * 2021-02-03 2022-08-04 Royal Bank Of Canada System and method for heterogeneous multi-task learning with expert diversity
CN114882996A (en) * 2022-03-17 2022-08-09 深圳大学 Hepatocellular carcinoma CK19 and MVI prediction method based on multitask learning
CN117577350A (en) * 2023-11-20 2024-02-20 北京壹永科技有限公司 Training and reasoning method, device, equipment and medium of medical large language model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
MANUELA BENARY 等: "Leveraging Large Language Models for Decision Support in Personalized Oncology", 《JAMA NETWORK OPEN》, 17 November 2023 (2023-11-17), pages 1 - 11 *
SNUSIFG: "多任务学习中的任务关联性建模方法研究", 《HTTPS://BLOG.CSDN.NET/SNUSIFG/ARTICLE/DETAILS/134638079》, 27 November 2023 (2023-11-27), pages 1 - 3 *
张恒 等: "医学知识增强的肿瘤分期多任务学习模型", 《智能系统学报》, 31 July 2021 (2021-07-31), pages 739 - 745 *

Also Published As

Publication number Publication date
CN117786536B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
Zhou et al. Identifying spatial imaging biomarkers of glioblastoma multiforme for survival group prediction
Popescu et al. New trends in melanoma detection using neural networks: a systematic review
AlSaeed et al. Brain MRI analysis for Alzheimer’s disease diagnosis using CNN-based feature extraction and machine learning
Juneja et al. An approach for thoracic syndrome classification with convolutional neural networks
Ningrum et al. Deep learning classifier with patient’s metadata of dermoscopic images in malignant melanoma detection
Alahmadi Texture attention network for diabetic retinopathy classification
Prezja et al. DeepFake knee osteoarthritis X-rays from generative adversarial neural networks deceive medical experts and offer augmentation potential to automatic classification
Gaonkar et al. Ethical issues arising due to bias in training AI algorithms in healthcare and data sharing as a potential solution
CN117577350B (en) Training and reasoning method, device, equipment and medium of medical large language model
Ost et al. Spinal cord morphology in degenerative cervical myelopathy patients; assessing key morphological characteristics using machine vision tools
Ng et al. Application of artificial intelligence for nasopharyngeal carcinoma management–a systematic review
Rafay et al. EfficientSkinDis: An EfficientNet-based classification model for a large manually curated dataset of 31 skin diseases
Verma et al. Breast cancer survival rate prediction in mammograms using machine learning
Nunez et al. Predicting the survival of patients with cancer from their initial oncology consultation document using natural language processing
Gonçalves et al. Radiomics in head and neck cancer outcome predictions
Khan et al. Detecting breast arterial calcifications in mammograms with transfer learning
CN111145852B (en) Medical information processing method and device and computer readable storage medium
CN117786536B (en) Training method, device, equipment and medium for large language model
Patro et al. An effective correlation-based data modeling framework for automatic diabetes prediction using machine and deep learning techniques
Hussain et al. Explainable Deep Learning Approach for Multi-Class Brain Magnetic Resonance Imaging Tumor Classification and Localization Using Gradient-Weighted Class Activation Mapping
Wahyuningrum et al. Improvement of chest X-ray image segmentation accuracy based on FCA-Net
Ilyasova et al. An approach to semantic segmentation of retinal images using deep neural networks for mapping laser exposure zones for the treatment of diabetic macular edema
Khalil et al. Deep learning-based classification of abrasion and ischemic diabetic foot sores using camera-captured images
Kumar et al. RETRACTED ARTICLE: A Robust Decision Support System for Wireless Healthcare Based on Hybrid Prediction Algorithm
Zeng et al. A probabilistic model to support radiologists’ classification decisions in mammography practice

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant