Back to Journal
AI and Algorithms

How AI Fits Pharmacokinetic Models to Individual Patient Scan Data

Building a two-compartment PK model for each patient used to require manual parameter fitting that few clinics could afford. Here is how we automated that process without sacrificing physiological accuracy.

How AI Fits Pharmacokinetic Models to Individual Patient Scan Data cover image

The phrase "AI in dosimetry" covers a wide range of activities, from convolutional networks doing organ segmentation to optimization algorithms computing treatment plans. This post is about one specific component: fitting a two-compartment pharmacokinetic model to each patient's serial SPECT scan data automatically, and producing a kidney time-integrated activity coefficient (TIAC) estimate that matches what a trained medical physicist would calculate manually. That is a narrower problem than it sounds, and solving it correctly required more care than we initially expected.

The Fitting Problem in Clinical Dosimetry

When you have two or three SPECT measurements of kidney activity at different post-injection time points, fitting a two-compartment model means estimating four parameters: two rate constants describing exchange between the blood/tissue compartment and the kidney, a third constant for urinary excretion, and an initial distribution volume. Those four parameters must be recovered from two or three noisy data points.

This is an underdetermined system. With more unknowns than observations, minimizing squared residuals alone cannot find a unique solution. Multiple parameter combinations will produce curves that pass close to all observed data points, and many of those combinations are physiologically implausible. The job of the fitting algorithm is to find a parameter set that is simultaneously consistent with the observations and constrained to the physiologically realistic region of parameter space. That second constraint is where the actual modeling intelligence lives.

What a Two-Compartment PK Model Encodes

The standard two-compartment model used in radiopharmaceutical dosimetry represents the body as a central compartment (blood/plasma) and a tissue compartment, with the radiopharmaceutical exchanging between them at rate constants k12 and k21, and clearing from the central compartment at rate ke. The differential equations describing this system produce an activity-versus-time curve with a characteristic biphasic shape: a rapid early phase driven by blood-level kinetics and a slower terminal phase reflecting tissue redistribution and excretion.

For kidney dosimetry specifically, this biphasic shape matters. The kidney extracts tracer rapidly from blood through renal blood supply, producing an early accumulation peak, then clears via urinary excretion with a rate that reflects both GFR and radioactive decay. A model that imposes this shape structure uses the early SPECT time point and the later points together to constrain both phases, rather than fitting only the visible terminal decay with a simple exponential. The biological plausibility constraints encoded in the model, which require rate constants to fall within physiologically observed ranges for this compound class, prevent the optimizer from selecting parameter combinations that fit the noise while describing impossible biology.

The Manual Baseline and Why It Cannot Scale

A trained medical physicist fitting a two-compartment model to a single patient's Lu-177 SPECT series manually takes roughly 45 to 90 minutes. That includes reviewing the reconstructions for acquisition artifacts, extracting organ volumes of interest from each time-point scan, correcting for background activity and partial volume effects, plotting the time-activity curve, and iterating on initial parameter guesses until the optimizer converges to a stable solution.

For a department treating 20 patients per Lu-177 cycle, that is 15 to 30 hours of medical physics time per treatment round, before the subsequent dose calculation and report generation. Most nuclear medicine departments do not have that capacity, and this capacity bottleneck, not the physics itself, is why population-average dosing persists in routine clinical practice. The physics of patient-specific dosimetry has been understood for decades. The implementation barrier is time and expertise, not scientific knowledge.

Automated Bayesian Parameter Estimation

Our approach replaces the manual fitting loop with a Bayesian inference procedure. Instead of treating the four PK parameters as unknowns to be found by minimizing residuals, we treat them as random variables with prior distributions derived from published PK data for the specific radiopharmaceutical and patient population. The posterior distribution over parameters is computed by conditioning those priors on the observed SPECT data, weighted by their measurement uncertainty.

The practical advantage is that the approach handles underdetermination explicitly. When only two SPECT time points are available, the algorithm does not force a four-parameter solution onto insufficient data. It returns a parameter estimate with wider credible intervals, reflecting the genuine uncertainty from limited sampling. That uncertainty propagates into the TIAC estimate, which propagates in turn into a dose uncertainty range rather than a falsely precise point estimate. A nuclear medicine physician reviewing the output sees not just a number but a confidence interval, which is a meaningful clinical input.

For departments able to acquire all three standard time points (24h, 96h, 168h), the posterior narrows substantially and credible intervals on the TIAC estimate are typically within 10 percent of the posterior mean. The Bayesian framework does not eliminate uncertainty; it makes the remaining uncertainty visible rather than hiding it behind the apparent precision of a single fitted number.

Practical Accuracy: What the Algorithm Guarantees and What It Does Not

In validation work using the initial scan dataset from our pilot program across three oncology centres, automated TIAC estimates for the kidney compartment agreed with manually computed values to within 8 percent root-mean-squared error for complete three-time-point acquisitions. For cases where all three SPECT acquisitions were available and free of significant acquisition artifacts, agreement was within 5 percent.

Two situations degrade performance. First: fewer than two SPECT time points, which forces mono-exponential assumptions that are often incorrect for renal clearance of Lu-177 agents. Second: acquisitions with uncorrected motion artifacts or incomplete attenuation correction, where the input activity concentrations are unreliable. In both cases the algorithm flags the case for physicist review rather than returning a silently uncertain estimate. Cases proceed to automated report generation only when the algorithm's internal quality indicators are within acceptance bounds.

It is accurate to say that automated PK fitting is not equivalent to expert physicist review in every case. For the roughly 70 to 80 percent of cases in our pilot data that presented with clean three-point acquisitions and no flagged artifacts, agreement with manual review was within clinical tolerance. The remaining cases receive human review priority based on algorithmic flags, not after a report has already been issued. The physicist's expertise is directed toward cases that actually require it, rather than distributed uniformly across repetitive calculation work.

What Automation Changes About the Workflow

When PK model fitting is automated, the physics bottleneck shifts from computation to data quality. The limiting step is no longer the parameter search; it is ensuring that the SPECT acquisitions are good enough to support quantitative analysis. That shift is productive. It refocuses the physicist's expertise on acquisition protocol review, segmentation quality, and the flagged cases, rather than on repetitive curve-fitting iterations that produce the same result each time.

The YSOTOPE platform structures this exactly: automated fitting runs during the post-acquisition review period, flagged cases surface to the physicist's queue for manual review, and straightforward cases proceed to dose report generation. The physicist reviews a dosimetry summary and acts on flags, not on a parameter optimization problem. The efficiency gain is real, but it comes from eliminating the right work, not from eliminating the physicist's role in the clinical process.

Learn more about patient-specific dosimetry

See how YSOTOPE's AI-driven platform delivers individualized dose optimization for nuclear oncology teams.

Explore the Platform More Journal Articles