A knowledge graph-based cancer cell line drug response prediction large language model construction method

By constructing a knowledge graph of cancer cell drug response and integrating it with a large language model, the problem of insufficient prediction performance and interpretability of existing drug response prediction methods under multi-omics heterogeneous data is solved, and efficient and accurate drug sensitivity prediction and interpretable drug response explanation are achieved.

CN122117002APending Publication Date: 2026-05-29EAST CHINA UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
EAST CHINA UNIV OF SCI & TECH
Filing Date
2026-04-23
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing drug response prediction methods suffer from insufficient predictive performance when dealing with heterogeneous multi-omics data and complex biological mechanisms, lack automatic knowledge reasoning capabilities at the semantic level, and have weak model interpretability.

Method used

By integrating knowledge graphs and large language models, multi-source data is acquired through web crawling technology to construct a knowledge graph of drug response in cancer cells. LoRA fine-tuning is then performed on a pre-trained large language model, and knowledge retrieval and reasoning are combined with RAG technology to achieve multi-level modeling and prediction of drug-cell response.

Benefits of technology

It significantly improves the accuracy and interpretability of drug response prediction, shortens the model training and validation cycle, improves drug screening efficiency, and provides biologically interpretable prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122117002A_ABST
    Figure CN122117002A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on knowledge graph's cancer cell line drug response prediction large language model construction method.The method fuses the structured information of biological knowledge graph and the semantic reasoning ability of large language model, realizes the multi-level modeling and explainable prediction of drug-cell reaction mechanism.The method comprises the following steps: first, integrate multi-source data to construct multi-modal dataset;Second, establish the drug response knowledge graph containing drug, gene and other entities;Then, fine-tune the model using LoRA technology and inject graph embedding, realize cross-modal alignment;Further, dynamic knowledge retrieval and enhancement are carried out using RAG technology;Finally, output drug sensitivity prediction and natural language explanation.The application significantly improves the prediction accuracy and explainability, and can reveal the key gene pathway, providing an efficient intelligent tool for precision cancer treatment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of bioinformatics and artificial intelligence, specifically involving a method and technology for constructing a large language model for drug prediction of cancer cell lines based on knowledge graphs. Background Technology

[0002] Drug response prediction is one of the core research directions in precision oncology. Its goal is to predict the sensitivity or resistance of cancer cells to specific drugs based on their molecular characteristics. Traditional prediction methods mainly rely on experimental models (such as cell line experiments or animal models) and statistical regression analysis. While these methods are effective in small-scale studies, they have limitations when dealing with heterogeneous multi-omics data and complex biological mechanisms, especially in scenarios with scarce data, high feature dimensionality, and complex semantic relationships, where predictive performance is difficult to guarantee.

[0003] In recent years, machine learning and deep learning models have gradually become important tools for drug response prediction, but these methods still have the following problems: (1) Most existing models rely on static features, such as gene expression or drug molecular fingerprints, and fail to effectively integrate cross-modal biological knowledge; (2) The models have weak interpretability and are difficult to reveal the potential molecular mechanisms of drug action; (3) The training data rely on manual annotation and lacks the ability to automatically reason about semantics.

[0004] The development of knowledge graph technology offers a new approach to solving the aforementioned problems. By representing entities such as genes, drugs, diseases, pathways, and cell lines, and their relationships, in a graph structure, biological contextual information can be effectively mined. However, traditional knowledge graph models mainly rely on structured reasoning algorithms, which are insufficient for mining potential biological knowledge in natural language literature. Large language models possess powerful semantic understanding and knowledge generalization capabilities, and can fine-tune the learning of complex relationships between biological text, pharmacological knowledge, and graph structure data through multimodal instructions. Integrating knowledge graphs with large language models can achieve unified modeling from structured knowledge to semantic reasoning, thereby constructing a knowledge-enhanced drug response prediction system.

[0005] Therefore, we designed a method for predicting drug response in cancer cell lines that integrates knowledge graphs and large language models, which can significantly improve prediction accuracy, interpretability, and transferability in multi-source data environments. Summary of the Invention

[0006] The purpose of this invention is to provide a method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs. This method integrates the structural information of biological knowledge graphs with the semantic reasoning capabilities of large language models to achieve multi-level modeling and prediction of drug-cell response mechanisms, making it applicable to fields such as precision oncology treatment, drug screening, and pharmacological mechanism research.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] Data Acquisition:

