Pathology report generation method based on diagnostic knowledge graph and local conformal prediction

CN122930360APending Publication Date: 2026-10-16SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611164817.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]针对现有技术中的上述不足,本发明提供的一种基于诊断知识图谱和局部共形预测的病理报告生成方法解决了现有基于视觉语言模型生成病理辅助报告时存在的医学逻辑不严谨、证据混杂难以过滤、细粒度诊断极易产生幻觉,以及单一全局阈值难以适应局部数据分布差异的问题

Benefits of technology

[0013] The beneficial effects of this invention are as follows: This invention provides a pathology report generation method based on diagnostic knowledge graph and local conformal prediction. By utilizing the mapping logic of diagnostic knowledge graph, unstructured candidate semantic content is forcibly transformed into standardized clinical questions with specific rule attributes. This completely solves the problem of mixed evidence verification caused by free text short sentences containing complex medical concepts in the prior art, and greatly improves the accuracy of independent evidence review of different medical assertions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122930360A_ABST
    Figure CN122930360A_ABST
Patent Text Reader

Abstract

The application provides a pathological report generation method based on a diagnostic knowledge graph and local conformal prediction, relates to the technical field of medical artificial intelligence and digital pathological image processing, and the method is based on standardized clinical problems, performs feature processing and matching, obtains a candidate answer set and an initial non-conformal score, uses a local conformal prediction strategy to calculate an adaptive risk control threshold, verifies and traces back to a backward level based on the adaptive risk control threshold and a hierarchical structure of the diagnostic knowledge graph to obtain a calibrated diagnostic fact set, and uses constrained compilation logic to assemble compliance based on the calibrated diagnostic fact set to generate a risk-controlled pathological auxiliary report. The application solves the problems of imprecise medical logic, mixed evidence difficult to filter, fine-grained diagnosis prone to hallucinations and single global threshold difficult to adapt to local data distribution differences in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical artificial intelligence and digital pathology image processing technology, and in particular to a method for generating pathology reports based on diagnostic knowledge graphs and local conformal prediction. Background Technology

[0002] Pathology reports are crucial medical documents in the clinical diagnosis and treatment process. Their content is extensive and complex, typically including diagnostic conclusions, histological subtypes, morphological descriptions, ordinal grading, site determination, quantitative measurements, immunohistochemical or molecular testing results, and, when necessary, recommendations for further auxiliary examinations. The unique aspect of pathology lies in the fact that each medical assertion in the report has specific clinical evidence requirements and risk levels. For example, basic H&E staining images often only support specific morphological judgments and histological diagnoses, and cannot directly infer results such as ER or HER2, which require specialized testing.

[0003] In recent years, with the development of visual language models and medical multimodal large model technologies, the automatic generation of natural language pathology reports based on medical images using artificial intelligence has become a research hotspot. However, the fluency and coherence of the generated language does not equate to the rigor and reliability of the medical logic. Existing free-generating models generally face a serious risk of "illusion," easily outputting fine-grained sub-diagnoses lacking actual image evidence support, fabricating auxiliary examination results without actual verification, or giving inappropriate suggestions detached from the patient's actual context. To address these issues, existing fact-checking methods often employ a scheme of decomposing the model-generated free text into independent short sentences (claims) and filtering them one by one based on image similarity. However, this method has significant limitations: the decomposed free text short sentences are not equivalent to indivisible medical atomic facts. For example, "invasive lobular carcinoma, grade 2, ER positive" as a short sentence, if it passes the verification as a whole due to the high support of the "invasive" feature in the image, will seriously mask the fatal error that the "ER positive" part actually lacks verification data support.

[0004] Furthermore, some existing concept-driven pathology report generation methods primarily focus on improving the text quality and conceptual relevance of the generated reports through feature fusion, while neglecting the issue of standardizing and constraining medical semantic content during the report generation process. These existing technologies generally lack a mechanism to uniformly map complex diagnostic assertions to controlled clinical problem objects, and have not established a safety degradation logic that aligns with the hierarchical structure of pathological concepts. When dealing with data distribution shifts caused by different centers and different scanning equipment, they often use a one-size-fits-all global confidence threshold, failing to dynamically adjust risk assessment criteria based on local features. This results in significant deficiencies in the reliability, interpretability, and cross-domain adaptability of the system in actual clinical applications. Summary of the Invention

[0005] To address the aforementioned shortcomings in existing technologies, this invention provides a pathology report generation method based on diagnostic knowledge graphs and local conformal prediction. This method solves the problems of insufficient medical logic, difficulty in filtering mixed evidence, high likelihood of hallucinations in fine-grained diagnoses, and difficulty in adapting to local data distribution differences when generating pathology auxiliary reports based on visual language models.

