Marginal Likelihood Training for Partially Annotated Sequences

84 concepts57 papers1 proposal

Supervised learning thrives on completeness. In tasks like Named Entity Recognition (NER), syntactic parsing, or semantic segmentation, standard training paradigms assume that every token, span, or pixel in the training set is explicitly and correctly labeled.

In the real world, however, data is rarely pristine. We frequently encounter partially annotated data:

  • Distant Supervision: Text automatically labeled via dictionaries or knowledge bases, which inevitably misses entities not present in the lexicon.
  • Disjoint Datasets: Multiple specialized corpora where one dataset labels only chemicals, another labels only genes, and each treats the other's entities as unlabeled text.
  • Active Learning: Cost-saving strategies where annotators label only specific high-uncertainty tokens or subsequences rather than entire sentences.

When faced with missing annotations, standard loss functions fail catastrophically. This article explains why naive workarounds break down and how marginal likelihood training elegantly solves the problem by treating missing labels as latent variables.


The Pitfalls of Naive Imputation

What happens if we train a standard sequence model, like a Conditional Random Field (CRF), on incomplete data? We are generally forced into one of two flawed strategies:

  1. Treating missing labels as negative examples: If a token lacks a label, we assume it belongs to the background or "Outside" (O) class. As Greenberg et al. and Yang et al. demonstrate, this introduces destructive false negatives. If a model is trained on a dataset that only annotates chemicals, valid gene names will be penalized as incorrect background tokens, forcing the model to actively unlearn valid concepts.
  2. Dropping unlabeled tokens or segments: In structured prediction, this is fatal. As Cole et al. note, sequential and hierarchical models rely on a continuous chain of dependencies. Deleting parts of the input breaks the structural context, making it impossible for the model to learn valid transition dynamics or structural boundaries.

The Core Intuition: Marginalizing the Latent Space

The core philosophy of marginal likelihood training is to treat missing annotations not as negative evidence, but as unknown latent variables.

Instead of forcing the model to match a single, fully determined ground-truth sequence, we maximize the probability of the entire set of sequences that are consistent with our partial observations.

To see how this works, let's contrast a standard CRF objective with a Marginal CRF objective. In a standard CRF, the goal is to maximize the conditional log-likelihood of a single true label sequence $Y^*$:

$$\log P(Y^* \mid X) = \log \frac{\exp(\text{score}(X, Y^*))}{\sum_{Y \in \mathcal{Y}_{\text{all}}} \exp(\text{score}(X, Y))}$$

Under partial supervision, we do not possess $Y^*$. Instead, we have a partial sequence $Y_{\text{partial}}$. We define a subset $\mathcal{Y}_{\text{compatible}}(X)$ containing every possible full sequence that matches our known annotations. The objective function shifts to maximizing the marginal probability of this compatible set:

$$\log P(Y_{\text{partial}} \mid X) = \log \frac{\sum_{Y \in \mathcal{Y}_{\text{compatible}}} \exp(\text{score}(X, Y))}{\sum_{Y \in \mathcal{Y}_{\text{all}}} \exp(\text{score}(X, Y))}$$

Standard CRF Path:
Tokens:      The   [ biopsy ]   showed   [ carcinoma ]
Gold Path:    O       B-MED        O         B-MED      <-- Single deterministic path

Marginal CRF Paths:
Tokens:      The   [ biopsy ]   showed   [ carcinoma ]
Partial:      ?       B-MED        ?           ?        <-- Missing labels are latent
Path 1:       O       B-MED        O           O
Path 2:       O       B-MED        O         B-MED      <-- Sum over all valid paths
Path 3:     B-ORG     B-MED      I-ORG         O

By summing over all valid paths, the model is never penalized for predicting an entity in an unannotated slot, provided that path is structurally valid. As Kashima et al. and Marcheggiani et al. show, this allows the model to propagate information from sparse, high-confidence "anchors" across the entire sequence without introducing bias.


Efficient Computation via Dynamic Programming

Summing over an exponential number of compatible paths in the numerator sounds computationally prohibitive. However, it can be executed efficiently using the exact same dynamic programming machinery used to compute the denominator (the partition function).

