Using Non-Linear Programming Solvers to Generate Hypothalamus-Pituitary Curves for Patients With Hypothyroidism
Robert Petersen, Vittal Srinivasan, Stanislaw Zak, Cary Mariash
TL;DR
This work addresses the challenge of treating hypothyroidism by moving beyond TSH-only dosing to patient-specific dosing guided by Hypothalamus-Pituitary (HP) curves that relate FT4 to TSH. It develops a two-equation HPT axis model with $\frac{d[TSH]}{dt}=k_1 - \frac{k_1[FT_4]^{n_1}}{k_a+[FT_4]^{n_1}} - k_2[TSH]$ and $\frac{d[FT4]}{dt}=k_5 - k_4[FT4]$, and derives HP curves from equilibrium conditions. Three parameter-estimation strategies are explored—Goede’s two-point method, nonlinear least squares (NLSM), and nonlinear programming solver (NLPS)—with NLPS using RMSE, SAE, and Hubber loss (HLF) objectives to fit data; the Hubre loss variant performs best and is chosen for subsequent analysis. The study shows NLPS–HLF yields robust HP curves across literature and new patient data, with setpoints within reference ranges and improved resilience to outliers, suggesting practical use for personalized dosing and potential integration into model-predictive control frameworks. Overall, the work advances individualized hypothyroidism management by enabling data-driven, patient-specific HP curves that can drive more accurate thyroid hormone replacement.
Abstract
Common practice in treating primary hypothyroidism is to use only Thyrothropin (TSH) to adjust the dose of thyroid replacement. In this paper, it is argued that using both TSH and free Thyroxine (FT4) values in the replacement may be beneficial in the treatment of hypothyroidism. The tool to determine the optimal value of TSH and FT4 is the Hypothalamus-Pituitary (HP) curve. These curves are models of thyroid hormone concentrations that can be used to determine patient-specific treatment strategies for individuals with hypothyroidism. By generating an HP curve for an individual with hypothyroidism, a set point is determined that represents the optimal levels of thyroid hormones in the blood. A graphical method for set point determination is proposed. A physician can then prescribe a thyroid replacement strategy to achieve this set point. In this paper, two methods for generating HP curves are proposed using non-linear programming solvers and compared with the existing methods. The proposed methods are tested using datasets from the literature, as well as measurements of patients being treated for hypothyroidism.
