TL;DR
Co-training is a semi-supervised method for when labels are scarce and the data can be described in two independent ways. It trains one classifier on each description, then lets each classifier label the unlabelled examples it is most sure about. Those labels go into the other classifier's training set, so each model learns from evidence it could not see alone. The labelled set grows round by round.
Builds on: Semi-Supervised Learning, Conditional Independence · Leads to: Pseudo-Labeling, FixMatch
Where it's used
Classifying web pages. The original demonstration classified university course home pages. One view is the words on the page itself. The other view is the words in the links that point to it. A page can be recognised from either view, and a labelled page in one view tells the other classifier something about the pages it links to.
Two-view spam filtering. A mail system can judge an email by its body text and by its sender features, such as how old the account is and how often it sends. Labels are costly, since users rarely mark mail. Co-training lets a few hundred marked emails bootstrap a filter that uses both views. The numbers in the worked example are illustrative.
Multimodal data. Many items come with two natural views: a caption and an image, or a title and a body. When each view is enough to tell the class most of the time, co-training can use unlabelled pairs from a large archive.
How it works
Here is one tiny instance traced from start to finish. Each page has two views. View A counts the word "syllabus" on the page. View B counts "homework" in the link text pointing to the page. The target is 1 for a course page and 0 otherwise. Each classifier is a threshold rule, the simplest kind of supervised classifier: "positive if the count is at least ". Its confidence on a page is how far that page's count is from .
Two labelled pages: has , , label 1. has , , label 0. Three unlabelled pages: has , ; has , ; has , .
- Fit one rule per view. Rule A and rule B both get threshold . Any value above 0 and at most 3 classifies both labelled pages correctly, and 2 is a safe middle choice. Check: for rule A, has , so it is positive, and has , so it is negative. Rule B gets right too, since , and since .
- Score the unlabelled pages. Rule A says is positive with confidence 3 (since ), is negative with confidence 1, and is positive with confidence 1. Rule B says is negative with confidence 1, is negative with confidence 1, and is negative with confidence 2. Check: each confidence is the distance from 2.
- Each rule nominates its most confident page. Rule A nominates (positive, confidence 3). Rule B nominates (negative, confidence 2). Check: these are the largest confidences in their columns.
- Hand each nomination to the other view. with label positive goes into view B's training set, using its B value of 1. with label negative goes into view A's training set, using its A value of 3. Check: each rule now has three labelled pages, and each new label came from the other view's evidence.
- Refit both rules. View A's set is , and . The rule sets its threshold to the highest value that still labels every positive page positive, which is 4, the lowest positive count it has seen. Check: it gets all three right. View B's set is , and , so the threshold drops to 1. Check: it gets all three right too.
- See what changed. Rule B's threshold fell from 2 to 1, learned from view A's judgement of . Rule A's threshold rose from 2 to 4, learned from view B's judgement of . Check: , with and , is now negative under A and positive under B. The views disagree, and the next round has to settle that.
The diagram shows the loop. Each round repeats the same exchange.
flowchart LR L[Small labelled set] --> A[Classifier on view A] L --> B[Classifier on view B] A -->|most confident pages with labels| B B -->|most confident pages with labels| A A --> R[Refit both on the enlarged sets] B --> R
The math
Each example is described by two views, , with a label . The labelled set is and the unlabelled set is . Co-training assumes two things. First, each view alone is enough to predict the label well. Second, the two views are conditionally independent given the label:
The second assumption is the one that makes the method work, and the common mistakes section explains why.
Step 1 in symbols: one classifier per view
Train on the pairs from , and on the pairs from . In the example, is rule A and is rule B. Each rule reads only its own view.
Step 2 in symbols: confidence
For a threshold rule, the confidence on a page with count is . For a classifier that outputs probabilities, the usual confidence is the largest predicted probability. In either case, the pool of unlabelled examples is scored by the classifier that will nominate from it.
Step 3 in symbols: the exchange
Let be the unlabelled examples on which is most confident, each with the label . Add the pairs for to the training set of . Do the same with , using 's labels, for . Then refit both classifiers and repeat. In the example, .
Step 4 in symbols: why independence matters
Suppose is confident about and the label is . If the views are conditionally independent given , the view-2 features of carry information about that is not already in the view-1 features. Then the pair teaches something new. If the views were copies of each other, would add nothing that had not already used, and the loop would only repeat 's own beliefs.
Worked examples
Rule A has threshold 5 and rule B has threshold 2. Three unlabelled pages: has , has and has .
- Rule A scores each page by distance from 5. is positive with confidence . is positive with confidence . is negative with confidence .
- Rule B scores each page by distance from 2. is positive with confidence . is negative with confidence . is negative with confidence .
- Rule A's most confident page is , with confidence 4. Rule B's most confident page is , with confidence 2.
- Check: the largest confidence in each column is the one picked.
- Interpretation: goes to view B with label positive. Rule B was undecided about , with confidence 0, so the label from view A is new information. goes to view A with label negative.
A mail system has 100 labelled emails and 900 unlabelled ones. Each round, view A nominates the 10 unlabelled emails it is most confident about, and view B nominates 10 more. The 20 nominated emails are distinct, and each set is handed to the other view. The numbers are illustrative.
- At the start, each view has 100 labelled emails, and 900 are unlabelled.
- In each round, 10 emails move from the unlabelled pool to view B's set, and 10 move to view A's set. That is 20 emails leaving the unlabelled pool per round.
- After 5 rounds, each view's labelled set has emails. Its own 100 are joined by 50 from the other view.
- The unlabelled pool has emails left.
- Check: the 100 emails moved out of the pool are distinct, so 100 original plus 100 nominated gives 200 labelled emails. With the 800 unlabelled ones, that is 1,000, the full mailbox.
- Interpretation: the filter now trains on 150 emails per view instead of 100, and the extra labels came from the other view's confident judgement.
A shop has 2,000 reviews. Moderators have labelled 200 of them as genuine or fake. View A is the review text, read as word patterns. View B is the reviewer's account features, such as the age of the account and the gap between reviews. The numbers are invented for illustration.
- Train a text classifier on view A and an account classifier on view B, each on the 200 labelled reviews.
- Each classifier scores the 1,800 unlabelled reviews. Each round, each classifier nominates the 8 reviews it is most sure of, whichever label they carry.
- The nominated reviews go into the other view's training set, with their labels.
- Refit, and repeat for several rounds.
- Interpretation: a skilled fake review may read as genuine to the text classifier, but its account can look new and busy. The account classifier then labels it, and the text classifier learns that the wording of such reviews can be fake.
Try it: after 3 rounds, with 8 nominations per classifier per round, how many nominated reviews does each view's training set hold? Answer: each view receives the other classifier's 8 nominations per round, so nominated reviews per view.
Common mistakes and tradeoffs
It is tempting to think that any two halves of the features make a good pair of views, such as the two halves of a bag-of-words vector. In fact each view must be enough to predict the label on its own, and the two views should carry different information. If the views are near-copies, each classifier simply confirms the other, and the loop adds no new evidence.
It is tempting to think that labelling every unlabelled example helps. In fact each classifier should nominate only its most confident examples. Wrong labels that are fed back become training data for the next round, and the errors compound. This is the confirmation bias of self-labelling, and the confidence threshold is the defence against it.
It is tempting to think that the independence assumption holds because the views look different. In fact the two views are often correlated through a shared cause. A page's words and the words in its links both reflect its topic. The method can still help when the dependence is weak, but its guarantees rest on the assumption, so check the results on a held-out labelled set rather than trusting the theory.
It is tempting to think co-training needs a large labelled set. In fact it starts from a small one, but each view's classifier must fit that set well enough for the first nominations to be right. A starting set with too few or too noisy labels gives confident mistakes from the first round.
When to use it. Use it when labels are scarce, the data has two views that each carry most of the signal, and the views are fairly independent.
When not to use it. Avoid it when only one view exists, when the views are near-copies, or when the labelled set is so small that the first classifiers are guesses.
Alternatives. The table compares the common ways to use unlabelled data.
| Method | What it uses | What it needs |
|---|---|---|
| Co-training | Two views, each labelling for the other | Two views that are each sufficient and fairly independent |
| Pseudo-Labeling | One model labelling its own confident predictions | A confidence threshold to limit errors |
| Consistency Regularization | Agreement of predictions under input changes | Useful augmentations of the data |
| FixMatch | Pseudo-labels with strong augmentation and a confidence threshold | Augmentations and a confidence threshold, with no second view |
History
In 1998 Avrim Blum and Tom Mitchell introduced co-training. They showed it on classifying web pages, with the words on each page and the words in the links pointing to it as the two views. They also gave a theoretical argument for when the method should work, which is where the conditional independence assumption comes from.
Self-labelling, where a model learns from its own confident predictions, was used before this. The two-view idea is what gave the method a principled reason to work, because the second view supplies labels the first view could not produce on its own. Later work carried the idea into text processing and computer vision, where natural two-view data is common, and it shaped the consistency-based methods that followed. Later contrastive methods also treat two views of one example as a matched pair.
Recap
- Co-training trains one classifier on each of two views of the same examples.
- Each classifier labels the unlabelled examples it is most confident about, and those labels go into the other classifier's training set.
- The method works best when each view is sufficient on its own and the views are conditionally independent given the label.
- Confidence-based selection and a held-out check guard against the errors that the loop can amplify.
- Read next: Pseudo-Labeling for the one-view version, Confirmation Bias for the failure mode of self-labelling, and FixMatch for a strong modern method that uses one view and augmentation.