[0009] This study employs web crawling and manual review to provide high-quality, multi-source, multi-modal corpora and structured data for cell line drug response prediction tasks. By integrating biological databases, literature resources, and experimental data, it achieves comprehensive knowledge coverage at the drug, cell, gene, and disease levels, providing unified semantic and structural input for subsequent knowledge graph construction and model training. Web crawling and API interfaces are used to extract structured drug information from drug databases such as DrugBank, PubChem, and ChEMBL, including SMILES sequences, InChIKeys, physicochemical properties, and drug target and metabolic pathway data. Data from CCLE and GDS are also extracted. Multi-omics information and drug sensitivity experimental data of cancer cells were obtained from the C database; specifically, transcriptomic expression profiles, mutation status, copy number variation, methylation level, and response data after drug treatment of cell lines were collected in batches from PubMed and PMC databases. A biomedical corpus was constructed by crawling literature titles and abstracts related to cancer pharmacology, drug mechanisms of action, signaling pathways, and drug resistance research. Named entity recognition and biological terminology dictionaries such as UMLS, MeSH, and GO were used to identify drug, cell, gene, disease, and pathway entities in the text. Then, through entity alignment methods, the identified entities were mapped to a unified identifier system such as DrugBank ID, CCLE ID, NCBI Gene ID, and DO-KB ID, thereby forming structured semantic links. The acquired multi-source data were deduplicated, outliers were removed, and missing values ​​were imputed to unify the feature space. A unified naming convention for cross-modal data was constructed using biological and chemical ontology for hierarchical conceptual mapping.

[0010] Knowledge graph construction:

[0011] This invention transforms multi-source heterogeneous biological data into a unified structured knowledge network to achieve semantic modeling and mechanism-level representation of complex relationships among drugs, genes, cells, and diseases. This module provides a computable knowledge foundation for subsequent reasoning tasks through standardized entity identification, semantic relation extraction, and multi-layer graph structure construction. To ensure consistency across multi-source heterogeneous data, this invention uses entity mapping and semantic alignment strategies to uniformly encode entities from different databases: drugs use DrugBank ID and PubChem CID; genes use NCBI Gene ID; cell lines use CCLE NAME; and diseases use DO-KB identifiers. After the knowledge graph is constructed, knowledge representation learning algorithms such as TransE and RotatE are used to vectorize the triples, obtaining low-dimensional entity and relation embeddings. These embedding results are not only used for knowledge retrieval in the model but also serve as auxiliary input to enhance the structured knowledge understanding ability of the language model. The final cancer cell drug response knowledge graph is constructed by representing heterogeneous relationships in the form of triples.

[0012] <Drug, Attribute Category, Attribute Node>;

[0013] <Cell, Attribute Category, Attribute Node>;

[0014] <Genes, biological attributes, attribute nodes>;

[0015] <Drugs, targeted therapies, gene nodes>

[0016] <Drugs, treatments, disease progression>;

[0017] <Cell, related, gene node>;

[0018] <Cell, trigger, disease node>;

[0019] Model training and knowledge injection:

[0020] Based on the pre-trained large language model LLaMA3.1-8B, LoRA technology is used for efficient parameter fine-tuning, updating only some model weights to reduce training resource consumption. The training corpus comes from three sources: structural corpus: from drug structure and molecular attribute data; text corpus: from the titles and abstracts of biomedical papers in PubMed, covering drug mechanisms, pathways, gene mutations and drug resistance studies; and encapsulated sequence corpus: drug names are replaced with SMILES expressions and cell and gene entities are replaced with unified ID codes through entity replacement technology, thereby realizing the fusion input of natural language and biological structural information. Based on the pre-trained model, LoRA technology is used for efficient parameter fine-tuning, updating only a portion of the low-rank subspace of the weight matrix to achieve domain specialization while saving computational resources. LoRA fine-tuning covers multiple Transformer structures, ensuring the model's adaptability to different semantic layers. To further enhance the model's structural understanding ability, a knowledge injection strategy based on knowledge graph embedding is designed, aligning the structured knowledge embedding representations in the knowledge graph with the semantic vector space of the large language model. Algorithms such as TransE and RotatE are used for embedding training to generate low-dimensional vector representations for each entity. Then… A knowledge-gated fusion layer is added to the middle layer of the large language model. Through linear transformation and attention weighting mechanism, KGE vectors are fused with the semantic representation of the model. Then, the knowledge alignment loss constraint model is used to simultaneously minimize language prediction error and structural alignment error, realizing cross-modal fusion of text semantics and graph structure. By designing a knowledge alignment fine-tuning strategy, knowledge graph embedding is used as a structured input prompt for the large language model to guide the model to understand the multi-hop relationship between drugs, genes and cells. Semantic supplementation is carried out using cancer pharmacology literature, clinical records and drug mechanism text data. The biological understanding ability of the model is improved through cross-modal alignment of knowledge graph and text semantics.

