A hypergraph-based discharge summary generation system

By using a hypergraph-based discharge summary generation system, the problem of low accuracy in discharge summary generation is solved through structured segmentation and dynamic hyperedge construction. This system achieves a full understanding and mining of semantic relationships and content affinity relationships within the text, thereby improving the quality of the generated discharge summaries.

CN121565357BActive Publication Date: 2026-04-17CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-01-20
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy in generating discharge summaries. In particular, graph-based methods suffer from scarce sentence-level labeled samples and extremely uneven distribution of saliency labels, resulting in insufficient supervision signals and limited neighborhood information, making it difficult to achieve ideal training results. At the same time, noise issues in large-scale clinical graphs affect computational and storage efficiency.

Method used

A discharge summary generation system based on hypergraphs is adopted. By structurally segmenting hospital-related texts into multiple text units, constructing a hierarchical hypergraph and generating dynamic hyperedges for it, performing joint reasoning and feature extraction, and generating discharge summaries.

Benefits of technology

It improves the accuracy of discharge summary generation, achieves a full understanding and mining of the semantic content within the text, overcomes the limitations of independent and difficult-to-connect text content, and enhances the quality of the generated discharge summaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121565357B_ABST
    Figure CN121565357B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of discharge summary, and provides a discharge summary generation system based on a hypergraph, which comprises the following modules: a segmentation module, which is used for acquiring inpatient related texts of a target patient, and performing structural segmentation on the inpatient related texts to obtain a plurality of text units; a construction module, which is used for constructing a hierarchical hypergraph based on all the text units; a construction module, which is used for constructing dynamic hyperedges for the hierarchical hypergraph to obtain an updated hierarchical hypergraph; a feature extraction module, which is used for performing joint reasoning and feature extraction on the updated hierarchical hypergraph to obtain final selection probabilities of each sentence; and a generation module, which is used for generating a discharge summary of the target patient according to the final selection probabilities of all the sentences. The method can improve the precision of generating the discharge summary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of discharge summary technology, and in particular to a discharge summary generation system based on hypergraph. Background Technology

[0002] The traditional process of writing Electronic Health Records (EHRs) is not only time-consuming and costly, but also carries a high risk of errors and information loss. This process involves the comprehensive summarization and compilation of multiple key aspects, from admission history and physical examination records, integration of laboratory test results, description of diagnosis, treatment and surgical procedures, tracking of disease progression, to discharge assessment. The discharge summary, as an indispensable core document in the EHR, requires clinicians to invest significant time in manual compilation and writing. Furthermore, different individuals' experiences and writing habits can introduce inconsistencies in style and information bias. If key evidence is missing or improperly expressed in the discharge summary due to human error, it can affect subsequent medical decisions and patient safety, and also make it difficult to transform previous records into high-quality structured knowledge. To alleviate this heavy burden, the automatic generation of discharge summaries is a wise choice. This strategy not only has the potential to significantly shorten document writing time and reduce labor costs, but also improve document consistency and traceability, maximizing the value of the massive clinical data within the EHR.

[0003] In recent years, artificial intelligence has demonstrated tremendous potential in the field of medical text processing. Pre-trained language models (PLMs) have brought significant progress to clinical and biomedical text summarization. However, these methods mainly operate on one-dimensional linear word sequences, often requiring the segmentation of long documents into blocks. This weakens their ability to model long-range dependencies across chapters and paragraphs, making it difficult to organically connect assessment and diagnosis with evidence and routine medical procedures as naturally as clinicians can. Furthermore, PLMs lack relation-oriented inductive bias, making it difficult to structurally integrate topological evidence distributed across different chapters and discourse units. They often overemphasize locally high-frequency content with limited clinical value, exhibiting black-box characteristics in terms of evidence tracing and interpretability. In contrast, graph structure methods provide a feasible path with explicit structural constraints for the above problems: using text units such as words, sentences, and chapters as nodes, and characterizing the semantic, discourse, causal, referential, and entity co-occurrence relationships between them as edges, the graph can effectively aggregate information across levels and chapters by using message passing and multi-hop reasoning, and improve the interpretability and auditability of the generated summary through inspectable paths.

[0004] However, current graph methods for automatic generation of discharge summaries still have some limitations. For example, sentence-level labeled samples are scarce, and the distribution of saliency labels is extremely uneven, resulting in insufficient supervision signals. When constructing graphs at the word or sentence level, the neighborhood information is limited, leading to incomplete information capture and difficulty in achieving ideal training results. To address these issues, more and more researchers are trying to introduce external medical knowledge or construct global graphs across documents / across patient information to enhance model capabilities and improve the performance of downstream summarization tasks. However, as the scale of EHRs continues to grow, the types of units and relationships in documents will continue to increase, and the heterogeneity of graphs will become increasingly significant. This poses new challenges to how to effectively embed representations and share parameters for different relationship types. In addition, although large-scale clinical graphs are rich in information, node representations are often degraded due to noise. Passing the entire graph into the model will significantly increase the computational and storage burden, affecting training and inference efficiency.

[0005] Some researchers have attempted to use subgraphs or candidate fragments to accurately focus on key information for graph embedding learning and selective summarization. However, the construction of subgraphs currently relies heavily on fixed chapter boundaries, heuristic paths, or prior topological structures. Existing graph structures may not be reliable, explicit connections may not reflect true dependencies and causality, and not all relational paths provide important association information. Over-reliance may introduce noise.

[0006] This shows that there is currently a problem with the low accuracy of generated hospital summaries in the field. Summary of the Invention

[0007] This application provides a discharge summary generation system based on a hypergraph, which can solve the problem of low accuracy in the generated hospitalization summaries.