[0006] To achieve the aforementioned objectives, the technical solution adopted by this invention is: a method for generating pathology reports based on diagnostic knowledge graphs and local conformal prediction, comprising: S1: Based on the pathological images to be processed and available auxiliary data, the candidate report free text is transformed into multiple standardized clinical questions using the mapping logic of the diagnostic knowledge graph; S2: Based on standardized clinical questions, feature processing and matching are performed using accessed heterogeneous medical prediction tools to obtain the corresponding candidate answer set and initial non-conformal score; S3: Based on the initial nonconformal score, a local conformal prediction strategy is used to extract a local validation benchmark in the calibration sample set, and a global backoff algorithm is executed when the sample is insufficient to calculate the adaptive risk control threshold. S4: Based on the hierarchical structure of adaptive risk control threshold and diagnostic knowledge graph, a recursive degradation algorithm is used to verify the candidate answer set and backtrack to the next level to obtain the calibrated diagnostic fact set; S5: Based on the calibrated set of diagnostic facts, use constrained compilation logic to perform compliance assembly, generate risk-controlled pathology auxiliary reports, and complete the pathology report generation.

[0007] Further, S1 includes: Based on the pathological images to be processed and available auxiliary data, candidate report free text is extracted and parsed into medical semantic objects; By leveraging the mapping logic of the diagnostic knowledge graph, the pre-defined evidence premises, answer space, and conceptual hierarchy relationships within the diagnostic knowledge graph are queried, transforming medical semantic objects into multiple standardized clinical questions that include question identifiers, question types, and evidence requirements.

[0008] Further, S2 includes: Based on standardized clinical questions, the required heterogeneous medical prediction tools are called through a unified interface. For questions that require image evidence, multidimensional similarity aggregation is performed using versioned standardized answer templates and pathological images to be processed to complete feature processing and matching. The original output of the tools is standardized to obtain the corresponding candidate answer set and initial nonconformal score.

[0009] Furthermore, the expression for the initial nonconformal score is: ; ; in, This represents the initial nonconformal score calculated for a specific question and answer. This represents the image evidence score obtained from multidimensional similarity aggregation. This indicates the pathological image to be processed received based on the input interface. This represents standardized clinical questions derived from knowledge graphs. This represents the candidate answers output by the heterogeneous medicine prediction tool. This indicates the index number of the standardized answer template. This operator represents an operator that performs a multidimensional arithmetic mean aggregation operation along multiple template index dimensions. This function calculates the cosine of the angle between two vectors. This represents the image embedding feature vector obtained by feature extraction from the pathological image to be processed based on a pre-trained visual coding model. This represents the text embedding feature vector obtained by encoding a text string based on a pre-trained text encoding model. This refers to a standardized answer template text obtained by matching a knowledge graph with a standardized clinical question database, which corresponds to a specific question, candidate answer, and index number.

[0010] Further, S3 includes: Based on the initial nonconformal score, the embedding spatial distance between the image features of the pathological image to be processed and the images of each sample in the calibration sample set is calculated. A local conformal prediction strategy was used to select samples with the closest embedding spatial distance and belonging to the same standardized clinical problem to form a local calibration sample set to extract local validation benchmarks. When the number of valid samples in the local calibration sample set is lower than a preset threshold and is determined to be insufficient, a global rollback algorithm is executed to return to the global calibration set or a higher-level concept, and an adaptive risk control threshold is obtained through statistical calculation.

[0011] Further, S4 includes: Based on the adaptive risk control threshold and the hierarchical structure of the diagnostic knowledge graph, it is determined whether the lower-level diagnostic concepts in the candidate answer set meet the adaptive risk control threshold. If not, a recursive degradation algorithm is used to backtrack along the diagnostic knowledge graph to the corresponding higher-level diagnostic concept. The higher-level diagnostic concept is used to re-verify until the threshold is met. In addition, the conclusions lacking auxiliary data support are eliminated and verified in combination with the evidence premise of the diagnostic knowledge graph, so as to obtain the calibrated set of diagnostic facts.

[0012] Further, S5 includes: Based on the calibrated set of diagnostic facts, extract the calibrated answers, the superordinate concepts that allow for downgrading, and the suggestions for further examination triggered by diagnostic uncertainty. Based on higher-level concepts and further inspection recommendations, and utilizing constrained compilation logic, compliance assembly is performed under the premise of prohibiting the introduction of uncalibrated new medical facts. Corresponding non-conformal scores and tool identifiers are linked to form an audit trail, generating a pathology auxiliary report with an audit trail and controlled risks, thus completing the pathology report generation.

[0013] The beneficial effects of this invention are as follows: This invention provides a pathology report generation method based on diagnostic knowledge graph and local conformal prediction. By utilizing the mapping logic of diagnostic knowledge graph, unstructured candidate semantic content is forcibly transformed into standardized clinical questions with specific rule attributes. This completely solves the problem of mixed evidence verification caused by free text short sentences containing complex medical concepts in the prior art, and greatly improves the accuracy of independent evidence review of different medical assertions.

[0014] By establishing a processing and matching mechanism that supports the access of heterogeneous medical prediction tools, the system can uniformly integrate feature calculation results from multiple dimensions to generate candidate answers and initial non-conformal scores, breaking through the limitations of a single prediction model and improving the diversity of underlying prediction and evaluation.

