Weakly Supervised Multilayer Perceptron

Machine Learning
Introduced by
Multiple contributors; paradigm formalized by Zhou (2018) and Ratner et al. (2016)
Year
2016–2018
Type
Feedforward neural network trained under weak supervision
Family
Deep learning / NLP / CV

What does it do?

Weakly supervised training of a multilayer perceptron (MLP) fits a standard feedforward network when the available labels are imperfect: noisy, incomplete, crowd-sourced, rule-generated, or derived from distant supervision.

It is a training paradigm rather than a distinct architecture. The network itself is unchanged; what differs is how the training targets are produced and how the loss handles label errors. This allows an MLP to be trained on large collections where full expert annotation would be too costly.

The intuition behind the method

Labels from keyword heuristics, crowd workers, knowledge-base lookups, or hand-written labeling functions are cheap, but each source has its own error pattern and coverage gaps. Combining them produces a per-example label that is noisy and sometimes missing. An MLP trained directly on such targets with ordinary cross-entropy tends to fit the errors along with the signal, because the loss gives every example equal weight. The weak-supervision adaptation therefore acts in two places: how the targets are formed from several sources, and how the loss or training procedure limits the influence of labels that are probably wrong. The MLP itself is the function being fitted to those targets.

History

Zhi-Hua Zhou's review "A brief introduction to weakly supervised learning" in National Science Review (vol. 5, no. 1, 2018; indexed online in 2017) organizes weak supervision into incomplete supervision (only a subset of the training data is labeled), inexact supervision (labels are coarse-grained), and inaccurate supervision (labels are not always correct). Ratner et al. (2016) introduced data programming, in which programmatic labeling functions are combined into training labels; the approach is implemented in the Snorkel system.

When to use it

Choose this approach when many examples are available but expert labels are unaffordable, and cheap sources such as heuristics, rules, existing knowledge bases, or crowd votes can supply plausible labels across much of the data. Typical settings include text classification with distant supervision from ontologies or codes, and tabular tasks where threshold rules or reference-table lookups are reliable for part of the data. A small clean evaluation set is required, since without one the model's quality cannot be judged. Do not use it when a moderate amount of clean labeled data is available, because a supervised MLP trained on that data is the simpler and usually stronger choice. Avoid it where the origin of each training label must be documented and audited, such as safety-critical decisions.

Limitations and considerations

  • Accuracy is capped by the weak sources: if a rule or crowd vote is systematically wrong for a subgroup, the MLP learns that error.
  • Labeling functions must be designed and checked for systematic bias, and each added source increases the labeling effort.
  • Estimating a noise-transition matrix or the accuracies of label-model sources is an extra statistical step, and its estimation error can propagate into training.
  • Accuracy typically trails a fully supervised MLP trained on clean labels from the same domain.
  • When the model underperforms, it is hard to tell whether the cause is the network or the labeling process, because both shape the training targets.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Training targets come from cheap sources such as rules, crowd votes, or knowledge-base matches, so the labeled set can cover far more examples than expert annotation alone.
  • Several weak sources can be merged into one target, and disagreement between them can be carried as a soft label rather than discarded.
  • The end model is an ordinary MLP, so existing architectures and training code carry over; the changes are confined to the targets and the loss.
  • Noise-robust losses and sample weighting allow the same network to be trained with different tolerance to label errors without redesigning the model.

Applications

  • Biomedical and clinical text classification using distant supervision from ontologies or ICD codes.
  • Social media sentiment or topic classification using keyword heuristics and crowd annotations.
  • Industrial defect detection where labeled defect images are scarce but rule-based detectors exist.
  • News or document categorization leveraging metadata, tags, or knowledge-base lookups as weak labels.
  • Scientific literature screening where inclusion/exclusion heuristics substitute for full expert review.
  • E-commerce product classification using catalog rules and user-generated tags as supervision.

How it works

How it works

1

Weak sources are defined first, for example keyword heuristics, distant supervision from a knowledge base, crowd annotations, or programmatic labeling functions. Each source either assigns a label to an example or abstains. Because sources differ in coverage, several of them together usually label more examples than any one alone, but their labels can conflict.