[0021] Knowledge retrieval and enhancement:

[0022] RAG technology is used to enhance knowledge retrieval and dynamic reasoning. Specifically, this includes:

[0023] First, the query and entity extraction are defined. When a user inputs a drug response prediction task, the large model first parses the input text, automatically identifies the drug and cell line entities, and generates a search query. Then, a knowledge graph retrieval is performed, searching for triple relationships related to drugs and cell lines from the CCD-KG based on the query subject, and selecting the most relevant set of node relationships using vectorized similarity calculation. Finally, knowledge filtering and ranking are performed, with the trained expert model performing semantic relevance filtering on the search results, selecting the set of triples most closely related to drug-gene-cell response, forming the filtered knowledge context.

[0024] Drug response prediction and reasoning:

[0025] A neural factor decomposition machine module is used to predict drug-cell response values. By jointly optimizing graph structure representation loss and linguistic semantic loss, the large language model possesses dual capabilities of structural reasoning and semantic generation. Filtered knowledge triples are converted into natural language prompts and input into the expert large model along with drug structure descriptions and cell feature descriptions. The model further generates prediction criteria using natural language. To prevent knowledge interference and semantic redundancy, this invention introduces a semantic consistency filtering mechanism based on the expert large model. The model analyzes and filters candidate triples using a Prompt template, retaining the part most relevant to the current task. After filtering, the system converts the retained triples into natural language descriptions.

[0026] This invention combines knowledge graphs, RAG technology, and large language models to achieve structured semantic reasoning for predicting drug response in cancer cell lines, offering the following significant advantages:

[0027] To improve prediction accuracy and generalization ability, a biological knowledge graph containing the relationships between drugs, cell lines, genes, pathways and diseases is constructed and combined with the semantic reasoning ability of a large language model. This allows for the accurate capture of the complex mechanisms of action between drugs and cancer cells, thereby effectively improving the accuracy of drug sensitivity prediction and the model's cross-cancer generalization performance.

[0028] To accelerate the drug response modeling and validation process, this invention introduces RAG technology, enabling the model to dynamically retrieve knowledge triples related to input entities when performing drug response prediction tasks. This allows for rapid integration and immediate supplementation of external knowledge. Compared to traditional models that rely on static feature inputs, this approach can complete data updates and semantic enhancement in the shortest possible time, significantly shortening the model training and result validation cycle and improving the overall efficiency of drug screening and experimental validation.

[0029] To enhance the biological interpretability of the model, this system leverages a large language model for comprehensive understanding and reasoning of multi-source knowledge. It can analyze vast amounts of historical drug efficacy data and real-time experimental results, providing researchers with reliable predictions and suggestions. In addition to outputting drug sensitivity results, the model can automatically generate natural language explanations of the mechanism of action, helping researchers make more forward-looking decisions in the drug design phase and optimize experimental design and resource allocation.

[0030] To promote innovative and multimodal research, this invention introduces a collaborative mechanism of knowledge graphs and large language models into cancer pharmacology prediction, constructing a unified prediction framework that integrates semantic, structural, and numerical features. This framework can be flexibly extended to fields such as protein target screening, drug reuse, and drug resistance mechanism analysis, providing a general infrastructure for future multimodal biological computing and driving the deep integration and innovative applications of intelligent pharmacology and artificial intelligence. Attached Figure Description

[0031] Figure 1 This is a flowchart illustrating the method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs, as per the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention and to make the above-mentioned objectives, technical solutions and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings.

[0033] like Figure 1 As shown, this embodiment provides a method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs. The method mainly includes the following steps:

[0034] S1: Multi-source data acquisition; Through the integration of multimodal biological databases and literature corpus crawling, multidimensional datasets are acquired, covering drug structural characteristics, cell line omics information, drug sensitivity indicators, and biomedical textual knowledge.

