An osteoporosis risk grading prediction method based on clinical priori logic gate control
The osteoporosis risk grading prediction method, which integrates dual-stream feature coding and logic gating, solves the problems of low feature utilization and lack of clinical logic in existing technologies. It achieves high-precision and interpretable osteoporosis risk grading, significantly improving the accuracy and specificity of screening.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for the diagnosis and risk screening of osteoporosis suffer from low feature utilization, insufficient accuracy, lack of clinical logic and ordinal grading, leading to frequent false negative or false positive judgments. Furthermore, traditional AI models are difficult to meet the needs of refined clinical management.
An osteoporosis risk grading prediction method based on clinical prior logic gating is adopted. By combining a dual-stream feature encoding module and a logic gating fusion module with a cascaded classification prediction module, clinical diagnostic rules are explicitly embedded. Multimodal clinical data is used for feature extraction and dynamic weighted fusion to output osteoporosis risk grading results.
It improves the accuracy and specificity of osteoporosis risk stratification, significantly enhances screening precision, has clinical interpretability, can simulate the diagnostic thinking of doctors, and alleviates the confusion problem of ordinal classification.
Smart Images

Figure CN122117365A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to a method for predicting osteoporosis risk grading based on clinical prior logic gating. Background Technology
[0002] Osteoporosis is a systemic bone disease characterized by low bone mass and destruction of bone microstructure, often without obvious symptoms in its early stages. Currently, the clinical diagnosis and risk screening of osteoporosis mainly rely on the following methods: 1) Imaging gold standard (DXA): Dual-energy X-ray absorptiometry (DXA) is the gold standard for diagnosis, which is graded by measuring bone mineral density (BMD) T-values.
[0003] 2) Simple risk assessment tools: such as the Asian Osteoporosis Self-Screening Tool (OSTA) or the Fracture Risk Prediction Tool (FRAX). These tools typically calculate a simple linear score based on a very small number of core indicators (such as age, weight, and smoking history) for initial screening of high-risk individuals.
[0004] 3) Conventional data mining models: In recent years, with the popularization of electronic medical records (EMR), some technologies have attempted to use support vector machines (SVM), random forests (RF) or traditional fully connected neural networks (MLP) to classify and predict patient data.
[0005] While the above methods have aided clinical diagnosis to some extent, significant technical bottlenecks and limitations remain in large-scale, low-cost precision screening scenarios: 1) Traditional scales (such as OSTA) have low feature utilization and insufficient accuracy: Tools like OSTA have drastically simplified input features (using only age and weight) to facilitate manual calculations. This simplification ignores a wealth of high-value information contained in electronic medical records, such as biochemical test indicators (serum calcium, serum phosphorus, bone metabolism markers) and unstructured medical history (such as old fractures in specific locations). This results in low specificity for such tools, making them prone to producing a large number of false negatives or false positives.
[0006] 2) General AI models lack "clinical logic" and suffer from a "black box" trust crisis: Existing machine learning methods typically employ an "end-to-end" black-box training model, mixing all features as input. However, clinical diagnosis follows strict evidence-based medicine logic (e.g., for individuals under 50 years of age, primary osteoporosis is rarely diagnosed unless there is a specific medical history). General-purpose models cannot explicitly model these hard thresholds or veto rules, leading to predictions that sometimes contradict common medical sense and are difficult for doctors to trust.
[0007] 3) Single-stage multi-classification networks struggle with the "ordinal classification" problem: Osteoporosis risk levels (e.g., normal, osteopenia, osteoporosis, severe osteoporosis) exhibit significant ordinal characteristics and progressiveness. Traditional single-stage four-class classification networks (using a single Softmax output) often treat the categories as independent, ignoring the evolutionary relationships between them. This leads to severe feature confusion when the model handles "borderline states" (e.g., between "normal" and "mild osteopenia"), making it difficult to achieve the required accuracy for refined clinical management. Summary of the Invention
[0008] This invention provides a method for predicting osteoporosis risk grading based on clinical prior logic gating, in order to solve the above-mentioned technical problems existing in the prior art.
[0009] According to the first aspect, one embodiment provides a method for predicting osteoporosis risk stratification based on clinical prior logic gating, the method comprising: Acquire multimodal clinical data from patients, perform structured mapping and preprocessing, and obtain standardized feature vector sets; Construct and train a neural network model for predicting osteoporosis risk grading, wherein the neural network model for predicting osteoporosis risk grading includes a two-stream feature encoding module, a logic-gated fusion module, and a cascaded classification prediction module; The dual-stream feature encoding module includes two parallel processing branches: a data feature extraction branch for extracting nonlinear deep features of multimodal clinical data, and a clinical rule encoding branch for parametric encoding of prior clinical diagnostic rules using a learnable threshold activation function. The logic gate fusion module is used to utilize the logic gate activation values generated by the clinical rule coding branch, and dynamically weight and fuse the deep features extracted by the data feature extraction branch through an attention mechanism to output a fused feature that incorporates clinical prior knowledge. The cascaded classification prediction module adopts a two-stage serial structure: the first-stage classifier is used to output a binary probability of normal / abnormal based on the fusion features output by the logic-gated fusion module, and the second-stage classifier is used to process only abnormal samples and output the subdivided probabilities of low risk / medium risk / high risk. The standardized feature vector group is concatenated and then input into the trained osteoporosis risk grading prediction neural network model, and the osteoporosis risk grading prediction result is output.
[0010] Furthermore, multimodal clinical data from patients is acquired and subjected to structured mapping and preprocessing to obtain a standardized feature vector set, specifically including: Input the original electronic medical record data, extract and group it into three groups of feature vectors: demographic, biochemical and physical signs, and medical history events; Among them, demographic feature vectors The extracted fields include: age, gender, height, and weight; derived features include: body mass index. ; Biochemical and physical characteristic vectors The extracted fields include: systolic blood pressure, diastolic blood pressure, blood calcium, blood phosphorus, alkaline phosphatase, bone metabolism indicators, and liver and kidney function indicators. Medical history event feature vector The field extraction and encoding logic includes: extracting keywords from the "Diagnosis Name" and "Past Medical History" text fields in the medical record; the encoding logic is: constructing a dictionary of key parts. If the text contains a word from the dictionary, the corresponding position is set to 1, and a multi-hot vector is generated. Missing values were processed and Z-score was applied to the feature vectors to obtain three sets of standardized feature vectors.
[0011] Furthermore, the data feature extraction branch specifically includes: The formula for calculating the hierarchy is:
[0012] in: : No. The high-dimensional feature vectors output by the hidden layers; : No. The output of the layer, when hour, , This refers to the input features obtained by concatenating multiple sets of standardized feature vectors. : No. The learnable weight matrix of the layer is used to perform linear transformation on the input features; : No. Learnable bias vectors of the layer; : Modify the activation function of the linear unit to introduce nonlinear characteristics; Residual connections directly superimpose the input onto the output to prevent gradient vanishing. : The deep feature representation of the final output of the current branch.
[0013] Furthermore, the clinical rule coding branch specifically includes: The age threshold, used to simulate the rule in clinical guidelines that "ages > 50 years require priority screening," is represented as:
[0014] in: : Activation value of the age threshold gate, range of values The closer the value is to 1, the higher the risk. The patient's actual age. The learnable age threshold parameter is automatically fine-tuned by the network during training. : A scaling factor that controls the steepness of the activation function and determines the sensitivity to age boundaries.
[0015] Furthermore, the clinical rule coding branch specifically includes: The "fracture incident" category is used to simulate a doctor's absolute disapproval or high level of vigilance regarding a "history of fragility fractures," and is represented as follows:
[0016] in: : Activation value of the fracture event gate, range of values , used to represent the strength of risk gain; : Multi-hot vector of medical history characteristics, 1 if there is a corresponding fracture site, 0 otherwise; : Learnable weight vector transpose for different fracture sites and severity levels; The hyperbolic tangent activation function is used to normalize the output to a range.
[0017] Furthermore, the logic gating fusion module specifically includes:
[0018] in: The fused feature vector, which incorporates prior clinical knowledge, serves as the input to the cascaded classification prediction module. The original feature vector extracted by the data feature extraction branch; : Concatenate the scalar outputs of each logic gate into a logic state vector; : Gated mapping layer, used to map low-dimensional logic state vectors to... Same dimensions; : A learnable attention intensity scalar that controls the degree of influence of logical rules on the final features; Hadamard product, which is the element-wise multiplication of vectors. The residual attention mechanism ensures that even without logical risks, the original features are preserved. It can also be preserved.
[0019] Furthermore, the cascaded classification prediction module specifically includes: The first-level classifier is used for health screening and is represented as follows:
[0020] in: : The probability value of a patient having a risk of bone loss, and the range of values. ; The fused feature vector output by the logic-gated fusion module; : The transpose of the weight vector of the first-level classifier; : The bias scalar of the first-level classifier; The sigmoid activation function is used to compress linear outputs into probability values.
[0021] Furthermore, the cascaded classification prediction module specifically includes: The second-level classifier is used for severity classification, and only applies if the first-level classifier determines that there is a risk. At that time, the feature vector This layer will only be entered after input; it is represented as:
[0022] in: A probability distribution vector containing 3 elements. These represent the probabilities of low risk, medium risk, and high risk, respectively. The weight matrix of the second-level classifier; : The bias vector of the second-level classifier; : Normalized exponential function, ensuring that the sum of all elements in the output vector is 1.
[0023] Furthermore, the neural network model for predicting osteoporosis risk grading is trained, specifically including: During training, a conditional mask loss function is used: the grading loss of the second-level classifier is calculated only for samples that are judged as abnormal by the first-level classifier, thereby decoupling the health screening task from the severity grading task. Therefore, the formula for the total loss function is defined as follows:
[0024] in: : The total loss value used for backpropagation to update network parameters; Binary cross-entropy loss is used to supervise the accuracy of the first-level classifier. : True binary labels, 0 indicates normal, 1 indicates disease; Multi-class cross-entropy loss is used to supervise the accuracy of the second-level classifier. : The actual severity level is categorized into three levels: 1 - low risk, 2 - medium risk, and 3 - high risk. Indicator function, when the actual label A value greater than 0 indicates that the patient is indeed ill, and a value of 1 is used otherwise, ensuring that healthy samples do not interfere with the training of the grader. : Hyperparameter balancing coefficient, used to adjust the ratio of the loss weights of the two tasks.
[0025] According to the second aspect, one embodiment provides an osteoporosis risk grading prediction system based on clinical prior logic gating, the system comprising: The data processing module is used to acquire multimodal clinical data of patients, perform structured mapping and preprocessing, and obtain standardized feature vector sets; The prediction model construction and training module is used to construct and train an osteoporosis risk grading prediction neural network model, wherein the osteoporosis risk grading prediction neural network model includes a two-stream feature encoding module, a logic-gated fusion module, and a cascaded classification prediction module. The dual-stream feature encoding module includes two parallel processing branches: a data feature extraction branch for extracting nonlinear deep features of multimodal clinical data, and a clinical rule encoding branch for parametric encoding of prior clinical diagnostic rules using a learnable threshold activation function. The logic gate fusion module is used to utilize the logic gate activation values generated by the clinical rule coding branch, and dynamically weight and fuse the deep features extracted by the data feature extraction branch through an attention mechanism to output a fused feature that incorporates clinical prior knowledge. The cascaded classification prediction module adopts a two-stage serial structure: the first-stage classifier is used to output a binary probability of normal / abnormal based on the fusion features output by the logic-gated fusion module, and the second-stage classifier is used to process only abnormal samples and output the subdivided probabilities of low risk / medium risk / high risk. The prediction module is used to concatenate standardized feature vector groups and input them into the trained osteoporosis risk grading prediction neural network model, and output the osteoporosis risk grading prediction results.
[0026] This invention provides a method for predicting osteoporosis risk stratification based on clinical prior logic gating, which has the following beneficial effects: 1) Interpretable Embedding of Clinical Logic: Unlike the "black box" prediction of traditional neural networks, this invention uses explicit "logic branches" and "gating units" to enable the model to simulate the diagnostic thinking of doctors "preliminary qualitative assessment based on age and medical history". After visualizing the weight changes during feature fusion, it can help doctors understand why a patient is judged to be high-risk (e.g., because the fracture gate is activated).
[0027] 2) Solves the confusion problem of ordinal classification: The “cascaded classification head” design is adopted, which first divides into two categories and then further subdivides them, effectively alleviating the problem of unclear boundaries between “normal” and “mild osteopenia” in traditional four-category networks, and significantly improving the specificity of screening and the accuracy of classification. Attached Figure Description
[0028] Figure 1 A flowchart of an osteoporosis risk grading prediction method based on clinical prior logic gating provided in one embodiment of the present invention; Figure 2 A flowchart illustrating the specific implementation of an osteoporosis risk grading prediction method based on clinical prior logic gating, as provided in one embodiment of the present invention; Figure 3 The overall architecture diagram of the osteoporosis risk grading prediction neural network model in an osteoporosis risk grading prediction method based on clinical prior logic gating provided in an embodiment of the present invention; Figure 4 A schematic diagram of a dual-stream feature encoding module in an osteoporosis risk grading prediction method based on clinical prior logic gating, provided in an embodiment of the present invention; Figure 5 A schematic diagram of a logic gating fusion module in an osteoporosis risk grading prediction method based on clinical prior logic gating, provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of a cascaded classification prediction head in an osteoporosis risk grading prediction method based on clinical prior logic gating, provided as an embodiment of the present invention. Detailed Implementation
[0029] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the invention. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present invention are not shown or described in the specification. This is to avoid obscuring the core parts of the invention with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.
[0030] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0031] The first embodiment of this invention provides a method for predicting osteoporosis risk grading based on clinical prior logic gating. It aims to transform the diagnostic logic in clinical guidelines into an "attention gating mechanism" in a neural network through a two-stream architecture, combined with a cascaded "screening-grading" strategy. This system can directly utilize existing structured data (demographics, lab reports, medical history) in the hospital information system (HIS) to achieve low-cost, high-precision, and clinically interpretable osteoporosis risk grading without additional imaging examinations. The following is a detailed explanation... Figure 1 and Figure 2 Please provide a detailed explanation.
[0032] This embodiment proposes an end-to-end deep learning classification framework called Clinical Logic-Gated Cascade Network (CLG-Net). This framework mainly comprises four core steps: multi-source data structured mapping, two-stream feature encoding, logical gating fusion, and cascaded classification prediction. Details are as follows: like Figure 1 As shown, in step S100, multimodal clinical data of patients are acquired, and structured mapping and preprocessing are performed to obtain a standardized feature vector group.
[0033] In this embodiment, the specific steps for structured mapping and preprocessing of multi-source clinical data are as follows: The input for this step is the original electronic medical record data, and the output is three sets of standardized feature vectors.
[0034] S110, Feature Extraction and Grouping Based on the semantic attributes of the data, the features are extracted into three independent vector groups: Group A: Demographic Feature Vectors ( ) Extracted fields: age, gender (0 / 1 encoding), height, weight; Derivative feature: Calculation of body mass index ; in, Patient weight (unit: kg); Patient's height (unit: m).
[0035] Group B: Biochemical and physiological characteristic vectors ( ) Extracted fields: systolic blood pressure, diastolic blood pressure, serum calcium (Ca), serum phosphorus (P), alkaline phosphatase (ALP), bone metabolism indicators (four bone markers), liver and kidney function indicators; Processing strategy: Missing values are filled using interpolation based on K-nearest neighbors (KNN).
[0036] Group C: Feature vector of medical history events ( ) Extracting fields: Extract keywords from the "Diagnosis Name" and "Past Medical History" text fields; Encoding logic: Constructing a dictionary of key parts If the text contains a word from the dictionary, the corresponding position is set to 1, generating a multi-hot vector.
[0037] S120, Data Standardization Formula For continuous numerical variables (such as age and blood calcium concentration), Z-Score standardization is used to eliminate dimensional differences.
[0038]
[0039] Symbol explanation: The first one after standardization The feature values are used as input to the neural network.
[0040] The first in the original data A characteristic value (e.g., age 65).
[0041] Training Set No. The statistical mean of each feature.
[0042] Training Set No. The statistical standard deviation of each feature.
[0043] : A small constant to prevent the denominator from being zero (usually taken as ) ).
[0044] like Figure 1 As shown, in step S200, a neural network model for predicting osteoporosis risk grading is constructed and trained, wherein, as... Figure 3 As shown, the osteoporosis risk grading prediction neural network model includes a two-stream feature encoding module, a logic-gated fusion module, and a cascaded classification prediction module.
[0045] S210, a two-stream feature coding network: In this embodiment, as Figure 4 As shown, the dual-stream feature encoding module contains two parallel processing branches, which respectively simulate "data mining" and "rule judgment": the data feature extraction branch is used to extract nonlinear deep features of multimodal clinical data, and the clinical rule encoding branch is used to parameterize and encode clinical prior diagnostic rules using a learnable threshold activation function.
[0046] 1. Data-Driven Branch This branch is used to uncover potential nonlinear correlations between indicators.
[0047] Feature splicing:
[0048] Symbol explanation: : The total input vector of the network.
[0049] The vector concatenation operation connects multiple feature vectors end-to-end along the channel dimension, merging them into a single long vector.
[0050] Hierarchical calculation formula (Res-MLP):
[0051] Symbol explanation: : No. The high-dimensional feature vector output by the hidden layer.
[0052] : No. The output of the layer (when) hour, ).
[0053] : No. The learnable weight matrix of a layer is used to perform linear transformations on the input features.
[0054] : No. The learnable bias vector of a layer.
[0055] The modified linear unit activation function is defined as follows: , used to introduce nonlinear characteristics.
[0056] Residual connections directly superimpose the input onto the output to prevent gradient vanishing.
[0057] The final output of this branch is the deep feature representation.
[0058] 2. Clinical Logic Branch Instead of deep abstraction, this branch introduces a learnable threshold activation function to parameterize and encode key clinical rules.
[0059] Logical Node A: Age Gate simulates the rule in clinical guidelines that "people over 50 years of age should be screened more closely."
[0060]
[0061] Symbol explanation: : Activation value of the age logic gate, range of values The closer the value is to 1, the higher the risk.
[0062] : The patient's actual age (unnormalized).
[0063] : A learnable age threshold parameter (initialized to 50.0), which the network will automatically fine-tune during training.
[0064] The scaling factor, which controls the steepness of the activation function, determines the sensitivity to age boundaries.
[0065] The base of the natural logarithm.
[0066] Logic Node B: Fracture Gate. Simulates a doctor's veto or high vigilance regarding a "history of fragility fractures".
[0067]
[0068] Symbol explanation: : Activation value of fracture risk threshold, range of values , is typically used to indicate the strength of risk gain.
[0069] : Multi-hot vector of medical history characteristics (1 if there is a corresponding fracture site, 0 otherwise).
[0070] : Learnable weight vector transpose for different fracture sites (e.g., hip vs. wrist) severity.
[0071] The hyperbolic tangent activation function is defined as follows: This is used to normalize the output to a range.
[0072] This embodiment constructs a pathological fracture keyword mapping mechanism based on anatomical location for the "Diagnosis Name" text field in electronic medical records. This mechanism transforms unstructured text descriptions into high-dimensional sparse multi-hot vectors, which are directly used as strong prior features input into the clinical rule encoding branch. A fracture risk gating signal is generated through the hyperbolic tangent (Tanh) activation function, realizing an end-to-end mapping from textual medical history to quantified risk weights.
[0073] S220, a logic-gated fusion network: In this embodiment, as Figure 5 As shown, the logic gate fusion module uses the logic gate activation values generated by the clinical rule encoding branch to dynamically weight and fuse the deep features extracted by the data feature extraction branch through an attention mechanism, and outputs fused features that incorporate clinical prior knowledge.
[0074] Logic-Gated Attention Fusion: Utilizes the "risk signal" generated from clinical logic branches to dynamically weight (attention gating) the features of data branches, represented as:
[0075] Symbol explanation: The final feature vector, which incorporates prior clinical knowledge, is input into the classification head.
[0076] : The original feature vector extracted by the data-driven branch.
[0077] : Concatenate the scalar outputs of each logic gate into a logic state vector.
[0078] Gated mapping layers (usually single-layer fully connected layers) are used to map low-dimensional logic state vectors to... Same dimensions.
[0079] : A learnable attention scalar that controls the degree of influence of logical rules on the final features.
[0080] The Hadamard product is an element-wise multiplication operation of vectors.
[0081] The residual attention mechanism ensures that even without logical risks, the original data features are preserved. It can also be preserved.
[0082] S230, Cascade Classification Head: In this embodiment, as Figure 6 As shown, the cascaded classification prediction module adopts a two-stage serial structure: the first-stage classifier is used to output the binary probability of normal / abnormal based on the fusion features output by the logic-gated fusion module, and the second-stage classifier is used to process only abnormal samples and output the subdivided probability of low risk / medium risk / high risk.
[0083] To address the multi-class confusion issue, the network terminal is designed with a two-stage cascaded structure. Details are as follows: Level 1: Binary Screener The aim is to highly sensitively isolate the "completely healthy population".
[0084]
[0085] Symbol explanation: : The probability value of a patient having a risk of bone loss, with a range of values. .
[0086] : The fused feature vector output from the previous step.
[0087] The weight vector transpose of the first-level classifier.
[0088] : Bias scalar of the first-level classifier.
[0089] The Sigmoid activation function is defined as follows: This is used to compress linear outputs into probability values.
[0090] Level 2: Severity Grader Only when the first level is determined to be risky ( When ), the eigenvector This layer will only be entered after that.
[0091]
[0092] Symbol explanation: A probability distribution vector containing 3 elements. , representing the probabilities of low risk, medium risk, and high risk, respectively.
[0093] The weight matrix of the second-level classifier has dimensions of [dimension number missing]. .
[0094] The bias vector of the second-level classifier, with dimensions of... .
[0095] : Normalized exponential function, formula is This ensures that the sum of all elements in the output vector is 1.
[0096] Final Judgment Logic
[0097] Symbol explanation: : The final output of clinical diagnostic grading.
[0098] : The maximum index operation returns a probability vector. The index of the element with the largest value in the middle.
[0099] : The preset binary classification decision threshold.
[0100] S240, Conditional Masked Loss The classification prediction module adopts a cascaded topology of "binary screening - multi-level classification". The first-level classifier outputs a binary probability of normal / abnormal based on fused features; the second-level classifier only processes anomalous samples and outputs a subdivided probability of low risk / medium risk / high risk. During training, a conditional mask loss function is used, and the classification loss of the second level is calculated only for samples judged as anomalous by the first level, thereby decoupling the screening task from the classification task.
[0101] To jointly optimize the two-stage network, the total loss function is defined as follows:
[0102] Symbol explanation: : The total loss value used for backpropagation to update network parameters.
[0103] Binary Cross-Entropy Loss is used to supervise the accuracy of the first-level screener.
[0104] : True binary labels (0 indicates normal, 1 indicates disease).
[0105] Cross-Entropy Loss for multi-class classification is used to supervise the accuracy of the second-level classifier.
[0106] : Real risk rating labels (1-low risk, 2-medium risk, 3-high risk).
[0107] Indicator Function: When the actual label... The value is 1 when it is greater than 0 (i.e., the patient is indeed sick), and 0 otherwise. This ensures that healthy samples do not interfere with the training of the grader.
[0108] : Hyperparameter balancing coefficient, used to adjust the ratio of the loss weights of the two tasks.
[0109] like Figure 1 As shown, in step S300, the standardized feature vector group is concatenated and then input into the trained osteoporosis risk grading prediction neural network model, and the osteoporosis risk grading prediction result is output.
[0110] Corresponding to the osteoporosis risk grading prediction method based on clinical prior logic gating disclosed above, this invention also discloses an osteoporosis risk grading prediction system based on clinical prior logic gating, which specifically includes: The data processing module is used to acquire multimodal clinical data of patients, perform structured mapping and preprocessing, and obtain standardized feature vector sets; The prediction model construction and training module is used to construct and train an osteoporosis risk grading prediction neural network model, wherein the osteoporosis risk grading prediction neural network model includes a two-stream feature encoding module, a logic-gated fusion module, and a cascaded classification prediction module. The dual-stream feature encoding module includes two parallel processing branches: a data feature extraction branch for extracting nonlinear deep features of multimodal clinical data, and a clinical rule encoding branch for parametric encoding of prior clinical diagnostic rules using a learnable threshold activation function. The logic gate fusion module is used to utilize the logic gate activation values generated by the clinical rule coding branch, and dynamically weight and fuse the deep features extracted by the data feature extraction branch through an attention mechanism to output a fused feature that incorporates clinical prior knowledge. The cascaded classification prediction module adopts a two-stage serial structure: the first-stage classifier is used to output a binary probability of normal / abnormal based on the fusion features output by the logic-gated fusion module, and the second-stage classifier is used to process only abnormal samples and output the subdivided probabilities of low risk / medium risk / high risk. The prediction module is used to concatenate standardized feature vector groups and input them into the trained osteoporosis risk grading prediction neural network model, and output the osteoporosis risk grading prediction results.
[0111] It should be noted that for a detailed description of the osteoporosis risk grading prediction system based on clinical prior logic gating provided in the embodiments of the present invention, please refer to the relevant description of the osteoporosis risk grading prediction method based on clinical prior logic gating provided in the embodiments of the present invention, which will not be repeated here.
[0112] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.
Claims
1. A method for predicting osteoporosis risk stratification based on clinical prior logic gating, characterized in that, The method includes: Acquire multimodal clinical data from patients, perform structured mapping and preprocessing, and obtain standardized feature vector sets; Construct and train a neural network model for predicting osteoporosis risk grading, wherein the neural network model for predicting osteoporosis risk grading includes a two-stream feature encoding module, a logic-gated fusion module, and a cascaded classification prediction module; The dual-stream feature encoding module includes two parallel processing branches: a data feature extraction branch for extracting nonlinear deep features of multimodal clinical data, and a clinical rule encoding branch for parametric encoding of prior clinical diagnostic rules using a learnable threshold activation function. The logic gate fusion module is used to utilize the logic gate activation values generated by the clinical rule coding branch, and dynamically weight and fuse the deep features extracted by the data feature extraction branch through an attention mechanism to output a fused feature that incorporates clinical prior knowledge. The cascaded classification prediction module adopts a two-stage serial structure: the first-stage classifier is used to output a binary probability of normal / abnormal based on the fusion features output by the logic-gated fusion module, and the second-stage classifier is used to process only abnormal samples and output the subdivided probabilities of low risk / medium risk / high risk. The standardized feature vector group is concatenated and then input into the trained osteoporosis risk grading prediction neural network model, and the osteoporosis risk grading prediction result is output.
2. The osteoporosis risk grading prediction method based on clinical prior logic gating as described in claim 1, characterized in that, Acquire multimodal clinical data from patients, perform structured mapping and preprocessing to obtain a standardized feature vector set, specifically including: Input the original electronic medical record data, extract and group it into three groups of feature vectors: demographic, biochemical and physical signs, and medical history events; Among them, demographic feature vectors The extracted fields include: age, gender, height, and weight; derived features include: body mass index. ; Biochemical and physical characteristic vectors The extracted fields include: systolic blood pressure, diastolic blood pressure, blood calcium, blood phosphorus, alkaline phosphatase, bone metabolism indicators, and liver and kidney function indicators. Medical history event feature vector The field extraction and encoding logic includes: extracting keywords from the "Diagnosis Name" and "Past Medical History" text fields in the medical record; the encoding logic is: constructing a dictionary of key parts. If the text contains a word from the dictionary, the corresponding position is set to 1, and a multi-hot vector is generated. Missing values were processed and Z-score was applied to the feature vectors to obtain three sets of standardized feature vectors.
3. The osteoporosis risk grading prediction method based on clinical prior logic gating as described in claim 1, characterized in that, The data feature extraction branch specifically includes: The formula for calculating the hierarchy is: in: : No. The high-dimensional feature vectors output by the hidden layers; : No. The output of the layer, when hour, , This refers to the input features obtained by concatenating multiple sets of standardized feature vectors. : No. The learnable weight matrix of the layer is used to perform linear transformation on the input features; : No. Learnable bias vectors of the layer; : Modify the activation function of the linear unit to introduce nonlinear characteristics; Residual connections directly superimpose the input onto the output to prevent gradient vanishing. : The deep feature representation of the final output of the current branch.
4. The osteoporosis risk grading prediction method based on clinical prior logic gating as described in claim 1, characterized in that, The clinical rule coding branch specifically includes: The age threshold, used to simulate the clinical guideline rule of "priority screening for ages > 50," is represented as: in: : Activation value of the age threshold gate, range of values The closer the value is to 1, the higher the risk. The patient's actual age. : Learnable age threshold parameter; the network will automatically fine-tune the age threshold parameter during training. : A scaling factor that controls the steepness of the activation function and determines the sensitivity to age boundaries.
5. The osteoporosis risk grading prediction method based on clinical prior logic gating as described in claim 4, characterized in that, The clinical rule coding branch specifically includes: The "fracture incident" category is used to simulate a doctor's absolute disapproval or high level of vigilance regarding a "history of fragility fractures," and is represented as follows: in: : Activation value of the fracture event gate, range of values , used to represent the strength of risk gain; : Multi-hot vector of medical history characteristics, 1 if there is a corresponding fracture site, 0 otherwise; : Learnable weight vector transpose for different fracture sites and severity levels; The hyperbolic tangent activation function is used to normalize the output to a range.
6. The osteoporosis risk grading prediction method based on clinical prior logic gating as described in claim 5, characterized in that, The logic gating fusion module specifically includes: in: The fused feature vector, which incorporates prior clinical knowledge, serves as the input to the cascaded classification prediction module. The original feature vector extracted by the data feature extraction branch; : Concatenate the scalar outputs of each logic gate into a logic state vector; : Gated mapping layer, used to map low-dimensional logic state vectors to... Same dimensions; : A learnable attention intensity scalar that controls the degree of influence of logical rules on the final features; Hadamard product, which is the element-wise multiplication of vectors. The residual attention mechanism ensures that even without logical risks, the original features are preserved. It can also be preserved.
7. The osteoporosis risk stratification prediction method based on clinical prior logic gating as described in claim 1, characterized in that, The cascaded classification prediction module specifically includes: The first-level classifier is used for health screening and is represented as follows: in: : The probability value of a patient having a risk of bone loss, and the range of values. ; The fused feature vector output by the logic-gated fusion module; : Transpose of the weight vector of the first-level classifier; : The bias scalar of the first-level classifier; The Sigmoid activation function is used to compress linear outputs into probability values.
8. The osteoporosis risk grading prediction method based on clinical prior logic gating as described in claim 7, characterized in that, The cascaded classification prediction module further includes: The second-level classifier is used for severity classification, and only applies if the first-level classifier determines that there is a risk. At that time, the feature vector This layer will only be entered after input; it is represented as: in: A probability distribution vector containing 3 elements. These represent the probabilities of low risk, medium risk, and high risk, respectively. The weight matrix of the second-level classifier; : The bias vector of the second-level classifier; : Normalized exponential function, ensuring that the sum of all elements in the output vector is 1.
9. The osteoporosis risk stratification prediction method based on clinical prior logic gating as described in claim 8, characterized in that, Training a neural network model for predicting osteoporosis risk stratification specifically includes: During training, a conditional mask loss function is used: the grading loss of the second-level classifier is calculated only for samples that are judged as abnormal by the first-level classifier, thereby decoupling the health screening task from the severity grading task. Therefore, the formula for the total loss function is defined as follows: in: : The total loss value used for backpropagation to update network parameters; Binary cross-entropy loss is used to supervise the accuracy of the first-level classifier. : True binary labels, 0 indicates normal, 1 indicates disease; Multi-class cross-entropy loss is used to supervise the accuracy of the second-level classifier. : The actual severity level is categorized into three levels: 1 - low risk, 2 - medium risk, and 3 - high risk. Indicator function, when the actual label A value greater than 0 indicates that the patient is indeed ill, and a value of 1 is used otherwise, ensuring that healthy samples do not interfere with the training of the grader. : Hyperparameter balancing coefficient, used to adjust the ratio of the loss weights of the two tasks.
10. An osteoporosis risk grading and prediction system based on clinical prior logic gating, characterized in that, The system includes: The data processing module is used to acquire multimodal clinical data of patients, perform structured mapping and preprocessing, and obtain standardized feature vector sets; The prediction model construction and training module is used to construct and train an osteoporosis risk grading prediction neural network model, wherein the osteoporosis risk grading prediction neural network model includes a two-stream feature encoding module, a logic-gated fusion module, and a cascaded classification prediction module. The dual-stream feature encoding module includes two parallel processing branches: a data feature extraction branch for extracting nonlinear deep features of multimodal clinical data, and a clinical rule encoding branch for parametric encoding of prior clinical diagnostic rules using a learnable threshold activation function. The logic gate fusion module is used to utilize the logic gate activation values generated by the clinical rule coding branch, and dynamically weight and fuse the deep features extracted by the data feature extraction branch through an attention mechanism to output a fused feature that incorporates clinical prior knowledge. The cascaded classification prediction module adopts a two-stage serial structure: the first-stage classifier is used to output a binary probability of normal / abnormal based on the fusion features output by the logic-gated fusion module, and the second-stage classifier is used to process only abnormal samples and output the subdivided probabilities of low risk / medium risk / high risk. The prediction module is used to concatenate standardized feature vector groups and input them into the trained osteoporosis risk grading prediction neural network model, and output the osteoporosis risk grading prediction results.