Sub topic 15
Failure Modes: Correlated Sources, Bias, Leakage and Feedback Loops
This chapter assumes Basic Python, supervised text classification, precision, recall, F1, basic probability, and regular expressions. You also need the weak-supervision model from earlier chapters: labeling functions produce noisy votes, a label model combines those votes, and an end model learns from the resulting labels.
Weak supervision increases labeling volume by accepting imperfect sources. That trade-off creates risks. A label model can produce confident labels for the wrong reason, especially when sources repeat the same evidence or when the data used to create labels also appears in evaluation.
Correlated labeling functions
A label model often works best when labeling functions provide partly independent evidence. Correlated sources violate that assumption.
For example, these functions may look like three sources:
- A function matches the word
refund. - A function matches a customer-support lexicon containing
refund. - A function calls a sentiment model trained on customer-support text.
All three may react to the same underlying pattern. If they vote negative, the label model can treat the repeated evidence as three independent confirmations. It may assign excessive confidence to the negative label.
Correlation can also occur when several functions call the same model or use the same keyword list.
Reduce this risk by grouping sources by evidence, removing duplicates, and checking whether a label remains stable when one group is removed. A small gold set can reveal overconfidence.
Bias and systematic errors
A source has bias when it favors some labels or groups of examples. A keyword function might label “cheap” as negative, even though “cheap and reliable” is positive. An LLM might interpret dialect, spelling, or product names unevenly.
Coverage alone does not reveal bias. Compare precision and recall across important slices, such as language variety, product category, or message length. Inspect examples where sources disagree. Keep a source that abstains rather than forcing a guess when its rule is unreliable.
| Failure mode | Typical symptom | Useful check |
|---|---|---|
| Correlated sources | Confidence rises without new evidence | Remove one source group |
| Label bias | One class dominates or a slice performs poorly | Compare metrics by slice |
| Leakage | Evaluation scores are unexpectedly high | Trace every feature and source |
| Feedback loop | Errors repeat and grow after retraining | Recheck labels against fresh data |
Leakage and feedback loops
Leakage occurs when information unavailable at prediction time influences a label, feature, or evaluation result. Examples include using a post-resolution support tag, putting gold-set texts in the weak-labeling pool, or letting a labeling function match a phrase copied from the test annotation.
Separate data before labeling when possible. Keep the gold set private from labeling-function development. Record when each feature and source could have existed in production.
A feedback loop starts when model predictions become future labeling evidence. The model reinforces its own mistakes: weak labels train the model, predictions become new labels, and the next training round learns those predictions again. Use fresh samples, human review, and unchanged test data to break the loop.
A safer workflow
- Define the prediction-time information boundary.
- Group labeling functions by shared evidence.
- Measure coverage, overlap, conflict, and class balance.
- Review examples from every source and disagreement group.
- Compare weak labels with a small, separately collected gold set.
- Retrain only after checking new errors on fresh data.
Exercise
Three labeling functions all use different names for the same sentiment lexicon and vote negative on the same reviews. What is the main risk, and what should you do?
Show answer
The sources are correlated, so the label model may become overconfident. Group or remove duplicate sources, then test the labels against a separate gold set.