[0035] S2: Knowledge Graph Construction; Based on the semantic relationships between entities such as drugs, cell lines, genes and diseases, a knowledge graph of cancer cell drug response is constructed and stored in the form of multi-type nodes and multi-relation triples to realize the structured expression of pharmacological mechanisms.

[0036] S3: Model pre-training and knowledge injection; Incremental knowledge alignment training is performed by inputting multi-source corpora into the model, and LoRA technology is used to achieve efficient fine-tuning of parameters, enabling the model to have the ability to understand and reason about semantic associations from cells to drugs.

[0037] S4: Knowledge Retrieval and Semantic Enhancement; Utilizing RAG technology to dynamically retrieve structured information from the knowledge graph during the reasoning process, and retrieving relevant triples of the target object through vectorized similarity matching, providing external semantic support for the model.

[0038] S5: Drug response prediction and interpretation generation; The optimized Prompt is input into the expert model for knowledge-enhanced reasoning, and the drug sensitivity prediction results of cancer cell lines and natural language interpretation reports are output, explaining the possible mechanisms of response prediction, such as key gene pathways, signal transduction regulation or drug resistance-related genes.

[0039] Our method

[0040] Furthermore, step S1, multi-source data acquisition, specifically includes: integrating multimodal biological databases and crawling literature corpora; acquiring multi-dimensional datasets covering drug structural features, cancer cell line omics information, drug sensitivity indicators, and biomedical text knowledge, to support subsequent knowledge graph construction and model pre-training.

[0041] Step 101: Our data acquisition process is as follows:

[0042] (1) Using web crawling and API interface technology, the structural information of drugs, including SMILES sequences, InChIKey codes, and physicochemical properties such as molecular weight, polar surface area, number of hydrogen bond donors and acceptors, and LogP, were obtained from the DrugBank and PubChem databases. The SMILES sequences were standardized and deduplicated to ensure the consistency and resolvability of the input.

[0043] (2) Extract the gene expression profile, mutation status, copy number variation and drug sensitivity index such as IC50 of cancer cells from the Cancer Cell Line Encyclopedia and Genomics of Drug Sensitivity in Cancer database to characterize the cell response to different drugs.

[0044] (3) A biomedical text corpus was constructed using PubMed and PMC databases. Biological entities such as drugs, cells, genes, diseases and signaling pathways in the literature were identified by the Named Entity Recognition (NER) tool. Drug entities were replaced with the corresponding SMILES sequences and cell lines were replaced with standard codes to form a WrappedSequence that integrates semantics and structure.

[0045] (4) Data cleaning is completed through data standardization, missing value completion and outlier filtering, and finally three parts are formed: structured drug data, cancer cell omics data and wrapped text corpus, which provide a multimodal pre-training foundation for large language models.

[0046] Step S2, knowledge graph construction, specifically includes: constructing a cancer cell drug response knowledge graph based on the semantic relationships between biological entities such as drugs, cells, genes, and diseases; and realizing the structured expression of pharmacological mechanisms through multi-type nodes and multi-relationship triples.

[0047] Step 102: In the data preparation stage, the node types and relationship types of the knowledge graph are first defined. Nodes include Drug Nodes, Cell Nodes, Gene Nodes, and Disease Nodes, each with rich attributes. For example, Drug Nodes record structural formulas, target lists, and physicochemical parameters; Cell Nodes record the tissue of origin, expression characteristics, and drug sensitivity; Gene Nodes record their molecular functions, regulatory directions, and upstream signals; Disease Nodes identify tumor subtypes. Relationship definitions include five main semantic relationships: "target" describes the interaction between the drug and the target gene; "express" reflects the expression status of a specific gene in the cell; "involved in" reveals the functional role of the gene in the signaling pathway; "affect" describes the effect of the drug on cell growth inhibition or activity; and "involve" reveals the relationship between the disease and the driver gene. The constructed knowledge graph is organized in the form of triplets, such as:<Drug, target, Gene> ,<Cell, associate, Gene>,<Drug, affect, Cell> ,<Cell, express, Gene> ,<Disease,involve, Gene> All triples are stored in a graph database to support efficient indexing and similarity retrieval. This knowledge graph realizes a multi-level association mapping between drugs, cells, genes, and diseases, providing structured semantic support for subsequent knowledge-enhanced reasoning.

[0048] Furthermore, the model training and knowledge injection in step S3 specifically include: incrementally training the large language model using multi-source corpora; and achieving efficient parameter fine-tuning through LoRA technology, enabling the model to have the ability to understand and reason about semantic associations from cytokine features to drug response.