[0015] Innovatively, a local conformal prediction strategy is used to extract local validation benchmarks from the calibration sample set to calculate adaptive risk control thresholds. When there are insufficient samples, a global backoff algorithm is executed. This overcomes the shortcomings of traditional global unified thresholds, which are prone to failure when faced with local data offsets caused by cross-hospital and cross-device issues. It balances local adaptability with evaluation stability under extreme conditions.

[0016] By using a recursive degradation algorithm based on the hierarchical structure of the diagnostic knowledge graph to verify candidate answers and backtrack to the next level, the problem of existing systems having to forcibly output incorrect answers or directly clear and reject answers when fine-grained predictions do not meet the threshold is solved. This achieves flexible degradation output that retains medical value as much as possible while ensuring safety.

[0017] By using constrained compilation logic to compliantly assemble the calibrated set of diagnostic facts, the random illusory facts that have not been verified by prior atlas mapping and local conformal prediction are fundamentally prevented from being mixed into the final report, ensuring the absolute security and traceability of the pathology auxiliary report content. Attached Figure Description

[0018] This specification will be further described by way of exemplary embodiments, which will be described in detail with reference to the accompanying drawings. These embodiments are not limiting; in these embodiments, the same reference numerals denote the same structures, wherein: Figure 1 This is an exemplary flowchart illustrating a pathology report generation method based on diagnostic knowledge graphs and local conformal prediction, according to some embodiments of this specification. Detailed Implementation

[0019] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0020] Example Figure 1 This is an exemplary flowchart illustrating a pathology report generation method based on diagnostic knowledge graphs and local conformal prediction, according to some embodiments of this specification. Figure 1 As shown, the process includes the following steps. In some embodiments, the process may be executed by a processor.

[0021] S1: Based on the pathological images to be processed and available auxiliary data, the candidate report free text is transformed into multiple standardized clinical questions using the mapping logic of the diagnostic knowledge graph.

[0022] The pathological images to be processed refer to the raw medical image input data that the system needs to generate risk-controlled auxiliary reports for. For example, the pathological images to be processed can include multi-dimensional medical digital image information such as whole pathological slide images, microscopic field images, hematoxylin-eosin stained images, immunohistochemical images, and digital images of local tissue sections in specific scenarios such as core needle biopsy of the breast.

[0023] In some embodiments, the processor can obtain the pathological image to be processed by receiving scanned slide files uploaded in real time by a digital pathology slide scanner, or by retrieving and downloading historically stored digital pathology slide files from a hospital medical image archive and communication system and an electronic medical record database through a communication network, and then performing format parsing and normalization preprocessing operations.

[0024] Available ancillary data refers to structured or semi-structured medical information, other than the pathological image itself, that can provide supplementary evidence and patient context constraints for the generation of pathology auxiliary reports. For example, available ancillary data may include basic patient demographic information such as sex and age, specimen sampling site metadata, as well as immunohistochemical testing status, structured biomarker results, molecular testing analysis results, and past medical examination history.

[0025] In some embodiments, the processor can read and parse the structured record fields in the electronic medical record text by calling the standardized data interface of the hospital information system or laboratory information management system, or directly read the metadata tags attached to the header of the medical image file, and integrate and summarize the clinical background information associated with the current diagnosis to obtain usable auxiliary data.

[0026] A diagnostic knowledge graph is a network-like data control structure used to define clinical problems, constrain the answer space, and provide hierarchical relationships of pathological concepts and evidentiary premises. For example, a diagnostic knowledge graph can include parent-child node relationships of various pathological diagnostic concepts, such as invasive carcinoma as the parent concept of invasive ductal carcinoma, mutually exclusive diagnostic concept relationships, multi-label differential diagnostic relationships, image or data evidence premise rules necessary for specific medical assertions, and logical conditions triggering further examination recommendations based on different risk levels.

[0027] In some embodiments, the processor can import authoritative international disease classification standard texts, clinical pathology report standard guidelines manuals, and local operating rule files of medical institutions, and combine them with a professional terminology dictionary maintained and updated by an expert team. It can then use knowledge graph construction algorithms to extract entities, attributes, and logical edge relationships from these sources and persist them to a graph database, thereby obtaining a diagnostic knowledge graph.

[0028] Candidate report free text refers to a pathological diagnosis description in natural language form that is initially generated by an external visual language model or initially drafted manually, without structured parsing and risk control filtering. For example, candidate report free text may include continuous natural language sentences or paragraphs containing multiple mixed medical semantic components, such as invasive lobular carcinoma, grade 2, ER positive, which include diagnostic conclusions, histological grading, morphological descriptive features, and immunohistochemical prediction results that have not been verified by evidence.

[0029] In some embodiments, the processor can directly describe the pathological image to generate a natural language response by receiving handwritten text from the doctor input device, text records converted from speech recognition, or calling the inference interface of an unfiltered basic general visual language multimodal large model, and extracting continuous text strings therein to obtain the candidate report free text.

[0030] Standardized clinical questions refer to structured question objects formed by standardizing and parsing medical semantic objects from free text, resulting in clearly defined boundaries, control rules, and execution actions. For example, a standardized clinical question may include a unique question identifier code, a binary or multi-class question type definition, a restricted set of legal answer spaces, associated diagnostic knowledge graph control nodes, a description of necessary pre-existing evidence conditions, a risk level identifier, and a list of permitted output actions such as retention or downgrading.

[0031] In some embodiments, the processor can input the extracted medical semantic objects into a large language model or rule parsing engine, perform semantic matching, element decomposition and field alignment mapping with a predefined standard question library in the diagnostic knowledge graph, assign unique identifiers and bind corresponding risk control attribute constraint parameters, thereby obtaining standardized clinical questions.

[0032] In some embodiments, the processor can extract and parse the candidate report free text into medical semantic objects based on the pathological image to be processed and available auxiliary data; using the mapping logic of the diagnostic knowledge graph, it can query the preset evidence premises, answer space and concept hierarchy relationships in the diagnostic knowledge graph, and transform the medical semantic objects into multiple standardized clinical questions containing question identifiers, question types and evidence requirements.

[0033] Medical semantic objects refer to atomic-level content units extracted from unstructured candidate report free text that possess independent medical significance and risk characteristics. For example, a medical semantic object may include a single binary diagnostic determination, such as the presence of malignancy, specific histological subtype classification results, ordinal-level pathological tissue grading data, specific quantitative regression measurement values, independent positive or negative status of immunohistochemical markers, and descriptions of recommended examinations for the next clinical action.

[0034] In some embodiments, the processor can utilize a named entity recognition model in natural language processing technology, or call a large language model parsing engine with cue word constraints, to perform sentence segmentation, component decomposition, and concept alignment operations on the candidate report free text, separating the basic medical assertion fragments that are independent of each other and no longer contain compound meanings, thereby obtaining a medical semantic object.

[0035] S2: Based on standardized clinical questions, feature processing and matching are performed using accessed heterogeneous medical prediction tools to obtain the corresponding candidate answer set and initial non-conformal score.

[0036] Heterogeneous medical prediction tools refer to algorithmic models and logic engines with different architectures or principles that are integrated into a system to provide predictive answers or analytical results for different standardized clinical questions. For example, heterogeneous medical prediction tools may include zero-shot visual language models based on prompt word responses, supervised lesion detection classifiers trained on labeled data, segmentation measurement models for area or cell counts, quantitative tools for immunohistochemical analysis, structured parsing rule engines for medical record texts, and semantic auditors for large language models responsible for symbolic logic verification.

[0037] In some embodiments, the processor can access the registration interface through the system's built-in unified tool, read the configuration files of each external algorithm model, obtain registration parameter information including the tool's unique identifier, the range of clinical problems it supports, input and output data modality format requirements, non-conformal scoring calculation function, and applicable data domain range, and establish a call connection to obtain a heterogeneous medical prediction tool.

[0038] A candidate answer set refers to the collection of possible answer options and their related parameters calculated and output by a heterogeneous medical prediction tool for a specific standardized clinical question based on the current input data. For example, a candidate answer set may include multiple histological subtype names and their corresponding confidence probability distributions for multi-classification questions, or a differential diagnosis list containing multiple adjacent or mutually exclusive concepts for multi-label differential diagnosis questions, as well as the boundary values ​​of the regression measurement result interval with initial error prediction values.

[0039] In some embodiments, the processor can input the pathological image to be processed or related auxiliary data into a successfully registered heterogeneous medical prediction tool after data format conversion to perform forward reasoning or rule parsing calculation, receive the original classification probability, numerical range or text label results returned by each tool and summarize and convert them into a unified data structure to obtain a set of candidate answers.

[0040] The initial nonconformal score is a numerical indicator output or transformed by medical prediction tools before performing conformal prediction calibration. It is used to initially measure the degree of deviation or uncertainty between candidate answers and the true situation. For example, the initial nonconformal score may include the misclassification probability value in binary classification problems, the difference score between the probability distribution of candidate answers and the highest probability in multi-class problems (such as the marginal score), the absolute value of the residual estimate output by the regression prediction model, and the percentage of dissimilarity calculated by the zero-shot model based on images and templates.

[0041] In some embodiments, the processor can extract the original predicted probability value or image-text feature similarity value output by the model by calling the scoring function conversion module built into the heterogeneous medical prediction tool, or by using a preset mapping rule engine. After inversion, difference calculation or normalization scaling, the value is converted into a value reflecting uncertainty risk under a unified dimension, thereby obtaining the initial nonconformal score.

[0042] In some embodiments, the processor can call the required heterogeneous medical prediction tool through a unified interface based on standardized clinical questions. For questions requiring image evidence, it can use versioned standardized answer templates to perform multidimensional similarity aggregation with the pathological image to be processed to complete feature processing and matching, and standardize the original output of the tool to obtain the corresponding candidate answer set and initial nonconformal score.

[0043] Standardized answer templates refer to rigorously reviewed and version-controlled standardized medical descriptive text styles used for similarity comparison with pathological image features. For example, a standardized answer template may include pre-defined complete sentence text such as the current H&E breast pathology image features suggesting invasive lobular carcinoma, or standardized descriptive structures for specific auxiliary examinations, as well as dedicated prompt word strings that are associated with specific standardized clinical questions, specific candidate answers, and are marked with a clearly maintained version number.

