Papers
Topics
Authors
Recent
Search
2000 character limit reached

Internal Label Shift Problem

Updated 14 July 2026
  • 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

P(X∣Y)=Q(X∣Y)butP(Y)≠Q(Y),P(X\mid Y)=Q(X\mid Y)\quad\text{but}\quad P(Y)\neq Q(Y),

with source prior πP=P(Y=1)\pi_P=P(Y=1), target prior πQ=Q(Y=1)\pi_Q=Q(Y=1), and shared class-conditionals G0=g0(x)G_0=g_0(x), G1=g1(x)G_1=g_1(x) (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 ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y) (Maity et al., 2020)
TTA with changing target priors target-time adaptation conditioned on estimated pt(y)p_t(y) (Park et al., 2023)
Hidden-activation shift induced by priors P(hk∣y)P(h_k\mid y) mixed by changed p(c)p(c) (Vianna et al., 2024)
Hierarchical internal-node shift p(i,u∣c)p(i,u\mid c) fixed while πP=P(Y=1)\pi_P=P(Y=1)0 (Kruse et al., 12 Jul 2026)
Federated target-aware aggregation πP=P(Y=1)\pi_P=P(Y=1)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

πP=P(Y=1)\pi_P=P(Y=1)2

or equivalently an importance ratio

πP=P(Y=1)\pi_P=P(Y=1)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 πP=P(Y=1)\pi_P=P(Y=1)4 or the weight vector πP=P(Y=1)\pi_P=P(Y=1)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 πP=P(Y=1)\pi_P=P(Y=1)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,

πP=P(Y=1)\pi_P=P(Y=1)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 πP=P(Y=1)\pi_P=P(Y=1)8 without target labels. BBSE exploits a black-box classifier πP=P(Y=1)\pi_P=P(Y=1)9 and the linear relation

πQ=Q(Y=1)\pi_Q=Q(Y=1)0

where πQ=Q(Y=1)\pi_Q=Q(Y=1)1, πQ=Q(Y=1)\pi_Q=Q(Y=1)2, and πQ=Q(Y=1)\pi_Q=Q(Y=1)3. With plug-in estimates πQ=Q(Y=1)\pi_Q=Q(Y=1)4 and πQ=Q(Y=1)\pi_Q=Q(Y=1)5, one forms

πQ=Q(Y=1)\pi_Q=Q(Y=1)6

The method is consistent under the label-shift assumption, support inclusion πQ=Q(Y=1)\pi_Q=Q(Y=1)7, and invertibility of πQ=Q(Y=1)\pi_Q=Q(Y=1)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 πQ=Q(Y=1)\pi_Q=Q(Y=1)9 linear system, with G0=g0(x)G_0=g_0(x)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

G0=g0(x)G_0=g_0(x)1

and studies the MLE

G0=g0(x)G_0=g_0(x)2

A key result is that the proposed robust estimators coincide with the MLE, and the paper gives deviation bounds that recover the optimal G0=g0(x)G_0=g_0(x)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 G0=g0(x)G_0=g_0(x)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 G0=g0(x)G_0=g_0(x)5, an unlabeled target stream G0=g0(x)G_0=g_0(x)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,

G0=g0(x)G_0=g_0(x)7

If the source model is biased toward majority classes, entropy minimization can reinforce that bias when G0=g0(x)G_0=g_0(x)8 is shifted. The proposed remedy is a lightweight adapter G0=g0(x)G_0=g_0(x)9 that maps a candidate label prior G1=g1(x)G_1=g_1(x)0 to feature-affine adjustments G1=g1(x)G_1=g_1(x)1 and classifier deltas G1=g1(x)G_1=g_1(x)2, producing logits

G1=g1(x)G_1=g_1(x)3

At test time, the target prior is estimated by an EMA of batch-mean predictions,

G1=g1(x)G_1=g_1(x)4

initialized at the uniform prior G1=g1(x)G_1=g_1(x)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

G1=g1(x)G_1=g_1(x)6

caused purely by a change in the label prior G1=g1(x)G_1=g_1(x)7 (Vianna et al., 2024). The consequence is that BN statistics G1=g1(x)G_1=g_1(x)8 become prior-dependent. CSN scores each channel by the squared G1=g1(x)G_1=g_1(x)9-Wasserstein discrepancy

ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)0

aggregates these scores using a class prior estimate, freezes label-sensitive channels with a depth-dependent mask, and uses hybrid BN statistics

ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)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 ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)2, items ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)3, and item-level attributes ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)4, with a base recommender ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)5 and an item-to-attribute map ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)6. Under the joint model

ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)7

the original attribute marginal is

ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)8

Internal label shift assumes that the conditional “leaf” distributions ps(x∣y)=pt(x∣y)p_s(x\mid y)=p_t(x\mid y)9 remain unchanged while the marginal over the internal labels pt(y)p_t(y)0 is moved from pt(y)p_t(y)1 to a stakeholder-defined target pt(y)p_t(y)2 (Kruse et al., 12 Jul 2026).

The resulting aligned recommender is

pt(y)p_t(y)3

with

pt(y)p_t(y)4

In the common one-category-per-item case, this reduces to per-item reweighting by pt(y)p_t(y)5. NAILS then mixes the shifted and original recommenders through

pt(y)p_t(y)6

and applies the procedure entirely at inference time, without retraining (Kruse et al., 12 Jul 2026). On EB-NeRD, with pt(y)p_t(y)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 pt(y)p_t(y)8, with coverage ≈85 % (Kruse et al., 12 Jul 2026).

Federated learning introduces yet another structure. In FedPALS, client distributions pt(y)p_t(y)9 and target distribution P(hk∣y)P(h_k\mid y)0 satisfy the pure label-shift assumption

P(hk∣y)P(h_k\mid y)1

while label marginals differ across clients and target (Zec et al., 2024). Standard FedAvg uses data-size weights P(hk∣y)P(h_k\mid y)2, which become biased for the target gradient under label shift. FedPALS instead computes

P(hk∣y)P(h_k\mid y)3

and aggregates by

P(hk∣y)P(h_k\mid y)4

When P(hk∣y)P(h_k\mid y)5 lies in the convex hull of P(hk∣y)P(h_k\mid y)6, the P(hk∣y)P(h_k\mid y)7 solution yields an unbiased single-step SGD update for the target objective; as P(hk∣y)P(h_k\mid y)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 P(hk∣y)P(h_k\mid y)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 p(c)p(c)0 and p(c)p(c)1, and uses a weighted source loss plus a Wasserstein penalty

p(c)p(c)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 p(c)p(c)3 depends only on a small subset of coordinates p(c)p(c)4 and the label p(c)p(c)5, with classical label shift recovered as the special case p(c)p(c)6, p(c)p(c)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 p(c)p(c)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,

p(c)p(c)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

p(i,u∣c)p(i,u\mid c)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

p(i,u∣c)p(i,u\mid c)1, p(i,u∣c)p(i,u\mid c)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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Internal Label Shift Problem.