[0049] Step 103: Using the multi-source corpus obtained in S1 as input, perform knowledge alignment and incremental training on the pre-trained large language model; employ LoRA technology to insert low-rank adaptation matrices into the model's attention layer and feedforward layer to achieve efficient parameter fine-tuning, thereby completing cross-modal knowledge injection with limited resources; during the model training phase, simultaneously input drug SMILES sequences, package sequences, and biomedical text corpora, and through semantic alignment tasks, enable the model to learn the semantic association rules between drugs, genes, cells, and diseases; after training, the model can understand the response relationship of cancer cells to drugs and possess cross-modal reasoning ability, realizing the fusion representation of pharmacological information and omics data, providing a high-quality language foundation model for subsequent knowledge augmentation prediction; employing LoRA technology to insert low-rank adaptation parameters into the model's attention weight matrix and feedforward network layer, freezing the remaining weights to reduce computational burden, thereby achieving efficient knowledge alignment; training objectives include language modeling loss and semantic consistency loss; in the training settings, the batch size per device is 12, the gradient accumulation step is 2, and the learning rate is set to 1.0 × 10⁻ 4 The training rounds are 1; cosine annealing learning rate scheduling and BF16 precision calculation are used to ensure the stability and performance of the training process; through this process, the model learns to understand the complex relationship between drugs, cells, genes and diseases, and can use built-in knowledge to achieve semantic reasoning and mechanism explanation in the generation stage, providing powerful knowledge reasoning capabilities for cancer drug response prediction tasks.

[0050] Furthermore, the knowledge retrieval and semantic enhancement in step S4 specifically include: during the reasoning process, using RAG technology to dynamically retrieve structured information from the knowledge graph; and integrating relevant knowledge into the model generation process to achieve semantically enhanced reasoning.

[0051] Step 104: When a prediction request regarding a certain drug and cancer cell line is received, the system first vectorizes the input drug and cell information and calculates its similarity to existing nodes in the knowledge graph; it then selects the triplet most relevant to the input entity based on similarity ranking, such as...<Drug_X, target, EGFR> ,<Gene_EGFR, participate, MAPK_pathway> ,<Drug_X, affect, Cell_HCC827> The retrieval results are semantically reordered, redundant and noisy data are removed, and the structured knowledge most relevant to the prediction task is retained. This structured knowledge is then transformed into contextual information in natural language form and fed into the large language model along with the input prompt word "Prompt" to achieve knowledge-enhanced reasoning. During the generation process, the model uses this external structured knowledge to complete the reasoning, thereby achieving higher prediction accuracy and interpretability. The introduction of RAG technology ensures that the model not only relies on static parameter knowledge but can also make decisions using dynamic knowledge graphs in real-time queries.

[0052] Furthermore, the drug response prediction and interpretation generation in step S5 specifically includes: inputting the optimized Prompt into the expert large language model for knowledge-enhanced reasoning, and outputting the prediction results of the cancer cell line's response to the drug and its biological interpretation.

[0053] Step 105: The model integrates knowledge graph retrieval information with internal semantic representation to generate drug sensitivity prediction results, including the predicted IC50 value range, drug tolerance trends, and potential key regulatory genes. Simultaneously, the model automatically generates natural language explanations to illustrate the biological basis of the predictions, such as key signaling pathways like MAPK, PI3K-AKT, transcription factor regulatory networks, or possible drug resistance driving mechanisms. This generative explanation method improves the interpretability of the prediction results, enabling researchers to intuitively understand the model's decision-making logic and optimize experimental design and drug screening strategies accordingly.

[0054] This invention constructs an interpretable cancer cell drug response prediction system by deeply integrating knowledge graphs, RAG technology, and large language models. This system achieves semantic fusion of multi-source data, dynamic knowledge enhancement, and interpretable reasoning, not only improving prediction accuracy but also providing mechanism-level explanations, thus offering effective computational support for precision cancer treatment and new drug development.

Claims

