Lifemics knowledge graph construction method and system based on large language model
By combining large language models and structured prompt templates, the problems of automation and accuracy in the construction of knowledge graphs in life omics are solved, enabling efficient and flexible knowledge graph construction to support biomedical research and drug discovery.
Patent Information
- Application Number
- CN202511949015.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-12-23
AI Technical Summary
Existing technologies for constructing life omics knowledge graphs suffer from low automation, insufficient ability to process unstructured text, difficulty in knowledge integration, poor scalability, and difficulty in efficiently and accurately transforming massive amounts of life omics data into computable and usable knowledge.
Information extraction is performed using a large language model, entity standardization and relation normalization are performed by combining external standard knowledge bases, structured prompt templates and parameter fine-tuning are designed, an end-to-end knowledge graph construction process is built, and model performance is continuously improved through human-machine collaborative optimization mechanism.
It enables efficient and automated transformation from unstructured text to knowledge graphs, improving knowledge coverage and accuracy, enhancing flexibility and scalability, supporting continuous optimization, and improving the efficiency of biomedical research and drug discovery.
Smart Images

Figure CN121364853A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer data processing, in particular to the intersection field of artificial intelligence and bioinformatics, and relates to a method and system for constructing an omics knowledge graph, in particular to an omics knowledge graph construction method and system based on a large language model. BACKGROUND
[0002] Currently, with the development of high-throughput sequencing and other technologies, data in the field of omics is growing at an unprecedented rate, covering multiple levels such as genomes, transcriptomes, proteomes, and metabolomes. These massive, multi-source, and heterogeneous data contain key knowledge that reveals the mysteries of life, understands disease mechanisms, and develops new therapies. However, this knowledge often exists in unstructured (such as scientific literature, clinical notes) or semi-structured forms, making information extraction and integration extremely difficult.
[0003] As a powerful knowledge representation technology, a knowledge graph (KG) can organize scattered biological entities (such as genes, proteins, diseases, and drugs) and their complex interrelationships (such as regulation, interaction, and treatment) into a structured knowledge network, providing strong support for complex queries, reasoning, and data-driven scientific discovery.
[0004] Currently, the methods for constructing an omics knowledge graph have the following limitations: Traditional natural language processing (NLP) pipeline method: This method usually adopts a multi-stage process of "entity recognition-relation extraction-entity linking". Each stage relies on independent models (such as BiLSTM-CRF, SVM, etc.), which has the problem of error accumulation, i.e., errors in the previous stage are passed on and affect the performance of the subsequent stage. In addition, this method relies heavily on large-scale, high-quality manually annotated data, which is costly, and has limited ability to understand complex sentence patterns, long-distance dependencies, and implicit semantics.
[0005] Method based on early pre-training language models (such as BERT, BioBERT): Although this method improves semantic representation by pre-training on biomedical corpora, the model size is relatively small, and the zero-shot and few-shot learning capabilities are limited. For specific knowledge extraction tasks, a large amount of labeled data is usually needed for fine-tuning, and it is difficult to understand complex natural language instructions, and external tools are still needed for knowledge fusion.
[0006] Rule-based and ontology-based method: This method relies on domain experts to define a large number of extraction rules or use existing ontologies for matching. The formulation and maintenance of rules are time-consuming and labor-intensive, and it is difficult to cover various forms of language expressions, resulting in low recall rate and poor ability to discover new knowledge.
[0007] In summary, the prior art generally faces challenges such as low automation, insufficient ability to process unstructured text, difficulty in knowledge fusion, poor scalability, and difficulty in efficiently and accurately converting massive amounts of life science data into computable and usable knowledge when constructing a life science knowledge graph. Therefore, there is an urgent need for a more advanced and automated technical solution to solve the above problems. SUMMARY
[0008] The main purpose of the present application is to overcome the above-mentioned defects of the prior art, and to provide a life science knowledge graph construction method and system based on a large language model, which has high automation, good accuracy and strong flexibility.
[0009] The first aspect of the present application discloses a life science knowledge graph construction method based on a large language model; the method comprises: comprising the following steps: S1: obtaining and preprocessing multi-element life science data, the multi-element life science data at least including unstructured biomedical text data; S2: performing information extraction on the preprocessed biomedical text data based on a large language model to obtain entity mentions and relationship descriptions; S3: based on the large language model and in combination with an external standard knowledge base, performing entity standardization on the entity mentions and relationship normalization on the relationship descriptions to obtain standardized knowledge triples; S4: storing the standardized knowledge triples in a graph data storage system to construct a life science knowledge graph.
[0010] Preferably, in the above technical solution, the information extraction based on the large language model in step S2 includes designing and applying a structured prompt template, the template at least including a role definition module, a task and knowledge domain constraint module, and a structured output format constraint module, to guide the large language model to perform entity recognition and relationship extraction in a zero-shot or few-shot learning manner.
[0011] Preferably, in the above technical solution, the structured prompt template further includes a structured thinking chain instruction module, which instructs the large language model to perform information extraction according to a pre-set logical step.
[0012] Preferably, in the above technical solution, the information extraction based on the large language model in step S2 further includes using an instruction data set containing biomedical entity and relationship annotations to perform parameter efficient fine tuning (PEFT) on the basic large language model to obtain a domain-enhanced knowledge extraction model.
[0013] Preferably, in the above technical solution, the method of entity standardization of the entity mention in step S3 comprises: retrieving a list of candidate standard entities from a standard knowledge base according to the text string of the entity mention; providing the entity mention, its context text, and the candidate list as inputs to a large language model; and guiding the model to analyze the context and select the most matching standard entity.
[0014] Preferably, in the above technical solution, the input provided to the large language model further includes the relationship description related to the entity mention extracted in step S2 to assist the model to more accurately determine the entity type and make the selection.
[0015] Preferably, in the above technical solution, it further comprises guiding the large language model to analyze the wording describing the relationship in the text, assigning a confidence label and evidence text to each relationship, and storing them as attributes of the edge in the knowledge graph.
[0016] Preferably, in the above technical solution, the method further comprises step S5: verifying and iteratively optimizing the constructed knowledge graph, which comprises utilizing the large language model for automated preliminary review, combining with the feedback of domain experts, automatically generating positive and negative samples for fine-tuning the model again, and forming a closed-loop optimization process.
[0017] The second aspect of the present application discloses a system for constructing a life science knowledge graph based on a large language model; the system comprises: a data acquisition and preprocessing module for acquiring and preprocessing multi-element life science data, the multi-element life science data at least including unstructured biomedical text data; an information extraction module configured with a large language model for extracting information from the preprocessed biomedical text data to obtain entity mentions and relationship descriptions; a knowledge fusion module for calling the large language model and combining with an external standard knowledge base to standardize the entity mentions and normalize the relationship descriptions to obtain standardized knowledge triples; a graph construction and storage module for storing the standardized knowledge triples in a graph data storage system to construct a life science knowledge graph.
[0018] The system further comprises: a verification and iterative optimization module for verifying the constructed life science knowledge graph and automatically generating fine-tuning data according to the verification results and expert feedback to optimize the large language model in the information extraction module.
[0019] Compared with the prior art, the present application has the following significant advantages: Significant improvement in automation and efficiency: By leveraging the powerful zero-shot / few-shot capabilities of large language models, the reliance on manual rule definition and data annotation is greatly reduced, enabling an end-to-end or near-end-to-end automated construction process from text to knowledge graph, significantly improving construction efficiency.
[0020] Wider knowledge coverage and higher recall rate: Large language models are good at handling complex and unstructured natural language texts, capable of understanding long-distance dependencies, deep contextual semantics, and implicit relationships, thus enabling the extraction of knowledge from massive literature that traditional methods cannot discover, and the construction of a more comprehensive knowledge graph.
[0021] Higher extraction accuracy: With strong contextual understanding capabilities, this method can effectively solve the ambiguity problem in biomedical entities (such as homonyms, gene and protein differentiation), accurately identify the directionality of relationships, and thus improve the accuracy of extracted knowledge.
[0022] More effective knowledge fusion: This invention innovatively uses large language models to assist entity standardization, analyzes the context and even the extracted relationship information to assist disambiguation, accurately links entity mentions from different sources to standard IDs, and significantly improves the quality of knowledge fusion.
[0023] Strong flexibility and scalability: By adjusting the prompt or performing a small amount of instruction fine-tuning, it can quickly adapt to new entity types, relationship types, or application scenarios without rewriting complex rules or retraining the entire traditional model.
[0024] Supports continuous optimization and quality improvement: The validation and iterative optimization closed-loop mechanism proposed in this invention can efficiently convert expert knowledge into model "experience", and through the automatic generation of fine-tuning data, the quality of the knowledge graph can be continuously improved in a continuous feedback loop. BRIEF DESCRIPTION OF DRAWINGS
[0025] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0026] Figure 1 A flowchart of a life science knowledge graph construction method based on a large language model according to an embodiment of the present invention; Figures 2a-2b A schematic diagram of a structured prompt template for information extraction according to an embodiment of the present invention; Figure 3A structural diagram of a life omics knowledge graph construction system based on a large language model according to an embodiment of the present application; Figure 4 A structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0028] The present application aims to solve the challenges in the current life omics knowledge graph construction process, especially the problems such as low efficiency in processing massive, heterogeneous (especially unstructured text) data, low automation, difficulty in accurately capturing the relationship between complex biological entities, and difficulty in knowledge fusion. The present application proposes a new method of using the powerful natural language understanding and generation capabilities of large language models (LLM) to automatically, efficiently and accurately extract and integrate knowledge from multi-element life omics data and construct a knowledge graph. The ultimate goal is to better integrate and utilize the explosively growing life omics data, accelerate the process of biomedical research, drug discovery and precision medicine.
[0029] Related term explanation: Life Omics: A collection of disciplines that study the overall, systematic molecular composition (such as genes, RNA, proteins, metabolites, etc.) of an organism and their interactions, including genomics, transcriptomics, proteomics, metabolomics, etc.
[0030] Knowledge Graph (KG): A database technology that represents knowledge in the form of a graph. It is composed of nodes (representing entities such as genes, diseases) and edges (representing relationships between entities such as "treatment", "association"), and can contain node attributes (such as gene sequences) and edge attributes (such as the source literature of the relationship).
[0031] Large Language Model (LLM): A natural language processing model trained based on deep learning (especially the Transformer architecture) with a vast number of parameters (usually in the tens of billions to hundreds of billions). They are pre-trained on a large amount of text data and exhibit strong text understanding, generation, summarization, question answering, translation, and even some degree of reasoning capabilities. Examples include the GPT series (OpenAI), LLaMA series (Meta), Gemini series (Google), Claude series (Anthropic), etc.
[0032] Named Entity Recognition (NER): The process of identifying entities of predefined categories (such as names of people, places, organizations; in the context of this invention, specifically biomedical entities such as gene names, protein names, disease names, drug names, etc.) from text.
[0033] Relation Extraction (RE): The process of identifying specific semantic relationships between recognized entities in text (such as protein A inhibits protein B, drug C treats disease D).
[0034] Entity Normalization / Linking: The process of mapping recognized entities in text (which may have aliases, abbreviations, different expressions) to unique, authoritative identifiers (IDs) in standard databases (such as NCBI Gene, UniProtKB, MeSH).
[0035] Prompt Engineering: The technology of designing and optimizing text prompts (Prompts) input to large language models to guide the model to produce desired outputs.
[0036] Fine-tuning: The process of further training a pre-trained large language model using data specific to a task or a particular domain, so that the model better adapts to the target task or domain.
[0037] Instruction Tuning: A fine-tuning method that trains LLMs using datasets containing "instructions" (describing tasks) and "instances" (input-output pairs), enabling the model to better understand and follow various natural language instructions to complete tasks.
[0038] Zero-shot Learning: The ability of LLMs to complete tasks without seeing any labeled samples for that specific task, relying solely on their pre-training knowledge and task descriptions (usually through Prompts).
[0039] Few-shot Learning: Providing a small number of task examples (usually 1 to several dozen) in the Prompt to help the LLM better understand the task requirements and complete the task.
[0040] Graph Database: A database system specifically designed to store and query graph-structured data, such as Neo4j, JanusGraph.
[0041] RDF (Resource Description Framework): A standard data model developed by W3C for representing information in knowledge graphs, usually stored in the form of triples "Subject-Predicate-Object". RDF stores are systems for storing and querying RDF data, such as Apache Jena, Virtuoso.
[0042] PubMed, PMC: Biomedical literature databases containing abstracts and full texts of a large number of scientific research papers.
[0043] GenBank, UniProt, KEGG, TCGA, DrugBank, MeSH, ChEBI, UMLS, NCBI Gene: Important public bioinformatics and medical databases, respectively storing gene sequences, proteins, metabolic pathways, cancer genomes, drugs, medical subject headings, chemical entities, unified medical language system, genes, etc.
[0044] The explosion of life science data and challenges: With the development of high-throughput sequencing technology and multi-omics analysis technology, we have accumulated a large amount of life science data (genome, transcriptome, proteome, metabolome, etc.). These data contain great potential to reveal the laws of life activities, understand disease mechanisms, and discover drug targets and biomarkers. However, these data have the characteristics of massiveness, multi-source, heterogeneity, high dimensionality, and complexity. Knowledge is often scattered in various carriers, including: Unstructured data: Scientific literature (such as PubMed abstracts and PMC full texts), clinical notes, free text parts of electronic health records (EHR). This is the main source of knowledge, but information extraction is the most difficult.
[0045] Semi-structured data: Web pages, partial database records, experimental reports.
[0046] Structured data: Tabular data in public databases (such as GenBank, UniProt, KEGG, DrugBank, etc.).
[0047] The value of knowledge graphs in life sciences: Knowledge graphs (KGs) have become a powerful tool for effectively integrating and utilizing scattered knowledge. They can: This connects entities from different sources (such as genes, proteins, diseases, and drugs) and their relationships (such as interactions, regulation, and treatment) to form a unified knowledge network.
[0048] It supports complex knowledge queries and reasoning, such as discovering potential drug-target-disease pathways.
[0049] Promoting data-driven scientific discovery: Rule-based: Relies on domain experts to define a large number of pattern rules, which is poorly adaptable to the diversity and flexibility of language expression, usually has low recall (coverage), and is difficult to maintain.
[0050] Traditional machine learning / NLP requires a large amount of labeled data to train specific entity recognition and relation extraction models. The models have limited generalization ability, poor adaptability to new entity / relation types, difficulty in handling long-distance dependencies and contextual information, and weak ability to extract implicit relations.
[0051] Information integration is difficult: accurately linking entities from different sources and with different naming methods to standard IDs (entity linking / standardization) is a huge challenge, and ambiguity is common.
[0052] Opportunities presented by Large Language Models (LLM): In recent years, LLMs have made groundbreaking progress in understanding and generating natural language. They possess the following characteristics: Powerful contextual understanding capabilities: It can better understand semantic information at the sentence, paragraph, and even document level.
[0053] The ability to handle linguistic ambiguity and diversity: better robustness to synonyms and the same meaning expressed in different sentence structures.
[0054] A certain level of reasoning ability: able to infer implicit information from the context.
[0055] Zero-shot / few-shot learning capability: It can perform specific tasks without requiring a large amount of labeled data, using carefully designed prompts.
[0056] Fine-tunability: Performance can be further improved by fine-tuning on domain data.
[0057] The first aspect of this invention discloses a method for constructing a life omics knowledge graph based on a large language model. (See also...)Figure 1 and Figures 2a-2b The embodiment of the present application provides a life systems knowledge graph construction method based on a large language model. The core idea is to use a large language model (LLM) as a core processing engine to construct an efficient and automated process for extracting and fusing knowledge from multiple heterogeneous life systems data sources and finally constructing a structured knowledge graph. The method specifically includes the following steps: Step one (S1): Multi-element life systems data acquisition and preprocessing The purpose of this step is to prepare clean and uniformly formatted data for subsequent knowledge extraction.
[0058] Data sources can include but are not limited to: Unstructured text data: This is the main source of knowledge, such as biomedical research papers from PubMed Central (PMC) or paper abstracts from PubMed. It can also include anonymized text in clinical trial records (such as ClinicalTrials.gov) and electronic health records (EHR).
[0059] Structured / semi-structured data: Mainly from public bioinformatics databases such as NCBI Gene (gene information), UniProtKB (protein information), KEGG (metabolic pathways), DrugBank (drug information), MeSH (medical subject headings for disease standardization), ChEBI (chemical entities), etc. These data can be used directly as knowledge sources, and can also provide authoritative references for entity standardization.
[0060] The preprocessing process includes: cleaning the text data (such as removing HTML tags, handling special characters), formatting, and splitting the text according to the input length limit of the selected LLM (such as by sentence, paragraph, or fixed Token number). For structured data, parse and extract the mapping relationship between entities and their identifiers (IDs).
[0061] Step two (S2): Entity recognition (NER) and relationship extraction (RE) based on a large language model (LLM) The large language model can be open source Qwen2 7B / 72B or Qwen1.5, or Qwen series models or Mistral 7B and similar open source models; The implementation of this step can be one of the following two or a combination of the two: I. Based on prompt engineering (Prompt Engineering) The method is suitable for zero-shot or few-shot scenarios and does not require training of the LLM. The key is to design an efficient and structured prompt template. The present application proposes a joint extraction prompt template comprising a plurality of modules: A. Role definition module: set the expert role for the LLM, such as "You are a senior researcher proficient in molecular biology...", to activate its relevant knowledge.
[0062] B. Task and knowledge domain constraint module: clearly define the entity types (such as Gene, Protein, Disease) and relationship types (such as inhibits, treats) that need to be extracted, and specify the target database (such as NCGIGene, MeSH) for entity standardization, to ensure the normalization of the output.
[0063] C. Dynamic few-shot example module: provide 1-5 high-quality "input-output" examples, especially for difficult points in the biomedical field (such as gene / protein ambiguity, uncertain expressions), to guide the LLM to learn how to handle them.
[0064] D. Structured Chain-of-Thought instruction module: force the LLM to follow a step-by-step logical reasoning process, such as "Step 1: Identify all entity mentions. Step 2: Analyze the context and link to standard IDs. Step 3: Extract relationships between standardized entities...", to improve the accuracy of complex tasks.
[0065] E. Strict output format constraint module: requires the LLM to output results in a unified, machine-readable format (such as JSON) and includes all necessary fields (such as entity text, standard ID, relationship, evidence text, confidence, etc.), facilitating automated parsing, Figures 2a-2b The present application illustrates the composition of such a structured prompt template, Figure 2a which includes the first four steps, Figure 2b and the fifth step is optional; after Figure 2a storing in the graph data storage system, the steps in Figure 2b can be performed to verify and iteratively optimize the knowledge graph.
[0066] In some embodiments, specifically, Role definition: a senior researcher proficient in molecular biology, pharmacology, and bioinformatics; Task: extract structured life science knowledge from the given biomedical text; Task goal: please analyze the input text and extract the following information: 1. Entity Recognition: Identify Genes, Proteins, Diseases, Chemicals / Drugs, and Mutations in the text.
[0067] 2. Entity Normalization: Provide standard database IDs (e.g., NCGeneID, UniProtID, MeSHID, DrugBankID) for entities whenever possible. If not possible, mark as null.
[0068] 3. Relation Extraction (RE): Identify semantic relationships between entities.
[0069] Limited to the following relationship types: [targets, inhibits, activates, binds_to, associated_with, treats, causes]; 4. Evidence and Confidence: Extract the original text snippet supporting the relationship and assess the confidence level (High / Medium / Low).
[0070] Chain-of-Thought Instructions: Follow these steps for reasoning: Step 1: Read the text and identify all relevant biological entities. Be mindful of the context difference between genes (DNA level) and proteins (functional level).
[0071] Step 2: Map the identified entities to standardized forms.
[0072] Step 3: Analyze the syntactic and semantic relationships between entities and determine the direction of the relationship (Subject->Object).
[0073] Step 4: Assess the confidence level based on the wording used in the text (e.g., "suggests" vs. "demonstrates").
[0074] Step 5: Format the results as a strict JSON object.
[0075] Output Format: The output must be a pure JSON string conforming to the following Schema, without Markdown tags or other explanatory text: {"entities":[{"id":"e1","text":"Entity text","type":"Type","standard_id":"Database ID or null"}],"relations":[{"subject_id":"e1","relation":"Relation type","object_id":"e2","evidence":"Excerpt of original evidence","confidence":"High / Medium / Low"}]} Input text (InputText) {{INPUT_TEXT}}.
[0076] II. Domain-Based Instruction Fine-tuning For scenarios requiring higher performance and stability, this invention employs Parametric Efficient Fine-Tuning (PEFT) techniques (such as LoRA or QLoRA) to fine-tune the basic LLM.
[0077] Fine-tuning data construction: The fine-tuning data uses JSONL files in instruction format. Each data entry contains an instruction (task description), input (text to be processed), and output (the expected structured golden answer). This data can come from existing labeled datasets or be automatically generated through the iterative optimization mechanism in step five of this invention.
[0078] Fine-tuning process: Select a suitable base model (such as LLaMA, Mistral series), train it with a small learning rate (such as 1e-4), fewer training cycles (such as 1-3 epochs) and specific LoRA parameters (such as rank r=16, alpha=32) to obtain an expert model focused on extracting knowledge from life omics.
[0079] Step 3 (S3): Entity Standardization and Relationship Normalization This step aims to resolve the issues of ambiguity and heterogeneity in knowledge and is crucial for knowledge fusion. This invention innovatively utilizes LLM (Limited Learning Model) to assist in this process.
[0080] 1. Relation-Aware Entity Normalization Traditional entity linking methods primarily rely on string matching and local context. This invention proposes a more advanced collaborative decision-making mechanism: Candidate generation: For an entity mention (e.g. "p53"), a list of candidate IDs (e.g. TP53 gene ID, p53 protein ID) is first obtained by searching standard databases (e.g. NCI Gene, UniProt).
[0081] LLM adjudication: The entity mention, the context sentence it is in, and all the relations descriptions (e.g. "mutation in p53", "phosphorylation of p53") extracted in step S2 are jointly provided to the LLM.
[0082] Reasoning process: The LLM is guided to analyze this information. For example, "mutation" is a strong signal at the gene level, while "phosphorylation" is a strong signal at the protein level. The LLM uses this domain knowledge, combined with the context, to accurately link "p53" in different contexts to the corresponding gene ID or protein ID with a high probability.
[0083] 2. Relation normalization The LLM is also used to map the extracted natural language relation expressions (e.g. "A inhibits B", "B is inhibited by A", "the inhibition of B by A") in various forms to predefined, unique predicates (e.g. inhibits(A, B)). This is a classification task based on the powerful semantic understanding ability of the LLM.
[0084] Step four (S4): Knowledge graph construction and storage This step converts the standardized knowledge triples into a graph structure and stores them persistently.
[0085] Graph construction: Standardized entities (identified by their unique IDs) are used as nodes (Node) in the graph, and normalized relations are used as edges (Edge) connecting corresponding nodes.
[0086] Attribute addition: Add attributes to the nodes, such as standard names, aliases, types, source database links, etc. Add rich attributes to the edges, which is another feature of the invention, including at least: Provenance: such as PMID of the original literature, sentence number.
[0087] Evidence: original text fragments supporting the relationship.
[0088] Confidence: The confidence level (e.g., Fact, Strongly_Suggested, Hypothesis) assessed by the LLM at extraction based on the original phrasing (e.g., "results demonstrate" vs "may suggest"), which allows the knowledge graph to express the uncertainty of scientific findings.
[0089] Storage: Store the constructed graph into a professional graph data storage system, such as property graph databases (Neo4j, JanusGraph) or RDF triple repositories (Apache Jena, Virtuoso), to facilitate subsequent efficient querying and analysis.
[0090] Step Five (S5): Knowledge Graph Verification and Iterative Optimization (Optional but Recommended) In order to continuously improve the quality of the knowledge graph, the invention designs a closed-loop, human-machine collaborative optimization process.
[0091] Automated Preliminary Review: Use LLM as a "junior reviewer" to check the logical consistency of new knowledge in the graph (such as a drug cannot simultaneously strongly activate and strongly inhibit the same target), whether it violates basic common sense in the field, and predict possible missing links by designing specific "review prompts".
[0092] Expert Feedback Capture: Submit the doubts or graph samples reviewed by LLM to domain experts for final confirmation or correction through an interactive interface. The system automatically captures every operation of the expert (such as correcting a relationship, deleting an incorrect triple, or adding a missing triple).
[0093] Automatic Fine-tuning Sample Generation: This is one of the key innovations of the invention. The system automatically converts the expert's feedback into high-quality fine-tuning data.
[0094] For correction operations: For example, the expert corrects the relationship activates to inhibits. The system will automatically generate a pair of "comparative" samples: a negative sample (clearly indicating that the original activates output is incorrect) and a positive sample (with the expert's corrected inhibits as the correct output).
[0095] For addition operations: The system will generate a supplementary positive sample, whose output includes the model's original output and the expert's newly added knowledge.
[0096] Model Iteration: The accumulated incremental fine-tuning data is used to periodically re-tune the knowledge extraction LLM, allowing it to learn from the expert's knowledge, avoid making similar mistakes in the future, and improve recall. EMBODIMENT
[0097] To better illustrate the present application, a specific embodiment is given below.
[0098] This embodiment aims to construct a "drug-target-disease" knowledge subgraph from PubMed abstracts.
[0099] Data acquisition and preprocessing: Download the latest literature abstracts related to a specific disease (e.g. "non-small cell lung cancer") from PubMed in bulk, and perform text cleaning.
[0100] Model selection and preparation: Select an open-source large language model fine-tuned by instructions, such as Mistral-7B-Instruct. And use an instruction data set containing about 2000 high-quality annotated drug-target-disease triples to fine-tune LoRA, get an expert model BioKG-Extractor-7B.
[0101] In this embodiment, the LoRA fine-tuning uses rank r=16, alpha=32, learning rate 2e-4, Batch Size=64, and trains for 2 Epochs.
[0102] Information extraction: input the preprocessed abstract text into the BioKG-Extractor-7B model. The model is instructed to output all (drug, target, disease) entities, their (targets, inhibits, treats, associated_with) relationships, confidence labels for each relationship, and evidence text in JSON format at once.
[0103] Knowledge fusion: For the entity "Osimertinib", the candidate ID DB09330 is obtained by searching DrugBank.
[0104] For the entity "EGFR", the context is "Osimertinib is an inhibitor of EGFR...L858R mutation in EGFR gene...", and the relationship (Osimertinib, inhibitor of, EGFR) is also extracted.
[0105] The system provides this information to the LLM together, and the LLM can accurately link the first "EGFR" to the protein ID of UniProt and the second to the gene ID of NCBI Gene according to clues such as "inhibitor" and "mutation".
[0106] Graph construction and storage: The normalized triples, such as (DrugBank:DB09330, targets, UniProt:P00533), along with their source PMID, evidence text, and confidence Fact, are loaded into the Neo4j graph database.
[0107] Verification and optimization: The LLM automatically reviews that for the same drug and target, one paper extracts the inhibits relationship and the other extracts the activates relationship, which is marked as "potential contradiction" and submitted to the expert.
[0108] After expert review, it is confirmed that there are indeed different effects under different cell line conditions, so the two edges are retained, but the "experimental condition" attribute is added to the edge. This operation is captured by the system and generates a new fine-tuning instruction to teach the model to pay attention to and extract the experimental conditions in the context when extracting relationships in the future.
[0109] The instruction data set used in this embodiment is 2000 literature abstract annotation data obtained from PubTator and manually reviewed and constructed according to the instruction format of the present application.
[0110] The innovation of the present application lies in combining large models and knowledge bases to construct knowledge graphs, without comparing the effects of individual tasks on entity recognition and relationship extraction.
[0111] In summary, the life science knowledge graph construction method and system based on a large language model proposed by the present application realizes efficient and automatic conversion from unstructured text to structured knowledge through an end-to-end design, and innovatively introduces a human-machine collaborative closed-loop optimization mechanism, which can construct a life science knowledge graph with wider coverage, higher precision, and continuously improving quality, providing a solid data foundation for subsequent biomedical research and application.
[0112] The second aspect of the present application discloses a life science knowledge graph construction system based on a large language model. Figure 3 The structure diagram of the life science knowledge graph construction system based on a large language model according to an embodiment of the present application is shown in FIG. Figure 3 As shown, the system 100 comprises: A data acquisition and preprocessing module 101 is configured to acquire and preprocess multi-element life science data, wherein the multi-element life science data at least comprises unstructured biomedical text data. An information extraction module 102 is configured with a large language model and is configured to perform information extraction on the preprocessed biomedical text data to obtain entity mentions and relationship descriptions. The knowledge fusion module 103 is configured to call the large language model and combine an external standard knowledge base to perform entity standardization on the entity mention and relationship normalization on the relationship description, so as to obtain a standardized knowledge triple. The graph construction and storage module 104 is configured to store the standardized knowledge triple in a graph data storage system and construct an omics knowledge graph.
[0113] The system further comprises: The verification and iterative optimization module is configured to verify the constructed omics knowledge graph and automatically generate fine-tuning data according to the verification result and expert feedback to optimize the large language model in the information extraction module.
[0114] The third aspect of the present application discloses an electronic device. The electronic device comprises a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the method for constructing an omics knowledge graph based on a large language model according to any one of the first aspect of the present application are implemented.
[0115] Figure 4 The structure of the electronic device according to the embodiment of the present application is shown in FIG. Figure 4 As shown in the figure, the electronic device comprises a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, operator network, near field communication (NFC) or other technologies. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0116] Those skilled in the art can understand that, Figure 4 The structure shown in the figure is only a structural diagram of part of the technical solution of the present application, and does not constitute a limitation on the electronic device to which the technical solution of the present application is applied. The specific electronic device can comprise more or fewer components than those shown in the figure, or some components can be combined, or have a different arrangement of components.
[0117] The fourth aspect of the present application discloses a computer readable storage medium. The computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps in the computer program are implemented.
[0118] Please note that the technical features of the above embodiments can be combined in any manner. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not contradict, they should be considered as the scope of the description. The above embodiments only express several embodiments of the present application, which are described in detail and in detail, but should not be construed as limiting the scope of the application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for constructing a life science knowledge graph based on a large language model, characterized in that, The method comprises the following steps: S1: obtaining and preprocessing multi-omics life science data, the multi-omics life science data at least comprising unstructured biomedical text data; S2: performing information extraction on the preprocessed biomedical text data based on a large language model to obtain entity mentions and relationship descriptions; S3: performing entity standardization on the entity mentions and relationship normalization on the relationship descriptions based on the large language model and in combination with an external standard knowledge base to obtain standardized knowledge triples; S4: storing the standardized knowledge triples in a graph data storage system to construct an omics knowledge graph.
2. The method of claim 1, wherein, In the step S2, the information extraction based on the large language model comprises: designing and applying a structured prompt template, the template at least comprising a role definition module, a task and knowledge domain constraint module, and a structured output format constraint module, to guide the large language model to perform entity recognition and relationship extraction in a zero-shot or few-shot learning manner.
3. The method of claim 2, wherein, The structured prompt template further comprises a structured thinking chain instruction module for instructing the large language model to perform information extraction according to a preset logical step, the logical step comprising: first recognizing entities, then performing entity standardization, then extracting relationships between standardized entities, and then evaluating the credibility of the relationships.
4. The method of claim 1, wherein, In the step S2, the information extraction based on the large language model comprises: using an instruction dataset comprising biomedical entity and relationship annotations to perform parameter-efficient fine-tuning on a basic large language model to obtain a domain-enhanced knowledge extraction model, and using the model to perform entity recognition and relationship extraction.
5. The method of claim 1, wherein, In the step S3, the method for performing entity standardization on the entity mentions comprises: retrieving a candidate standard entity list from one or more standard knowledge bases according to the text string of the entity mention; providing the entity mention, the context text in which the entity mention is located, and the candidate standard entity list as inputs to the large language model; guiding the large language model to analyze the context text and select a standard entity from the candidate standard entity list that best matches the context semantics, and using the unique identifier of the standard entity as the result of entity standardization.
6. The method of claim 5, wherein, The inputs provided to the large language model further comprise the relationship descriptions extracted in the step S2 in relation to the entity mentions; the large language model is guided to prioritize using the relationship descriptions as core clues for judging the biological types of the entities to assist in the selection.
7. The method according to claim 1 or 2, characterized in that, In the steps S2 or S3, the method further comprises guiding the large language model to analyze the wording describing the relationships in the biomedical text data, and assigning a confidence label and corresponding evidence text segment to each extracted relationship; The confidence label and evidence text segment are stored in the graph data storage system as attributes of the corresponding edges of the knowledge triples in the step S4.
8. The method of claim 1, wherein, The method further comprises a step S5 of verifying and iteratively optimizing the constructed omics knowledge graph, comprising: performing an automatic preliminary review of the knowledge in the graph by the large language model to identify potential logical contradictions, common sense violations, or missing links; The review results or graph data are submitted to domain experts for confirmation or correction, and the feedback of the experts is captured; Based on the feedback of the experts, high-quality positive samples and / or negative samples are automatically generated to form an incremental fine-tuning data set; The large language model is fine-tuned again using the incremental fine-tuning data set to improve the accuracy and recall rate in subsequent knowledge graph construction. 9.A system for constructing a life science knowledge graph based on a large language model, characterized in that, Comprise: A data acquisition and preprocessing module for acquiring and preprocessing multi-element life science data, the multi-element life science data at least including unstructured biomedical text data; An information extraction module configured with a large language model for information extraction on the preprocessed biomedical text data to obtain entity mentions and relationship descriptions; A knowledge fusion module for calling the large language model and combining external standard knowledge bases to standardize the entity mentions and normalize the relationship descriptions to obtain standardized knowledge triples; A graph construction and storage module for storing the standardized knowledge triples into a graph data storage system to construct a life science knowledge graph.
10. The system of claim 9, wherein, Also comprising: A verification and iterative optimization module for verifying the constructed life science knowledge graph and automatically generating fine-tuning data according to the verification results and expert feedback to optimize the large language model in the information extraction module.
Citation Information
Patent Citations
Large model programming review system based on combination of knowledge graph and RAG
CN119106173A
Knowledge graph construction method based on fine-tuning large language model
CN119808917A
Traditional Chinese medicine knowledge question-answering system based on fine-tuning large model and dual retrieval enhancement
CN120596593A
Lightweight intelligent traditional Chinese medicine inquiry system and construction method thereof
CN121054227A
Method and system for predicting biological entities
WO2024236317A1
Cited By
Intelligent place name translation method and system based on Lora fine tuning and knowledge graph
CN122065853A
Automatic medical knowledge graph construction method and system
CN122240856A