[0008] This application provides a discharge summary generation system based on a hypergraph, which includes:

[0009] The segmentation module is used to acquire hospitalization-related text of the target patient and perform structured segmentation of the hospitalization-related text to obtain multiple text units;

[0010] The building module is used to construct a hierarchical hypergraph based on all text units; multiple nodes in the hierarchical hypergraph correspond one-to-one with multiple text units, and the hyperedge between two nodes represents the semantic relationship between the two corresponding text units.

[0011] The construction module is used to construct dynamic hyperedges for the hierarchical hypergraph to obtain the updated hierarchical hypergraph; the dynamic hyperedge between two nodes is the content affinity relationship between the corresponding two text units;

[0012] The feature extraction module is used to perform joint inference and feature extraction on the updated hierarchical hypergraph to obtain the final selection probability of each sentence;

[0013] The generation module is used to generate a discharge summary for the target patient based on the final selection probability of all sentences.

[0014] Optionally, the text unit can be a word, sentence, or chapter;

[0015] The hospitalization-related text was structured and segmented into multiple text units, including:

[0016] Chapter recognition was performed on hospitalization-related texts, resulting in multiple chapters.

[0017] Sentence segmentation was performed on hospitalization-related text to obtain multiple sentences;

[0018] Lexicalization was performed on hospitalization-related texts to obtain multiple words.

[0019] Optionally, a hierarchical hypergraph can be constructed based on all text units, including:

[0020] Generate a corresponding node for each text unit;

[0021] For each word, iterate through each sentence and perform the following steps: If a word appears in a sentence, then there is a semantic relationship between the word and the sentence;

[0022] For each sentence, iterate through each chapter and perform the following steps: If a sentence appears in a chapter, then there is a semantic relationship between the sentence and the chapter;

[0023] A hierarchical hypergraph is obtained by generating a hyperedge between the two corresponding nodes based on each semantic relationship.

[0024] Optionally, dynamic hyperedges can be constructed for the hierarchical hypergraph to obtain an updated hierarchical hypergraph, including:

[0025] Calculate the content affinity value between every two text units;

[0026] For each pair of text units, if the content affinity value between the two text units is greater than a preset affinity threshold, then there is a content affinity relationship between the two text units.

[0027] Based on the affinity of all content, multiple dynamic hyperedges are generated for the hierarchical hypergraph, resulting in an updated hierarchical hypergraph.

[0028] Optionally, calculate the content affinity value between every two text units, including:

[0029] Through the formula:

[0030] ;

[0031] Calculate the first The text unit and the first Content affinity between text units ;

[0032] in, Indicates the first The current text representation of each text unit. Indicates the first The current text representation of each text unit. Indicates the fusion weight. This represents the Sigmoid activation function. For indicator functions, indicating the first The text unit and the first Does each text unit span multiple chapters? Then it means the first The text unit and the first Each text unit spans multiple chapters. Then it means the first The text unit and the first The text unit does not span multiple chapters. , , Indicates the number of text units.

[0033] Optionally, joint inference and feature extraction are performed on the updated hierarchical hypergraph to obtain the final selection probability for each sentence, including:

[0034] For each sentence, the sentence representation, chapter aggregation vector, and cross-chapter evidence embedding vector are calculated based on the updated hierarchical hypergraph. The final selection probability of the sentence is then calculated based on the sentence representation, chapter aggregation vector, and cross-chapter evidence embedding vector.

[0035] Optionally, the sentence representation, chapter aggregation vector, and cross-chapter evidence embedding vector are computed based on the updated hierarchical hypergraph, including:

[0036] Sentence encoding is performed on the sentence to obtain the sentence representation of the sentence;

[0037] Based on the updated hierarchical hypergraph, all adjacent nodes of the corresponding node of the chapter to which the sentence belongs are aggregated to obtain the chapter aggregation vector;

[0038] Calculate the cross-chapter evidence embedding vector of the sentence based on the updated hierarchical hypergraph.

[0039] Optionally, the final selection probability of a sentence is calculated based on its sentence representation, its chapter aggregation vector, and its cross-chapter evidence embedding vector, including:

[0040] Through the formula:

[0041] ;

[0042] ;

[0043] ;

[0044] Calculate the first The final selection probability of each sentence ;

[0045] in, Indicates the first The final representation of each sentence, Indicates the first The sentence representation of a sentence. Indicates the first The aggregate vector of the chapter to which each sentence belongs. Indicates the first Cross-chapter evidence embedding vectors for each sentence, , Indicates the number of sentences. Indicates the selection of a numeric class. Representation layer normalization, Indicates nonlinear activation. Indicates standardization, This represents a multilayer perceptron. , The classifier projection matrix, Indicates the bias term. This represents the Sigmoid activation function.

[0046] Optionally, a discharge summary for the target patient is generated based on the final selection probability of all sentences, including:

[0047] Sort the final selection probabilities of all sentences and select the sentences with the highest selection probabilities in the sorting results as the summary sentences.

[0048] All sentences are combined into a single text to obtain the discharge summary for the target patient.

[0049] The above-mentioned solution in this application has the following beneficial effects:

[0050] In the embodiments of this application, hospitalization-related text of the target patient is obtained and structurally segmented to obtain multiple text units. Then, a hierarchical hypergraph is constructed based on all text units, and dynamic hyperedges are constructed for the hierarchical hypergraph to obtain an updated hierarchical hypergraph. Joint inference and feature extraction are then performed on the updated hierarchical hypergraph to obtain the final selection probability of each sentence. Finally, a discharge summary of the target patient is generated based on the final selection probabilities of all sentences. Specifically, structurally segmenting the hospitalization-related text into multiple text units enables fine-grained analysis of the text. Constructing a hierarchical hypergraph and building dynamic hyperedges for it allows for the description of semantic relationships and content affinity between text units. Generating a discharge summary based on the updated hierarchical hypergraph considers semantic relationships and content affinity within the text, achieving a full understanding and mining of the semantic content within the text. This overcomes the limitations of independent and difficult-to-connect text content, improving the accuracy of the generated discharge summary.

[0051] Other beneficial effects of this application will be described in detail in the following detailed description section. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 A schematic diagram of the structure of a discharge summary generation system based on a hypergraph provided in an embodiment of this application;

[0054] Figure 2 A flowchart illustrating a method for generating discharge summaries based on a hypergraph, as provided in an embodiment of this application;

[0055] Figure 3 This is a schematic diagram of dynamic hyperedge generation provided in an embodiment of this application. Detailed Implementation

[0056] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0057] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0058] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0059] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0060] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0061] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0062] To address the low accuracy of existing generated hospitalization summaries, this application provides a discharge summary generation system based on a hypergraph. The system acquires hospitalization-related text for the target patient and performs structured segmentation to obtain multiple text units. A hierarchical hypergraph is then constructed based on all text units, and dynamic hyperedges are added to the updated hypergraph. Joint inference and feature extraction are then performed on the updated hypergraph to obtain the final selection probability of each sentence. Finally, the discharge summary for the target patient is generated based on the final selection probabilities of all sentences. Specifically, the structured segmentation of hospitalization-related text into multiple text units allows for fine-grained analysis. The construction of the hierarchical hypergraph and the addition of dynamic hyperedges describes the semantic and content affinity relationships between text units. The generation of the discharge summary based on the updated hierarchical hypergraph considers these semantic and content affinity relationships, achieving a full understanding and mining of the semantic content within the text. This overcomes the limitations of independent and interconnected text content, improving the accuracy of the generated discharge summary.

[0063] The following is an illustrative example of the discharge summary generation system based on hypergraph provided in this application.

[0064] like Figure 1 As shown, the discharge summary generation system based on hypergraph provided in this application includes:

[0065] The segmentation module 101 is used to acquire hospitalization-related text of the target patient and perform structured segmentation on the hospitalization-related text to obtain multiple text units;

[0066] Module 102 is used to construct a hierarchical hypergraph based on all text units; multiple nodes in the hierarchical hypergraph correspond one-to-one with multiple text units, and the hyperedge between two nodes represents the semantic relationship between the two corresponding text units;

[0067] Module 103 is used to construct dynamic hyperedges for the hierarchical hypergraph to obtain the updated hierarchical hypergraph; the dynamic hyperedge between two nodes is the content affinity relationship between the corresponding two text units.

[0068] The feature extraction module 104 is used to perform joint inference and feature extraction on the updated hierarchical hypergraph to obtain the final selection probability of each sentence;

[0069] The generation module 105 is used to generate a discharge summary for the target patient based on the final selection probability of all sentences.

[0070] The discharge summary generation system of this application is used to perform, for example... Figure 2 The method for generating discharge summaries based on hypergraphs, as shown, includes the following steps:

[0071] Step 21: Obtain the hospitalization-related text of the target patient and perform structured segmentation on the hospitalization-related text to obtain multiple text units.

[0072] The target patients mentioned above are those for whom discharge summaries need to be generated. The hospitalization-related texts include the target patients' medication records, medical records, and other texts during their hospitalization. The text units are words, sentences, or chapters.

[0073] Specifically, the hospital-related text is subjected to chapter recognition to obtain multiple chapters, the hospital-related text is subjected to sentence segmentation to obtain multiple sentences, and the hospital-related text is subjected to lexicalization to obtain multiple words.

[0074] For example, a Support Vector Machine (SVM) can be used to perform chapter recognition, sentence segmentation, and lexicalization on hospitalization-related texts to obtain multiple text units.

[0075] It should be noted that before performing structured segmentation, preprocessing such as chapter boundary recognition and standardized mapping can be performed on hospital-related texts, chapter title normalization can be performed, chapter sets can be constructed, a mapping table from original titles to standard chapter names can be established, and chapter order indexes can be retained to facilitate cross-chapter relationship modeling.

[0076] Step 22: Construct a hierarchical hypergraph based on all text units.

[0077] In a hierarchical hypergraph, multiple nodes correspond one-to-one with multiple text units, and the hyperedge between two nodes represents the semantic relationship between the two corresponding text units.

[0078] In some embodiments of this application, the steps of constructing a hierarchical hypergraph based on all text units include:

[0079] The first step is to generate a corresponding node for each text unit.

[0080] It should be noted that the nodes are divided into three levels, corresponding to words, sentences, and chapters respectively. That is, the nodes corresponding to words are at the word level, the nodes corresponding to sentences are at the sentence level, and the nodes corresponding to chapters are at the chapter level.

[0081] The second step involves iterating through each sentence for each word, performing the following steps: if a word appears in a sentence, then there is a semantic relationship between the word and the sentence.

[0082] For example, if a word does not appear in a sentence, then there is no semantic relationship between the word and the sentence.

[0083] The third step involves iterating through each chapter for each sentence, performing the following steps: if a sentence appears in a chapter, then there is a semantic relationship between the sentence and the chapter.

[0084] For example, if a sentence does not appear in a chapter, then there is no semantic relationship between the sentence and the chapter.

[0085] The fourth step is to generate a hyperedge between the two corresponding nodes based on each semantic relationship, thus obtaining a hierarchical hypergraph.

