A method for rapid assessment of thyrotropin values
By integrating 12 clinical indicators to construct a regression-classification dual-task model, the problems of high cost, long cycle and high misjudgment rate in existing TSH assessment technologies are solved, realizing rapid, low cost and interpretable TSH assessment, which is suitable for cross-institutional deployment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE AFFILIATED HOSPITAL OF QINGDAO UNIV
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies lack a systematic approach to integrating multidimensional routine test indicators for TSH value prediction, making it impossible to quickly, cost-effectively, and interpretably assess TSH values. Furthermore, the generalization ability of models deployed across institutions is insufficient, leading to missed detections and misdiagnoses of thyroid dysfunction.
By integrating 12 routine clinical indicators, a regression-classification dual-task joint learning model is constructed. Combined with age-adaptive reference interval correction and multi-model integration strategies, a rapid and low-cost assessment of TSH values is achieved, and interpretable reports are provided.
It significantly shortens the testing cycle to within 5 minutes, reduces costs by 80%, improves the accessibility of thyroid dysfunction screening, reduces the misdiagnosis rate of subclinical conditions, enhances clinical accuracy and interpretability, and supports cross-institutional deployment.
Smart Images

Figure CN122158118A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical data processing technology, and specifically to a method for rapidly assessing thyroid-stimulating hormone (TSH) levels. Background Technology
[0002] Thyroid-stimulating hormone (TSH) is a glycoprotein hormone secreted by thyroid-stimulating cells in the anterior pituitary gland. It is the most sensitive biomarker reflecting the functional status of the hypothalamus-pituitary-thyroid axis. Abnormal TSH levels are closely related to the diagnosis and monitoring of treatment efficacy for hyperthyroidism, hypothyroidism, and various subclinical thyroid disorders. It is an indispensable test item in the daily diagnosis and treatment of endocrinologists, health check-up centers, and primary healthcare institutions.
[0003] Currently, clinical TSH testing primarily relies on chemiluminescence immunoassay (CLIA). This method requires a dedicated chemiluminescence immunoassay analyzer and associated reagents and consumables, with a single test costing approximately 80-150 yuan. The testing cycle typically takes 2-4 hours and requires operation by a professional laboratory technician. In scenarios such as health check-up centers, primary healthcare institutions, and large-scale population screening, these constraints limit the accessibility of TSH testing: many individuals forgo TSH screening due to the additional cost or waiting time, resulting in missed diagnoses of thyroid dysfunction.
[0004] Studies have shown that TSH levels are physiologically associated with several routine clinical indicators: Body mass index (BMI) affects the hypothalamic-pituitary-thyroid axis through leptin signaling in adipose tissue and is positively correlated with elevated TSH; prealbumin (transthyretin) is one of the thyroid hormone transport proteins, and its serum level changes dynamically with the thyroid metabolic state, with a half-life of only about 1.9 days, making it sensitive to recent metabolic changes; alkaline phosphatase (ALP) is significantly elevated in hyperthyroidism due to accelerated bone turnover; the neutrophil-to-lymphocyte ratio (NLR) is significantly elevated in autoimmune thyroid diseases such as Hashimoto's thyroiditis and has a synergistic indicative significance with abnormal TSH.
[0005] However, current technologies lack systematic artificial intelligence methods for integrating the aforementioned multidimensional routine test indicators for TSH numerical prediction, mainly due to the following technical problems: First, there is a lack of multidimensional feature fusion models for TSH prediction, especially technical solutions for jointly modeling the three categories of "metabolism-immunity-nutrition" indicators; Second, existing AI classification models can only provide thyroid function classification and cannot simultaneously output continuous TSH numerical predictions, making it difficult to meet the clinical need for numerical reference; Third, TSH reference intervals vary with age-related individual differences, and a uniform reference interval leads to a high misjudgment rate of subclinical states; Fourth, existing systems lack domain adaptation mechanisms for cross-institutional deployment, and the model's generalization ability across different testing platforms is insufficient.
[0006] Therefore, there is an urgent need for a method that can quickly, cost-effectively, and interpretably assess TSH values using routine physical examination and blood test data and artificial intelligence methods, in order to meet the practical needs of large-scale population screening and primary healthcare auxiliary diagnosis. Summary of the Invention
[0007] The purpose of this invention is to provide a method for rapidly assessing thyroid-stimulating hormone (TSH) levels. By integrating 12 routine clinical indicators of the subject, a regression-classification dual-task joint learning model is constructed. This model enables rapid, low-cost, and interpretable inference of TSH levels without the need for a chemiluminescence immunoassay analyzer. Furthermore, the clinical accuracy and reliability of the assessment are improved through age-adaptive reference interval correction and multi-model integration strategies.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] A method for rapidly assessing thyroid-stimulating hormone (TSH) levels includes the following steps:
[0010] Step S1, Clinical Data Collection: Collect 12 clinical indicators of the examinee from the hospital information system or physical examination management system as input features of the model, including: age, weight, BMI; hemoglobin, lymphocyte count, NLR, platelet count; albumin, prealbumin, total protein, AST and ALP; the time interval between the collection of blood routine and biochemical tests for the same examinee shall not exceed 24 hours;
[0011] Step S2, Data Quality Control and Feature Construction: The isolated forest algorithm is used to detect outliers in 12 input indicators, and random forest multiple imputation is used to fill missing values; Cartesian product cross operation is performed on the physical and demographic dimension features and the blood routine inflammation and immunity dimension features to construct second-order cross features represented by BMI×NLR and age×lymphocyte count.
[0012] Step S3, Dual-Task Joint Prediction: Input the feature vector output from Step S2 into the pre-trained regression-classification dual-task joint learning model; the model includes a shared feature encoding layer and two output heads: the regression head outputs the continuous numerical prediction result of TSH, and the classification head outputs the probability distribution of five states: hyperthyroidism, subclinical hyperthyroidism, normal thyroid function, subclinical hypothyroidism, and hypothyroidism; the joint loss function is defined as LtotAl=α*LMSE+β*LCrossEntropy;
[0013] Step S4, Age-Adaptive Reference Interval Correction: Automatically match the TSH reference interval for the corresponding age group based on the subject's age; substitute the regression head output value from Step S3 into the reference interval deviation scoring formula to convert it into a relative deviation score D; combine the D value with the probability distribution of the classification head output from Step S3 to generate a thyroid function grading conclusion.
[0014] Step S5, Interpretability Report Output: The contribution value of each feature is calculated using the SHAP method, and the top 5 main driving features are visualized. The output is a structured assessment report containing the following three layers of content: TSH predicted value and its 95% confidence interval; thyroid function classification conclusion and follow-up recommendations; and a visualization of feature contribution.
[0015] Furthermore, in step S2, the screening process for second-order cross features includes: calculating the SpeArmAn correlation coefficient between the 12 candidate cross terms and the TSH label, and retaining only cross features with an absolute value greater than 0.15; then performing a variance inflation factor (VIF) test on the retained features and removing terms with a VIF greater than 5; finally, the number of second-order cross features included in the model is no less than 2 and no more than 6.
[0016] Furthermore, in step S3, the shared feature encoding layer uses LightGBM gradient boosting tree as the base learner, and the leaf node indexes are one-hot encoded and concatenated to form an intermediate representation vector; both output heads are composed of two fully connected layers, with the regression head connected to a linear single-node output layer at the end and the classification head connected to a SoftmAx layer at the end.
[0017] Furthermore, in step S3, the weight coefficients α and β of the loss function are parameterized as learnable variables and automatically updated during backpropagation based on the task uncertainty weighting method; in each training round, the order of magnitude ratio R of regression loss to classification loss is calculated. When R>10, α is lowered and β is raised, and when R<0.1, the opposite adjustment is performed.
[0018] Furthermore, regarding the confounding issue of ALP in non-thyroid diseases: in step S1, the presence of skeletal system diseases, hepatobiliary system diseases, or a history of fracture within the past 3 months is recorded simultaneously. If such diseases are present, the ALP feature value is marked with a "potential confounding" label. In step S3, the sample carrying this label is automatically switched to the 11-dimensional standby sub-model after removing ALP for inference.
[0019] Furthermore, in step S3, the inference stage employs an integration of three independently trained isomorphic dual-task models: the TSH prediction is taken as the median of the three model outputs, and the grading conclusion is taken as the majority vote result; when the range of the TSH prediction values of the three models exceeds 2.0 mIU / L, an uncertainty prompt suggesting confirmation by chemiluminescence immunoassay is automatically added to the report in step S5.
[0020] Further, before the training in step S3, the following sample balancing processing is performed: If the number of samples in any category of subclinical hyperthyroidism or subclinical hypothyroidism is less than 1 / 5 of that of the normal category, SMOTE (K = 5) is used for synthetic amplification, and the ratio of samples in each category after amplification does not exceed 3:1; for the training samples with TSH labels falling within the critical interval, a weight twice as much is given in the loss function.
[0021] Further, in step S4, the reference intervals for age segmentation are as follows: for age < 40 years old, the upper limit U = 4.5 mIU / L; for age 40 - 60 years old, U = 5.0 mIU / L; for age > 60 years old, U = 6.0 mIU / L. The lower limit L for each age group is 0.5 mIU / L. During pregnancy, the special reference interval is used; the deviation score D is calculated as: when V ∈ [L, U], D = 0; when V > U, D = (V - U) / U × 100%; when V < L, D = (L - V) / L × 100%.
[0022] Further, in step S1, the history of thyroid surgery and the current L-T4 replacement therapy situation are synchronously recorded; if there are relevant situations, in step S3, switch to the special sub-model for "patients after thyroid surgery", and add two features, namely the surgical type and the daily dose of L-T4, to the original feature vector; in step S4, the reference interval is synchronously switched to the post-operative special interval, and for the subjects after thyroid cancer surgery, the TSH target management intervals for low-risk and medium-high-risk are respectively applied according to the tumor risk stratification.
[0023] Further, when deploying in multiple centers, the new institution must provide no less than 200 local calibration data, perform parameter adaptation for the batch normalization layer of the pre-trained model. After domain adaptation, the TSH prediction MAE on the reserved validation subset must be reduced by no less than 10% compared with that before adaptation before it can be put on the line; after being put on the line, performance monitoring is automatically triggered for every 500 accumulated paired records. If the MAE or the five-classification AUC-ROC drops by more than 5% compared with the previous baseline, the model update is triggered in the way of Fine-tuning, and the updated version must pass the verification of the independent test set before replacing the online version.
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] (1) The present invention compresses the TSH evaluation period from the traditional 2 - 4 hours to within 5 minutes, and the detection cost is reduced by about 80%, greatly improving the accessibility of screening for thyroid function abnormalities;
[0026] (2) The present invention combines immune-inflammatory indexes such as NLR and liver protein metabolism indexes for TSH evaluation, forming a three-dimensional feature system of "metabolism-immunity-nutrition", and the feature combination is novel;
[0027] (3) The regression-classification dual-task joint learning framework of the present invention uses the boundary supervision signal of the classification task to improve the regression accuracy near the critical value, while outputting continuous numerical values and hierarchical conclusions.
[0028] (4) The age-adaptive dynamic reference interval correction mechanism of the present invention reduces the misjudgment rate of subclinical status caused by a uniform reference interval;
[0029] (5) The interpretable output of the SHAP of this invention enables clinicians to understand the basis of the model's decision-making and improves clinical acceptance;
[0030] (6) The cross-institutional domain adaptation scheme of the present invention supports rapid deployment in new institutions with minimal local data and has good feasibility for clinical promotion. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating a method for rapidly assessing thyroid-stimulating hormone (TSH) levels disclosed in an embodiment of this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some embodiments of this invention, but not all embodiments.
[0033] Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] The embodiments and directional terms described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0035] Example 1; as Figure 1 As shown, this application discloses a method for rapidly assessing thyroid-stimulating hormone (TSH) levels, the method comprising the following steps:
[0036] Step S1: Multidimensional Clinical Data Acquisition
[0037] Twelve routine clinical indicators of the examinee were collected from the hospital information system or physical examination management system as input features of the model. The twelve indicators were divided into three dimensions according to physiological function attributes: (1) physical and demographic dimension, including age, weight and body mass index BMI; (2) blood routine inflammation and immunity dimension, including hemoglobin, lymphocyte count, neutrophil-to-lymphocyte ratio NLR and platelet count; (3) liver protein metabolism dimension, including albumin, prealbumin, total protein, aspartate aminotransferase AST and alkaline phosphatase ALP; it is required that the time interval between blood routine test and biochemical test of the same examinee shall not exceed 24 hours to ensure the timeliness consistency between the features and training labels.
[0038] Step S2, Data Quality Control and Feature Construction:
[0039] The isolated forest algorithm was used to detect outliers in the 12 input indicators collected in step S1, and abnormal samples caused by hemolysis, lipemia or collection errors were identified and marked. Missing values in the detection results were filled using a random forest-based multiple imputation algorithm. Based on the original 12 features, cross-dimensional Cartesian product cross-operation was performed on the physical and demographic features and the blood routine inflammation and immunity features to construct second-order cross features represented by BMI×NLR and age×lymphocyte count, so as to explicitly model the synergistic effect of obesity combined with autoimmune inflammation on thyroid-stimulating hormone levels.
[0040] Step S3, Dual-task joint prediction:
[0041] The feature vector output from step S2 is input into a pre-trained regression-classification joint learning model. The model includes a shared feature encoding layer and two independent output heads: Task A output head is a regression prediction head, outputting continuous numerical predictions of thyroid-stimulating hormone (TSH) in mIU / L; Task B output head is a classification prediction head, outputting the probability distributions of five states: hyperthyroidism, subclinical hyperthyroidism, normal thyroid function, subclinical hypothyroidism, and hypothyroidism. The joint loss function for the two tasks is defined as L... totAl =α*L MSE +β*L CrossEntropy The prediction accuracy of the regression task near the thyroid-stimulating hormone threshold is constrained by the supervision signal of the classification task.
[0042] Step S4, Age-Adaptive Dynamic Reference Interval Correction:
[0043] Based on the subject's age parameters collected in step S1, the normal reference range of thyroid-stimulating hormone (TSH) for the corresponding age group is automatically matched according to the preset piecewise function; the absolute value of the predicted TSH output from task A in step S3 is substituted into the reference range deviation scoring formula and converted into a relative score D that quantifies the degree of deviation; the final thyroid function classification conclusion is generated by combining the D value with the five-category probability distribution output from task B in step S3.
[0044] Step S5, Output of interpretability results:
[0045] The ShApley contribution value of each input feature to the thyroid-stimulating hormone (TSH) prediction result was calculated using the SHAPTreeExplAiner method. The features were sorted in descending order of absolute contribution value and the influence direction and magnitude of the top 5 main driving features were presented in a visual diagram. Finally, a structured evaluation report containing the following three levels was output to the operating system: the first level is the predicted TSH value and its 95% confidence interval; the second level is the thyroid function classification conclusion and corresponding follow-up recommendations; and the third level is a visualization diagram of the feature contribution.
[0046] As an embodiment of this application, the construction and screening process of the cross-dimensional second-order cross features in step S2 includes the following sub-steps:
[0047] First, a full Cartesian product operation was performed on the three features of the physical and demographic dimension (age, weight, BMI) and the four features of the blood routine inflammation and immunity dimension (hemoglobin, lymphocyte count, NLR, platelet count) to generate 12 candidate second-order cross terms.
[0048] Next, the SpeArmAn rank correlation coefficients between the above 12 candidate cross features and the thyroid-stimulating hormone training label values (after log transformation) were calculated respectively, and only cross features with an absolute value of correlation coefficient greater than 0.15 were retained;
[0049] Next, the variance inflation factor (VIF) test is performed on the cross features retained in the previous step to remove cross terms with a VIF greater than 5, in order to eliminate the risk of multicollinearity in the feature vectors.
[0050] After the above three rounds of screening, the number of second-order cross features finally included in the model is no less than 2 and no more than 6. The dual screening mechanism (correlation test combined with collinearity test) ensures that the retained cross features are all based on real biological associations, avoiding the introduction of spurious correlations by mathematical construction, which would reduce the generalization stability of the model on the independent validation set.
[0051] As an embodiment of this application, the shared feature encoding layer and dual output heads of the regression-classification dual-task joint learning model described in step S3 are constructed as follows:
[0052] The shared feature encoding layer uses LightGBM gradient boosting tree as the basic learner: the feature vector output in step S2 (the concatenation vector of the original 12-dimensional features and the second-order cross features) is input into the LightGBM backbone network; the leaf node index of each decision tree is one-hot encoded, and the encoding results of each tree are concatenated into a fixed-dimensional intermediate representation vector, which is used as the shared input of the subsequent output head.
[0053] The regression prediction output head for Task A and the classification prediction output head for Task B both consist of two fully connected layers (the first layer has 64 nodes and the activation function is ReLU; the second layer has 16 nodes and the activation function is ReLU). The regression head for Task A is connected to a single-node linearly activated output layer, which directly outputs continuous TSH prediction values. The classification head for Task B is connected to a SoftmAx output layer, which outputs the probability distribution of the five thyroid function states.
[0054] The above architecture leverages the LightGBM tree structure's efficient ability to capture high-dimensional nonlinear feature interactions, combined with the fully connected output head's ability to finely fit multi-task objectives, to achieve optimal feature utilization and multi-task collaborative prediction of structured medical test data.
[0055] As an embodiment of this application, the dual-task joint loss function L in step S3 totAl =α*L MSE +β*L CrossEntropy The weighting coefficients α and β are not fixed, manually preset values, but are dynamically determined through the following adaptive loss balancing mechanism:
[0056] During model training, the loss L for the current regression task is automatically calculated after each training epoch. MSE Loss L of classification task CrossEntropy The order of magnitude ratio R=L MSE / L CrossEntropy When R is greater than 10, α is automatically lowered and β is increased to make the gradient update magnitudes of the two tasks more balanced; when R is less than 0.1, the adjustment is performed in the opposite direction.
[0057] The adaptive adjustment is achieved using a task uncertainty weighting method: α and β are parameterized as learnable variables and updated along with other model parameters through gradient descent during model backpropagation.
[0058] This mechanism can effectively prevent gradient suppression caused by the significant difference in the order of magnitude of the loss functions of the two tasks, ensuring that both the regression and classification tasks can obtain sufficient gradient update signals from the feature representation of the shared coding layer, and ultimately achieving a synergistic improvement in the accuracy of TSH numerical prediction and the accuracy of thyroid function classification.
[0059] As an embodiment of this application, to address the confounding issue that alkaline phosphatase (ALP) can also be significantly elevated in non-thyroid-related diseases such as bone diseases (e.g., PAget disease, bone metastases) and cholestatic liver disease, this method includes the following ALP confounding effect elimination mechanism in steps S1 and S3:
[0060] In the data collection form of step S1, in addition to the 12 core indicators, it is also recorded whether the examinee has any known skeletal system diseases, hepatobiliary system diseases or a history of fracture within the past 3 months. If the examinee has any of the above conditions, in the feature preprocessing stage of step S2, the ALP feature value of the examinee is marked with a "potential confounding" flag.
[0061] In the model inference stage of step S3, for input samples carrying the "potential confounding" flag, the model automatically switches to a backup sub-model without ALP features to perform inference; the backup sub-model is trained separately in the training stage with 11-dimensional feature vectors after removing ALP features, and is deployed in parallel with the main model.
[0062] Through the aforementioned automatic switching mechanism between primary and backup models, the interference of skeletal and hepatobiliary system complications on ALP as a sensitive indicator of thyroid metabolism is eliminated without increasing the burden of additional testing items for examinees, thus ensuring the clinical semantic accuracy of feature input.
[0063] As an embodiment of this application, the regression-classification dual-task joint learning model described in step S3 employs a multi-model ensemble strategy during the inference phase to improve the robustness of the prediction results and quantify the prediction uncertainty:
[0064] The system maintains an ensemble pool consisting of three independently trained isomorphic dual-task models. The three models are trained independently under different random seed initializations and different stratified sampling training subsets, and have the same network structure but different parameter solutions.
[0065] For each subject's input feature vector, the three models perform inference independently, each outputting a set of TSH regression predictions and a set of five-category probability distributions; the final TSH prediction is the median of the regression outputs of the three models (instead of the arithmetic mean, to reduce the interference of extreme predictions); the thyroid function classification conclusion is the category that receives the majority vote (2 or 3 unanimous votes);
[0066] When the range between the TSH predictions of the three models exceeds 2.0 mIU / L, the system determines that the discrepancy between the models in this prediction is significant. The evaluation report output in step S5 automatically adds an uncertainty prompt: "The difference between the predictions of the models exceeds the threshold. It is recommended to confirm by TSH detection by chemiluminescence immunoassay." This mechanism quantifies the prediction confidence by the degree of prediction discrepancy between the models, which solves the inherent limitation that a single model cannot self-assess the reliability of the results.
[0067] As an embodiment of this application, the regression-classification dual-task joint learning model described in step S3 must perform the following class balancing and sample weighting strategies on the training dataset before training:
[0068] For the classification objective of Task B: If the number of samples in either the subclinical hyperthyroidism or subclinical hypothyroidism category in the training set is less than 1 / 5 of the number of samples in the normal thyroid function category, then the synthetic minority class oversampling technique SMOTE will be used to amplify that category; the K-nearest neighbor parameter of SMOTE is set to 5; the synthetic samples are generated only by interpolation within the local neighborhood of the original feature space, without extrapolation of the feature space, to avoid generating biologically unreasonable feature combinations; after amplification, the ratio of the number of samples in each category in the training set does not exceed 3:1.
[0069] For the regression objective of Task A: training samples with TSH label values falling within the critical range of thyroid function (0.3-0.5 mIU / L and 4.5-6.0 mIU / L) are assigned twice the sample weight in the loss function calculation to enhance the model's prediction accuracy within the critical range of thyroid function assessment.
[0070] The synergistic effect of the above dual strategies improves the accuracy of task B in classifying subclinical states while enhancing the regression accuracy of task A in the critical value range, thereby improving the overall detection sensitivity of this method for subclinical thyroid dysfunction.
[0071] As an embodiment of this application, the age-adaptive dynamic reference interval in step S4 is set according to the following segmentation rules, and the relative score D of the degree of deviation from the reference interval is calculated according to the following formula:
[0072] The age segmentation rules are as follows: when the subject is under 40 years old, the upper limit of the normal reference range for thyroid-stimulating hormone (TSH), U, is set at 4.5 mIU / L; when the age is between 40 and 60 years old (inclusive), U is adjusted to 5.0 mIU / L; when the age is over 60 years old, U is further adjusted to 6.0 mIU / L; the lower limit of the reference range, L, is uniformly set at 0.5 mIU / L for all age groups; when the subject is marked as pregnant, the above segmentation rules do not apply, and the pregnancy-specific reference range is used for independent matching.
[0073] The calculation formula of the relative deviation score D is a piecewise function: when the TSH prediction value V output by task A in step S3 falls within the range of [L, U], D = 0, indicating that the prediction value is within the normal range; when V > U, D = (V - U) / U × 100%, indicating the positive deviation percentage relative to the upper limit of the reference range; when V < L, D = (L - V) / L × 100%, indicating the negative deviation percentage relative to the lower limit of the reference range.
[0074] In the evaluation report output in step S5, the D value is presented in the format of "deviating from the upper limit of the reference range + X% (↑)" or "deviating from the lower limit of the reference range - X% (↓)", enabling clinicians to intuitively judge the direction and magnitude of the deviation. Especially after the upper limit of the reference range for elderly examinees is shifted upward after age correction, the relative deviation score can more accurately reflect their actual abnormal degree, avoiding masking the true subclinical hypothyroidism risk due to the loosening of the reference range.
[0075] As an embodiment of the present application, whether the examinee has a history of thyroid surgery (including total thyroidectomy, partial thyroidectomy, and radioactive iodine 131 treatment history) and whether the examinee is currently receiving levothyroxine sodium L-T4 replacement therapy are synchronously recorded in the data collection form in step S1; if the examinee has any of the above situations, steps S3 and S4 are executed according to the following special process:
[0076] In step S3, on the basis of the original 12-dimensional feature vector, two additional input features, namely the surgical type (total / partial thyroidectomy / iodine 131 treatment, encoded as a categorical variable) and the current daily dose of L-T4 (unit: μg / day), are added to form an extended feature vector; at the same time, the inference model is switched to a dedicated submodel trained separately for "patients after thyroid surgery"; the dedicated submodel is trained based on the special cohort data of examinees who have long-term received L-T4 replacement therapy after surgery, and can reflect the combined effects of residual thyroid tissue function and exogenous hormone supplementation on the TSH level after surgery. Its prediction rule is essentially different from that of the general population model.
[0077] In step S4, the reference interval correction module is synchronously switched to the reference interval dedicated to the postoperative population; for examinees after thyroid cancer surgery, the TSH target management interval is divided into two levels according to the tumor stage: low-risk (TSH target value 0.5 - 2.0 mIU / L) and medium-high-risk (TSH target value < 0.1 mIU / L), which is significantly different from the normal reference interval of the general hypothyroidism population, so as to avoid misjudgment of the TSH management target after surgery due to the use of the general reference interval.
[0078] As an embodiment of this application, when this method is deployed to a new medical institution, in order to eliminate systematic deviations caused by differences in testing instrument brands, reagent batches, and target population baselines between different institutions, this method includes the following cross-institutional domain adaptation sub-processes and a continuous performance maintenance mechanism after deployment:
[0079] Domain Adaptation Subprocess: Before official launch, new institutions must provide at least 200 local subject data sets containing complete 12 feature data and chemiluminescence immunoassay TSH measured values, serving as a local calibration set. Lightweight domain adaptation (BAtchNormAdAptAtion) is then performed on the globally pre-trained model using this local calibration set. This involves updating only the mean and variance parameters of each batch normalized layer, while keeping the core model parameters frozen. The domain adaptation calculation process should not exceed 10 minutes. After domain adaptation, the mean absolute error (MAE) of TSH prediction of the domain-adapted model must be verified on the reserved validation subset of the local calibration set to show a reduction of at least 10% compared to before domain adaptation before the local deployment version can be activated.
[0080] Incremental retraining mechanism: After the model is deployed, every 500 new data points containing paired records of AI predicted values and chemiluminescence immunoassay TSH measured values, the system automatically triggers a model performance monitoring and evaluation, calculating the MAE and five-class AUC-ROC of the currently deployed model on the new data. If any indicator decreases by more than 5% compared to the previous updated baseline, fine-tuning is performed with the original model parameters as the initial values, instead of retraining from a randomly initialized state, in order to adapt to data distribution drift while retaining historical data knowledge. After each fine-tuning, the new model must pass the performance evaluation on an independent test set before it can replace the online version, and the version number is recorded for traceability, realizing the continuous performance maintenance of this method in long-term operation.
[0081] Implementation of Column 2: Rapid TSH assessment in routine screening scenarios at health checkup centers;
[0082] 1.1 Application Scenarios and Data Sources;
[0083] This embodiment is applied to a thyroid function auxiliary screening scenario at a tertiary-level Class A hospital's health checkup center. The center conducts approximately 500 health checkups daily, with about 70% of examinees completing both routine blood tests and a full biochemical panel, but routinely not performing TSH chemiluminescence immunoassay. This embodiment aims to utilize the examinees' existing routine test data to automatically attach a rapid TSH assessment conclusion to the health checkup report using the method of this invention, thereby achieving proactive identification and triage of examinees with potential thyroid dysfunction.
[0084] The model training dataset was derived from historical physical examination records of the physical examination center from January 2020 to December 2023, which included complete blood routine, full biochemical panel and TSH chemiluminescence immunoassay. A total of 18,642 valid samples were obtained, of which 11,203 (60.1%) had normal thyroid function, 3,287 (17.6%) had subclinical hypothyroidism, 1,024 (5.5%) had hypothyroidism, 1,836 (9.8%) had subclinical hyperthyroidism, and 1,292 (6.9%) had hyperthyroidism.
[0085] 1.2 Step S1: Multidimensional clinical data collection;
[0086] After the health checkup management system detects that both the routine blood test report and the complete biochemistry report for the same examinee have been reviewed and archived, it automatically triggers the data collection interface to extract the following 12 input features:
[0087] Physical and demographic dimensions (3 items): age (years), weight (kg, measured on an empty stomach with shoes off), body mass index (BMI) (kg / m²) 2 (The height is calculated based on the actual height measured that day, not the self-reported value).
[0088] Complete blood count (CBC) inflammatory and immune dimensions (4 items): Hemoglobin (g / L), lymphocyte count (×10⁻⁶) 9 / L), neutrophil to lymphocyte ratio (NLR, calculated by dividing the absolute neutrophil count reported by the instrument by the absolute lymphocyte count), platelet count (×10 9 / L).
[0089] Liver protein metabolism dimension (5 items): albumin (g / L), prealbumin (mg / L), total protein (g / L), aspartate aminotransferase (AST) (U / L), alkaline phosphatase (ALP) (U / L).
[0090] At the same time, the collection form synchronously records the following auxiliary information: (1) the gender of the examinee (for gender correction of ALP reference interval); (2) whether there is a known skeletal system disease, hepatobiliary system disease or fracture history in the past 3 months (for ALP mixed marker determination); (3) whether there is a history of thyroid surgery and whether the examinee is currently receiving L-T4 replacement therapy; (4) whether the examinee is pregnant.
[0091] In this case, a female subject (subject A001) was 47 years old, weighed 68.5 kg, and had a BMI of 26.3 kg / m². 2 Hemoglobin 118 g / L, lymphocyte count 1.2 × 10⁻⁶ 9 / L, NLR 3.8, platelet count 198×10 9 / L; albumin 38.2g / L, prealbumin 182mg / L, total protein 68.5g / L, AST 28U / L, ALP 62U / L. No history of skeletal or hepatobiliary system diseases, no history of thyroid surgery, not pregnant, and the time interval between blood routine and biochemical tests is 3 hours, meeting the 24-hour time requirement.
[0092] 1.3 Step S2: Data quality control and feature construction;
[0093] The system first calls the isolated forest anomaly detection module (n estimAtors =200, contAminAtion=0.03) were used to calculate the anomaly scores for the 12 feature values of A001. The results showed that the anomaly scores for each indicator of A001 were 0.31, which is below the threshold of 0.65. Therefore, it was determined to be a normal sample and no manual verification was required; all feature values were directly processed.
[0094] All 12 features of 001 are complete, so there is no need to activate the missing value imputation process.
[0095] In the feature construction phase, the system performed a full Cartesian product cross-operation on physical and demographic features (age 47 years, weight 68.5 kg, BMI 26.3) and blood routine inflammation and immunity features (hemoglobin 118 g / L, lymphocyte count 1.2, NLR 3.8, platelet count 198), generating 12 candidate second-order cross-operations. Based on the pre-calculated and fixed SpeArmAn rank correlation coefficient screening results (cross-operations with an absolute correlation coefficient less than 0.15 and VIF greater than 5 have been removed), four effective second-order cross-operations were activated in this example, including BMI×NLR (=99.94), age×NLR (=178.6), age×lymphocyte count (=56.4), and weight×NLR (=260.3).
[0096] After feature construction, the complete feature vector of A001 has a dimension of 16 (12 original features + 4 effective second-order cross features).
[0097] 1.4 Step S3: Joint prediction using dual tasks;
[0098] The 16-dimensional feature vector of A001 is input into an ensemble pool consisting of three independently trained isomorphic dual-task models. All three models employ a hybrid architecture combining LightGBM shared encoding layers (200 decision trees, learning rate 0.05) with dual fully connected output heads (64-16-1 / 5 nodes), and are trained independently with different random seeds (seed=42, seed=123, seed=2024) and different stratified sampling training subsets.
[0099] The inference results for A001 from the three models are as follows:
[0100] Model 1: The regression prediction head for Task A outputs a predicted TSH value of 6.21 mIU / L; the classification prediction head for Task B outputs a probability distribution of 0.03 for hyperthyroidism, 0.04 for subclinical hyperthyroidism, 0.11 for normal, 0.67 for subclinical hypothyroidism, and 0.15 for hypothyroidism.
[0101] Model 2: Task A outputs a predicted TSH value of 5.98 mIU / L; Task B outputs hyperthyroidism 0.02, subclinical hyperthyroidism 0.05, normal 0.09, subclinical hypothyroidism 0.70, and hypothyroidism 0.14.
[0102] Model 3: Task A outputs a predicted TSH value of 6.43 mIU / L; Task B outputs hyperthyroidism 0.03, subclinical hyperthyroidism 0.03, normal 0.10, subclinical hypothyroidism 0.69, and hypothyroidism 0.15.
[0103] Integration results: The median TSH prediction value was used, resulting in a final predicted TSH value of 6.21 mIU / L. The range of the three model predictions was 6.43 - 5.98 = 0.45 mIU / L, which is below the uncertainty threshold of 2.0 mIU / L and does not trigger an uncertainty warning. Thyroid function classification conclusion: Subclinical hypothyroidism (all three votes were consistent, with the highest probability category being subclinical hypothyroidism).
[0104] 1.5 Step S4: Age-adaptive dynamic reference interval correction;
[0105] 001 is 47 years old, which falls within the 40-60 age range. The system automatically matches the reference range for this age range: lower limit L = 0.5 mIU / L, upper limit U = 5.0 mIU / L.
[0106] Substituting into the relative deviation scoring formula: V=6.21mIU / L, V>U, D=(VU) / U×100%=(6.21-5.0) / 5.0×100%=24.2%.
[0107] Based on the combined D-value and classification probability distribution, the system generates a thyroid function classification conclusion: subclinical hypothyroidism, with a relative deviation from the upper limit of the reference interval of +24.2%.
[0108] 1.6 Step S5: Output of interpretability results;
[0109] The system uses the SHAPTreeExplAiner method to calculate the ShApley contribution value of each input feature of A001. The top 5 features by absolute contribution value are as follows:
[0110] (1) Prealbumin 182 mg / L (below the lower reference limit of 200 mg / L) → Effect on TSH prediction: +1.42 mIU / L (indicating hypothyroidism);
[0111] (2) NLR 3.8 (higher than the upper limit of reference 3.0) → Impact on TSH prediction: +0.87 mIU / L (suggesting autoimmune thyroiditis);
[0112] (3) BMI×NLR cross-feature (=99.94) → impact on TSH prediction: +0.61mIU / L (synergistic effect of obesity and immune inflammation).
[0113] (4) Hemoglobin 118 g / L (below the lower reference limit of 120 g / L) → Effect on TSH prediction: +0.38 mIU / L (suggesting mild anemia related to hypothyroidism);
[0114] (5) ALP 62 U / L (within the reference range after gender correction) → Effect on TSH prediction: -0.21 mIU / L (normal ALP indicates no hyperplasia of bone turnover and slightly reduces the possibility of hyperthyroidism).
[0115] The final A001 assessment report written to the physical examination reporting system contains three levels: The first level is the predicted TSH value of 6.21 mIU / L (95% confidence interval: 5.34~7.08 mIU / L); the second level is the thyroid function classification conclusion "subclinical hypothyroidism (level II warning, orange)" and the follow-up recommendation "It is recommended to complete a full thyroid function test (FT3, FT4, TSH) and thyroid peroxidase antibody TPOAb retest within 1 month"; the third level is the characteristic contribution SHAP visualization chart, which uses a red gradient to mark features that increase the predicted TSH value, such as decreased prealbumin and increased NLR, and uses a blue gradient to mark the normal ALP level that decreases TSH.
[0116] The report concludes with a note stating, "This assessment result was generated with AI assistance and is for clinical reference only; it should not be used as a basis for diagnosis."
[0117] In this case, A001 voluntarily underwent chemiluminescent immunoassay for TSH testing, and the measured value was 6.35 mIU / L. The absolute error between this value and the predicted value of 6.21 mIU / L was 0.14 mIU / L, which was consistent with the thyroid function classification (subclinical hypothyroidism), thus verifying the effectiveness of the method of this invention.
[0118] In summary, the method for rapidly assessing thyroid-stimulating hormone (TSH) levels provided by this invention has the following proven technical effects:
[0119] In terms of prediction accuracy, the absolute error of single-case prediction in Example 1 is 0.14 mIU / L, the MAE of the validation set in Example 2 is 1.19 mIU / L, and the AUC-ROC of five-class classification is 0.841; the evaluation time is reduced from the traditional 2 to 4 hours to less than 120 seconds; and the cost of direct detection is reduced by about 80%.
[0120] In terms of cross-institutional adaptability, only 200 local calibration data points are needed to complete batch normalized layer domain adaptation in 6 minutes, with a MAE reduction of up to 32.2%, which is significantly better than the scheme of directly transferring the global model.
[0121] In terms of clinical safety, the multi-model integration strategy quantifies the uncertainty of prediction through the divergence between models, and automatically triggers uncertainty prompts for cases with a prediction range exceeding 2.0 mIU / L, guiding subjects to undergo chemiluminescence immunoassay for confirmation; the switching mechanism between the post-thyroid surgery population-specific sub-model and the specific reference interval effectively avoids misjudgment of post-operative TSH monitoring targets due to the use of a general reference interval; the interpretable output of SHAP enables clinicians to understand and review the model's reasoning basis.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for rapidly assessing thyroid-stimulating hormone (TSH) levels, characterized in that, Includes the following steps: Step S1, Clinical Data Collection: Collect 12 clinical indicators of the examinee from the hospital information system or physical examination management system as input features of the model, including: age, weight, BMI; hemoglobin, lymphocyte count, NLR, platelet count; albumin, prealbumin, total protein, AST and ALP; the time interval between the collection of blood routine and biochemical tests for the same examinee shall not exceed 24 hours; Step S2, Data Quality Control and Feature Construction: The isolated forest algorithm is used to detect outliers in 12 input indicators, and random forest multiple imputation is used to fill missing values; Cartesian product cross operation is performed on the physical and demographic dimension features and the blood routine inflammation and immunity dimension features to construct second-order cross features represented by BMI×NLR and age×lymphocyte count. Step S3, Dual-Task Joint Prediction: Input the feature vector output from Step S2 into the pre-trained regression-classification dual-task joint learning model; the model includes a shared feature encoding layer and two output heads: the regression head outputs the continuous numerical prediction result of TSH, and the classification head outputs the probability distribution of five states: hyperthyroidism, subclinical hyperthyroidism, normal thyroid function, subclinical hypothyroidism, and hypothyroidism; the joint loss function is defined as L... totAl =α*L MSE +β*L CrossEntropy ; Step S4, Age-Adaptive Reference Interval Correction: Automatically match the TSH reference interval for the corresponding age group based on the subject's age; substitute the regression head output value from Step S3 into the reference interval deviation scoring formula to convert it into a relative deviation score D; combine the D value with the probability distribution of the classification head output from Step S3 to generate a thyroid function grading conclusion. Step S5, Interpretability Report Output: The contribution value of each feature is calculated using the SHAP method, and the top 5 main driving features are visualized. The output is a structured assessment report containing the following three layers of content: TSH predicted value and its 95% confidence interval; thyroid function classification conclusion and follow-up recommendations; and a visualization of feature contribution.
2. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: In step S2, the screening process for second-order cross features includes: calculating the SpeArmAn correlation coefficient between the 12 candidate cross terms and the TSH label, and retaining only cross features with an absolute value greater than 0.15; then performing a variance inflation factor (VIF) test on the retained features and removing terms with a VIF greater than 5; finally, the number of second-order cross features included in the model is no less than 2 and no more than 6.
3. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: In step S3, the shared feature encoding layer uses LightGBM gradient boosting tree as the base learner, and the leaf node indexes are one-hot encoded and concatenated to form an intermediate representation vector; both output heads are composed of two fully connected layers, with the regression head connected to a linear single-node output layer at the end and the classification head connected to a SoftmAx layer at the end.
4. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: In step S3, the weight coefficients α and β of the loss function are parameterized as learnable variables and automatically updated during backpropagation based on the task uncertainty weighting method. In each training round, the order of magnitude ratio R between the regression loss and the classification loss is calculated. When R > 10, α is lowered and β is raised. When R < 0.1, the opposite adjustment is performed.
5. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: To address the confounding issue of ALP in non-thyroid diseases: Step S1 synchronously records whether the subject has skeletal system diseases, hepatobiliary system diseases, or a history of fracture within the past 3 months. If so, the ALP feature value is marked with a "potential confounding" flag. In Step S3, the sample carrying this flag is automatically switched to the 11-dimensional standby sub-model after removing ALP for inference.
6. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: In the inference stage of step S3, an integration of three independently trained isomorphic dual-task models is adopted: for TSH prediction, the median of the outputs of the three models is taken, and for the classification conclusion, the majority voting result is taken; when the range of the TSH prediction values of the three models exceeds 2.0 mIU / L, an uncertainty prompt recommending confirmation by chemiluminescence immunoassay is automatically appended to the report in step S5.
7. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: Before training in step S3, the following sample balancing process is performed: if the number of samples in any category of subclinical hyperthyroidism or subclinical hypothyroidism is less than 1 / 5 of that of the normal category, SMOTE (K = 5) is used for synthetic amplification, and the ratio of samples in each category after amplification does not exceed 3:
1. For training samples with TSH labels falling within the critical interval, a weight twice as much is assigned in the loss function.
8. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: In step S4, the reference intervals for age segmentation are as follows: for age < 40 years old, the upper limit U = 4.5 mIU / L; for age 40 - 60 years old, U = 5.0 mIU / L; for age > 60 years old, U = 6.0 mIU / L; the lower limit L = 0.5 mIU / L for each age group, and during pregnancy, the special reference interval is adopted. The deviation score D is calculated as: when V ∈ [L, U], D = 0; when V > U, D = (V - U) / U × 100%; when V < L, D = (L - V) / L × 100%.
9. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: In step S1, the history of thyroid surgery and the current situation of L-T4 replacement therapy are recorded synchronously; if there are relevant situations, in step S3, the model switches to the special sub-model for "patients after thyroid surgery", and two features, namely the type of surgery and the daily dose of L-T4, are appended to the original feature vector; step The reference interval in step S4 is synchronously switched to the post-operative special interval, and for the subjects after thyroid cancer surgery, the TSH target management intervals for low risk and medium-high risk are respectively applied according to the tumor risk stratification.
10. The method for rapidly assessing thyroid-stimulating hormone (TSH) levels according to claim 1, characterized in that: When deploying in multiple centers, the new institution must provide no less than 200 cases of local calibration data, perform parameter adaptation of the batch normalization layer on the pre-trained model, and the MAE of TSH prediction on the held-out validation subset after domain adaptation must be reduced by no less than 10% compared to before adaptation before it can be put online. After being put online, performance monitoring is automatically triggered for every cumulative 500 paired records. If the MAE or the five-classification AUC-ROC drops by more than 5% compared to the previous baseline, the model update is triggered in the way of Fine-tuning, and the updated version must pass the verification of the independent test set before replacing the online version.