Internal Label Shift Problem
- Internal Label Shift is defined as a scenario where class priors change across environments while class-conditional feature distributions remain invariant, forming the basis for classical label shift analysis.
- The topic extends to varying interpretations such as hidden-layer adaptations in deep networks, internal-node reweighting in hierarchical systems, and federated target-aware aggregation.
- Research methodologies include importance weighting, maximum likelihood estimation, and moment matching to estimate target priors and correct prediction biases caused by label shifts.
The internal label shift problem is not a single universally standardized problem class in the arXiv literature. In its narrowest and most classical sense, it reduces to label shift or prior shift, where the class priors change across environments while class-conditional feature distributions remain invariant. In more recent work, the phrase has also been used for structurally different phenomena: hidden-layer distribution changes induced by prior changes in deep networks, internal-node reweighting in hierarchical recommendation systems, and target-aware aggregation in federated settings. A precise reading therefore requires identifying which object is treated as the “label,” which conditional distribution is assumed invariant, and whether the shift is purely marginal or coupled with covariate or class-conditional change (Maity et al., 2020, Park et al., 2023, Kruse et al., 12 Jul 2026).
1. Terminological status and definitional landscape
The term is non-uniform across papers. One source is explicit that the paper “never uses the term ‘internal label shift’” and that “the only shift scenario analyzed is the classical one above,” namely
with source prior , target prior , and shared class-conditionals , (Maity et al., 2020). By contrast, later work adopts the phrase for settings that are not merely synonymous with classical prior shift.
A compact way to organize the terminology is the following.
| Usage of “internal label shift” | Invariant object | Representative paper |
|---|---|---|
| Classical prior shift | (Maity et al., 2020) | |
| TTA with changing target priors | target-time adaptation conditioned on estimated | (Park et al., 2023) |
| Hidden-activation shift induced by priors | mixed by changed | (Vianna et al., 2024) |
| Hierarchical internal-node shift | fixed while 0 | (Kruse et al., 12 Jul 2026) |
| Federated target-aware aggregation | 1 across clients and target | (Zec et al., 2024) |
This suggests that “internal” is used in at least three different ways. In some papers it is effectively a renaming of standard label shift; in others it refers to internal representations of a network; in still others it refers to internal labels in a hierarchy, such as item attributes above item identities. The resulting ambiguity is itself part of the topic.
2. Classical label shift as the canonical foundation
The canonical formulation assumes
2
or equivalently an importance ratio
3
Under this assumption, target risk can be rewritten as a reweighted source risk, and many estimation and correction procedures reduce to estimating the target marginal 4 or the weight vector 5 from unlabeled target data (Lipton et al., 2018, Tian et al., 2023).
Several foundational consequences recur across the literature. First, identifiability requires some form of class distinguishability. In BBSE this appears as invertibility of the predictor’s confusion matrix; in MLLS it appears as invertibility of a soft confusion matrix or strict linear independence of the class-conditional induced distributions; in mixture-model treatments it appears as linear independence of the class-conditional measures 6 (Lipton et al., 2018, Garg et al., 2020, Lecestre, 5 Feb 2025). Second, correction is usually performed either by importance-weighted ERM or by posterior reweighting,
7
followed by normalization (Lipton et al., 2018).
The nonparametric analysis in “Minimax optimal approaches to the label shift problem in non-parametric settings” isolates a further distinction between the unsupervised case, where only unlabeled target samples are available, and the case with a small number of labeled target examples. The paper attributes the difference in difficulty to the availability of target-domain data for estimating class-conditional distributions in the latter setting, and shows that a class proportion estimation approach is minimax rate-optimal in the unsupervised setting (Maity et al., 2020). This places classical label shift at the base of the broader internal-label-shift vocabulary.
3. Estimation, correction, and robustness under prior shift
A large part of the internal-label-shift literature, when stripped to its statistical core, concerns estimation of 8 without target labels. BBSE exploits a black-box classifier 9 and the linear relation
0
where 1, 2, and 3. With plug-in estimates 4 and 5, one forms
6
The method is consistent under the label-shift assumption, support inclusion 7, and invertibility of 8 (Lipton et al., 2018).
“A Unified View of Label Shift Estimation” places BBSE and maximum-likelihood estimation within a common distribution-matching perspective. It shows that population MLLS is consistent when the predictor is canonically calibrated and the soft confusion matrix is invertible, and that BBSE can be recovered from MLLS under a coarser confusion-matrix-style calibration. The paper attributes BBSE’s statistical inefficiency to information loss induced by coarse calibration (Garg et al., 2020). ELSA then reformulates estimation as a semiparametric moment-matching problem and constructs a weight estimator by solving a 9 linear system, with 0-consistency and asymptotic normality, while explicitly aiming to avoid post-prediction calibration (Tian et al., 2023).
Robustness has also become a central theme. “Robust Label Shift Quantification” treats unlabeled target covariates as a finite-mixture sample
1
and studies the MLE
2
A key result is that the proposed robust estimators coincide with the MLE, and the paper gives deviation bounds that recover the optimal 3 rate up to logarithmic factors in the well-specified case, together with robustness to contamination and outliers (Lecestre, 5 Feb 2025).
The same weighting principle also supports downstream procedures. Under label shift, calibration-error estimation without target labels can be made consistent by importance-reweighting labeled source samples within a bin-based estimator (Popordanoska et al., 2023). Distribution-free uncertainty quantification can likewise be restored by reweighting conformal calibration scores and binning-based post-hoc calibration by 4, with exact or asymptotic coverage guarantees depending on whether the true or estimated weights are used (Podkopaev et al., 2021).
4. Internal label shift in test-time adaptation and internal representations
In test-time adaptation, the phrase is used more specifically for settings in which covariate shift and label shift co-occur and standard entropy-based TTA becomes unstable. “Label Shift Adapter for Test-Time Adaptation under Covariate and Label Shifts” formulates a labeled source dataset 5, an unlabeled target stream 6, and distinguishes covariate shift, label shift, and their joint occurrence. The report states: “We refer to this setting as internal label shift in TTA” (Park et al., 2023).
The failure mode is tied to entropy minimization,
7
If the source model is biased toward majority classes, entropy minimization can reinforce that bias when 8 is shifted. The proposed remedy is a lightweight adapter 9 that maps a candidate label prior 0 to feature-affine adjustments 1 and classifier deltas 2, producing logits
3
At test time, the target prior is estimated by an EMA of batch-mean predictions,
4
initialized at the uniform prior 5, and adaptation updates only BN affine parameters or IABN parameters (Park et al., 2023). Reported results include a gain of +6.1% on CIFAR-10-C backward for Adapter+TENT over source performance, +9.8% on CIFAR-10-C and +5.6% on CIFAR-100-C for IABN+Adapter, and 72.97% versus 48.68% on VisDA-C for TENT+Adapter relative to TENT alone (Park et al., 2023).
A different but related formulation appears in “Channel-Selective Normalization for Label-Shift Robust Test-Time Adaptation.” There, Internal Label Shift is defined as the discrepancy between source and target hidden-layer activation laws
6
caused purely by a change in the label prior 7 (Vianna et al., 2024). The consequence is that BN statistics 8 become prior-dependent. CSN scores each channel by the squared 9-Wasserstein discrepancy
0
aggregates these scores using a class prior estimate, freezes label-sensitive channels with a depth-dependent mask, and uses hybrid BN statistics
1
Empirically, under one-class extreme imbalance, TTN loses ≈70 pp accuracy while Hybrid-TTN loses only ≈8 pp on CIFAR-10-C; on ImageNet-1K-C under single-class adaptation, TTN/TENT collapse by >70 pp whereas Hybrid-TTN collapses by <4 pp (Vianna et al., 2024).
These formulations retain the intuition of prior shift but relocate its effect to adaptation dynamics or internal feature statistics, rather than only to the external label marginal.
5. Hierarchical and distributed formulations
The strongest literal use of “internal” occurs in hierarchical recommendation. “Normative Alignment of Recommender Systems via Internal Label Shift” treats users 2, items 3, and item-level attributes 4, with a base recommender 5 and an item-to-attribute map 6. Under the joint model
7
the original attribute marginal is
8
Internal label shift assumes that the conditional “leaf” distributions 9 remain unchanged while the marginal over the internal labels 0 is moved from 1 to a stakeholder-defined target 2 (Kruse et al., 12 Jul 2026).
The resulting aligned recommender is
3
with
4
In the common one-category-per-item case, this reduces to per-item reweighting by 5. NAILS then mixes the shifted and original recommenders through
6
and applies the procedure entirely at inference time, without retraining (Kruse et al., 12 Jul 2026). On EB-NeRD, with 7 toward the editorial target, NAILS-det reduces KL@10 from 2.060 to 0.574 and improves coverage from 88.4 %→92.3 %; under the uniform target, KL@10 from 3.802→0.574 at 8, with coverage ≈85 % (Kruse et al., 12 Jul 2026).
Federated learning introduces yet another structure. In FedPALS, client distributions 9 and target distribution 0 satisfy the pure label-shift assumption
1
while label marginals differ across clients and target (Zec et al., 2024). Standard FedAvg uses data-size weights 2, which become biased for the target gradient under label shift. FedPALS instead computes
3
and aggregates by
4
When 5 lies in the convex hull of 6, the 7 solution yields an unbiased single-step SGD update for the target objective; as 8, the method recovers FedAvg (Zec et al., 2024). Reported gains include 65.6 ± 10.1% for FedPALS versus 44.0 ± 8.4% for FedAvg on CIFAR-10 with 10 clients and 9 labels/client, and 86.0 ± 2.9% versus 73.4 ± 1.6% on PACS (Zec et al., 2024).
6. Generalizations, monitoring, and recurring controversies
A recurrent source of confusion is whether internal label shift is pure prior shift or a broader joint-shift phenomenon. “Optimal Transport for Conditional Domain Matching and Label Shift” explicitly assumes both 0 and 1, and uses a weighted source loss plus a Wasserstein penalty
2
to align a reweighted source marginal with the target marginal in latent space, with target priors estimated by a mixture-plus-OT procedure (Rakotomamonjy et al., 2020). The paper’s summary explicitly describes this as resolving the “internal” label shift where both the priors and the class-conditionals have changed. This is materially different from classical label shift.
A second generalization is Sparse Joint Shift, where the density ratio 3 depends only on a small subset of coordinates 4 and the label 5, with classical label shift recovered as the special case 6, 7. Under SJS, SEES estimates both performance change and the shifted feature subset from labeled source and unlabeled target data, and empirically improves over BBSE and KLIEP on several benchmarks (Chen et al., 2022). This suggests that some uses of “internal” in the literature function as shorthand for structured latent or joint shift, not just label-prior mismatch.
Monitoring and decision-theoretic responses also extend the classical problem. Sequential changepoint detection under label shift reduces the multivariate problem to one-dimensional classifier scores 8, with a CUSUM-type statistic on the score density ratio (Evans et al., 2020). Distributionally robust optimization instead dispenses with target samples and trains against worst-case label distributions inside a KL ball around the source marginal,
9
yielding a saddle-point problem in model parameters and adversarial label weights (Zhang et al., 2020). Active learning under label shift introduces a medial distribution
0
balancing subsampling bias and importance-weighting variance (Zhao et al., 2020). In high-dimensional binary classification, label shift can even produce a phase transition: in sufficiently overparameterized regimes, an imbalanced training set can outperform a balanced down-sampled counterpart, while strong regularization removes that phase transition (Cheng et al., 2022).
The central controversy, therefore, is definitional rather than merely algorithmic. Some papers reserve the underlying assumption
1, 2
for the term; others apply “internal label shift” to hidden-layer shifts, internal-node marginals, client-target marginal mismatch, or joint label-plus-class-conditional shift. A plausible implication is that the term currently functions less as a settled statistical primitive than as a family resemblance around marginal reweighting of semantically meaningful latent or observable labels while preserving a lower-level conditional structure.