Large language model fine tuning method, pathogenic variation screening method, computer equipment and storage medium
Through the large language model fine-tuning method, multi-dimensional feature information and knowledge prompt words are constructed, the pre-trained model is fine-tuned, and a screening model that can judge pathogenicity in non-standardized input is generated, which solves the traditional method's reliance on standardized phenotypic information. solve the problem and achieve efficient screening of pathogenic variants.
Patent Information
- Application Number
- CN202410754294.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-03
AI Technical Summary
Traditional pathogenic variant screening methods rely on standardized patient phenotype information, resulting in heavy manual review workload and low efficiency, and it is difficult to accurately determine pathogenic variants from non-standardized clinical descriptions.
The large language model fine-tuning method is used to obtain and annotate pathogenic and non-pathogenic mutation sites, construct multi-dimensional feature information and knowledge prompt words, form a fine-tuning training set, and fine-tune the pre-trained large language model. Generate screening models capable of determining pathogenicity in unstandardized inputs.
It greatly reduces the reliance on standardized phenotypic information, improves the recall rate and accuracy of pathogenic variant screening, reduces the number of candidate pathogenic sites and the need for manual interpretation, and improves the interpretation efficiency of genetic testing results.
Smart Images

Figure CN118588173A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of pathogenic variation screening, and in particular to a large language model fine-tuning method, a pathogenic variation screening method, a computer device and a storage medium. Background Art
[0002] Genetic diseases refer to diseases caused by changes in genetic material (such as gene mutations or chromosomal abnormalities). They are divided into single-gene genetic diseases, multi-gene genetic diseases, chromosomal diseases, etc., and the impact on patients and families is often long-term and serious. Diagnostics based on next-generation sequencing (NGS), such as exome and genome sequencing, are currently widely used in the diagnosis of clinical genetic diseases. However, due to its ability to detect mutations in a large number of genes at the same time, it becomes extremely challenging to identify mutations that are truly pathogenic to the disease. Traditional methods for finding related pathogenic variants, such as Xrare and exmiser, mainly prioritize candidate variants based on patient phenotypes and genotype annotation information. This method often requires clear and standardized patient phenotypes as input, and the sorting results are not ideal. There are still a large number of sites that need to be manually interpreted. Summary of the invention
[0003] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the high input requirements for pathogenic variant screening in traditional technologies, which leads to a large workload of manual review.
[0004] In a first aspect, the present application provides a large language model fine-tuning method, comprising:
[0005] Obtain training variant sites and their corresponding phenotypic information; the types of training variant sites include pathogenic and non-pathogenic;
[0006] Annotate the training variant sites to obtain the corresponding feature information;
[0007] A knowledge prompt word is obtained according to the phenotypic information and characteristic information of the training variant site, an answer prompt word is obtained according to the type of the training variant site, and the knowledge prompt word, the question prompt word and the answer prompt word are combined into a training question-answer prompt word to obtain a fine-tuning training set; wherein the question prompt word includes a question about whether the variant site is pathogenic;
[0008] The pre-trained large language model is fine-tuned using the fine-tuning training set to obtain a screened large language model.
[0009] In one embodiment, before obtaining the knowledge prompt words according to the phenotypic information and characteristic information of the training variant site, the method further includes:
[0010] Matching optional variant sites in the local knowledge base that are consistent with the positions of training variant sites;
[0011] According to the phenotypic similarity between the training variant site and each optional variant site, a preset number of target variant sites are determined;
[0012] The knowledge prompt words are obtained based on the phenotypic information and characteristic information of the training variant sites, including:
[0013] Knowledge prompt words are obtained according to the phenotypic information and characteristic information of the training variant sites and the phenotypic information and characteristic information of each target variant site.
[0014] In one embodiment, according to the phenotypic similarity between the training variant site and each optional variant site, a preset number of target variant sites are determined, including:
[0015] Vectorize the phenotypic information of the training variant site to obtain a first vector;
[0016] Vectorize the phenotypic information of each optional variable site to obtain a corresponding second vector;
[0017] The similarities between the first vector and each second vector are calculated respectively, and a preset number of optional variation sites are selected as target variation sites in descending order.
[0018] In one embodiment, the characteristic information includes at least one of population frequency, gene-related information, related functional changes, conservative prediction, harmfulness prediction and disease pathogenicity.
[0019] In one embodiment, the question prompt word further includes at least one of the following:
[0020] Role-specific prompt words;
[0021] Thinking guiding prompt words; the thinking guiding prompt words include at least one of the multiple thinking elements that instruct the large language model to comprehensively consider to determine whether the pathogenicity is present. The multiple thinking elements include the first thinking element, the second thinking element and the third thinking element. The first thinking element is to determine the biological hazard based on conservative prediction, hazard prediction and disease pathogenicity. The second thinking element is to determine the genetic characteristics based on genetic information and population frequency. The third thinking element is to determine the disease relevance based on the disease information in the phenotypic information and gene-related information.
[0022] In one embodiment, fine-tuning the pre-trained large language model using the fine-tuning training set to obtain the screening large language model includes:
[0023] The fine-tuning training set is used to perform full fine-tuning, and the pre-trained large language model is fine-tuned to obtain the screened large language model.
[0024] In a second aspect, the present application provides a method for screening pathogenic variants, comprising:
[0025] Annotate each variant site to be screened in the variant set to be screened to obtain characteristic information of the variant site to be screened;
[0026] According to the phenotypic information and characteristic information of the variant site to be screened, knowledge prompt words are obtained, and the knowledge prompt words are combined with question prompt words to obtain reasoning question and answer prompt words; the question prompt words include questions about whether the variant site is pathogenic;
[0027] The reasoning question and answer prompt words corresponding to each variant site to be screened are input into the screening large language model to obtain the pathogenicity classification results of each variant site to be screened, and obtain a pathogenic variant set; wherein, the screening large language model is obtained by fine-tuning the large language model fine-tuning method based on any of the above embodiments.
[0028] In one embodiment, the characteristic information includes at least one of population frequency, gene-related information, related functional changes, conservative prediction, harmfulness prediction, and disease pathogenicity;
[0029] The question prompt words also include at least one of role-specifying prompt words and thinking-guiding prompt words; the thinking-guiding prompt words include at least one of a plurality of thinking elements that instruct the large language model to comprehensively consider to determine whether the pathogenicity is present, the plurality of thinking elements include a first thinking element, a second thinking element, and a third thinking element, the first thinking element is to determine the biological hazard based on conservative predictions, hazard predictions, and disease pathogenicity, the second thinking element is to determine the genetic characteristics based on genetic information and population frequency, and the third thinking element is to determine the disease relevance based on the disease information in the phenotypic information and gene-related information.
[0030] In a third aspect, the present application provides a computer device comprising one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the large language model fine-tuning method or pathogenic variation screening method in any of the above-mentioned embodiments is executed.
[0031] In a fourth aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the large language model fine-tuning method or pathogenic variation screening method in any of the above-mentioned embodiments.
[0032] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0033] The fine-tuning method in this embodiment starts with obtaining training variant sites and their phenotypic information. This process brings together large-scale databases and in-depth clinical studies to establish a comprehensive and balanced data set covering pathogenic and non-pathogenic variants. Subsequently, by performing multi-dimensional feature annotations on each variant site, the channels for establishing connections between features, indicators, etc. and pathogenicity are enriched. Next, using phenotypic information and feature information, knowledge prompts, question prompts, and answer prompts are constructed for each variant site to form a fine-tuning training set. These prompts not only contain facts, but also contain the relevant knowledge required to infer facts. Finally, the large language model is fine-tuned using the fine-tuning training set, so that the general large language model becomes a screening large language model for the vertical field of pathogenic variant screening. The screening large language model trained by this method changes the way to evaluate the pathogenicity of variants. Traditionally, this process relies heavily on standardized phenotypic information, requiring professionals to convert patients' symptoms into standardized terms, which is not only time-consuming but also error-prone. This new method provides rich molecular features and reasoning examples in the fine-tuning stage, so that the model can not only infer pathogenicity based on standardized inputs, but also directly infer pathogenicity from non-standardized clinical descriptions and various characteristics. It greatly reduces the dependence on standardized phenotypic information, greatly improves the recall rate, and can achieve very accurate screening of pathogenic variants. It greatly reduces the number of candidate pathogenic sites and reduces the number of manual interpretations required, thereby improving the efficiency of interpreting genetic test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0035] Figure 1 A schematic diagram of a flow chart of a large language model fine-tuning method provided in one embodiment of the present application;
[0036] Figure 2 A flowchart of a large language model fine-tuning method provided in another embodiment of the present application;
[0037] Figure 3 A schematic diagram of a method for screening pathogenic variants provided in one embodiment of the present application;
[0038] Figure 4 An internal structure diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] This application provides a large language model fine-tuning method, please refer to Figure 1 , including steps S102 to S108.
[0041] S102, obtaining training variant sites and corresponding phenotypic information. The types of training variant sites include pathogenic and non-pathogenic.
[0042] It can be understood that the variant site refers to the site in the genome that is different from the reference genome sequence. The sites here include both sites in gene regions and sites in non-gene regions. Variants can be single nucleotide polymorphisms (SNPs), insertions / deletions (InDels), structural variations (SVs), etc. Training variant sites refer to variant sites used to fine-tune the training of large language models. Variant sites can be divided into pathogenic and non-pathogenic categories based on their impact on health. Pathogenic variant sites refer to variants that can cause disease or increase the risk of disease. Non-pathogenic variant sites are variants that do not cause disease or significantly affect health, such as neutral variants or benign variants. Pathogenic variant screening is to find the sites of pathogenic variants from the results of genetic testing, so as to better carry out treatment. In order to train the classification ability of the model, both types of variant sites are required. The specific ratio can be adjusted according to the actual training results. Phenotypic information refers to the observable characteristics of an individual determined by the genotype. For pathogenic phenotypic information, it involves the name of the disease, symptoms (such as chronic pain), age of onset, severity, etc. For non-pathogenic variants, the phenotypic information may be displayed as "no obvious phenotype" or describe some harmless features, such as eye color. The phenotypic information in this embodiment can be in a variety of forms, such as non-standardized text form, standardized entry form, etc. Standardization here is to describe the individual's situation using terms in a specific set of terms. Commonly used ones include the Human Phenotype Ontology (HPO).
[0043] The training variant sites and their phenotypic information can be extracted from public databases, large-scale population genome databases, or gene databases within the unit. For example, they can be extracted from OMIM (Online Human Mendelian Inheritance Database), ClinVar (Clinical Variation Database), GPCards (Human Major Disease Genotype Phenotype Association Database and Analysis Platform), etc. These databases collect a large number of known pathogenic variants and related diseases, from which pathogenic training variant sites are randomly selected and the corresponding phenotypic information is obtained. You can also use the 1000 Genomes Project, gnomAD and other healthy population genome projects. These databases contain a large number of variant information of healthy individuals, from which non-pathogenic training variant sites are randomly selected and the corresponding phenotypic information is obtained. The variant sites selected in this step include a wide range of pathogenic and non-pathogenic variants, providing rich and balanced learning materials for the model, which helps to improve the accuracy and generalization ability of the model. Compared with the traditional method that requires the input of standardized phenotypic information (such as professional terms, standardized symptom descriptions), this increases the complexity of data preparation. This method accepts diverse phenotypic information during the training phase, allowing the model to learn to infer pathogenicity from non-standardized or even missing phenotypic descriptions.
[0044] S104, annotating the training variation sites to obtain corresponding feature information.
[0045] It can be understood that annotation of variant sites refers to a detailed description and classification of variant sites in the genome, so as to complete the understanding of the training variant sites from multiple aspects other than phenotypic information. Feature information contains feature annotations of more than two dimensions. It helps the large language model to establish the relationship between various indicators, features, etc. and pathogenicity.
[0046] In some embodiments, the feature information includes at least one of population frequency, gene-related information, relevant functional changes, conservation prediction, harmfulness prediction, and disease pathogenicity. Population frequency refers to the frequency of a particular variant in one or more populations. Gene-related information describes the relevant information of the gene where the variant site is located, such as the name of the gene, and the name of the disease that the gene may cause. Related functional changes describe how the variant affects the biological function of the gene product (usually protein), specifically including functional domain effects, protein structure changes, expression level changes, etc. Functional changes are directly related to molecular mechanisms and can be used to explain why a variant causes disease. Conservative prediction assesses the degree of conservation of the variant site during evolution. Mutations in highly conserved sites are likely to be harmful. Harmfulness prediction is to predict the degree of impact of the variant on protein function and the possibility of causing disease. Many related computational tools have emerged to evaluate the degree of harmfulness of variants. Disease pathogenicity refers to the known association between the variant and a specific disease, which can generally be obtained based on previous studies and clinical reports. If a newly discovered variant is the same or very similar (position, type) to a known pathogenic variant, then it is likely to be pathogenic. Furthermore, even if the variant itself is novel, if it is located in a gene that is known to be strongly associated with a specific disease, then it has a higher probability of being pathogenic.
[0047] Multidimensional feature information together provides a multidimensional framework for evaluating the pathogenicity of variants. This multi-angle information can help large language models provide sufficient information to infer the pathogenicity of variants in the absence of detailed phenotypic information or non-standardized phenotypic information. For example, a variant that is extremely rare (low population frequency), changes key functional domains (important gene changes and functional changes), is highly conserved (high conservation), and is predicted by computational tools to be highly harmful is likely to be pathogenic, even if we do not have a detailed symptom description of the patient.
[0048] S106, obtaining knowledge prompt words according to the phenotypic information and characteristic information of the training variant site, obtaining answer prompt words according to the type of the training variant site, and combining the knowledge prompt words, question prompt words and answer prompt words into training question and answer prompt words to obtain a fine-tuning training set. The question prompt words include questions about whether the variant site is pathogenic.
[0049] It can be understood that the knowledge prompt is a text fragment used to guide the large language model to understand knowledge in a specific field. It is generated based on the phenotype and feature information of the training variant site, with the aim of allowing the model to obtain as many specific performances of the variant site in various dimensions as possible, so that when the user inputs information related to different dimensions, the large language model can better establish a connection with pathogenicity judgment. The answer prompt is a text fragment indicating the expected output of the model, clearly telling the model whether each variant site is pathogenic or not. This allows the model to learn the correspondence between the knowledge prompt and pathogenicity and non-pathogenicity. The question prompt is a text used to ask a specific query to the model. Here, the question always revolves around the core question of whether the variant site is pathogenic. The complete text composed of the knowledge prompt, the question prompt and the answer prompt is the training question and answer prompt. Each training variant site has a one-to-one corresponding training question and answer prompt, and the training question and answer prompt corresponding to all training variant sites is combined into a fine-tuning training set.
[0050] Combining these three components into training question-answering prompts essentially teaches the model to "think like an expert." Through repeated exposure to this reasoning process, the model learns to find appropriate answers based on the question and the knowledge background. More deeply, this approach cleverly solves the problem of standardizing phenotypic information. Instead of trying to compress phenotypic and feature information into a fixed format, they are presented in natural language. Large language models are good at processing this flexible text input, and they can extract key information from a variety of expressions. The model learns to associate non-standard terms with their pathogenicity and understands the association between them, enabling the model to handle various forms of input descriptions.
[0051] S108, fine-tuning the pre-trained large language model using the fine-tuning training set to obtain a screened large language model.
[0052] It can be understood that the pre-trained large language model is a deep learning model trained based on massive text data. It can not only generate natural language text, but also deeply understand the meaning of the text and handle various natural language tasks. However, the general large language model does not have relevant knowledge in professional fields such as medical genomics. Therefore, it is necessary to fine-tune the pre-trained large language model. The fine-tuning training in this embodiment includes various types of knowledge used to determine whether the variant site is pathogenic, that is, phenotypic information and feature information. By continuously learning this knowledge, a connection can be established between the input information related to the phenotypic information and feature information and the judgment result of whether it is pathogenic. The general large language model is transformed into a screening large language model that can judge whether the variant site is pathogenic based on various related characteristics of the variant site.
[0053] In some embodiments, the pre-trained large language model can be an open source large language model deployed locally, such as Mistral, Llama3, Tongyi Qianwen and other models. Fine-tuning can be done by full fine-tuning. The Swift framework can be used for full fine-tuning. (Swift, Scalable lightWeight Infrastructure for Fine-Tuning) is a tool for scalable lightweight infrastructure for fine-tuning, which provides a complete adaptation library to support the latest training technologies, such as NEFTune, LoRA+, LLaMA-PRO, etc. In this embodiment, the full fine-tuning method is adopted, that is, the parameters of the entire large language model are adjusted. Specifically, after preparing the fine-tuning training set, set "sft_type" to "full" in the Swift framework; set multiple epochs for training, such as 5. Evaluate the performance of each round of training results separately, and select the best one as the final screening large language model.
[0054] The fine-tuning method in this embodiment starts with obtaining training variant sites and their phenotypic information. This process brings together large-scale databases and in-depth clinical studies to establish a comprehensive and balanced data set covering pathogenic and non-pathogenic variants. Subsequently, by performing multi-dimensional feature annotations on each variant site, the channels for establishing connections between features, indicators, etc. and pathogenicity are enriched. Next, using phenotypic information and feature information, knowledge prompts, question prompts, and answer prompts are constructed for each variant site to form a fine-tuning training set. These prompts not only contain facts, but also contain the relevant knowledge required to infer facts. Finally, the large language model is fine-tuned using the fine-tuning training set, so that the general large language model becomes a screening large language model for the vertical field of pathogenic variant screening. The screening large language model trained by this method changes the way to evaluate the pathogenicity of variants. Traditionally, this process relies heavily on standardized phenotypic information, requiring professionals to convert patients' symptoms into standardized terms, which is not only time-consuming but also error-prone. This new method provides rich molecular features and reasoning examples in the fine-tuning stage, enabling the model to directly infer pathogenicity from non-standardized clinical descriptions and various characteristics, greatly reducing the dependence on standardized phenotypic information, greatly improving the recall rate, and achieving very accurate screening of pathogenic variants. It greatly reduces the number of candidate pathogenic sites and reduces the number of manual interpretations required, thereby improving the efficiency of interpreting genetic testing results.
[0055] In one embodiment, see Figure 2 , the large language model fine-tuning method includes steps S202 to S212.
[0056] S202, obtaining training variant sites and corresponding phenotypic information. The types of training variant sites include pathogenic and non-pathogenic.
[0057] S204, annotating the training variation sites to obtain corresponding feature information.
[0058] The description of step S202 and step S204 may refer to the description of step S102 and step S104 above.
[0059] S206, matching the optional mutation sites that are consistent with the training mutation sites in the local knowledge base.
[0060] It can be understood that the local knowledge base refers to a collection of genomic data stored in the local system, which includes multiple variant sites and their corresponding phenotypic information, and also has multiple feature information of the same type as the training variant site. The local knowledge base is maintained by the administrator, which can be better updated in real time and can also better integrate the research results of the unit into the use of the large language model in a timely manner. The local knowledge base also has higher confidentiality. The knowledge in the local knowledge base will serve as a material library for retrieval enhancement of each training variant site. Therefore, first, for each training variant site, other variant sites that are consistent with its own position are found from the local knowledge base as optional variant sites. The position of the variant site here refers to the exact location where the variation occurs in the genome. In the human genome reference sequence, each position has a unique coordinate, usually expressed as "chromosome: position", such as "chr17:41256138". The variation at the same site may have different effects on different people, but there are always commonalities. The phenotypic information and feature information corresponding to the variant sites at the same position in these local knowledge bases may contain valuable information to improve the ability to judge whether the training variant site is pathogenic and the generalization ability. Therefore, they are listed as optional mutation sites for further screening, so that valuable knowledge for training mutation sites can be found in the local knowledge base.
[0061] S208, determining a preset number of target mutation sites based on the phenotypic similarity between the training mutation site and each optional mutation site.
[0062] It can be understood that the specific process of screening is to compare the phenotypic similarity between the training variant site and each optional variant site. High similarity means that the two variants have the same or similar effects and can be considered as the same type of situation. Therefore, it is necessary to calculate the similarity based on the phenotypic information of the training variant site and the phenotypic information of each optional variant site. Generally, the phenotypic information of the training variant site is vectorized to obtain a first vector. The phenotypic information of each optional variant site is vectorized to obtain a corresponding second vector. The similarity (generally cosine similarity) between the first vector and each second vector is calculated respectively, and a preset number of optional variant sites are selected as target variant sites in order from high to low. In some embodiments, the preset number is selected as 5. The target variant site selected in this way is the variant that is most similar to the phenotype of the training variant site. Their characteristic information and phenotypic information are very helpful in judging whether the training variant site is pathogenic or not, and can be added to the knowledge prompt words as enhanced knowledge.
[0063] S210, based on the phenotypic information and feature information of the training variant sites and the phenotypic information and feature information of each target variant site, obtain knowledge prompt words, obtain answer prompt words based on the type of the training variant site, and combine the knowledge prompt words, question prompt words and answer prompt words into training question and answer prompt words to obtain a fine-tuning training set. Among them, the question prompt words include questions about whether the variant site is pathogenic.
[0064] It can be understood that the difference between this step and step S106 is that new content needs to be added to the knowledge prompt words. Specifically, in addition to training the phenotypic information and feature information of the variant site itself, the phenotypic information and feature information of each target variant site also need to be added to the knowledge prompt words. In addition to training the relevant knowledge of the variant site itself, this embodiment also provides some similar cases as knowledge to the large language model, making it more generalizable and greatly improving the judgment accuracy.
[0065] S212, fine-tuning the pre-trained large language model using the fine-tuning training set to obtain a screened large language model.
[0066] The description of step S212 can refer to the description of step S108 .
[0067] In one embodiment, the question prompt word further includes at least one of the following:
[0068] (1) Role-specifying prompt words.
[0069] It can be understood that the role-specified prompt is a prompt that clearly instructs the large language model to play a specific role in the conversation. By setting its professional identity, such as asking it to play the role of a clinical analyst, etc., the large language model can choose appropriate expressions and standardized expressions to answer questions, and will also focus on calling on knowledge in specific professional fields to give answers that are more in line with the role settings.
[0070] (2) Thinking guidance prompt words. The thinking guidance prompt words include at least one of the multiple thinking elements that instruct the large language model to comprehensively consider to determine whether the organism is pathogenic. The multiple thinking elements include the first thinking element, the second thinking element, and the third thinking element. The first thinking element is to determine the hazard of the organism based on conservative prediction, hazard prediction, and disease pathogenicity. The second thinking element is to determine the genetic characteristics based on genetic information and population frequency. The third thinking element is to determine the disease relevance based on the disease information in the phenotypic information and gene-related information.
[0071] It can be understood that the thinking chain is a prompt word writing technology that helps the large language model enhance its logical reasoning ability. The main idea is to break down a difficult task into multiple small tasks, so that the large language model can solve each small task separately, and then combine the understanding of each small task to get a more accurate and complete answer. Therefore, this embodiment also uses this idea in design. The thinking chain can include at least one of the first thinking element, the second thinking element and the third thinking element.
[0072] The first thinking element requires that the feature information includes conservative prediction, harmfulness prediction and disease pathogenicity. These three characteristics are highly correlated with the harm to biological health when the corresponding variant site mutates, and can guide the large language model to analyze the biological harmfulness of the training variant site based on these three characteristics.
[0073] The second thinking factor requires that the characteristic information includes genetic information and population frequency. The second thinking factor is to judge the genetic characteristics based on genetic information and population frequency. Genetic characteristics are extremely helpful in judging the pathogenicity of gene mutations caused by genetic diseases. Specifically, genetic characteristics include inheritance mode, inheritance frequency characteristics, etc. For inheritance mode, it includes autosomal dominant inheritance (AD), autosomal recessive inheritance (AR), X-linked inheritance, etc. It is necessary to check the patient's family history and genetic information (such as whether parents and siblings are sick) to determine the inheritance mode of their disease. Then check whether the training variant site conforms to this mode. For the inheritance mode of autosomal dominant inheritance, it is necessary to consider further adding the requirement for the large language model to consider whether there is an imperceptible phenotype or incomplete penetrance in the second thinking factor. For the genetic frequency characteristics, it is to query the frequency of the variant in the general healthy population. If the frequency is very high, even if the variant looks harmful, it may be a benign polymorphism. This part requires the large language model to consider that even healthy people may carry certain harmful variants, but they do not necessarily cause disease.
[0074] The third thinking element is to determine the disease relevance based on the disease information in the phenotypic information and gene-related information, that is, to guide the big model to establish a relationship between the phenotype and the potential disease corresponding to the gene.
[0075] (3) Enhance information-guiding words.
[0076] This guide emphasizes that the large language model should take into account the characteristic information and phenotypic information corresponding to the target variant site to prevent it from ignoring relevant knowledge.
[0077] This application provides a method for screening pathogenic variants, please refer to Figure 3 , including steps S302 to S306.
[0078] S302, annotating each variation site to be screened in the variation set to be screened, and obtaining characteristic information of the variation site to be screened.
[0079] It can be understood that the set of variants to be screened refers to a set of variant sites that need to be judged for pathogenicity. Before asking questions to the large screening language model, in addition to informing it of the information of the variant site itself, it is also necessary to describe the individual situation in detail. During training, the large screening language model learned the relationship between the pathogenicity of each training variant site and its phenotypic information and feature information. When using the large screening language model for reasoning, it is necessary to provide this information as much as possible. The annotations here are the same as those in constructing the fine-tuning dataset, and relevant information needs to be provided according to the same dimensions. For example, one or more characteristic information of population frequency, gene-related information, related functional changes, conservation prediction, hazard prediction, and disease pathogenicity is added to the training variant site. When annotating each variant site to be screened, the same type of characteristic information also needs to be annotated.
[0080] S304, obtaining knowledge prompt words based on the phenotypic information and characteristic information of the variant site to be screened, combining the knowledge prompt words with question prompt words to obtain reasoning question and answer prompt words. The question prompt words include questions about whether the variant site is pathogenic.
[0081] It can be understood that the difference between this step and the assembly of training question and answer prompt words in the fine-tuning stage is that there is no need to add answer prompt words. In addition, there is no requirement for whether the phenotypic information here is standardized, and it can be flexibly input according to the actual situation. In the inference stage, it is also possible to find a preset number of target variant sites from the local knowledge base in the manner described above, and add the phenotypic information and feature information corresponding to the target variant sites to the knowledge prompt words.
[0082] S306, input the reasoning question and answer prompt words corresponding to each variant site to be screened into the screening large language model, obtain the pathogenicity classification results of each variant site to be screened, and obtain the pathogenic variant set. The screening large language model is fine-tuned based on the large language model fine-tuning method in any of the above embodiments.
[0083] It can be understood that after constructing the reasoning question and answer prompt words corresponding to each variant site to be screened, they can be input into the screening large language model, and the screening large language model can obtain the pathogenicity judgment result of each variant site to be screened. Finally, all variant sites judged to be pathogenic are integrated to obtain the set of pathogenic variants after screening. The biggest advantage of this screening large language model is that non-standardized phenotypic and feature information can now be directly input without manually converting it into a predefined standardized form. This greatly reduces the threshold for use, allowing this system to be more widely used, even for clinicians who are not familiar with bioinformatics. Because the model has learned the ability to reason from diverse information, it can handle various unexpected situations and has strong generalization ability. For example: encountering new genes that have not been seen in training, but the model may infer it through the rules learned from known genes. If the phenotypic information is incomplete (such as only "early onset"), the model may still make judgments in combination with other features. If there are contradictions in the feature information (such as high conservation but high frequency), the model can weigh the pros and cons.
[0084] In one embodiment, the question prompt also includes at least one of a role-specifying prompt, a thinking-guiding prompt, and an enhanced information guiding word. The role-specifying prompt is used to specify the role played by the large language model. The thinking-guiding prompt includes at least one of the multiple thinking elements that indicate the large language model to comprehensively consider to determine whether it is pathogenic. The multiple thinking elements include a first thinking element, a second thinking element, and a third thinking element. The first thinking element is to judge the biological hazard based on conservative prediction, hazard prediction, and disease pathogenicity. The second thinking element is to judge the genetic characteristics based on genetic information and population frequency. The third thinking element is to judge the disease relevance based on the disease information in the phenotypic information and gene-related information. The enhanced information guiding word is used to guide the knowledge enhancement information of the large language model about the knowledge prompt word part.
[0085] It can be understood that in order to better assist the large language model in reasoning, at least one of the role-specified prompt words, thinking-guiding prompt words, and enhanced information-guiding words can also be used to assist in the reasoning stage. Role-specified prompt words can guide the large language model to play an appropriate role and output a more professional expression that is more consistent with the identity. Thinking-guiding prompt words are used to guide the large language model to choose at least one of biological hazards, genetic characteristics, and standardized expressions as the intermediate thinking link between the question and the final answer, which helps to improve the accuracy of reasoning. Enhanced information guiding words require the large language model not to ignore the relevant knowledge in the local knowledge base to enhance the generalization ability of the large language model.
[0086] The present application provides a computer device, including one or more processors and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the large language model fine-tuning method or pathogenic variation screening method in any of the above-mentioned embodiments is executed.
[0087] Indicatively, Figure 4 As shown, Figure 4 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. Figure 4 The computer device 400 includes a processing component 402, which further includes one or more processors, and a memory resource represented by a memory 401 for storing instructions executable by the processing component 402, such as an application. The application stored in the memory 401 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 402 is configured to execute instructions to perform the large language model fine-tuning method or the pathogenic variation screening method of any of the above embodiments.
[0088] The computer device 400 may further include a power supply component 403 configured to perform power management of the computer device 400 , a wired or wireless model interface 404 configured to connect the computer device 400 to the model, and an input / output (I / O) interface 405 .
[0089] The present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the large language model fine-tuning method or pathogenic variation screening method in any of the above-mentioned embodiments.
[0090] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0091] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0092] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A large language model fine-tuning method, characterized in that: include: Obtaining training variant sites and corresponding phenotypic information; the types of the training variant sites include pathogenic and non-pathogenic; Annotating the training variation sites to obtain corresponding feature information; Obtaining knowledge prompt words according to the phenotypic information and the characteristic information of the training variant site, obtaining answer prompt words according to the type of the training variant site, and combining the knowledge prompt words, question prompt words and answer prompt words into training question and answer prompt words to obtain a fine-tuning training set; wherein the question prompt words include questions about whether the variant site is pathogenic; The pre-trained large language model is fine-tuned using the fine-tuning training set to obtain a screened large language model.
2. The large language model fine-tuning method according to claim 1, characterized in that: Before obtaining the knowledge prompt words according to the phenotype information and the feature information of the training variant site, the method further includes: Matching the optional variant site consistent with the position of the training variant site in the local knowledge base; Determining a preset number of target mutation sites based on the phenotypic similarity between the training mutation site and each of the optional mutation sites; The step of obtaining the knowledge prompt words according to the phenotypic information and the characteristic information of the training variant site includes: The knowledge prompt word is obtained according to the phenotypic information and the characteristic information of the training variation site and the phenotypic information and the characteristic information of each of the target variation sites.
3. The large language model fine-tuning method according to claim 2, characterized in that: The step of determining a preset number of target variation sites based on the phenotypic similarities between the training variation sites and each of the optional variation sites comprises: Vectorizing the phenotypic information of the training variant site to obtain a first vector; Vectorizing the phenotypic information of each of the optional variant sites to obtain a corresponding second vector; The similarities between the first vector and each of the second vectors are calculated respectively, and the preset number of the optional variation sites are selected as the target variation sites in descending order.
4. The large language model fine-tuning method according to claim 1, characterized in that: The characteristic information includes at least one of population frequency, gene-related information, related functional changes, conservative prediction, harmfulness prediction and disease pathogenicity.
5. The large language model fine-tuning method according to claim 4, characterized in that: The question prompt words also include at least one of the following: Role-specific prompt words; Thinking guiding prompt words; the thinking guiding prompt words include at least one of the multiple thinking elements that instruct the large language model to comprehensively consider to determine whether the pathogenicity is present, the multiple thinking elements include a first thinking element, a second thinking element, and a third thinking element, the first thinking element is to determine the biological hazard based on the conservative prediction, the hazard prediction, and the pathogenicity of the disease, the second thinking element is to determine the genetic characteristics based on the genetic information and the population frequency, and the third thinking element is to determine the disease correlation based on the phenotypic information and the disease information in the gene-related information.
6. The large language model fine-tuning method according to any one of claims 1 to 5, characterized in that: The method of fine-tuning the pre-trained large language model using the fine-tuning training set to obtain a screened large language model includes: The fine-tuning training set is used to perform full fine-tuning, and the pre-trained large language model is fine-tuned to obtain the screened large language model.
7. A method for screening for pathogenic variants, characterized in that: include: Annotate each variant site to be screened in the variant set to be screened to obtain characteristic information of the variant site to be screened; Obtaining knowledge prompt words according to the phenotypic information of the variant site to be screened and the characteristic information, and combining the knowledge prompt words with question prompt words to obtain reasoning question and answer prompt words; The question prompts include questions about whether the variant site is pathogenic; The inference question and answer prompt words corresponding to each of the variant sites to be screened are input into the screening large language model to obtain the pathogenicity classification results of each of the variant sites to be screened, and obtain a pathogenic variation set; wherein the screening large language model is obtained by fine-tuning the large language model fine-tuning method described in any one of claims 1-6.
8. The method for screening pathogenic variants according to claim 7, characterized in that: The characteristic information includes at least one of population frequency, gene-related information, related functional changes, conservative prediction, harmfulness prediction and disease pathogenicity; The question prompt words also include at least one of role-specifying prompt words and thinking-guiding prompt words; the thinking-guiding prompt words include at least one of a plurality of thinking elements that instruct the large language model to comprehensively consider to determine whether the pathogenicity is present, the plurality of thinking elements include a first thinking element, a second thinking element, and a third thinking element, the first thinking element is to determine the biological hazard based on the conservative prediction, the hazard prediction, and the pathogenicity of the disease, the second thinking element is to determine the genetic characteristics based on the genetic information and the population frequency, and the third thinking element is to determine the disease relevance based on the phenotypic information and the disease information in the gene-related information.
9. A computer device, characterized in that: The method comprises one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the large language model fine-tuning method as described in claims 1-6 or the pathogenic variation screening method as described in claims 7 and 8 is executed.
10. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the large language model fine-tuning method as described in claims 1-6 or the pathogenic variation screening method as described in claims 7 and 8.
Citation Information
Cited By
Drug use decision-making method and system based on deep learning
CN119557663A
Genetic data interpretation method and device based on medical big language model and medium
CN121171366A