[0086] Specifically, if there is a semantic relationship between the text units corresponding to two nodes, a hyperedge is generated between these two nodes.

[0087] For example, after constructing the hierarchical hypergraph, the initial edge features can be calculated, expressed as:

[0088] ;

[0089] in, For words Corresponding nodes and sentences Initial characteristics of the hyperedges between corresponding nodes. For words In the sentence word frequency in Represents a collection of corpus documents. Words The number of documents that have appeared in the corpus document collection. This indicates the number of documents in the corpus document collection.

[0090] The node representation of each node is calculated using an attention mechanism:

[0091] ;

[0092] ;

[0093] in, This represents the unnormalized attention score. For attention parameter vectors, A learnable projection matrix, applied to sentences / words or multiple heads. linear mapping, For nodes The set of neighboring nodes, Represents a node The current representation vector, Represents a node The current representation vector, This represents the node representation after the residual update. Represent the initial characteristics of the edges (i.e., those mentioned above) ), This represents the attention weights after Softmax normalization. Represents a node With nodes The unnormalized attention scores between them Represents a node With nodes The unnormalized attention scores between them This represents the intermediate vector after aggregation. For the number of heads to focus on, Indicates the first Attention on the target node When aggregating neighbor information, it is assigned to neighbor nodes. Normalized attention weights It is a feedforward network.

[0094] Step 23: Construct dynamic hyperedges for the hierarchical hypergraph to obtain the updated hierarchical hypergraph.

[0095] The dynamic hyperedge between two nodes represents the content affinity between the two corresponding text units.

[0096] In some embodiments of this application, the steps described above for constructing dynamic hyperedges in a hierarchical hypergraph to obtain an updated hierarchical hypergraph include:

[0097] The first step is to calculate the content affinity value between every two text units.

[0098] Specifically, through the formula:

[0099] ;

[0100] Calculate the first The text unit and the first Content affinity between text units .

[0101] in, Indicates the first The current text representation of each text unit. Indicates the first The current text representation of each text unit. Indicates the fusion weight. This represents the Sigmoid activation function. For indicator functions, indicating the first The text unit and the first Does each text unit span multiple chapters? Then it means the first The text unit and the first Each text unit spans multiple chapters. Then it means the first The text unit and the first The text unit does not span multiple chapters. , , Indicates the number of text units.

[0102] For example, the above current text represents It can be the node representation updated from the residuals calculated using the formula above. .

[0103] The second step is to consider each pair of text units separately. If the content affinity value between the two text units is greater than the preset affinity threshold, then there is a content affinity relationship between the two text units.

[0104] For example, if the content affinity value between two text units is less than or equal to a preset affinity value threshold, then there is no content affinity relationship between the two text units.

[0105] The third step is to generate multiple dynamic hyperedges for the hierarchical hypergraph based on the affinity of all content, thus obtaining the updated hierarchical hypergraph.

[0106] Specifically, if there is a content affinity between two text units, a dynamic hyperedge is generated between the corresponding two nodes.

[0107] For example, the process of generating dynamic hyperedges is as follows: Figure 3 As shown, Figure 3 'a' represents affinity matching, where circles represent the nodes corresponding to text units (chapters, sentences, excerpts). Figure 3 b represents the construction of cross-chapter hyperedges, specifically, the generation of hyperedges based on affinity relationships. Figure 3 c is to form a cross-chapter hypergraph, that is, to generate hyperedges between nodes belonging to different chapters to form a hypergraph.

[0108] Step 24: Perform joint inference and feature extraction on the updated hierarchical hypergraph to obtain the final selection probability of each sentence.

[0109] In some embodiments of this application, the steps described above for performing joint inference and feature extraction on the updated hierarchical hypergraph to obtain the final selection probability of each sentence include:

[0110] For each sentence, the sentence representation, chapter aggregation vector, and cross-chapter evidence embedding vector are calculated based on the updated hierarchical hypergraph. The final selection probability of the sentence is then calculated based on the sentence representation, chapter aggregation vector, and cross-chapter evidence embedding vector.

[0111] The final selection probability mentioned above describes the probability that the corresponding sentence is selected. The larger the value of the final feature representation, the greater the probability that the sentence is selected.

[0112] Specifically, the sentence is encoded intra-sentencely to obtain its sentence representation; all adjacent nodes of the corresponding node in the chapter to which the sentence belongs are aggregated in the updated hierarchical hypergraph to obtain the chapter aggregation vector; and the cross-chapter evidence embedding vector of the sentence is calculated based on the updated hierarchical hypergraph.

[0113] Through the formula:

[0114] ;

[0115] ;

[0116] ;

[0117] Calculate the first The final selection probability of each sentence ;

[0118] in, Indicates the first The final representation of each sentence, Indicates the first The sentence representation of a sentence. Indicates the first The aggregate vector of the chapter to which each sentence belongs. Indicates the first Cross-chapter evidence embedding vectors for each sentence, , Indicates the number of sentences. Indicates the selection of a numeric class. Representation layer normalization, Indicates nonlinear activation. Indicates standardization, This represents a multilayer perceptron. , The classifier projection matrix, Indicates the bias term. Let represent the Sigmoid activation function. First, calculate the ... The final representation of each sentence ,by As input, the numerical values ​​of the selected class pairs are obtained through the classification head. Then, the probability of selecting the sentence is obtained by applying the Sigmoid function. .

[0119] It should be noted that a minimum long short-term memory (minLSTM) network can be used to encode the sentence intra-sentence to obtain the sentence representation. The aggregated intermediate vector calculated in step 21 can then be used. The formula calculates the chapter aggregation vector, that is, it uses the node corresponding to the chapter to which the sentence belongs as the node in the formula. Calculated This is the aggregate vector of the chapter.