[0044] In some embodiments, the processor can access the hospital's official pathology report guidelines database or a controlled medical terminology dictionary maintained by authoritative experts, extract the corresponding standard description text string based on the current standardized clinical question identifier and candidate answers, and attach the latest template version tag information to ensure the consistency of the verification, thereby obtaining the standardized answer template.

[0045] In some embodiments, the expression for the initial nonconformal score is: ; ; in, This represents the initial nonconformal score calculated for a specific question and answer. This represents the image evidence score obtained from multidimensional similarity aggregation. This indicates the pathological image to be processed received based on the input interface. This represents standardized clinical questions derived from knowledge graphs. This represents the candidate answers output by the heterogeneous medicine prediction tool. This indicates the index number of the standardized answer template. This operator represents an operator that performs a multidimensional arithmetic mean aggregation operation along multiple template index dimensions. This function calculates the cosine of the angle between two vectors. This represents the image embedding feature vector obtained by feature extraction of the pathological image to be processed based on a pre-trained visual coding model. This represents the text embedding feature vector obtained by encoding a text string based on a pre-trained text encoding model. This refers to a standardized answer template text obtained by matching a knowledge graph with a standardized clinical question database, which corresponds to a specific question, candidate answer, and index number.

[0046] S3: Based on the initial nonconformal score, a local conformal prediction strategy is used to extract local validation benchmarks in the calibration sample set, and a global backoff algorithm is executed when the sample is insufficient to calculate the adaptive risk control threshold.

[0047] Local conformal prediction strategy refers to a method or rule that, during uncertainty calibration, does not use globally uniform sample data, but instead dynamically selects samples and calculates control parameters based on a local range of the feature space of the data to be processed. For example, a local conformal prediction strategy may include algorithmic logic that specifies selecting several closest samples in the embedding space as local benchmarks, setting a hard gating condition that the number of effective local samples must reach a specific threshold, and adaptive control flow logic that triggers a fallback to the global calculation mode when sample sparsity causes the threshold to be not met.

[0048] In some embodiments, the processor can obtain the logic code segment used to define the similarity distance calculation formula, the minimum sample number limit parameter in the local neighborhood, the candidate problem compatibility judgment rule, and the backoff mechanism triggering condition by reading the strategy definition module in the system configuration parameter file and load it into the computing memory, thereby obtaining the local conformal prediction strategy.

[0049] A calibration sample set refers to an independent set of reference data containing historical real-world annotation information used to perform conformal prediction algorithms, for the system to calculate non-conformal score quantile thresholds. For example, a calibration sample set may include desensitized historical pathology image identifiers, corresponding standardized clinical question codes, real answer labels verified by professional physicians, label source information obtained from structured fields in electronic medical records or manual annotations, raw prediction output data from historically deployed tools, pre-extracted image embedding feature vectors, and metadata about the data domain to which the samples belong, such as the hospital or scanner model.

[0050] In some embodiments, the processor can obtain a calibration sample set by retrieving historical medical databases, extracting information from official pathology reports signed by doctors using large language models or rule engines to obtain real labels, and using feature extraction networks to encode features of associated historical pathology images to obtain image embeddings. The two are then bound together, and invalid data is cleaned and filtered before being persistently stored.

[0051] Local validation benchmarks refer to threshold reference data provided by a subset of data that is highly similar in feature space to the current data to be processed, selected from a large overall calibration sample set during local conformal prediction. For example, a local validation benchmark may include a local calibration sample data matrix consisting of the 100 nearest-neighbor historical case samples, which have the same standardized clinical question codes, the same or compatible answer space constraints, similar image embedding distance scores, and consistent parent concept node classifications, as well as a local empirical cumulative distribution function calculated based on this matrix.

[0052] In some embodiments, the processor can calculate the Euclidean or cosine distance between the image embedding features of the current pathological image to be processed and the image embedding features of all samples in the overall calibration sample set, sort them according to a preset nearest neighbor algorithm, and superimpose standardized clinical problem code consistency filtering conditions to select K historical sample records that meet the requirements for statistical summary, thereby obtaining a local validation benchmark.

[0053] An adaptive risk control threshold is a quantile threshold dynamically calculated by the system during conformal prediction calibration based on the local sample distribution, used to determine whether a candidate answer is accepted. For example, the adaptive risk control threshold may include a specific significance level calculated when the number of local samples is sufficient, such as the local nonconformal score quantile cutoff value at 95% confidence, or a more conservative and stringent global nonconformal score quantile cutoff value calculated based on the global calibration set or higher-level concept dataset when a backoff mechanism is triggered due to insufficient local samples.

[0054] In some embodiments, the processor can obtain selected local validation benchmarks or global calibration sample data, extract the non-conformal scores of each sample to form an empirical cumulative distribution, apply the conformal prediction quantile calculation formula according to the preset target error rate parameter, and switch to the global distribution to recalculate the truncation parameter when the local sample size is detected to be insufficient to the preset lower limit, thereby obtaining the adaptive risk control threshold.

[0055] In some embodiments, the processor can calculate the embedding spatial distance between the image features of the pathological image to be processed and each sample image in the calibration sample set based on the initial nonconformal score; use a local conformal prediction strategy to select samples with the closest embedding spatial distance and belonging to the same standardized clinical problem to form a local calibration sample set to extract a local validation benchmark; when the effective number of samples in the local calibration sample set is lower than a preset threshold and is determined to be insufficient, execute a global backoff algorithm to retreat to the global calibration set or a higher-level concept, and obtain an adaptive risk control threshold through statistical calculation.

[0056] Image features refer to numerical, multidimensional vector data that can characterize the visual texture, structure, and semantic information of pathological images. For example, image features may include local tissue texture feature tensors extracted by deep learning convolutional neural networks, spatial attention weight matrices reflecting cell nucleus morphology and distribution density, low-dimensional compressed embedding vectors used to characterize the global semantic context information of the entire pathological slice image, and high-dimensional visual representation vectors specifically used for zero-shot model text similarity calculation.

[0057] In some embodiments, the processor can obtain image features by inputting the pathological image to be processed into a visual coding model, such as ViT or ResNet, which has been pre-trained on a large number of medical images, performing multi-layer convolution, pooling and non-linear activation operations on the image pixel matrix, and extracting multi-dimensional floating-point arrays generated by specific deep layers or output layers of the network.

[0058] Embedding spatial distance is a numerical measure used to assess the similarity between a current pathological image to be processed and historical images in a calibration sample set in an abstract feature space. For example, embedding spatial distance can include calculating the cosine similarity score between the embedding feature vectors of two images, calculating the Euclidean distance between two multidimensional coordinate points, or the sum of absolute errors calculated based on the Manhattan distance formula. The smaller the value or the higher the correlation score, the more similar the two images are in terms of tissue morphology or staining style.

[0059] In some embodiments, the processor can extract the image feature vector of the current pathological image to be processed, read the pre-stored image feature vectors of historical samples one by one from the calibration sample database, and call the mathematical distance function module in the vector calculation acceleration library to perform matrix subtraction, summation of squares and square root operations, or perform vector dot product and normalization operations to obtain the embedding space distance.

[0060] A local calibration sample set refers to a specific, small subset of data temporarily partitioned from the overall calibration sample library based on feature similarity and problem consistency when implementing a local conformal prediction strategy. For example, a local calibration sample set may include dozens to hundreds of historical medical records that are similar to the current slide in terms of data domain information such as scanner model and staining batch, and have the closest image embedding spatial distance. Each record is bound to a precise clinical problem identifier, a true diagnostic label, and corresponding historical predicted nonconformal score data.

[0061] In some embodiments, the processor can receive the feature vector and clinical question parameters of the current data to be processed, execute a nearest neighbor (k-NN) query in a relational database or vector database with multiple filtering conditions, such as matching the same question_id and adjacent parent concept nodes, extract the returned historical sample entries that meet the conditions into memory for aggregation, thereby obtaining a local calibration sample set.

[0062] S4: Based on the hierarchical structure of adaptive risk control threshold and diagnostic knowledge graph, a recursive degradation algorithm is used to verify the candidate answer set and backtrack to the next level to obtain a calibrated set of diagnostic facts.

[0063] A diagnostic fact set refers to a set of medical conclusions that, after undergoing evidence gating, local conformal prediction risk filtering, and concept hierarchy downgrading, is deemed by the system to have statistical reliability and be acceptable for use in the final report generation. For example, a diagnostic fact set may include a core invasive carcinoma binary classification diagnosis that has passed risk threshold verification, a relatively safe common superordinate concept name downgraded due to unreliable subtypes, a calibrated differential diagnosis list containing multiple ambiguous boundary options, and histological grading interval descriptions with clear uncertainty markers.

[0064] In some embodiments, the processor can input the initially generated set of candidate answers into the recursive degradation control module, use the calculated adaptive risk control threshold to filter out non-compliant high-risk fine-grained answers, call the knowledge graph to backtrack along the tree structure for the removed nodes and retain their safe parent node concepts, and merge all the logic units that pass the verification to obtain the set of diagnostic facts.

[0065] In some embodiments, the processor can determine whether the lower-level diagnostic concepts in the candidate answer set meet the adaptive risk control threshold based on the adaptive risk control threshold and the hierarchical structure of the diagnostic knowledge graph. If not, a recursive degradation algorithm is used to backtrack along the diagnostic knowledge graph to the corresponding higher-level diagnostic concept. The higher-level diagnostic concept is used to re-verify until the threshold is met. The conclusions lacking auxiliary data support are eliminated and verified in combination with the evidence premises of the diagnostic knowledge graph, thus obtaining a calibrated set of diagnostic facts.

[0066] Subordinate diagnostic concepts refer to specific medical diagnostic classifications that are leaf nodes or lower levels in the hierarchical tree structure of a diagnostic knowledge graph, representing more detailed, finer-grained classifications with typically higher evidence requirements. For example, subordinate diagnostic concepts may include invasive lobular carcinoma, invasive ductal carcinoma (non-specific type), microinvasive carcinoma, or be refined to specific histological grade 3. These concepts are usually subsets or specific instances of higher-level generalized classification concepts.

