Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Label Switching and Parameter Identifiability

Latent Class Joint Models · Tutorial 455 of 697

Label Switching and Parameter Identifiability

Learn to distinguish label switching from weak identification, recognize their signatures in joint-model output, and report class-specific estimates without treating arbitrary labels as substantive.

Advanced 12 min read

What You'll Learn

  • Define identifiability up to permutation of latent-class labels.
  • Show why permuting all class-specific parameters leaves the observed-data likelihood unchanged.
  • Distinguish harmless label switching from weak identification due to overlapping class profiles.
  • Use likelihood contributions and posterior class probabilities to illustrate near-overlap.
  • Assess what ordering constraints can and cannot accomplish.
  • Choose diagnostics and reporting practices that preserve the distinction between class labels and model evidence.

Why Class Labels Can Be Unstable

A finite-mixture joint model represents the observed data as arising from one of several latent classes. The classes may differ in their longitudinal trajectories, event risks, or both. But the labels “class 1” and “class 2” are names assigned by the analyst: unless the model imposes an identifying convention, exchanging those names does not change the statistical model. This symmetry can make an optimizer return parameter estimates that look different while fitting the data equally well.

A separate problem occurs when the class-specific profiles are very similar. In that case, the data may provide little information about how observations should be divided among classes or about the separate parameters for each class. The likelihood can then be relatively flat in directions that change class proportions or profiles. This is weak identification, not merely a relabeling. It matters because estimates and standard errors may be unstable even after the labels have been put in a consistent order.

Mixture Likelihood and Identifiability

Let \(D_i\) denote the observed longitudinal and time-to-event data for subject \(i\), and let \(C_i\) be that subject’s unobserved class, taking values \(1,\ldots,K\). Write \(\pi_{ik}=P(C_i=k\mid X_i)\) for the probability of class \(k\), possibly conditional on baseline covariates \(X_i\), and let \(f_k(D_i\mid X_i;\theta_k)\) be the class-specific joint-data density or probability mass. The observed-data contribution for subject \(i\) is the sum over possible classes:

$$ L_i(\Theta)=\sum_{k=1}^{K}\pi_{ik}f_k(D_i\mid X_i;\theta_k), \qquad \sum_{k=1}^{K}\pi_{ik}=1. $$

Here \(\Theta\) collects the class probabilities and all class-specific parameters, including trajectory and event-model parameters. The class-specific density is joint: it represents the probability model for the observed longitudinal and event data together, under the assumptions of the specified joint model. The subjects’ likelihood is the product of these contributions when subjects are independent.

Definition: A parameterization is identifiable if distinct parameter values imply distinct distributions for the observed data. In a \(K\)-class mixture with exchangeable class labels, the usual target is identifiability up to label permutation: parameter values that differ only by consistently renaming the classes represent the same observed-data distribution. Weak identification describes a different practical situation: distinct parameter values produce distributions so similar that the observed data give little information for distinguishing them.

Identifiability is a property of the model and its observable distribution, not a guarantee that a particular sample will yield precise estimates. A model may be identifiable in principle but weakly identified for the data at hand. Conversely, equal likelihoods obtained simply by renaming classes do not show that the model has failed to distinguish different observable distributions; they show that labels have no intrinsic ordering.

Why Permuting Labels Leaves the Likelihood Unchanged

Take any permutation \(\sigma\) of \(1,\ldots,K\). Construct a new parameter vector by assigning the old class-\(\sigma(k)\) probability and parameters to the new class \(k\): \(\pi'_{ik}=\pi_{i,\sigma(k)}\) and \(\theta'_k=\theta_{\sigma(k)}\). The resulting contribution is

