- Introduced by
- Ratner et al. (data programming framework); Hochreiter & Schmidhuber (LSTM backbone)
- Year
- 2016–2018
- Type
- Weakly supervised sequence model
- Family
- Deep learning / NLP / CV
What does it do?
Weakly supervised LSTM trains a Long Short-Term Memory network on sequence data when manually annotated training labels are scarce or absent.
Several imperfect label sources, such as heuristic rules, distant supervision, crowdsourced labels, or programmatic labeling functions, are combined into probabilistic training labels that supervise the LSTM. A small, cleanly labeled validation set is still needed to tune hyperparameters and to evaluate the model.
The intuition behind the method
Obtaining thousands of hand-labeled sequences is expensive and slow. Weakly supervised LSTM reduces this cost by exploiting cheap, noisy label signals: a researcher might write rules such as 'if the sentence contains a drug name, label it as an adverse-event mention.' Several such rules often disagree. A label model reconciles their conflicts and assigns each training example a soft probability over classes. The LSTM is then trained on these probabilistic labels, so uncertainty is carried into learning instead of being discarded. Hand-labeled data still has a role: a small clean validation set is needed to tune the model and to judge whether the weak labels are good enough.
History
Weak supervision for sequence models is not attributable to a single originating paper. Ratner et al. (2016) introduced data programming at NeurIPS, a way to aggregate multiple noisy label sources into training labels. The LSTM backbone is due to Hochreiter and Schmidhuber. The combination described on this page, a data-programming label model supervising an LSTM classifier, is a composition of these ideas, and no single source defines this exact model. Snorkel is a framework that implements the label-modelling step. Zhou's review in National Science Review describes three types of weak supervision: incomplete (only a subset of training data is labeled), inexact (only coarse-grained labels are given), and inaccurate (the given labels are not always ground truth).
When to use it
Use weakly supervised LSTM when you have abundant unlabeled sequential data (text, time-series, logs) but cannot afford large-scale manual annotation, and when domain knowledge can be encoded into labeling rules or heuristics. It is especially suited for NLP tasks such as relation extraction, named entity recognition, and sentiment classification in specialist domains. Avoid it when the weak signals are too noisy or contradictory to produce reliable probabilistic labels — in that case, even a small fully labeled dataset paired with a semi-supervised approach may outperform it. It is also a poor choice when sequence length is very short and a simple keyword classifier would suffice.
Limitations and considerations
- Quality is tightly coupled to labeling-function quality; poor or highly correlated heuristics yield unreliable probabilistic labels.
- A clean validation set is still required to tune hyperparameters and assess whether the weak labels are good enough.
- The label model introduces an additional, non-trivial component that must be understood and maintained separately from the LSTM.
- Computationally heavier than fully supervised training on a small labeled set, particularly for long sequences.
- Interpretability is low: the LSTM itself is a black box, and errors are difficult to trace back to specific labeling functions.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Allows training on large unlabeled sequence corpora without manually labeling each example, by using programmatic or heuristic label sources.
- The LSTM gating mechanism lets the model use context across a sequence, which matters for tasks where the label depends on word order or on tokens far apart.
- The label model estimates each labeling function's accuracy and correlations, so sources are weighted rather than combined by simple majority vote.
- Labeling functions can encode domain knowledge such as dictionaries, ontologies, or database lookups, so domain experts can contribute without labeling examples one at a time.
- Once labeling functions are written, they can be applied to new sequences at little annotation cost, although their coverage and conflicts must be re-checked as the corpus changes.
Applications
- Biomedical named entity recognition and relation extraction from scientific literature without exhaustive annotation.
- Sentiment and opinion classification in low-resource domains using dictionary-based labeling functions.
- Log anomaly detection in systems engineering where labeled anomalies are rare.
- Clinical named entity recognition and relation extraction where dictionaries and rules serve as labeling functions.
- Social media monitoring and news article classification where keyword heuristics or metadata serve as cheap label proxies.
How it works
How it works
Multiple weak supervision sources are defined: heuristic labeling functions, knowledge-base lookups, regular expressions, crowdsourced annotations, or outputs from a related but imperfect model. Each source assigns a label or abstains for a given sequence, producing a sparse, noisy label matrix.
A generative label model (such as the Snorkel data-programming framework) estimates the accuracy and correlations of each labeling function without ground-truth labels. It outputs a probabilistic label distribution per training example, encoding how confident each class assignment is.
An LSTM network is trained on the full unlabeled corpus using the probabilistic labels as soft supervision targets. The model learns to encode temporal dependencies in the input sequence via its gating mechanism — input gate, forget gate, and output gate — and maps hidden states to class probabilities.
Instead of a standard cross-entropy loss against one-hot labels, the loss is computed against the probabilistic label distribution of each example (expected cross-entropy under those probabilities). The training target therefore reflects how uncertain the label model is, rather than forcing each example into a single class.
Performance is measured on a small, cleanly annotated held-out set that was never used for labeling function development. Metrics such as F1, precision, recall, and AUC compare the weakly trained LSTM against fully supervised baselines to quantify how much annotation cost was saved.
Common pitfalls
- Writing labeling functions that look at the test set signal, causing optimistic evaluation and data leakage.
- Ignoring abstain rates — if most labeling functions abstain on most examples, the label model has insufficient signal to work from.
- Using hard, majority-voted labels instead of the probabilistic outputs of the label model, discarding uncertainty information.
- Treating weak supervision as a complete substitute for any human oversight; a small validation set of clean labels is always necessary.
- Underestimating class imbalance: weak labeling functions may systematically miss the minority class, producing a biased LSTM.
Frequently asked questions
How does weakly supervised LSTM differ from semi-supervised LSTM?
Semi-supervised LSTM uses a small set of clean labeled examples together with a large unlabeled pool, typically leveraging consistency regularization or pseudo-labeling. Weakly supervised LSTM instead builds its training labels from noisy, programmatic sources, so its main training step uses no hand-labeled examples. A small clean validation set is still needed to tune hyperparameters and to evaluate the model.
Do I need the Snorkel framework specifically?
No. Snorkel is one label model for data programming, but any method that aggregates multiple noisy label sources into probabilistic labels can be used, including simpler majority voting (with its caveats) or other generative models. The LSTM training step does not depend on how the soft labels were produced.
How many labeling functions are needed?
There is no universal minimum. A practical starting point is a handful of labeling functions that cover different aspects of the phenomenon and each have accuracy better than random guessing. Coverage and conflict statistics from the label model show where further functions are needed.
Can I use a pre-trained LSTM or must I train from scratch?
You can initialize the LSTM with pre-trained weights (for example, from a language-model pre-training step) and fine-tune it on the weakly labeled data. This can be beneficial because good initial representations may reduce the number of noisy examples needed to reach acceptable performance.
What if my labeling functions are highly correlated?
High correlation between functions is problematic because a label model that treats them as independent may overcount their evidence. Some label models can estimate dependencies between functions. If the model you use cannot, diversify the sources or treat the resulting probabilities with caution.
Related methods
Sources
Ratner, A., De Sa, C., Wu, S., Selsam, D., & Re, C. (2016). Data Programming: Creating Large Training Sets, Quickly. Advances in Neural Information Processing Systems (NeurIPS), 29.
Open publication referenceZhou, Z.-H. (2018). A brief introduction to weakly supervised learning. National Science Review, 5(1), 44–53.
Open DOI reference