[0067] In some embodiments, the processor can load the data structure model of the diagnostic knowledge graph, query the entity relationship table in the graph database based on the current candidate answer or medical semantic object, and extract the target node string identifier of the type "contains in" or "belongs to" directed edge pointing from other entities to the current entity, thereby obtaining the subordinate diagnostic concept.

[0068] A higher-level diagnostic concept refers to a generalized medical classification name that occupies the root node or a higher level in the hierarchical tree structure of a diagnostic knowledge graph. It represents a broader scope, coarser granularity, and is relatively safer and more conservative. For example, a higher-level diagnostic concept could include invasive breast cancer as a parent category of ductal carcinoma and lobular carcinoma, malignant tumors, fibroepithelial lesions as a generalized description of benign fibroadenomas and phyllodes tumors, and descriptions of broad classification ranges with indeterminate levels.

[0069] In some embodiments, the processor can obtain the superordinate diagnostic concept by inputting the identifier of the lower-level diagnostic concept node that is determined to be high-risk and has not passed the threshold when executing the degradation control flow, querying and traversing the directed graph structure of the diagnostic knowledge graph, backtracking upwards along the parent concept pointer path, and extracting the name string of the first-level or multi-level common parent node directly connected to it.

[0070] S5: Based on the calibrated set of diagnostic facts, use constrained compilation logic to perform compliance assembly, generate risk-controlled pathology auxiliary reports, and complete the pathology report generation.

[0071] A pathology auxiliary report refers to a standardized and risk-controlled medical document that the system ultimately outputs to clinicians or the medical system after all verification and compilation processes. For example, a pathology auxiliary report may include a core diagnostic paragraph consisting of calibrated diagnostic conclusions, differential diagnostic descriptions generated by degradation controls, compliance recommendations triggered by auxiliary examination status, and a structured report file or plain text display page that clearly indicates uncertainties and includes traceable audit trail data for each conclusion.

[0072] In some embodiments, the processor can receive the calibrated set of diagnostic facts and compliant inspection recommendations output by the preprocessing by calling the constrained compilation logic module, perform text splicing and formatting according to the preset report template style, and prohibit the insertion of any new conclusion fragments not in the set of diagnostic facts, and finally generate an electronic document file to obtain a pathology auxiliary report.

[0073] In some embodiments, the processor can extract calibrated answers, downgraded permissible superordinate concepts, and further examination suggestions triggered by diagnostic uncertainty from a calibrated set of diagnostic facts. Based on the superordinate concepts and further examination suggestions, the processor uses constrained compilation logic to perform compliance assembly under the premise of prohibiting the introduction of new uncalibrated medical facts, and associates the corresponding non-conformal scores and tool identifiers to form an audit trail, generating a pathology auxiliary report with an audit trail and controlled risks, thus completing the pathology report generation.

[0074] The term "superior concept" is synonymous with "superior diagnostic concept." A superior concept refers to a medical concept name that is at a higher level and has a broader scope within the diagnostic knowledge graph. For example, a superior concept may include highly generalized categories such as malignant epithelial tumors and invasive carcinomas.

[0075] In some embodiments, the processor can obtain the superordinate concept by querying the attributes of the parent node based on the subordinate node in the knowledge graph and extracting the corresponding name text.

[0076] Further investigation suggestions refer to structured text prompts triggered by the system when it determines that the current diagnosis faces uncertainty or lacks supporting evidence for decision-making, and are used to guide the next clinical actions. For example, further investigation suggestions may include diagnostic clarification suggestions triggered to differentiate between microinvasive and carcinoma in situ, such as suggesting additional immunohistochemical myoepithelial markers, or treatment or prognostic decision support suggestions triggered when the diagnosis has been established but molecular target data is lacking, such as suggesting HER2 testing. However, such suggestions are strictly prohibited from containing conjecture about the test results.

[0077] In some embodiments, the processor can receive the uncertainty flag or differential diagnosis set status output by the calibration process, and combine it with the read patient context information, such as the lack of previous ER / PR examination records, to call the rule engine to match the preset suggestion triggering logic rule set in the knowledge graph, extract the examination suggestion text string that meets the conditions, and thus obtain further examination suggestions.

[0078] An audit trail is a data log used to record the parameter status, data source, and decision-making logic steps in the process of generating each medical output conclusion in a pathology auxiliary report, so as to facilitate the tracing and interpretation of system behavior. For example, an audit trail may include standardized clinical problem identifiers associated with specific output statements, the specific version number of the tool invoked, the calculated nonconformal score value, the calibration threshold parameters used, the source record of the local calibration sample set, the evidence gating status, and the specific action code ultimately executed by the system, such as "retain" or "degrade".

[0079] In some embodiments, the processor can embed points in various modules of the entire report generation process, such as tool access, local calibration, degradation control, and compilation output, and call the logging system to capture and serialize relevant method input parameters, operation variable values, and control flow branch results in real time, and map and associate them with the final output sentence through a unique tracking ID to store them in the database, thereby obtaining the audit trail.

