When a model that grades disease severity leaves the hospital where it was trained, two things change. The images look different, because the scanners, cameras and protocols differ. The mix of patients also differs: a screening clinic sees mostly healthy and mild cases, while a tertiary referral center sees many severe ones. Most work on moving models between sites attacks the first problem. The second one, a change in how common each stage is (called label shift or prior shift), quietly corrupts the model's probabilities and decision cut-offs, and it hurts most in the rare severe stages that matter clinically. The standard remedy is to estimate the new site's stage frequencies from its unlabeled scans and reweight the model's outputs. That estimate is weakest exactly where it matters, because a few hundred unlabeled scans contain only a handful of severe cases.
We propose to use the fact that disease stages are ordered. Stage frequencies at a real site are not arbitrary: they come from one underlying severity distribution that has been cut into bins. If we describe the new site's stage mix as a shifted and rescaled version of the training site's latent severity distribution, only two or three numbers need estimating instead of one per stage. The rare severe stages then borrow statistical strength from their more common neighbors. The corrected probabilities give site-specific referral cut-offs that stay ordered by construction and need no target labels. In short, ordinal structure is used to fit the new site's prevalence, not the image representation, and the target is the single-center-to-new-site deployment gap that fixed thresholds like single-site biomarker cut-offs keep failing.
Core Claim
Our claim is that in small, unlabeled target samples, ordinal-structured prior-shift correction recovers severe-stage prevalence more accurately than unstructured per-stage correction. It should also improve severe-stage sensitivity at a fixed referral rate, and it should add to feature-level domain adaptation rather than overlap with it. If unstructured correction matches it at realistic target sample sizes (roughly 100 to 500 scans), the idea is not worth pursuing. The experiments are built to show whether that happens.
Where This Sits
The ordinal-modeling literature puts order into the loss or the latent space. Soft Labels for Ordinal Regression softens one-hot targets using the distance between ranks. Poisson Ordinal Network for Gleason Group Estimation Using Bi-Parametric MRI forces predictions to have a single peak. CORE and OCL arrange embeddings along a one-dimensional ordering. These papers supply training-side tools we can reuse, but none of them asks what happens to the output distribution when stage prevalence changes at deployment.
The imbalance literature rebalances the training set or the loss. Examples include random oversampling in the OSAHS dual-encoder work and proxies spread along the target axis in PRIME. Both implicitly assume the deployment population looks like the rebalanced training one, which is rarely true. AOR-DR handles ordinal structure and imbalance together for diabetic retinopathy, but it trains and tests separately within each benchmark, so it never meets cross-site prevalence change.
The closest work sits on the generalizability side. Recursively Conditional Gaussian for Ordinal Unsupervised Domain Adaptation (RCGUDA) aligns an ordered latent space across sites. It assumes roughly matched class distributions and does not recalibrate decision thresholds. Imbalance-Aware Domain Adaptation in Embryo Development Assessment (IADA) motivates this proposal directly. It documents prevalence and appearance shifting together across hardware, with blastocyst rates of 28.9% versus 81.2%. It uses adaptive per-class thresholds, but those are computed from training frequencies, ignore order, and are not constrained to stay monotone. The liver fibrosis staging system combines ordinal encoding with test-time adaptation across four hospitals, but it adapts features only.
We differ from all of these in one respect. We estimate the target site's stage distribution itself, without labels and under an ordinal parameterization, and derive decisions from that estimate. The method sits on top of whatever feature adaptation is used. One constraint comes from Distributional Shifts In Automated Diabetic Retinopathy Screening. It shows that some shifted inputs fall outside the training distribution entirely, and the label-shift assumption fails on those, so we pair our method with an out-of-distribution filter.
Research Program
We first train a source model on one site with an ordinal-aware head, using cumulative "is severity above stage $k$?" outputs trained jointly. We then calibrate its probabilities on source validation data with temperature scaling. The label-shift assumption says that at the new site, the image distribution within each stage is unchanged and only the stage frequencies differ. Under that assumption, the correct target posterior is a reweighting of the source posterior:
$$p_t(y=k \mid x) \propto \frac{\pi_t(k)}{\pi_s(k)}\, p_s(y=k \mid x),$$
Here $\pi_s(k)$ and $\pi_t(k)$ are the fractions of stage $k$ at the source and target sites. Classical expectation-maximization estimates all $K$ values of $\pi_t$ freely from unlabeled target images. We instead tie them to a latent severity variable:
$$\pi_t(k) = F\!\left(\frac{\tau_k-\mu}{\sigma}\right) - F\!\left(\frac{\tau_{k-1}-\mu}{\sigma}\right),$$
Here $\tau_0<\tau_1<\dots<\tau_K$ are cut points fixed by fitting the source prevalence with $\mu=0,\sigma=1$, and $F$ is a standard cumulative distribution (logistic or normal). The two free numbers $\mu$ and $\sigma$ describe how much sicker and how much more spread out the target population is. We fit them by maximizing the marginal likelihood of the unlabeled target images using the reweighted posteriors, which takes a few lines of expectation-maximization.
A two-parameter family may be too rigid. Referral centers can, for example, lack mild cases because of triage, the selection pattern the file attributes to Kujawa et al. For that case we also test a middle option: free per-stage prevalences with a penalty on differences between the log-ratios $\log(\pi_t(k)/\pi_s(k))$ of adjacent stages. This keeps order-aware smoothing but permits bumps.
Decisions follow from the corrected posterior. Point grades minimize expected absolute stage error. Referral uses $P(y \ge k^\ast \mid x)$ compared against a clinical cost ratio. Because this is a tail sum of a proper distribution, the cumulative probabilities never cross. That avoids the classifier-inversion problem that non-crossing methods such as NORDIC handle with explicit constraints. Scans flagged by an uncertainty-based out-of-distribution filter, in the style of Nandy et al., are excluded from prevalence estimation and deferred to a clinician.
We will also analyze when the method can fail. Estimation error scales roughly with $1/\sqrt{n_{\text{eff}}}$ per free parameter, where $n_{\text{eff}}$ is the effective number of informative target samples; this is the usual behavior of maximum-likelihood variance. With two parameters instead of $K-1$, the gain should be largest when $K$ is large and $n$ is small. We will check this prediction directly. Bias appears when the latent-shift family is wrong, and the penalized variant exists to limit that bias.
Baselines
The naive reference point is deploying the calibrated source model unchanged, taking the most probable grade and using the source-tuned referral cut-off. This is the single-center trap in its plain form.
The strongest competitor on the specific question of label shift is unstructured expectation-maximization prior correction. It is identical to our method except that all $K-1$ free prevalences are estimated independently. It is the direct ablation of our key ingredient, because everything else is held fixed: the same source model, the same calibration, the same target images, and the same decision rule. We will run it with and without a small Dirichlet smoothing prior. The smoothing strength will be tuned on held-out source-to-source splits under the same budget as our penalty weight. We found no reported result on Lacuna for expectation-maximization label-shift correction on diabetic-retinopathy cross-dataset transfer, so we will produce this number ourselves. Beating it means lower tail-stage prevalence error and higher severe-stage sensitivity at a matched referral rate at target sizes of 500 or fewer, with confidence intervals from repeated target subsamples that exclude zero.
The strongest existing cross-site ordinal method is RCGUDA. Recursively Conditional Gaussian for Ordinal Unsupervised Domain Adaptation reports 62.3% accuracy on diabetic-retinopathy adaptation, against 57.0% for DG-Net++. The imbalance-aware competitor is IADA. Addressing Domain Shift via Imbalance-Aware Domain Adaptation reports a 25.19% accuracy improvement over MD-Net from ED4 to ED3 and up to 12.56% AUC gain on smartphone images (ED1). We will reimplement both on our splits with the same backbone and a matched tuning budget. We will report them alone and with our correction applied on top, because our claim is that the correction adds to them.
For the within-benchmark ordinal-plus-imbalance reference, AOR-DR reports 80.3% on APTOS and 75.9% on DeepDR with a RETFound backbone. These are within-dataset figures and serve only as an upper reference. The last reference is an oracle that recalibrates thresholds using the true target stage labels. It bounds how much any label-free method can recover.
Why not just…?
Why not just rebalance the training data or loss? Oversampling, as in the OSAHS work, and proxy-based rebalancing, as in PRIME, move the model's implicit prior to uniform or to whatever the designer chose. A screening site and a referral site need different priors, so no single training-time choice serves both. We will include class-balanced training as a source model and show that its deployed error still depends on the target prevalence, while our correction adapts to it.
Why not just use feature-level domain adaptation? RCGUDA, IADA and test-time adaptation change what the images look like to the model. They do not estimate how many patients at the new site fall into each stage. IADA's thresholds come from training frequencies, so they carry the source prior to the new site. Worse, adversarial alignment under prevalence mismatch can pull stages onto the wrong partners. We treat this as complementary rather than competing, and the stacked runs described above test that claim. If adaptation alone already fixes tail sensitivity, our added value shrinks, and we will report that.
Why not just use standard EM label-shift correction? This is the real threat. With large target samples, the free estimator is consistent and flexible, and it will likely match or beat our parametric version. Our case rests entirely on the small-sample, rare-tail regime and on the penalized variant keeping bias low when the latent-shift family is wrong. The sample-size sweep settles this. If the free estimator matches ours at 200 scans, we drop the claim.
Why not just recalibrate thresholds on a few labeled target cases? This works when labels exist, and we include it as the oracle and as a few-label comparison with 20 to 50 labeled scans. But grading labels at a new site often need biopsy or expert panels, and a few dozen random labels rarely include any severe cases. We will measure how many labels this approach needs to match our label-free estimate.
Proposed Experiments
The main testbed is cross-dataset diabetic-retinopathy grading on five stages. We train on one of APTOS 2019, Messidor, DDR, DeepDR or Kaggle, the benchmarks used by AOR-DR and Nandy et al., and deploy unlabeled on each of the others. These datasets differ naturally in both camera and prevalence. To isolate label shift, we also resample each target set to controlled prevalence profiles: a screening-like profile with severe and proliferative disease below 2%, a referral-like profile weighted toward severe cases, and a triage-depleted profile missing mild cases. We then sweep target size from 50 to 2,000 scans over many random draws.
The second testbed is the four-hardware embryo benchmark from IADA, treated as ordered developmental stages. This tests whether the gains carry over to a setting with large documented prevalence gaps. If the hip osteoarthritis internal and external cohorts from Masuda et al. are accessible, they give a small real-world check where rare Crowe grade 4 cases are known to fail. That cohort is small, with 52 external patients, so it would be reported as illustrative only.
The metrics are absolute error of the estimated prevalence for each stage, with the rare stages reported separately; severe-stage sensitivity at a referral rate fixed to match the source rule; quadratic weighted kappa; mean absolute stage error; macro F1; and expected calibration error of the cumulative probabilities.
Three checks decide the outcome. The first compares our estimator with free expectation-maximization over the sample-size sweep. We predict our advantage is largest at small target sizes and disappears at large ones, and that pattern is the signature of borrowing strength across stages. The second is the triage-depleted profile, where the two-parameter family is deliberately wrong. It shows whether the penalized variant recovers without giving up the small-sample gain. The third stacks the correction on RCGUDA and IADA and asks whether tail sensitivity improves beyond what adaptation alone delivers. If the combined results on real cross-dataset pairs look the same as the resampled controls, we will have evidence that the method works under the joint appearance-and-prevalence shift that single-center biomarkers encounter at a new hospital.
References
- Soft Labels for Ordinal Regression
- Poisson Ordinal Network for Gleason Group Estimation Using Bi-Parametric MRI
- CORE: Learning Consistent Ordinal REpresentations for Image Ordinal Estimation
- OCL: Ordinal Contrastive Learning for Imputating Features with Progressive Labels
- An Attentive Dual-Encoder Framework Leveraging Multimodal Visual and Semantic Information for Automatic OSAHS Diagnosis
- PRIME: Deep Imbalanced Regression with Proxies
- Parameterized Diffusion Optimization Enabled Autoregressive Ordinal Regression for Diabetic Retinopathy Grading
- Recursively Conditional Gaussian for Ordinal Unsupervised Domain Adaptation
- Addressing Domain Shift via Imbalance-Aware Domain Adaptation in Embryo Development Assessment
- CT-based artificial intelligence system complementing deep learning model and radiologist for liver fibrosis staging
- Distributional Shifts in Automated Diabetic Retinopathy Screening
- Automatic hip osteoarthritis grading with uncertainty estimation from computed tomography using digitally-reconstructed radiographs