$$ L_i(\Theta') =\sum_{k=1}^{K}\pi_{i,\sigma(k)} f_{\sigma(k)}(D_i\mid X_i;\theta_{\sigma(k)}) =\sum_{j=1}^{K}\pi_{ij}f_j(D_i\mid X_i;\theta_j) =L_i(\Theta). $$

The middle equality follows because \(\sigma(k)\) runs through every class index exactly once; changing the order of the terms in a finite sum does not change the sum. This holds for every subject, so the full likelihood is unchanged as well. The equality requires that the relabeling be consistent: the class probability and every parameter attached to a class—including its trajectory, event-risk parameters, and within-class random-effects specification—must move together.

This argument is the central justification for treating label permutations as equivalent representations. If the labels are exchanged in only part of the model, such as swapping trajectory parameters but not the matching event-risk parameters, the resulting model will generally be different.

Worked Example: Verifying an Exact Two-Class Label Switch

Suppose a hypothetical subject has class-specific joint-data likelihoods \(f_1(D_i)=0.12\) and \(f_2(D_i)=0.03\), with class probabilities \(\pi_{i1}=0.60\) and \(\pi_{i2}=0.40\). These likelihood values are stipulated for illustration; they are not estimates from a real study. The subject’s observed-data contribution is

$$ L_i=0.60(0.12)+0.40(0.03)=0.072+0.012=0.084. $$

Now exchange the complete class profiles and their probabilities. The relabeled values are \(\pi'_{i1}=0.40,\ f'_1(D_i)=0.03,\ \pi'_{i2}=0.60,\ f'_2(D_i)=0.12\). Substitution gives

$$ L'_i=0.40(0.03)+0.60(0.12)=0.012+0.072=0.084. $$

The contributions match exactly. Thus, if an estimation routine returns these two parameterizations with the same likelihood, the difference may be nothing more than the names assigned to the classes. It would be incorrect to conclude that one fit supports a different substantive class structure solely because its “class 1” has the profile called “class 2” in the other fit.

Weak Identification When Class Profiles Overlap

Label symmetry persists even when classes are clearly separated. Weak identification arises when the observed data are not informative enough to separate the class-specific profiles. For example, if two classes have nearly the same longitudinal trajectories and event-risk models, their joint-data distributions will be similar. In the mixture sum, it can then be hard to determine which subjects support one class rather than the other. The class probabilities and class-specific parameters may move together with little change in the likelihood.

An exact limiting case clarifies the issue. If two classes have identical observed-data densities, \(f_1(D_i)=f_2(D_i)=f(D_i)\) for every possible \(D_i\), then their combined contribution is

$$ \pi_{i1}f(D_i)+\pi_{i2}f(D_i) =(\pi_{i1}+\pi_{i2})f(D_i). $$

The data contribution depends on the sum of those two probabilities, not on how that sum is split between the classes. Their separate class probabilities cannot be learned from these observations under this exact equality. When the densities are merely close rather than identical, the separate parameters may be estimable in principle, but only imprecisely.

Worked Example: Near-Overlapping Class Contributions

Consider a hypothetical subject with equal class probabilities, \(\pi_{i1}=\pi_{i2}=0.50\). Suppose the fitted joint-data likelihoods for this subject are \(f_1(D_i)=0.204\) and \(f_2(D_i)=0.196\). The contribution is

$$ L_i=0.50(0.204)+0.50(0.196)=0.102+0.098=0.200. $$

The posterior class probabilities for this subject, conditional on the fitted model, are proportional to the weighted class-specific likelihoods. In this example they are

$$ P(C_i=1\mid D_i)=\frac{0.50(0.204)}{0.200}=0.510, \qquad P(C_i=2\mid D_i)=\frac{0.50(0.196)}{0.200}=0.490. $$

The two classes contribute almost equally for this subject. That calculation alone does not prove that the whole model is weakly identified: evidence from other subjects and from the full set of trajectory and event observations also matters. But if this near-equality is typical because class profiles overlap, it is a warning that the data may not distinguish the class-specific parameters well. A small change in the data or model specification could then noticeably change the estimated class allocation or the separate profiles.

Diagnosing Switching and Weak Identification

The useful first question is whether apparently different fits can be aligned by a pure permutation. Compare complete class profiles, including class probabilities and all longitudinal and event components. If one fit’s class 1 matches another fit’s class 2 across these components, and their likelihoods agree to numerical precision, label switching is a plausible explanation. If matching labels still leaves substantially different estimates, or if estimates vary widely under small perturbations, weak identification or another fitting problem may be involved.

Several signs deserve attention, interpreted together rather than as automatic proof:

  • Class-specific profiles nearly coincide. Similar trajectory parameters and event-risk parameters can make the classes hard to distinguish through the joint data.
  • Large uncertainty or unstable estimates. Very large standard errors, broad likelihood-based intervals, or estimates that change substantially with small data or specification changes can signal weak information. Standard errors alone are not a definitive diagnosis, especially when the likelihood is irregular.
  • Highly correlated parameter estimates. For example, class probabilities and class-specific profile parameters may trade off against one another while leaving fitted observable distributions similar.
  • Different parameter vectors but matching fitted distributions. Check whether differences are a label permutation first; then examine whether non-permutation differences still give nearly equivalent likelihoods and observable implications.

The observed-data likelihood, fitted class-specific profiles, and uncertainty summaries should be examined together. A single small likelihood difference or a single unstable coefficient does not identify the cause. Numerical optimization can also be imperfect, so this tutorial’s distinction is conceptual: label switching is an exact symmetry of the model, while weak identification concerns insufficient separation in the observable information. Detailed diagnosis of competing optimizer solutions is a separate issue.

Ordering Constraints and Other Responses

One common computational convention is to impose an ordering on a class-specific parameter, such as requiring the class-specific mean trajectory at a chosen time to increase with the label. This selects one representative from the set of permuted parameterizations, when the ordering is well-defined and the profiles differ on that parameter. It can make repeated output easier to compare.

An ordering convention does not create new information or resolve weak identification. If the profiles are nearly tied on the ordered parameter, small changes in the data can reverse their order. If the profiles are exactly tied there, the constraint may fail to distinguish the labels. Nor does the convention make “higher-mean class” a biologically or clinically meaningful group by itself. Labels assigned through an ordering rule should be described as a naming convention.

ApproachWhat it addressesWhat it does not establish
Consistent relabeling after fittingMakes class labels comparable across parameterizations or runsDoes not improve separation or precision
Ordering constraint on a stated parameterSelects a consistent naming convention when the ordering is informativeDoes not remove a flat likelihood or make labels substantive
Reporting label-invariant quantitiesEmphasizes fitted mixture distributions or summaries unchanged by relabelingDoes not make every class-specific interpretation reliable

When reporting results, state the rule used to name classes, show the full class-specific profiles rather than only their labels, and distinguish exact label equivalence from uncertainty about the profiles themselves. If profiles overlap substantially, avoid presenting the class-specific estimates as sharply distinct patterns. A mixture model may still summarize the data usefully, but the strength of class-specific conclusions should match the information in the data.

Common Mistake and Key Takeaway

Common mistake: “The optimizer returned different class 1 estimates on two runs, so the model is not identifiable.” That conclusion is too quick. If the entire set of parameters is exchanged between classes and the likelihood is unchanged, the difference is the expected label symmetry of a mixture model. First align the labels and compare the corresponding profiles. If estimates still differ beyond permutation, examine the likelihood and uncertainty: near-overlap can create weak identification, but other numerical or model issues may also need consideration.

Key takeaway: Label switching changes the names attached to the classes while preserving the fitted mixture. Weak identification means the observed data do not sharply determine distinct class profiles or their probabilities. A naming convention can manage the first; it cannot repair the second.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In a two-class model, what must be exchanged to produce an exact label switch?
  2. Suppose two classes have identical joint-data densities. Which feature of their class probabilities can the observed-data likelihood identify from those densities?
  3. For a subject, the weighted class-specific likelihoods are \(0.18\) and \(0.12\). Find the posterior probability of class 1.
  4. What does an ordering constraint accomplish, and what does it not accomplish?

Solutions. (1) Exchange the class probabilities and every parameter tied to each class, including all trajectory, event-risk, and within-class components. The sum in the mixture likelihood is then unchanged. (2) It depends on the sum of the two class probabilities, since \(\pi_{i1}f+\pi_{i2}f=(\pi_{i1}+\pi_{i2})f\); their separate allocation is not identified from identical densities. (3) The total contribution is \(0.18+0.12=0.30\), so \(P(C_i=1\mid D_i)=0.18/0.30=0.600\). (4) An ordering constraint provides a consistent naming convention when the chosen parameter separates the profiles. It does not add information, resolve weak identification, or make the ordered labels inherently substantive.

Clinical Biostats