1. A method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs, characterized in that, include: S1: Multi-source data acquisition; Through the integration of multimodal biological databases and literature corpus crawling, multidimensional datasets are acquired, covering drug structural characteristics, cell line omics information, drug sensitivity indicators, and biomedical textual knowledge. S2: Knowledge Graph Construction; Based on the semantic relationships between entities such as drugs, cell lines, genes and diseases, a knowledge graph of cancer cell drug response is constructed and stored in the form of multi-type nodes and multi-relation triples to realize the structured expression of pharmacological mechanisms. S3: Model Training and Knowledge Injection; Incremental knowledge alignment training is performed by inputting multi-source corpora into the model, and LoRA technology is used to achieve efficient parameter fine-tuning, enabling the model to have the ability to understand and reason about semantic associations from cells to drugs. S4: Knowledge Retrieval and Semantic Enhancement; Utilizing RAG technology to dynamically retrieve structured information from the knowledge graph during the reasoning process, and retrieving relevant triples of the target object through vectorized similarity matching, providing external semantic support for the model. S5: Drug response prediction and interpretation generation; The optimized Prompt is input into the expert model for knowledge-enhanced reasoning, and the drug sensitivity prediction results of cancer cell lines and natural language interpretation reports are output, explaining the possible mechanisms of response prediction, such as key gene pathways, signal transduction regulation or drug resistance-related genes.

2. The method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs according to claim 1, characterized in that, Step S1, multi-source data acquisition, includes: obtaining drug structure information, including SMILES sequences, InChIKey encoding, and physicochemical properties, from DrugBank, PubChem, and ChEMBL databases using web crawling technology and API interfaces; extracting multi-omics information and drug response data of cancer cells, including transcriptome expression profiles, mutation status, copy number variations, methylation levels, and IC50 values, from CCLE and GDSC databases; obtaining titles and abstracts of scientific papers related to drug action mechanisms, cancer cell signaling pathways, and drug resistance mechanisms from PubMed and PMC databases; extracting drug, cell, gene, and disease entities using named entity recognition (NER) tools; mapping these entities to standardized identifiers; and generating WrappedSequences.

3. The method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs according to claim 1, characterized in that, Step S2, knowledge graph construction, includes: defining node types, including drug nodes, cell nodes, gene nodes, and disease nodes, with each type of node having structural and functional attributes; defining relation types, including "acting on", Drug–target–Gene; "affecting", Drug–affect–Cell; "expressing on", Cell–express–Gene; "participating in", Gene–participate–Pathway; "associating", Disease–involve–Gene; and "treating", Drug–treat–Disease; and storing all node and relation information in triplet form, including entity 1, relation, and entity 2, to form a cancer drug response knowledge graph.

4. The method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs according to claim 1, characterized in that, Step S3, model pre-training and knowledge injection, includes: using drug structure data, cytokine data, and biological text data as pre-training corpora to fine-tune the large language model LLaMA3.1-8B with domain knowledge; employing LoRA technology to insert low-rank adaptation matrices into the attention and feedforward layers of the Transformer, updating only some weight parameters to reduce computational resource consumption; and setting the batch size per device to 12, the gradient accumulation step count to 2, and the learning rate to 1×10⁻ during training. 4 The training rounds are 1, using a cosine annealing learning rate scheduler and BF16 precision training, and a warm-up ratio of 0.1 is used to stabilize model convergence. A knowledge gating fusion layer is introduced into the model to align the embedding vectors of entities in the graph with the model's semantic space, thereby achieving the fusion of language semantics and knowledge structure.

5. The method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs according to claim 1, characterized in that, Step S4, knowledge retrieval and semantic enhancement, includes: when the model receives a drug response prediction request, it first performs entity recognition and standardization, extracting key entities such as drugs, cells, or genes; it calculates entity similarity based on the knowledge graph embedding space, and retrieves and queries the most relevant set of triples through cosine similarity; it selects the top k most relevant triples as candidate knowledge, and filters redundant information through semantic reordering and aggregation algorithms; it converts the selected triples into natural language descriptions, generates knowledge enhancement prompts, and inputs them into the expert big model to achieve external knowledge enhancement reasoning.

6. The method for constructing a large language model for predicting drug response in cancer cell lines based on knowledge graphs according to claim 1, characterized in that, Step S5, drug response prediction and interpretation generation, includes: inputting the filtered knowledge triplet along with the original drug characteristics and cell line information into the expert model; the model outputs the drug sensitivity prediction results for cancer cell lines, including the predicted IC50 value or sensitivity grade; the model automatically generates a natural language interpretation of the drug response based on the knowledge-enhanced Prompt, explaining the mechanistic basis of the prediction results, including target genes, signaling pathways, and potential drug resistance genes; the output results include structured prediction values ​​and textual biological interpretation reports for researchers to verify and use as a reference for decision-making.