Claims

1. A method for generating pathology reports based on diagnostic knowledge graphs and local conformal prediction, characterized in that, include: S1: Based on the pathological images to be processed and available auxiliary data, the candidate report free text is transformed into multiple standardized clinical questions using the mapping logic of the diagnostic knowledge graph; S2: Based on standardized clinical questions, feature processing and matching are performed using accessed heterogeneous medical prediction tools to obtain the corresponding candidate answer set and initial non-conformal score; S3: Based on the initial nonconformal score, a local conformal prediction strategy is used to extract a local validation benchmark in the calibration sample set, and a global backoff algorithm is executed when the sample is insufficient to calculate the adaptive risk control threshold. S4: Based on the hierarchical structure of adaptive risk control threshold and diagnostic knowledge graph, a recursive degradation algorithm is used to verify the candidate answer set and backtrack to the next level to obtain the calibrated diagnostic fact set; S5: Based on the calibrated set of diagnostic facts, use constrained compilation logic to perform compliance assembly, generate risk-controlled pathology auxiliary reports, and complete the pathology report generation.

2. The pathology report generation method based on diagnostic knowledge graph and local conformal prediction according to claim 1, characterized in that, S1 includes: Based on the pathological images to be processed and available auxiliary data, candidate report free text is extracted and parsed into medical semantic objects; By leveraging the mapping logic of the diagnostic knowledge graph, the pre-defined evidence premises, answer space, and conceptual hierarchy relationships within the diagnostic knowledge graph are queried, transforming medical semantic objects into multiple standardized clinical questions that include question identifiers, question types, and evidence requirements.

3. The pathology report generation method based on diagnostic knowledge graph and local conformal prediction according to claim 1, characterized in that, S2 includes: Based on standardized clinical questions, the required heterogeneous medical prediction tools are called through a unified interface. For questions that require image evidence, multidimensional similarity aggregation is performed using versioned standardized answer templates and pathological images to be processed to complete feature processing and matching. The original output of the tools is standardized to obtain the corresponding candidate answer set and initial nonconformal score.

4. The pathology report generation method based on diagnostic knowledge graph and local conformal prediction according to claim 3, characterized in that, The expression for the initial nonconformal score is: ; ; in, This represents the initial nonconformal score calculated for a specific question and answer. This represents the image evidence score obtained from multidimensional similarity aggregation. This indicates the pathological image to be processed received based on the input interface. This represents standardized clinical questions derived from knowledge graphs. This represents the candidate answers output by the heterogeneous medicine prediction tool. This indicates the index number of the standardized answer template. This operator represents an operator that performs a multidimensional arithmetic mean aggregation operation along multiple template index dimensions. This function calculates the cosine of the angle between two vectors. This represents the image embedding feature vector obtained by feature extraction from the pathological image to be processed based on a pre-trained visual coding model. This represents the text embedding feature vector obtained by encoding a text string based on a pre-trained text encoding model. This refers to a standardized answer template text obtained by matching a knowledge graph with a standardized clinical question database, which corresponds to a specific question, candidate answer, and index number.

5. The pathology report generation method based on diagnostic knowledge graph and local conformal prediction according to claim 1, characterized in that, S3 includes: Based on the initial nonconformal score, the embedding spatial distance between the image features of the pathological image to be processed and the images of each sample in the calibration sample set is calculated. A local conformal prediction strategy was used to select samples with the closest embedding spatial distance and belonging to the same standardized clinical problem to form a local calibration sample set to extract local validation benchmarks. When the number of valid samples in the local calibration sample set is lower than a preset threshold and is determined to be insufficient, a global rollback algorithm is executed to return to the global calibration set or a higher-level concept, and an adaptive risk control threshold is obtained through statistical calculation.

6. The pathology report generation method based on diagnostic knowledge graph and local conformal prediction according to claim 1, characterized in that, S4 includes: Based on the adaptive risk control threshold and the hierarchical structure of the diagnostic knowledge graph, it is determined whether the lower-level diagnostic concepts in the candidate answer set meet the adaptive risk control threshold. If not, a recursive degradation algorithm is used to backtrack along the diagnostic knowledge graph to the corresponding higher-level diagnostic concept. The higher-level diagnostic concept is used to re-verify until the threshold is met. In addition, the conclusions lacking auxiliary data support are eliminated and verified in combination with the evidence premise of the diagnostic knowledge graph, so as to obtain the calibrated set of diagnostic facts.

7. The pathology report generation method based on diagnostic knowledge graph and local conformal prediction according to claim 1, characterized in that, S5 includes: Based on the calibrated set of diagnostic facts, extract the calibrated answers, the superordinate concepts that allow for downgrading, and the suggestions for further examination triggered by diagnostic uncertainty. Based on higher-level concepts and further inspection recommendations, and utilizing constrained compilation logic, compliance assembly is performed under the premise of prohibiting the introduction of uncalibrated new medical facts. Corresponding non-conformal scores and tool identifiers are linked to form an audit trail, generating a pathology auxiliary report with an audit trail and controlled risks, thus completing the pathology report generation.