In a standard forward-backward algorithm, the forward variable accumulates scores across all possible tags at each step. To compute the constrained numerator, we simply alter the transition constraints:

  • At positions with a known label, we restrict the forward pass to only transition through that specific ground-truth tag.
  • At positions with a missing label, we relax the constraints, allowing the forward pass to pool scores across all possible tags in the schema.

Greenberg et al. and Jie et al. demonstrate that this principled statistical handling allows models trained on highly fragmented data to closely approach the performance of models trained on fully gold-standard data.

This mechanism is highly flexible. For instance, Yang et al. apply it to Chinese Word Segmentation by summing over paths consistent with natural structural constraints like punctuation. Similarly, Ruan et al. use a marginalized objective to absorb token alignment shifts caused by speech recognition errors, treating misaligned tokens as hidden variables.


Beyond Linear Sequences: Trees and Forests

The power of marginalization extends naturally to hierarchical structures like syntax trees. When training dependency parsers on partially annotated corpora, we might only know a handful of parent-child word relationships.

Instead of discarding sentences with missing edges, Li et al. introduce a forest-based objective. The human-provided dependencies act as fixed constraints, and the model uses a modified chart-parsing algorithm to marginalize over the "forest" of all valid tree structures that can fill the gaps.

Partial Constraints:      [ The ] <--- [ cat ]      [ sat ]
                                                      |
                                                      v
                                                   [ mat ]

Marginalized Forest:      Sum over all valid projective trees 
                          that preserve the observed edges.

In a similar vein, Liu et al. utilize the inside-outside algorithm to marginalize over latent tree structures for span selection, allowing models to learn boundary representations even when full syntactic structures are absent.


Applications and Efficiency Gains

By decoupling model optimization from the requirement of total sequence coverage, marginal likelihood training unlocks massive efficiency gains across several domains.

Token-Efficient Active Learning

Traditional active learning forces humans to annotate entire sentences. With marginalization, algorithms can query only the single most uncertain token or subsequence. Surdeanu demonstrates that masking the loss for unannotated tokens while preserving full sequence context in Transformers is highly token-efficient. Wanvarie et al. and Radmard et al. show that this surgical approach achieves fully supervised performance levels while requiring annotations for only a tiny fraction of the total data.

Robust Distant Supervision

When automatically generating labels via dictionaries, omissions are inevitable. By treating unannotated spans as latent variables rather than non-entities, Nooralahzadeh et al. and Liu et al. prevent models from being penalized by dictionary gaps, maintaining high recall.

Multi-Label and Multi-Ontology Learning

When merging datasets with different annotation schemas (such as PropBank and VerbNet), text is often labeled for one ontology but not the other. Li et al. show that a marginal distribution approach within a CRF allows joint models to scale effectively using abundant single-ontology data by summing over all valid latent labels that could correspond to an observed label.


Extension to Vision and Multi-Label Spaces

The core philosophy—treating missing labels as a union of possibilities rather than a confirmed negative—extends directly to computer vision and multi-label classification.

In multi-source medical image segmentation, different datasets often label disjoint sets of organs. Zheng introduces a self-disambiguation strategy that treats unannotated regions as a union of potential target classes rather than a fixed background category.

Similarly, Wang et al. utilize a specialized marginal loss that merges missing foreground classes into a single flexible category. This prevents the optimization process from penalizing local models for correctly identifying structures that simply lack ground-truth annotations in their specific sub-dataset.

Whether dealing with text, trees, or pixels, marginal likelihood training shifts the optimization focus from predicting the exact ground truth to predicting anything that does not contradict the known truth.

Key Foundational Work

Training Conditional Random Fields Using Incomplete Annotations (2008) — contributed 3 concept elements to this direction.
Parsing the Wall Street Journal using a Lexical-Functional Grammar and Discriminative Estimation Techniques (2002) — contributed 1 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 60 papers
  2. Version 1 · 2026-10-04 · 47 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_partial_label_learning_a3ff0674,
  title = {partial label learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/partial-label-learning/rdr_a3ff067459a3459895c3bb97a67f64d3},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-21},
}

This exact version (version 2, frozen text):

@misc{lacuna_partial_label_learning_a3ff0674_v2,
  title = {partial label learning},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/partial-label-learning/rdr_a3ff067459a3459895c3bb97a67f64d3/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-21},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake