Psychiatric medical record structured extraction method and system based on semantic hierarchy fine-tuning
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI UNIVERSITY OF FINANCE AND ECONOMICS
- Filing Date
- 2026-05-08
- Publication Date
- 2026-08-07
AI Technical Summary
[0007]本发明的目的在于提出一种基于语义层级微调的精神科病历结构化提取系统和方法,以克服现有的精神科病历信息抽取方法难以应对复杂语义抽象层级、生成高阶诊断逻辑易产生逻辑幻觉以及微调过程中特征混叠的问题
[0102](1) 本发明通过面向精神科临床逻辑的顺序语义监督范式,有效解决了精神科症状表达多样性带来的噪声干扰,实现了在低标注成本下对复杂临床语义结构的稳健建模。
Smart Images

Figure CN122531601A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical information extraction technology, specifically relating to a structured extraction system and method for psychiatric medical records. Background Technology
[0002] Psychiatric medical records, serving as crucial evidence for the assessment and intervention of mental illnesses, possess a high degree of natural language narrative quality. Compared to other medical specialties, psychiatric symptoms often exhibit non-standardized, cross-sentence distribution characteristics, and clinical judgment heavily relies on the comprehensive analysis of multiple symptom cues. Therefore, automatically extracting structured symptom clusters from raw medical records is of significant value for clinical decision support and psychiatric research. In recent years, large language models and their efficient parameter fine-tuning techniques have made significant progress in the field of medical information extraction. Related studies typically adapt general models to medical clinical question answering, text summarization, or structured extraction tasks through methods such as instruction fine-tuning.
[0003] However, existing information extraction methods still have significant limitations when dealing with the complex and abstract clinical task of extracting psychiatric symptoms:
[0004] First, existing methods mostly employ a single-step end-to-end mapping paradigm. Most studies model clinical tasks as a direct prediction process from raw text to final labels. Due to the highly subjective and semantically diverse nature of psychiatric symptom expression, this single-step mapping paradigm is not only costly to annotate but also prone to introducing noise and ambiguity during training, making it difficult to handle complex levels of semantic abstraction.
[0005] Secondly, existing fine-tuning methods lack explicit modeling of the semantic reasoning process. Existing instruction-based fine-tuning and parameter-efficient fine-tuning methods typically fail to replicate the semantic evolution path from low-level symptom evidence to high-level psychiatric judgment. This results in models often lacking support from underlying objective evidence when generating high-order diagnostic logic, making them highly susceptible to logical illusions.
[0006] Finally, existing technologies struggle to address the feature aliasing problem at the lower levels of multi-level semantics in the model. Traditional fine-tuning frameworks employ an indiscriminate update strategy for model parameters, lacking effective decoupling and differentiated modeling of supervisory signals at different abstraction depths within the parameter space. This leads to mutual interference between low-level evidential features and high-level abstract logic during parameter evolution. Summary of the Invention
[0007] The purpose of this invention is to propose a structured extraction system and method for psychiatric medical records based on semantic hierarchical fine-tuning, in order to overcome the problems of existing psychiatric medical record information extraction methods being unable to cope with complex semantic abstraction levels, generating logical illusions when generating high-order diagnostic logic, and feature aliasing during fine-tuning.
[0008] The present invention provides a structured extraction system for psychiatric medical records based on semantic hierarchical fine-tuning. It internalizes key intermediate semantic states through a sequential semantic supervision constraint model. Building upon this, a dynamic parameter sensitivity evaluation mechanism is introduced. This mechanism, combined with layer-depth preference mapping, dynamically quantifies the response of each weight component to specific semantic levels during optimization. This explicitly decouples supervision signals at different abstraction depths within the model's underlying parameter space, thereby driving differentiated, step-by-step updates of multidimensional semantics. Finally, it integrates a visual auxiliary diagnostic panel based on etiological isolation and original text features to output a comprehensive view of interactive medical verification, completing the evidence tracing from complex semantic analysis to transparent clinical decision-making.
[0009] The basic implementation process of this invention includes: first, forming a sequential semantic supervised training dataset; then, constructing a semantic tiered tuning low-rank adaptation (STT-LoRA) model based on a pre-trained large language model, quantifying the contribution of different semantic levels to parameter updates through dynamic parameter sensitivity evaluation, and performing tiered weighted fusion training; next, compressing the multi-step semantic evolution logic into a single forward mapping through a unified semantic symptom synthesis interface, and outputting a structured cluster of psychiatric symptoms; finally, combining a visual auxiliary diagnostic panel based on etiological isolation and original text features to output a comprehensive view of interactive medical verification.
[0010] Specifically, it includes a sequential semantic supervised data construction module, a dynamic parameter sensitivity fine-tuning module, a unified semantic comprehensive reasoning module, and a clinical auxiliary diagnosis panel. Among them:
[0011] The sequential semantic supervision data construction module reconstructs the original psychiatric medical record text into evidence-level, concept-level, and pattern-level sequential decomposition forms, calculates the local supervision signal loss, and outputs the sequential semantic supervision training dataset to the dynamic parameter sensitivity fine-tuning module. This addresses the issues of scattered symptom descriptions and implicit relationships relying on contextual progression in psychiatric medical records by achieving step-by-step explicit modeling from surface description to deep diagnostic semantics, effectively reducing semantic ambiguity and the omission of key information.
[0012] The dynamic parameter sensitivity fine-tuning module uses hierarchical perception aggregation representation and dynamic parameter sensitivity evaluation mechanism to quantify the contribution of different semantic levels to the bottom weight update direction, and obtains a fine-tuning model in which the bottom parameters are explicitly decoupled through hierarchical weighted fusion.
[0013] The unified semantic comprehensive reasoning module uses the implicit representation space to compress multi-step evolution logic into a single forward mapping, and outputs a highly structured set of feature representations.
[0014] The clinical auxiliary diagnostic panel uses a Document Object Model (DOM) element binding engine to reconstruct multi-level symptom manifestations into classification cards and risk assessment lists, outputting a visual auxiliary view that supports two-way highlighting interaction and transparent medical verification.
[0015] Furthermore:
[0016] The sequential semantic supervision data construction module explicitly models and constructs intermediate semantic states based on the progressive logic of text units; the specific processing flow is as follows:
[0017] Given the original input sequence: ,in Representing text units; reconstructing the single-step mapping into a sequential decomposition form:
[0018] (1)
[0019] in, This represents the set of evidence extracted. This represents the standardized candidate set obtained by normalization based on evidence. This represents the set of co-occurrence patterns formed by further organization of candidates. This represents the evidence extraction function. Normalization function, represents the pattern organization function, and g represents the inference function.
[0020] The aforementioned hierarchical structure models the cognitive process of "evidence-concept-pattern" hierarchical abstraction in the psychiatric diagnosis process, enabling the model to organize semantic information in a way that better aligns with clinical thinking, thereby enhancing the ability to express complex combinations of psychiatric symptoms.
[0021] The system constructs a training dataset consisting of three types of instruction responses and calculates the corresponding negative log-likelihood loss for the local supervision signal:
[0022] Category 1 Loss in Extracting Key Evidence: (2)
[0023] The second type of loss for generating standardized concept candidates: (3)
[0024] The third type of loss for capturing structural association patterns: (4)
[0025] The overall training objective of the model is defined as a weighted combination of the losses at each level:
[0026] (5)
[0027] in, , , Hyperparameter weights are used to balance the importance of different semantic levels.
[0028] The dynamic parameter sensitivity fine-tuning module includes semantic mapping and hierarchical awareness aggregation representation submodules; wherein:
[0029] The intermediate semantic states are explicitly divided into three hierarchical sets: ;in, Corresponding to low-level semantic bearer ; Corresponding to the middle layer semantic carrier ; Corresponding to high-level semantic bearer This hierarchical approach corresponds to the cognitive hierarchy in psychiatric clinical practice, which ranges from symptom observation to diagnostic patterns, enabling the model to perform differentiated modeling for semantic information at different levels of abstraction.
[0030] Suppose the pre-trained language model consists of L transformer coding layers. For input text X, the Lth... The hidden state sequence of the layer is represented as:
[0031] ; (6)
[0032] To characterize the differences in representation between different semantic levels within the model, a hierarchical perceptual aggregation representation is introduced to compute feature vectors:
[0033] (7)
[0034] (8)
[0035] in, The weights represent the attention mechanism weights, and n represents the length of the input sequence. To measure the representation of a single token relative to a specific semantic level Alignment function of correlation , This represents the learnable semantic query vector corresponding to the semantic level τ.
[0036] The dynamic parameter sensitivity fine-tuning module also includes a low-rank adaptive sensitivity evaluation and parameter fusion submodule, with the specific calculation rules as follows:
[0037] For any linear transformation weight matrix W, its low-rank adaptive update form is:
[0038] ; (9)
[0039] A represents the low-rank projection matrix, and B represents the low-rank reconstruction matrix.
[0040] For a specific semantic level The importance of its contribution to the parameter update direction is quantified as the continuous integral of the loss function along the update step:
[0041] (10)
[0042] in, For the sequential supervision loss corresponding to the semantic level, To update the step size ratio; This represents the current parameter vector of the model. This indicates the direction of parameter updates for the l-th layer. Quantifying the contribution of semantic levels to parameter updates using the continuous integration method described above helps to stabilize cross-level semantic dependencies in psychiatric diagnosis.
[0043] Based on the sensitivity and importance of each level, the first... Semantic hierarchical weighted fusion is performed using the incremental matrix of the layers:
[0044] (11)
[0045] (12)
[0046] in, The weighting is based on the degree of sensitivity. semantic hierarchy The corresponding low-rank projection matrix, semantic hierarchy The corresponding low-rank reconstruction matrix.
[0047] Finally, while keeping the main parameters of the base model frozen, the loss function of multiple semantic levels is jointly optimized:
[0048] (13)
[0049] Represents a set of semantic levels.
[0050] The unified semantic comprehensive reasoning module has the following workflow:
[0051] The system invokes a unified semantic symptom synthesis interface (which is used during the inference phase to transform the explicitly constructed multi-level semantic intermediate states during training into implicit computational processes in a single forward propagation, and outputs a set of representations). This addresses the issue of long multi-step inference chains and potential logical deviations in psychiatric diagnosis by suppressing hallucinations in high-order semantic reasoning.
[0052] The multi-step semantic construction process during training is transformed into implicit computation in a single forward propagation:
[0053] (14)
[0054] in, For the complete original input text, This represents the model after semantic layering and fine-tuning. This is the final task mapping function. This mechanism enables the model to maintain semantic consistency when dealing with complex combinations of psychotic symptoms, avoiding information drift during the progressive generation process.
[0055] Specifically, during the inference phase, the model first extracts original evidence fragments related to symptoms through a low-level semantic subspace to form implicit evidence representations; then, it uses a mid-level semantic mapping to perform standardized concept merging on the symptom descriptions in the subspace; finally, it establishes co-occurrence relationships and risk association patterns among symptoms through a high-level semantic inference module. These multi-level semantic states are encoded in a unified implicit representation space using implicit vector states, and the comprehensive inference output is directly completed through a single forward propagation.
[0056] Based on this implicit reasoning process, the model abandons explicit decoding of intermediate states and directly outputs a structured set of feature representations through a single forward propagation:
[0057] (15)
[0058] Output Cluster Internally, it contains conceptual entities, key evidence summaries, and semantic level judgment markers, and suppresses the uncertainty of the output logic through implicit evidence chain constraints.
[0059] Each output cluster Specifically defined as:
[0060] (16)
[0061] in: Indicate standardized symptom names; This represents the corresponding fragment of the original text evidence; Indicates semantic hierarchy tags; This indicates the confidence level of the model output. The system constructs the relationships between symptom clusters based on the aforementioned structured features, and uses this as data input for the subsequent visual diagnostic panel.
[0062] The workflow of the aforementioned clinical auxiliary diagnostic panel is as follows:
[0063] By invoking a multi-dimensional feature mapping mechanism (used to align and fuse the multi-layer semantic features output by the model with the original text, and map them into a structured interface representation that supports visual interaction), the highly structured feature set is transformed into a visual decision space with the ability to accurately trace the source of the original text and dynamically link it:
[0064] (17)
[0065] in, It is a highly structured feature set output by the front-end module. For the complete original input text, This represents a visual reconstruction mapping function that integrates element binding and style-safe isolation within the Document Object Model. It also aims to improve the transparency and verifiability of diagnostic results, addressing the high reliance of psychiatric clinical decision-making on evidence tracing and the identification of negative symptoms.
[0066] Specifically, the visual reconstruction mapping function Includes the following steps:
[0067] (1) Based on the structured feature set Semantic hierarchy labels in the data are used to classify symptom features;
[0068] (2) Generate symptom cards, risk warning cards, and negative screening lists according to symptom categories;
[0069] (3) Use the document object model element binding mechanism to assign a unique interface identifier to each symptom feature;
[0070] (4) Dynamically adjust the highlight intensity of the interface based on the symptom confidence level;
[0071] (5) Based on the etiological isolation rules, the primary mental symptoms and secondary causes are rendered using differentiated visual styles.
[0072] Through the above process, a dynamic mapping from structured features to visual interface elements is achieved.
[0073] Based on the above visual reconstruction process, the system utilizes the original text feature mapping anchor points and etiological isolation rendering rules to reconstruct discrete text into a multidimensional correlation map, thereby outputting a comprehensive visualization view that supports interactive clinical verification:
[0074] (18)
[0075] Among them, the output view It contains symptom cluster decision cards. Negative Identification Screening Checklist and interactive two-way highlighting of the original text By employing differentiated feature rendering and direct evidence tracing, it effectively reduces information loss and logical uncertainty in clinical decision-making. It is particularly suitable for the stringent requirements of negative symptom screening and the integrity of the evidence chain in psychiatric diagnosis, effectively reducing the risk of misdiagnosis and missed diagnosis.
[0076] in: This represents a set of symptom decision cards; This indicates a list of negative symptom screening results, including... This indicates whether the corresponding symptom is explicitly denied by the original text; This represents a two-way anchor mapping relationship between structured symptoms and the original text. This indicates the character range position of the evidence fragment within the original medical record text. When the user selects a symptom card, the system uses the corresponding... Automatically highlight relevant evidence in the original text; when a user selects a text segment, the system locates the corresponding symptom card through reverse mapping, achieving two-way linkage verification.
[0077] The overall workflow of the system described in this invention is as follows:
[0078] (i) Sequential Semantic Supervision Data Construction Module: The original narrative text is taken as input, decomposed into progressive intermediate semantic states, and a training dataset with sequential supervision signals is obtained and output to the fine-tuning module.
[0079] (ii) Dynamic parameter sensitivity fine-tuning module: Receives data input, maps a specific semantic space by calculating the hierarchical perception aggregation representation, calculates the parameter sensitivity integral of the loss function, and performs decoupling and weighted fusion update on the weight matrix corresponding to features at different abstraction depths;
[0080] (III) Unified Semantic Comprehensive Reasoning Module: Deploys the updated fine-tuned model, receives a single complete input text, performs implicit inference of multi-step serial mapping in the latent feature space, and outputs a highly structured feature representation set supported by objective facts.
[0081] (iv) Clinical auxiliary diagnosis panel: Receives the structured feature set, calls the visual reconstruction mapping mechanism, and uses the original text feature mapping anchor points and differential rendering to reconstruct the discrete features into an interactive comprehensive auxiliary view with multi-dimensional correlation characteristics, so as to realize the isolated display of etiology and symptoms and the evidence tracing of medical decisions.
[0082] Corresponding to the above system, this invention also provides a method for structured extraction of psychiatric medical records based on semantic hierarchical fine-tuning, specifically including the following steps:
[0083] Step S1: Reconstruct the psychiatric medical record text input into a sequential decomposition form consisting of evidence-level, concept-level, and pattern-level data, and construct the corresponding instruction response data. This specifically includes the following sub-steps:
[0084] Step S11: Reconstruct the original mapping into a sequential decomposition chain, defining intermediate semantic states, including a set of symptom-related evidence. Normalized symptom candidate set and symptom co-occurrence pattern set ;
[0085] Step S12: Construct three types of local supervision signals, corresponding to the evidence extraction task, concept mapping task, and structure capture task, respectively, and define the negative log-likelihood loss function for each level;
[0086] Step S13: Use hyperparameter weights to balance the loss functions at different levels, and use sequential semantic supervision to constrain the model to internalize the key intermediate semantic evolution states.
[0087] Step S2: Construct the semantic hierarchical fine-tuning model STT-LoRA. Based on the dynamic parameter sensitivity evaluation mechanism and layer depth preference function mapping, guide multi-order semantic features to achieve differentiated updates in the parameter space. Specifically, this includes the following sub-steps:
[0088] Step S21: Establish the mapping relationship between semantic hierarchy and parameter space, and map low, medium and high-level semantics to specific parameter update subspaces respectively;
[0089] Step S22: Introduce hierarchical perceptual aggregation representation and use the attention mechanism to enable the model to dynamically focus on a dedicated representation subspace under the guidance of supervision signals at different levels;
[0090] Step S23: Perform dynamic parameter sensitivity assessment by calculating the continuous integral of the loss function along the parameter update path to quantify the cumulative sensitivity of each semantic level to the LoRA parameter update direction;
[0091] Step S24: Perform semantic hierarchical weighted fusion of the LoRA incremental matrices at each layer based on the sensitivity score, driving multidimensional semantic implementation to update parameters in a stepwise manner.
[0092] Step S3: Generate end-to-end symptom clusters under implicit evidence chain constraints through a single forward propagation. This includes the following sub-steps:
[0093] Step S31: Activate the unified semantic symptom synthesis interface to transform the multi-level inference logic solidified in the training phase into implicit reasoning in the implicit representation space;
[0094] Step S32: Input the original clinical medical record text into the model and perform end-to-end mapping calculation based on implicit evidence chain in a single forward propagation;
[0095] Step S33: Output a structured set of symptom clusters, including symptom cluster categories, temporal features, diagnostic hints, negative findings in differential diagnosis, and semantic hierarchical labels.
[0096] Step S4 involves visually reconstructing and interactively displaying structured data through a clinical auxiliary diagnostic panel. This includes the following sub-steps:
[0097] Step S41: Activate the multidimensional feature mapping mechanism to transform the extracted discrete structured symptom data into modular associated visual primitives and construct a view framework that includes symptom cluster decision cards and differential diagnosis checklists.
[0098] Step S42: Through the visual isolation mechanism of the front-end code, a background color and label format are assigned to the "cause of disease" and it is moved into the "pathogenesis logic" list level for display, so that doctors can intuitively distinguish the source cause of disease from the symptoms.
[0099] Step S43: Deploy the original text feature mapping anchor point, bind the structured feature elements with the original medical record text, and provide bidirectional highlight association and evidence tracing through interactive commands.
[0100] The present invention also provides an electronic device, including a memory and a processor; the memory stores a computer program. When the computer program is executed on the processor, it implements the above-described psychiatric medical record structure extraction system and method based on semantic hierarchical fine-tuning.
[0101] The present invention has the following beneficial effects:
[0102] (1) This invention effectively solves the noise interference caused by the diversity of psychiatric symptom expression by adopting a sequential semantic supervision paradigm oriented towards psychiatric clinical logic, and achieves robust modeling of complex clinical semantic structures with low annotation cost.
[0103] (2) This invention effectively isolates features of different abstract depths at the bottom layer of the model through dynamic parameter sensitivity assessment and parameter isolation mechanism and with the help of layer depth preference mapping, drives multidimensional semantics to achieve differentiated step-by-step updates, cuts off the feature pollution of objective facts by high-order reasoning, and suppresses the risk of logical illusion from the source.
[0104] (3) This invention achieves implicit compression of multi-level deductive logic through a unified semantic symptom integration interface, ensuring that the output results are highly consistent with clinical logic and evidence chain constraints while ensuring reasoning efficiency.
[0105] (4) This invention provides psychiatric clinicians with an intuitive view of the decoupled causes and symptoms and interactive evidence tracing by constructing and designing a clinical auxiliary diagnostic panel, thereby reducing the cognitive load when reading complex unstructured medical records. Attached Figure Description
[0106] Figure 1 This is a schematic diagram of the framework of the psychiatric medical record structure extraction system based on semantic hierarchical fine-tuning of the present invention.
[0107] Figure 2 This is a schematic diagram of the input and output of the fine-tuning model in this invention.
[0108] Figure 3 This is a schematic diagram of the structured case text in this invention.
[0109] Figure 4 This is a schematic diagram of the clinical auxiliary diagnostic panel in this invention. Detailed Implementation
[0110] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0111] I. Data and Parameter Settings
[0112] This embodiment constructs a dataset based on 5500 real psychiatric clinical medical records. All medical records have undergone strict anonymization, removing any information that could identify the patient. Each medical record text was manually annotated by clinicians. To support the semantic hierarchical modeling method proposed in this paper, a semantic hierarchy label was assigned to each symptom during the annotation process, corresponding to the basic layer (perception and emotion description), the middle layer (behavioral and cognitive abnormalities), and the high layer (risk assessment and psychiatric judgment), respectively.
[0113] The dataset was divided into training, validation, and test sets in a 7:2:1 ratio. To comprehensively evaluate model performance, four complementary evaluation metrics were used, corresponding to symptom extraction accuracy, structured symptom modeling ability, semantic hierarchical consistency, and hallucination generation control ability, respectively.
[0114] The symptom-level micro-average F1 score (Micro-F1) was used as the basic evaluation index to measure the model's accuracy and recall in the overall symptom extraction task.
[0115] To evaluate the model's ability to generate structured symptom clusters, a cluster-level F1 score is introduced. This measures whether the model reasonably organizes relevant symptoms into clinically meaningful symptom clusters.
[0116] To quantify the effectiveness of the semantic hierarchical mechanism, a Tier Consistency Score (TCS) is introduced. By calculating the consistency rate between the model's predictions and manually labeled levels, the model's ability to distinguish clinical semantics at different levels of abstraction is evaluated.
[0117] Considering the safety and reliability requirements of clinical applications in psychiatry, the Unsupported Symptom Rate (USR) is introduced to measure the proportion of symptoms generated by the model but lacking clear evidence support in the original medical record text.
[0118] II. Implementation Details of the Layered Fine-tuning Framework
[0119] In the model implementation, the pre-trained model Qwen3-8B (Qwen Team, 2025) maintains its parameters frozen, and the initial rank-mean of the low-rank adaptive module is set to [value missing]. An Adaptive Moment Estimation (Adam) optimizer with a learning rate of 5e-5 and a 100-step linear warm-up strategy is employed, with an effective batch size of 32 during training. During mid-training, a dynamic pruning and redistribution strategy is implemented. The model proportionally masks out rank components with low long-term contributions based on accumulated gradient contributions and allocates the released low-rank capacity to higher-level semantically driven update paths. We perform a comprehensive evaluation of the model on the validation set every 200 update steps.
[0120] III. Algorithm Execution Flow
[0121] Step S1: Construct a sequential semantic supervision dataset.
[0122] The psychiatric medical record text input is reconstructed into a sequential decomposition form, and training data containing multi-level instruction responses is constructed based on preset local supervision signals. Specifically, this includes the following steps:
[0123] Step S11 (Data Deconstruction): Let the original psychiatric medical record text be the input sequence. The algorithm deconstructs the traditional single-step mapping task into a set of symptom-related evidence. Standardized symptom candidate set and symptom co-occurrence pattern set Construct the following progressive computation flow:
[0124] (1)
[0125] Step S12 (Local Supervision Computation): Construct three types of local supervision signals corresponding to the tasks of evidence extraction, concept mapping, and structure capture, respectively, and calculate the negative log-likelihood loss at each level:
[0126] Evidence-level loss:
[0127] (2)
[0128] Conceptual loss:
[0129] (3)
[0130] Pattern-level loss:
[0131] (4)
[0132] Step S13 (Global Loss Construction): Balance the loss functions at different levels using hyperparameter weights, and internalize key intermediate semantic evolution states through sequential semantic supervision. The overall training objective is defined as:
[0133] (5)
[0134] Step S2: Semantic hierarchical fine-tuning and dynamic parameter sensitivity assessment.
[0135] A semantic hierarchical fine-tuning model (STT-LoRA) is constructed based on a pre-trained large language model, and the fine-tuning model is trained using a dynamic parameter sensitivity evaluation mechanism. Specifically, the following steps are included:
[0136] Step S21 (Semantic Hierarchical Mapping): Define the semantic set Each carries the above The progressive logic involves establishing a mapping relationship between semantic levels and parameter spaces, mapping low, medium, and high-level semantics to specific parameter update subspaces.
[0137] Step S22 (Hierarchical Perceptual Aggregation Representation): To characterize the differences in representation between different semantic levels within the model, an attention mechanism is invoked to extract and fuse feature vectors from specific semantic levels. For the model's... The hidden state sequence of the layer is introduced into the aggregation calculation:
[0138] (6)
[0139] (7)
[0140] ,
[0141] This mechanism ensures that the model dynamically focuses on a dedicated representation subspace.
[0142] Step S23 (Dynamically Sensitive Metrics): Adaptive Update in LoRA Low Rank In this process, dynamic parameter sensitivity assessment is performed. Specific semantic levels are quantified by calculating the continuous integral of the loss function along the parameter update path. Cumulative sensitivity to parameter update direction :
[0143] (8)
[0144] Step S24 (Hierarchical Weighted Fusion and Optimization): Based on the sensitivity score, perform semantic hierarchical weighted fusion on the LoRA incremental matrices of each layer:
[0145] (9)
[0146] The weighting ratio is:
[0147] (10)
[0148] By freezing the base parameters, and combining the global loss function to jointly optimize multiple semantic levels, the model's fine-tuning training is completed.
[0149] (11)
[0150] Step S3: Unified semantic integrated reasoning and structured output.
[0151] Activate the unified semantic symptom synthesis interface to compress the multi-step semantic evolution logic into implicit computation, generating and outputting structured psychiatric symptom clusters. Specifically, this includes the following steps:
[0152] Step S31 (Implicit Reasoning Transformation): After training, the multi-order logic is encoded into the implicit representation space. During the reasoning phase, the multi-order deductive logic solidified during training is transformed into an implicit reasoning process, performing approximate forward computation:
[0153] (12)
[0154] Step S32 (End-to-End Mapping): Input the original clinical medical record text to be extracted. In a single forward propagation, an end-to-end mapping based on an implicit chain of evidence is performed, outputting a set of structured feature representations:
[0155] (13)
[0156] Step S33 (Feature Decoupling and Output): The output includes symptom clusters containing symptom concepts, key evidence summaries, semantic hierarchical labels, and clinical judgment markers. Since the high-level semantics and deep parameters are strictly aligned in the S2 stage, the output is implicitly anchored to the underlying factual evidence, thereby achieving high-order logical inference and suppressing logical illusions.
[0157] Step S4: Display of the clinical auxiliary diagnostic panel.
[0158] It receives a structured feature set and the original medical record text, and generates an interactive, comprehensive view that supports bidirectional traceability through feature decoupling and implicit anchor mapping mechanisms. Its core visual reconstruction logic is represented as follows:
[0159] (14)
[0160] in, This represents the joint construction operation of a multidimensional view; and These represent the primary psychiatric symptoms and secondary pathogenic factors decoupled from the structured results, respectively. This represents a differential rendering function based on feature isolation; For the complete feature set, This is the original medical record sequence. This represents a bidirectional mapping function that calculates the implicit coordinate binding between feature primitives and continuous text.
[0161] IV. Experimental Results and Analysis - Comparison of High-Efficiency Fine-Tuning Methods
[0162] To validate the performance of STT-LoRA in the task of extracting structured information from psychiatric clinical text, we compared it with seven state-of-the-art Parametric Efficient Fine-Tuning (PEFT) methods: LoRA-drop (Zhou et al., 2025), AutoLoRA (Zhang et al., 2024), LoRA-Squeeze (Ma et al., 2026), IR-QLoRA (Qinet et al., 2024), RandLORA (Albert et al., 2025), and Weight-Based to State-Based Fine-Tuning (Zhang et al., 2025). As shown in Table 1, STT-LoRA achieved state-of-the-art performance across all evaluation dimensions, with a comprehensive average score of 0.836, outperforming all baseline models.
[0163] In the baseline comparison, High-Rank and RandLoRA, which rely on extended feature spaces, performed reasonably well in basic symptom extraction. However, the large parameter space exacerbated semantic entanglement between multi-level tasks, resulting in mediocre performance on the TCS (Transmission Control System) metric, which defines objective facts and logical boundaries. Furthermore, global full-rank updates are prone to overfitting to implicit associations, leading to a relatively high Unfounded Evidence Rate (USR) and a risk of hallucination. AutoLoRA and State-Based Fine-Tuning, which attempt to adapt to the task through dynamic search or state perturbation, failed to demonstrate advantages in generating structured symptom clusters due to limitations in static structure or feature aliasing issues.
[0164] On the other hand, models that focus on parameter compression and quantization also suffer from limited performance. Constrained by low bit width and rank reduction strategies, IR-QLoRA and LoRA-Squeeze weaken the non-linear feature representation capabilities required for complex symptom classification. LoRA-drop, which uses cross-layer parameter sharing, performs poorly across all dimensions because it disrupts the feature progression mechanism.
[0165] In contrast, STT-LoRA achieves task-aware subspace mapping through layer depth preference. It not only maintains the highest accuracy in basic extraction and structured generation but also achieves an advantage in the TCS metric, which evaluates the effectiveness of semantic layering. Furthermore, thanks to strict parameter isolation of the lower-level evidence pathways, STT-LoRA cuts off interference from high-level logical reasoning on fact extraction at the source, reducing the USR to 0.042. This demonstrates that the method, to a certain extent, meets the requirements of extremely low hallucination and high reliability for clinical psychiatric applications.
[0166] Table 1: Comparison Results of Efficient Parameter Fine-Tuning Methods
[0167] .
[0168] V. Experimental Results and Analysis - Comparison of Methods for Extracting Medical Record Text Information
[0169] To validate the performance of STT-LoRA in clinical text extraction tasks, the comparison methods were CLEAR (Lopez et al., 2025), Huatuo (Zhang et al., 2023), GRAPHTREX (Chaturvedi et al., 2025), MDAgents (Kim et al., 2024), and RBS (Rule-based System) (Patra et al., 2025). As shown in Table 2, STT-LoRA achieved the best performance across all core metrics.
[0170] In the baseline comparison, while the Rule-Based System (RBS) and the Extractive Model (GRAPHTREX) exhibit lower illusion risk, they come at the cost of sacrificing higher-order reasoning capabilities. Limited by statically predefined rules, RBS suffers from low recall and poor overall performance. While GRAPHTREX excels in basic extraction, its graph structure solutions...
[0171] The code has limitations, with shortcomings in assembling complex symptom clusters and defining semantic hierarchies, making it unsuitable for high-order logical inference in psychiatry.
[0172] While generative models (HuatuoGPT) and pipeline frameworks (MDAgents, CLEAR) possess strong reasoning capabilities, their performance is limited in strictly structured extraction tasks. This is due to semantic aliasing caused by the underlying isomorphic weights. Both HuatuoGPT and MDAgents perform poorly in generating complex structures, with HuatuoGPT exhibiting the highest risk of hallucination. Furthermore, while the retrieval-based CLEAR demonstrates balanced overall performance, its fragmented context limits its ability to capture the global temporal logic of medical records.
[0173] In contrast, STT-LoRA, while maintaining basic extraction accuracy, effectively prevents high-order inference from contaminating underlying facts through a parameter decoupling mechanism that separates layer depth preference from task specificity. This not only enables it to achieve better results in generating structured symptom clusters and defining semantic hierarchies, but also reduces the unprovoked evidence generation rate (USR) to 0.042 while maintaining high semantic consistency.
[0174] Table 2: Comparison Results of Information Extraction Methods
[0175] .
[0176] This invention discloses a parameter-efficient fine-tuning method and system for multi-level clinical semantic modeling. Based on a large language model, this invention establishes a sequential semantic supervision mechanism from objective evidence and standard concepts to higher-order symptoms, and makes three core improvements to the traditional fine-tuning framework: First, it introduces dynamic parameter sensitivity assessment and depth preference guidance to decouple features at different abstract levels within the lower-level parameter space; second, it employs a lower-level parameter freezing mechanism to cut off the feature contamination of lower-level facts by higher-order inference logic at the source; and third, it designs a dynamic rank allocation strategy to accurately align the limited parameter computation budget to the high-dimensional clinical deduction path. Experimental results show that in the task of extracting complex symptom clusters from real psychiatric clinical case datasets, the method of this invention outperforms existing parameter-efficient fine-tuning baseline algorithms in terms of extraction accuracy, temporal logic parsing, and format robustness. Especially in strict clinical scenarios, it exhibits extremely low risk of logical illusion and can effectively improve the reliability of psychiatric clinical decision support systems.
[0177] References:
[0178] [1] Zhou Y, et al. LoRA-drop: Efficient LoRA parameter pruning basedon output evaluation[C]. Proceedings of the International Conference onComputational Linguistics (COLING), 2025: 5530-5543.
[0179] [2] Zhang R, Qiang R, Somayajula S A, et al. AutoLoRA: Automaticallytuning matrix ranks in low-rank adaptation based on meta learning[C].Proceedings of the Annual Conference of the North American Chapter of theAssociation for Computational Linguistics (NAACL), 2024: 5048-5060.
[0180] [3] Vulić I, Grycner A, de Laroussilhe Q, et al. LoRA-Squeeze: Simpleand effective post-tuning and in-tuning compression of LoRA modules[J]. arXivpreprint arXiv:2602.10993, 2026.
[0181] [4] Zhang X, Chen G Z, Li S, et al. An orthogonal high-rankadaptation for large language models[C]. Proceedings of the Conference onEmpirical Methods in Natural Language Processing (EMNLP), 2025: 18815-18833.
[0182] [5] Qin H, Ma X, Zheng X, et al. Accurate LoRA-finetuningquantization of LLMs via information retention[J]. arXiv preprint arXiv:2402.05445, 2024.
[0183] [6] Albert P, Zhang F Z, Rodriguez-Opazo C, et al. RandLoRA: Full-rank parameter-efficient fine-tuning of large models[C]. The 13thInternational Conference on Learning Representations (ICLR), 2025.
[0184] [7] Zhang C, Ren L, Cheng J, et al. From weight-based to state-basedfine-tuning: Further memory reduction on LoRA with parallel control[C].International Conference on Machine Learning (ICML), 2025: 75453-75467.
[0185] [8] López I, Swaminathan A, Vedula K S, et al. Clinical entityaugmented retrieval for clinical information extraction[J]. npj DigitalMedicine, 2025: 8(1):45.
[0186] [9] Zhang H, Chen J, Jiang F, et al. HuatuoGPT, towards taminglanguage model to be a doctor[J]. arXiv preprint arXiv:2305.15075, 2023.
[0187]
[10] Chaturvedi R, Baghershahi P, Medya S, et al. Temporal relationextraction in clinical texts: A span-based graph transformer approach[C] / / Proceedings of the 63rd Annual Meeting of the Association for ComputationalLinguistics: Association for Computational Linguistics, 2025: 25765-25788.
[0188]
[11] Kim Y, Park C, Jeong H, Chan Y S, Xu X, McDuff D, et al.MDAgents: An adaptive collaboration of LLMs for medical decision-making[C] / / Advances in Neural Information Processing Systems. 2024, 37: 79410-79452.
[0189]
[12] Patra B G, Lepow L A, Kumar P K R J, et al. Extracting socialsupport and social isolation information from clinical psychiatry notes:comparing a rule-based natural language processing system and a largelanguage model[J]. Journal of the American Medical Informatics Association,2025, 32(1): 218-226。
Claims
1. A structured extraction system for psychiatric medical records based on semantic hierarchical fine-tuning, characterized in that, First, a sequential semantic supervised training dataset is constructed. Then, a semantic hierarchical sensitive fine-tuning low-rank adaptive model (STT-LoRA) is built based on a pre-trained large language model. The contribution of different semantic levels to parameter updates is quantified through dynamic parameter sensitivity evaluation, and hierarchical weighted fusion training is performed. Next, through a unified semantic symptom synthesis interface, the multi-step semantic evolution logic is compressed into a single forward mapping, outputting a structured cluster of psychiatric symptoms. Finally, combined with a visualization-assisted diagnostic panel based on etiological isolation and original text features, an interactive comprehensive view of medical verification is output. Specifically, this includes a sequential semantic supervised data construction module, a dynamic parameter sensitivity fine-tuning module, a unified semantic synthesis reasoning module, and a clinical auxiliary diagnostic panel. The sequential semantic supervision data construction module reconstructs the original psychiatric medical record text into evidence-level, concept-level, and pattern-level sequential decomposition forms, calculates the local supervision signal loss, and outputs the sequential semantic supervision training dataset to the dynamic parameter sensitivity fine-tuning module. The dynamic parameter sensitivity fine-tuning module uses hierarchical perception aggregation representation and dynamic parameter sensitivity evaluation mechanism to quantify the contribution of different semantic levels to the bottom weight update direction, and obtains a fine-tuning model in which the bottom parameters are explicitly decoupled through hierarchical weighted fusion. The unified semantic comprehensive reasoning module uses the implicit representation space to compress multi-step evolution logic into a single forward mapping, and outputs a highly structured set of feature representations. The clinical auxiliary diagnostic panel uses a document object model element binding engine to reconstruct multi-level symptom manifestations into classification cards and risk assessment lists, outputting a visual auxiliary view that supports two-way highlighting interaction and transparent medical verification.
2. The system according to claim 1, characterized in that, The sequential semantic supervision data construction module explicitly models and constructs intermediate semantic states based on the progressive logic of text units; the specific processing flow is as follows: Given the original input sequence: ,in Representing text units; reconstructing the single-step mapping into a sequential decomposition form: (1) in, This represents the set of evidence extracted. This represents the standardized candidate set obtained by normalization based on evidence. This represents the set of co-occurrence patterns formed by further organization of candidates. This represents the evidence extraction function. Normalization function, The pattern organization function is represented by g, the output mapping function is represented by Y, and the structured set of psychiatric symptom features is represented by Y. The system constructs a training dataset consisting of three types of instruction responses and calculates the corresponding negative log-likelihood loss for the local supervision signal: Category 1 Loss in Extracting Key Evidence: (2) The second type of loss for generating standardized concept candidates: (3) The third type of loss for capturing structural association patterns: (4) The overall training objective of the model is defined as a weighted combination of the losses at each level: (5) in, , , To balance the hyperparameter weights of different semantic levels, This represents the total training loss function. Let X represent the conditional probability function, and let X represent the input patient's medical record.
3. The system according to claim 2, characterized in that, The dynamic parameter sensitivity fine-tuning module includes semantic mapping and hierarchical awareness aggregation representation submodules; wherein: The intermediate semantic states are explicitly divided into three hierarchical sets: ;in, Corresponding to low-level semantic bearer ; Corresponding to the middle layer semantic carrier ; Corresponding to high-level semantic bearer ; Suppose the pre-trained language model consists of L transformer coding layers. For input text X, the Lth... The hidden state sequence of the layer is represented as: ; (6) To characterize the differences in representation between different semantic levels within the model, a hierarchical perceptual aggregation representation is introduced to compute feature vectors: (7) (8) in, To measure the representation of a single token relative to a specific semantic level The alignment function for relevance, where token represents the smallest semantic processing unit obtained after word segmentation and encoding of the input text. The attention mechanism weights allow the model to dynamically focus on their respective representation subspaces; n represents the number of tokens in the current model for the input text.
4. The system according to claim 3, characterized in that, The dynamic parameter sensitivity fine-tuning module also includes a low-rank adaptive sensitivity evaluation and parameter fusion submodule, with the specific calculation rules as follows: For any linear transformation weight matrix W, its low-rank adaptive update form is: ; (9) A represents the low-rank projection matrix, and B represents the low-rank reconstruction matrix; For a specific semantic level The importance of its contribution to the parameter update direction is quantified as the continuous integral of the loss function along the update step: (10) in, For the sequential supervision loss corresponding to the semantic level, To update the step size ratio, This represents the current parameter vector of the model. Indicates the parameter update direction of the l-th layer; Based on the sensitivity and importance of each level, the first... Semantic hierarchical weighted fusion is performed using the incremental matrix of the layers: (11) (12) in, The weighting is based on the degree of sensitivity. semantic hierarchy The corresponding low-rank projection matrix, semantic hierarchy The corresponding low-rank reconstruction matrix; Finally, while keeping the main parameters of the base model frozen, the loss function of multiple semantic levels is jointly optimized: (13) Represents a set of semantic levels. Indicates the first Loss at each semantic level, This indicates the importance weight of that level.
5. The system according to claim 4, characterized in that, The unified semantic comprehensive reasoning module has the following workflow: By calling the unified semantic symptom synthesis interface, the multi-step semantic construction process during the training period is transformed into implicit computation in a single forward propagation: (14) in, For the complete original input text, This represents the model after semantic layering and fine-tuning. Based on this implicit reasoning process, the model abandons explicit decoding of intermediate states and directly outputs a structured set of feature representations through a single forward propagation: (15) Among them, the output cluster Internally, it contains conceptual entities, key evidence summaries, and semantic level judgment markers, and suppresses the uncertainty of the output logic through implicit evidence chain constraints.
6. The system according to claim 5, characterized in that, The workflow of the aforementioned clinical auxiliary diagnostic panel is as follows: By invoking a multi-dimensional feature mapping mechanism, the highly structured feature set is transformed into a visual decision space with the ability to accurately trace the source of the original text and dynamically link it: (16) in, It is a highly structured feature set output by the front-end module. For the complete original input text, This represents a visual reconstruction mapping function that integrates DOM element binding with style-safe isolation. Based on the above visual reconstruction process, the system utilizes the original text feature mapping anchor points and etiological isolation rendering rules to reconstruct discrete text into a multidimensional correlation map, thereby outputting a comprehensive visualization view that supports interactive clinical verification: (17) Among them, the output view It contains symptom cluster decision cards. Negative Identification Screening Checklist and interactive two-way highlighting of the original text By using differentiated feature rendering and direct evidence tracing, information loss and logical uncertainty in clinical decision-making can be effectively reduced.
7. A method for structured extraction of psychiatric medical records based on the system described in any one of claims 1-6, specifically comprising the following steps: Step S1: Reconstruct the psychiatric medical record text input into a sequential decomposition form consisting of evidence level, concept level, and pattern level, and construct the corresponding instruction response data; specifically including the following sub-steps: Step S11: Reconstruct the original mapping into a sequential decomposition chain, defining intermediate semantic states, including a set of symptom-related evidence. Normalized symptom candidate set and symptom co-occurrence pattern set ; Step S12: Construct three types of local supervision signals, corresponding to the evidence extraction task, concept mapping task, and structure capture task, respectively, and define the negative log-likelihood loss function for each level; Step S13: Use hyperparameter weights to balance the loss functions at different levels, and use sequential semantic supervision to constrain the model to internalize the key intermediate semantic evolution states; Step S2: Construct the semantic hierarchical fine-tuning model STT-LoRA; based on the dynamic parameter sensitivity evaluation mechanism and layer depth preference function mapping, guide multi-order semantic features to achieve differentiated updates in the parameter space; specifically including the following sub-steps: Step S21: Establish the mapping relationship between semantic hierarchy and parameter space, and map low, medium and high-level semantics to specific parameter update subspaces respectively; Step S22: Introduce hierarchical perceptual aggregation representation and use the attention mechanism to enable the model to dynamically focus on a dedicated representation subspace under the guidance of supervision signals at different levels; Step S23: Perform dynamic parameter sensitivity assessment by calculating the continuous integral of the loss function along the parameter update path to quantify the cumulative sensitivity of each semantic level to the LoRA parameter update direction; Step S24: Perform semantic hierarchical weighted fusion of the low-rank adaptation (LoRA) increment matrices of each layer based on the sensitivity scores; Driven by multidimensional semantics, step-by-step parameter updates are achieved. Step S3: Generate end-to-end symptom clusters under implicit evidence chain constraints through a single forward propagation; specifically including the following sub-steps: Step S31: Activate the unified semantic symptom synthesis interface to transform the multi-level inference logic solidified in the training phase into implicit reasoning in the implicit representation space; Step S32: Input the original clinical medical record text into the model and perform end-to-end mapping calculation based on implicit evidence chain in a single forward propagation; Step S33: Output a structured set of symptom clusters, including symptom cluster categories, temporal features, diagnostic hints, negative findings in differential diagnosis, and semantic hierarchical labels; Step S4 involves visually reconstructing and interactively displaying structured data through a clinical auxiliary diagnostic panel; this includes the following sub-steps: Step S41: Activate the multidimensional feature mapping mechanism to transform the extracted discrete structured symptom data into modular associated visual primitives and construct a view framework that includes symptom cluster decision cards and differential diagnosis checklists. Step S42: Through the visual isolation mechanism of the front-end code, assign background color and label format to "causative factors" and move them into the "pathogenesis logic" list level for display, so that doctors can intuitively distinguish the source cause and the symptoms. Step S43: Deploy the original text feature mapping anchor point, bind the structured feature elements with the original medical record text, and provide bidirectional highlight association and evidence tracing through interactive commands.
8. An electronic device, comprising a memory and a processor; wherein a computer program is stored in the memory; and when the computer program is executed on the processor, it implements the above-described psychiatric medical record structure extraction system and method based on semantic hierarchical fine-tuning.