2

The labels from the individual sources are combined into one probabilistic label per example. Majority vote is the simplest option. A learned label model, such as the data-programming approach introduced by Ratner et al. (2016), estimates how accurate each source is and how its errors correlate with others, and outputs soft labels. In the Snorkel system this data-programming approach is implemented. Examples on which sources disagree or abstain receive less confident targets.

3

A standard MLP, with one or more hidden layers, nonlinear activations such as ReLU, and a softmax or sigmoid output, is trained on the soft labels. Cross-entropy against soft targets is the usual starting loss. Noise-robust alternatives such as symmetric cross-entropy or generalized cross-entropy (GCE) can be used when label noise is expected to be heavy. Batch normalization and dropout are common regularizers.

4

Residual label noise can be reduced further with sample weighting that down-weights likely mislabeled examples, a noise-transition matrix estimated during training, or co-training with a second network. Label smoothing limits overconfidence on noisy targets, but it is a regularizer and does not by itself correct label errors. Each of the other options adds an assumption about how the noise is structured, so the choice should be checked against the clean validation data.

5

Performance is measured on a clean, manually labeled held-out set using accuracy, F1, or AUC. A fully supervised baseline trained on a small clean set shows how much accuracy the weak supervision costs. Errors on the clean set should be grouped by the weak source or labeling function that produced the wrong label, to locate systematic mislabeling.

Common pitfalls

  • Evaluating on weakly labeled test data: the metric then measures agreement with the weak sources rather than with the true labels. Keep a manually labeled evaluation set.
  • Treating aggregated soft labels as ground truth, for example when reporting accuracy or confidence intervals computed against the training targets.
  • Relying on agreement between weak sources as a sign of quality; correlated sources can agree while sharing the same errors, which makes the aggregated label look more reliable than it is.
  • Ignoring class balance: labeling functions often cover some classes far more than others, so the aggregated labels can be skewed toward those classes.
  • Reporting results without a fully supervised baseline on the same task, which hides the cost of weak supervision.

Frequently asked questions

How does weak supervision differ from semi-supervised learning?

Semi-supervised learning uses a small set of clean labels together with many unlabeled examples, and exploits structure in the unlabeled data. Weak supervision uses many noisily labeled examples generated by heuristics or rules, and does not require clean labels for training, although a clean evaluation set is still needed.

Do I need a learned label model, or can I just train on majority-vote labels?

Majority voting is a reasonable baseline that is easy to inspect. A learned label model adds value when sources have correlated errors or very different accuracies, because it estimates source quality and produces soft labels. When the sources are of similar accuracy and largely independent, majority voting combined with a noise-robust loss may be enough.

What loss function should I use when training on noisy labels?

Standard cross-entropy is sensitive to label noise. Noise-robust alternatives include symmetric cross-entropy and generalized cross-entropy (GCE). Label smoothing is a regularizer that reduces overconfidence on noisy targets, but it does not by itself correct label errors. If the structure of the noise can be estimated, a noise-transition matrix can be used to correct the loss, but that estimate is itself uncertain.

How many labeling functions or weak sources do I need?

There is no fixed minimum. Diverse sources with low pairwise correlation generally produce better aggregated labels. Even two or three sources that cover different aspects of the task can improve on a single noisy source, especially when combined with a learned label model.

Can I apply this approach to tabular data or only to text and images?

It applies to tabular data as well. Rule-based labeling functions, such as a threshold on a feature or a lookup in a reference table, are straightforward to define for structured data, and the MLP is a standard end model for tabular tasks in this paradigm.

Related methods

Sources

  1. Zhou, Z.-H. (2018). A brief introduction to weakly supervised learning. National Science Review, 5(1), 44–53.

    Open DOI reference
  2. Ratner, A. J., De Sa, C. M., Wu, S., Selsam, D., & Re, C. (2016). Data programming: Creating large training sets, quickly. Advances in Neural Information Processing Systems (NeurIPS), 29.

    Open publication reference