[0120] The expression for calculating the cross-chapter evidence embedding vector is:

[0121] ;

[0122] in, This represents a cross-chapter evidence embedding vector. Indicates an indicator function, Indicates the first Does each sentence belong to a cluster? , This indicates the number of superedges.

[0123] To avoid large clusters and high-height nodes dominating, a normalization coefficient is defined:

[0124] ;

[0125] in, For clusters The number of sentences, For sentence Number of participating clusters, For hyperparameters. Only cross-chapter hyperedges are subjected to typed random zeroing and gated scaling during training to form effective associations:

[0126] ,like = 1, otherwise = 1, ;

[0127] ;

[0128] in, To retain instructions, To set the rate to zero for cross-chapter training, For learnable gating, For adjustable scaling. This formula indicates that only cross-chapter hyperedges are subject to typed random zeroing during training to enhance robustness: for each hyperedge e, when its type is labeled as cross-chapter (… When the parameter is Sampling mask variables from the Bernoulli distribution yields... ,like = 0 indicates that the cross-chapter hyperedge is completely hidden in the current training step and does not participate in subsequent propagation; if = 1 indicates that the hyperedge is preserved. For intra-chapter hyperedges ( 0), constant let = 1 to avoid being randomly set to zero. Construct a vector from the masks of all hyperedges. Construct a diagonal matrix The effective correlation matrix is ​​obtained by multiplying it with the original sentence-cluster correlation matrix H. The entire row corresponding to the cross-chapter super-edge that is set to zero is multiplied by 0, thus in The middle edge fails, while the remaining superedges remain unchanged. Intra-cluster attention is aggregated and type biases are injected:

[0129] ;

[0130] Return to the original sentence and perform degree normalization aggregation:

[0131] ;

[0132] in, For intra-cluster query vectors, For learnable projection matrices, For cluster attention, For clusters Summary of characteristics For type embedding, Cluster characterization after injection type, For sentence-cluster attention, This represents the sentence after the reflow update.

[0133] For example, before performing this step, the parameters of the formula in this step can be trained first. Specifically, select hospitalization-related texts from multiple sample patients as training data, combine cross-entropy and probability mass concentration terms, and use cross-chapter hyperedge annealing to stabilize training and improve the ability to focus on clinically significant sentences. Define cross-entropy:

[0134] ;

[0135] Among them, The number of documents in the batch, i.e., the set of text used as training data. For the first Number of sentences per document It is a sentence-level gold standard. Let be the final selection probability of the sentence. Let's define the binary cross-entropy. Define the distribution-based loss (only positive classes participate, weighted across chapters):

[0136] ;

[0137] in, For smoothing exponent, For cross-chapter identification, For type weights, and The final loss was:

[0138] ;

[0139] in, The loss weights are determined by the linear annealing process (training steps) to prevent early over-reliance on cross-chapter hyperedges with potential noise. ):

[0140] ;

[0141] ;

[0142] in, To scale the start and end values ​​across chapters, The start and end values ​​for the zeroing rate. This is the number of annealing steps. Fixed during the verification / testing phase. .

[0143] Step 25: Generate a discharge summary for the target patient based on the final selection probability of all sentences.

[0144] The above discharge summary provides an overview of the relevant documents related to hospitalization.

[0145] Specifically, the final selection probabilities of all sentences are sorted, and the sentences with the highest selection probabilities in the sorting results are selected as summary sentences; all summary sentences are integrated into a single text to obtain the discharge summary for the target patient.

[0146] For example, the probability count of the top choices is a preset value, and then... Sort and select the first under length and structural constraints Sentence generation discharge summary:

[0147] ;

[0148] in, For the final set of sentence indexes, Set the target number of output sentences (defined by the length constraint). n-gram blocking can be used to reduce redundancy; simultaneously, backtrack the cross-chapter hyperedges associated with the selected sentences. Together with its member sentences, they form an evidence path that is "perceptible to chapters".

[0149] It is worth mentioning that by structurally segmenting hospital-related texts into multiple text units, fine-grained analysis of these texts can be performed. Constructing a hierarchical hypergraph and dynamically generating hyperedges for it allows for the description of semantic and content affinity relationships between text units. Based on the updated hierarchical hypergraph, a discharge summary is generated, taking into account the semantic and content affinity relationships within the text. This enables a full understanding and mining of the semantic content within the text, overcoming the limitations of independent and interconnected text content and improving the accuracy of the generated discharge summary.

[0150] The method of this application will be illustrated below with a specific example.

[0151] This embodiment conducts discharge summary generation experiments on two types of publicly available de-identified clinical data: (1) Shared task Discharge Me dataset (from the publicly available MIMIC-IV-Note dataset and the publicly available MIMIC-IV-ED dataset), strictly following the official division and evaluation procedures, first generating the inpatient brief course of medical records (BHC), and then generating the discharge guide (DI) under the condition that BHC is available. The evaluation indicators include the longest common subsequence recall-guided summary evaluation indicator ROUGE-L, the BERT-based scoring indicator BERTScore, the alignment scoring indicator AlignScore, and the medical consistency scoring indicator MEDCON; (2) MIMIC-IV-Ext-BHC (from MIMIC-IV-Note), with the input being the inpatient text after removing BHC and the target being a pair of cleaned and standardized BHCs, supervised training and validation are performed. The evaluation indicators include ROUGE-L, BERTScore, BLEU-1, and BLEU-2. To ensure fairness and comparability, all datasets have been designed to strictly mask the target section on the input side during both training and inference phases. Furthermore, this embodiment selects several inpatient visit examples for system-level testing and validation: A complete inpatient record (with the target section masked) is input into the model, and the system automatically generates a discharge summary. The results are shown in Table 1 below.

[0152] Table 1. Discharge summary generation results of MIMIC-IV-Ext-BHC data

[0153]

[0154] The above translation of the discharge summary is as follows: Abdominal pain: The patient presented to the emergency department of ___ due to severe abdominal pain, predominantly in the right upper quadrant and suprapubic region. The pain began approximately 5 weeks prior (after returning from a trip to ___). Nausea was present, but no vomiting. During a previous hospitalization with similar symptoms, abdominal / pelvic imaging and magnetic resonance cholangiopancreatography (MRCP) were performed, but no acute lesions were found. The patient was advised to return to the gastroenterology department this week, but the pain worsened, leading to a second visit to the emergency department. The patient expressed concern because the nature of the pain was similar to that during a previous hospitalization in ___—when diagnosed with Caroli Syndrome and underwent partial hepatectomy. Laboratory tests upon admission showed mild liver function abnormalities: alanine aminotransferase (ALT) 147 U / L and alkaline phosphatase (ALP) 114 U / L, levels of which had not recurred since the previous visit to ___. The patient has been taking ibuprofen (400mg twice daily) for chronic neck pain for an unknown period. Due to suspected peptic ulcer disease (PUD), the patient has been instructed to discontinue nonsteroidal anti-inflammatory drugs (NSAIDs) and switch to acetaminophen for pain relief. Proton pump inhibitor (PPI) treatment continues. The patient has gradually transitioned to a full diet without discomfort and is scheduled for an outpatient gastroscopy (EGD) this week, with a follow-up appointment with their primary care physician (PCP) on [date missing].

[0155] The above-mentioned discharge summary is translated as follows: A female, aged ___, with a history of ___ syndrome, underwent cholecystectomy and left hepatectomy in ___. She presented this time due to worsening chronic abdominal pain. The patient was scheduled to return to the gastroenterology department later this week, but her abdominal pain worsened, leading to her evaluation in the emergency department. The patient was in good health approximately 5 weeks ago before returning from a trip to ___. After returning, she began experiencing progressive pain in the right upper quadrant and upper abdomen. You were previously hospitalized for abdominal pain; we believe you need to undergo upper gastrointestinal endoscopy to further determine the cause of the pain. Please continue taking omeprazole at home. Medical history information is from the patient herself. The patient was recently hospitalized in ___ with similar symptoms, at which time a computed tomography (CT) scan and magnetic resonance cholangiopancreatography (MRCP) were performed, both of which showed no abnormalities.

[0156] To comprehensively study the performance of the system proposed in this application, this invention introduces some other existing advanced methods, and compares the performance of these methods with that of the method proposed in this invention in the following experiments.

[0157] MLBMIKABR proposes a concept-driven two-stage generation method. By segmenting the Discharge and Radiology source documents according to rules, identifying and labeling concepts in the target text, and describing pairs, a refined summary is first generated for each segment. Then, the LLM is fine-tuned to predict concepts and generate paragraphs according to concepts. In the automatic generation task of discharge summary, the generation is driven by structured topics, which improves the coverage and controllability of key points.

[0158] IgnitionInnovators proposes a fine-tuning framework for instructions based on Chain Thinking (CoT). Through a three-level process of key chapter extraction, image report selection, and target section generation, combined with Mistral-7B and CoT question templates, it explicitly constrains the output structure of discharge summaries and guides the reasoning process, improving structural correctness and factual consistency, especially in the organization and narrative coherence of clinical key points.

[0159] Roux-lette proposes a question-based zero-shot retrieval enhancement model. Through question-and-answer templates designed by clinical experts, output letter templates, and controllable context selection (such as medication, diagnosis, etc.), it drives LLM to answer key questions in discharge summaries using only patient-related context, avoiding information leakage and illusions in the target paragraph. It requires no fine-tuning and can be deployed locally, adapting to clinical safety and compliance scenarios.

[0160] UoG Siephers proposed a seq2seq generation scheme that compares segmentation and encoding strategies. By evaluating input construction methods such as present medical history only, images only, multi-segment text concatenation, and encoding followed by concatenation, and combining models such as T5, BERT / roBERTa-GPT2, and Llama3, it was found that models trained with single segments are more robust in generating discharge summaries, while simply concatenating multiple segments is not necessarily better than carefully selecting single segments, suggesting that appropriate information selection takes precedence over stacking more information.

[0161] UF-HOBI proposes a two-stage retrieval-generation hybrid approach. It uses GatorTron to perform concept-level named entity extraction and input reconstruction on selected segments (such as current medical history, test results, medication, etc.), and then uses GatorTronGPT for P-tuning to generate a discharge summary. This approach reduces attentional distractions caused by long inputs and focuses on key entities and event chains.

[0162] QUB-Cirdan proposes a lightweight solution for word count retrieval based on retrieval enhancement. It utilizes quantized Llama3-8B to run on T4 resources, predicts the word count of the target paragraph through paragraph segmentation and similar case retrieval, and generates discharge summaries with structured templates and target word count constraints.

[0163] Shimo Lab proposed a prompt-driven LoRA fine-tuning method for paragraph splicing. First, it uses regular expressions and priority strategies to extract and clean key paragraphs (present medical history, laboratory tests, medications, etc.). Then, it adds explanatory prompts before each paragraph and... <sep>The connection forms the input, and LoRA fine-tuning and generation are performed on BHC and DI respectively.

[0164] Longformer employs a sparse attention-based long document Transformer, which can directly incorporate long records from admission to discharge for discharge summary generation, serving as a strong baseline to cover long contexts. However, it is limited in terms of semantic consistency and knowledge alignment due to the lack of structured retrieval.

[0165] BioBART, a BART pre-trained on a biomedical corpus, is used for abstract clinical summaries. It is robust in terms of word alignment and paragraph style, but is sensitive to verbose and noisy contexts and is prone to coverage imbalance.

[0166] T5-Large is a general seq2seq baseline, and it has good adaptability for automatic generation of discharge summaries. However, it is inferior to structural enhancement methods in terms of redundancy compression and factual consistency when domain constraints are lacking.

[0167] Flan-T5 is a fine-tuned version of T5 that can quickly adapt to the format and tone of discharge summaries with a small number of sample prompts, improving format compliance and readability. However, it is still limited in its ability to align long contexts and cross-paragraph facts.

[0168] BioGPT is a generative biomedical model that excels at generating medical terminology and expressing clinical terms, making it suitable for patient-oriented narratives in diagnostic dy (DI). However, it requires retrieval enhancement to ensure factual consistency and structural coverage.

[0169] Gemma3-Instruct (1B) is a small-parameter instruction model that is resource-friendly and has high throughput. As a lightweight discharge summary generation model, it has good scalability and is suitable for edge computing power or private deployment within the hospital.

[0170] Mistral-7B-Instruct is an open-source instruction model that serves as a general strong baseline and can stably output discharge summaries without structural enhancements, but its factual accuracy is slightly inferior to a combination of retrieval, filtering, and knowledge alignment.

[0171] ConTextual proposes a token-filtered clinical summary framework based on domain knowledge graphs and context preservation. This framework reduces computational overhead with higher throughput and controllable latency, preserves key signals in discharge summary generation, introduces a diagnosis-examination-treatment structural relationship, reduces illusions and omissions, and enhances clinical consistency and interpretability.

[0172] Llama2-13B was fine-tuned for discharge summary generation task via QLoRA, but its performance degraded as the context length increased. Its quantitative metrics were comparable to those of GPT-4 with its few-sample cueing.

[0173] Since these methods may use different data and data processing techniques, in order to achieve data uniformity and model fairness, and to eliminate bias caused by differences in data input or classification layers, this comparative example focuses on the performance differences of the model architecture itself. The specific implementation method of this example is as follows:

[0174] Standardization of data input:

[0175] Use the same training, validation, and test sets as this model for all comparison models to ensure consistent data partitioning.

[0176] In the other data models, this comparative example also uses the exact same Discharge Me dataset and MIMIC-IV-Ext-BHC dataset as those in the embodiments of this invention to conduct comprehensive comparative experiments, systematically evaluating the performance differences between the method of this application and other state-of-the-art methods in the discharge summary generation task. The comparison results on the Discharge Me dataset are shown in Table 2:

[0177] Table 2 Comparison results on the Discharge Me dataset

[0178]

[0179] Among them, ROUGE-L is a text similarity evaluation index based on the longest common subsequence, BERTScore is a text generation evaluation index based on pre-trained language models such as BERT, AlignScore is an index used to evaluate the consistency of textual facts, and MEDCON is an index specifically used for medical text generation and clinical record evaluation. Ixa-UPV proposes a retrieval enhancement generation framework based on structured patient summaries. First, Mistral-7B-Instruct is used to extract a JSON progress summary from the complete discharge record. Then, SentenceBERT is used to retrieve similar BHC / DI examples. The retrieval results and the summary are fed into a frozen LLM to generate target sections. qub-cirdan uses a zero-shot templated RAG method to segment the discharge record based on rules and select key information. MiniLM+FAISS is used to retrieve similar cases to estimate the target word count. Then, combined with a manually designed JSON structure template and instruction prompts, it drives the quantized Llama3-8B to generate BHC and DI.

[0180] As shown in the table, our method achieved first place in ROUGE-L, BERTScore, and AlignScore simultaneously, demonstrating a combined advantage in both text similarity and factual consistency. On MEDCON, it scored 0.352, second only to UF-HOBI, indicating robustness comparable to top-tier systems in medical contradiction detection and factual conflict avoidance. Compared to several publicly available solutions, such as Shimo Lab, IgnitionInnovators, and several systems based on a hybrid extraction and generation approach, our method effectively reduces factual drift caused by cross-segment mismatches and text length imbalances through chapter-aware subgraph propagation. While ensuring information integrity, it improves clinical readability and evidence chain consistency, thus achieving a stable lead in both AlignScore and BERTScore without sacrificing medical consistency for superficial overlap. This also explains its more balanced overall performance curve.

[0181] The comparison results on the MIMIC-IV-Ext-BHC dataset are shown in Table 3:

[0182] Table 3 Comparison results on the MIMIC-IV-Ext-BHC dataset

[0183]

[0184] Among them, BLEU-1 is a text generation quality assessment index based on 1-gram exact matching, and BLEU-2 is a text generation quality assessment index based on 2-gram exact matching.

[0185] As shown in Table 3, although the method in this application is slightly lower than Llama2-13B in ROUGE-L by 0.003 (approximately a relative difference of 1.1%), it achieves the best results in the three core indicators that better reflect semantic consistency and n-gram readability: BERTScore reaches 0.954, BLEU-1 reaches 0.207, and BLEU-2 reaches 0.094, which are improvements of +0.124, +0.020, and +0.022 respectively compared to the strong baseline ConTextual. It is also significantly better than general instruction models such as Gemma3-Instruct(1B), Mistral-7B-Instruct, and Flan-T5. This result shows that although the method in this application is comparable to the model with large parameters in terms of structural recall in the longest common subsequence dimension, it can more stably align key semantic units in long documents by modeling cross-chapter hyperedges and triple embedding fusion, thereby generating discharge summaries with semantics that are closer to those of real doctors under the same output length and threshold setting. Meanwhile, distributed focused training suppresses negative class redundancy and templated sentence structures, thereby simultaneously improving the consistency of higher-order n-grams and overall semantic similarity. This is also the reason why the method in this application is comprehensively superior in semantic class metrics, while ROUGE-L is only slightly inferior to the best.

[0186] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention.< / sep>

Claims

1. A discharge summary generation system based on a hypergraph, characterized in that, include: The segmentation module is used to acquire hospitalization-related text of the target patient and perform structured segmentation on the hospitalization-related text to obtain multiple text units; Builder module, used to construct hierarchical hypergraphs based on all text units; In the hierarchical hypergraph, multiple nodes correspond one-to-one with multiple text units, and the hyperedge between two nodes represents the semantic relationship between the two corresponding text units. The construction module is used to construct dynamic hyperedges for the hierarchical hypergraph to obtain the updated hierarchical hypergraph; the dynamic hyperedge between two nodes is the content affinity relationship between the corresponding two text units; The feature extraction module is used to perform joint inference and feature extraction on the updated hierarchical hypergraph to obtain the final selection probability of each sentence; A generation module is used to generate a discharge summary for the target patient based on the final selection probability of all sentences; The text units are words, sentences, or chapters; The construction of a hierarchical hypergraph based on all text units includes: Generate a corresponding node for each text unit; For each word, traverse each sentence and perform the following steps: if the word appears in the sentence, then there is a semantic relationship between the word and the sentence; For each sentence, traverse each chapter and perform the following steps: If the sentence appears in the chapter, then there is a semantic relationship between the sentence and the chapter; A hyperedge is generated between the two nodes corresponding to each semantic relationship to obtain a hierarchical hypergraph. The process of constructing dynamic hyperedges for the hierarchical hypergraph to obtain the updated hierarchical hypergraph includes: Calculate the content affinity value between every two text units; For each pair of text units, if the content affinity value between the two text units is greater than a preset affinity threshold, then there is a content affinity relationship between the two text units. Based on the affinity of all content, multiple dynamic hyperedges are generated for the hierarchical hypergraph to obtain the updated hierarchical hypergraph; The calculation of the content affinity value between every two text units includes: Through the formula: Calculate the first The text unit and the first Content affinity between text units ; in, Indicates the first The current text representation of each text unit. Indicates the first The current text representation of each text unit. Indicates the fusion weight. This represents the Sigmoid activation function. For indicator functions, indicating the first The text unit and the first Does each text unit span multiple chapters? Then it means the first The text unit and the first A text unit spans multiple chapters. Then it means the first The text unit and the first The text unit does not span multiple chapters. , , Indicates the number of text units.

2. The discharge summary generation system according to claim 1, characterized in that, The hospitalization-related text is structured and segmented to obtain multiple text units, including: The hospitalization-related text was analyzed to identify multiple chapters. The hospitalization-related text is segmented into sentences to obtain multiple sentences; The hospitalization-related text was lexicalized to obtain multiple words.

3. The discharge summary generation system according to claim 2, characterized in that, The step of performing joint inference and feature extraction on the updated hierarchical hypergraph to obtain the final selection probability of each sentence includes: For each sentence, the sentence representation, the chapter aggregation vector, and the cross-chapter evidence embedding vector are calculated based on the updated hierarchical hypergraph. The final selection probability of the sentence is then calculated based on the sentence representation, the chapter aggregation vector, and the cross-chapter evidence embedding vector.

4. The discharge summary generation system according to claim 3, characterized in that, The calculation of the sentence representation, chapter aggregation vector, and cross-chapter evidence embedding vector based on the updated hierarchical hypergraph includes: The sentence is encoded within the sentence to obtain its sentence representation; Based on the updated hierarchical hypergraph, all adjacent nodes of the corresponding node of the chapter to which the sentence belongs are aggregated to obtain the chapter aggregation vector; The cross-chapter evidence embedding vector of the sentence is calculated based on the updated hierarchical hypergraph.

5. The discharge summary generation system according to claim 4, characterized in that, The calculation of the final selection probability of the sentence based on the sentence representation, the chapter aggregation vector, and the cross-chapter evidence embedding vector includes: Through the formula: Calculate the first The final selection probability of each sentence ; in, Indicates the first The final representation of each sentence, Indicates the first The sentence representation of a sentence. Indicates the first The aggregate vector of the chapter to which each sentence belongs. Indicates the first Cross-chapter evidence embedding vectors for each sentence, , Indicates the number of sentences. Indicates the selection of a numeric class. Representation layer normalization, Indicates nonlinear activation. Indicates standardization, This represents a multilayer perceptron. , The classifier projection matrix, Indicates the bias term. This represents the Sigmoid activation function.

6. The discharge summary generation system according to claim 5, characterized in that, The process of generating the discharge summary for the target patient based on the final selection probability of all sentences includes: Sort the final selection probabilities of all sentences and select the sentences with the highest selection probabilities in the sorting results as the summary sentences. All summary sentences are integrated into a single text to obtain the discharge summary for the target patient.

Citation Information

Patent Citations

  • Large model-based multi-stage electronic medical record discharge nodule generation method

    CN118136196A

  • Electronic medical record text analysis method based on hypergraph

    CN119230043A