Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Labels that can be overruled
Label propagation treats every given label as gospel. But labels come from people and processes that make mistakes. Label spreading lets every point, labelled or not, listen to its neighbours: a labelled point keeps a pull toward its own label, but if all its neighbours say otherwise, they can win.
Expert labels on telemetry, images or reports are never perfect: annotators disagree, and logs mislabel events. A method that both spreads labels and flags labels that disagree with their neighbourhood doubles as a label-cleaning tool before training a supervised model.
- 1. Unlike label propagation, label spreading…
- 2. A labelled point is outvoted when…
- 3. Label spreading can be used to…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.The algorithm by hand
1. Normalised affinity. S = D^(−½) W D^(−½), so Sᵢⱼ = wᵢⱼ / √(dᵢdⱼ). S is symmetric. For weights 1 between nodes of degrees 1 and 4, Sᵢⱼ = 1/√4 = 0.5.
2. Iterate. F ← αSF + (1 − α)Y, where Y holds one-hot rows for labelled points and zeros elsewhere. For two linked nodes with only node 1 labelled and α = 0.8, one step from F = Y gives node 1 a score of 0.2 and node 2 a score of 0.8.
3. Closed form. The iteration converges to
F = (1 − α)(I − αS)⁻¹Y.
For two linked nodes and α = 0.5, the labelled node ends at 2/3 and its neighbour at 1/3.
4. Predict. Take the argmax of each row, optionally after class mass normalisation.
How far labels travel. Expanding the inverse gives (1 − α) Σₜ αᵗ SᵗY: walks of length t count with weight (1 − α)αᵗ, a geometric distribution with mean α/(1 − α). With α = 0.5 labels reach about 1 hop; with α = 0.99, about 99 hops.
- 1. Sᵢⱼ for w = 3 between degrees 4 and 3 is…
- 2. Mean walk length for α = 0.9 is…
- 3. In F ← αSF + (1 − α)Y, the second term…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 30 minUndergraduate students and practising engineers.Regularisation view
Objective. The closed form minimises
Q(F) = ½ Σᵢⱼ wᵢⱼ ‖Fᵢ/√dᵢ − Fⱼ/√dⱼ‖² + μ Σᵢ ‖Fᵢ − Yᵢ‖²,
with α = 1/(1 + μ). The first term asks for smoothness over the graph and the second for agreement with the given labels. Small μ (α near 1) trusts the graph; large μ (small α) trusts the labels. Label propagation is the limit where labelled points are clamped exactly.
Exercise 1 (two moons, 10 labels per class with 4 of the 20 flipped, 10 datasets). Accuracy on the unlabelled points:
| method | mean | worst |
|---|---|---|
| label propagation (labels clamped) | 0.872 | 0.707 |
| label spreading, α = 0.99 | 0.941 | 0.843 |
Spreading corrected 65% of the flipped labels, and the iteration converged to the closed form.
from sklearn.semi_supervised import LabelSpreading
LabelSpreading(kernel="knn", n_neighbors=10, alpha=0.99) # alpha = weight on the neighboursIn scikit-learn’s LabelSpreading, alpha (which it calls the clamping factor) is the weight on the neighbours, the same α as here, with default 0.2: a small α that trusts the given labels heavily.
- 1. α near 1 means trusting…
- 2. Label propagation is the limit where labelled points are…
- 3. In exercise 1 spreading corrected about what share of flipped labels?
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Normalised Laplacian. I − S = D^(−½) L D^(−½) is the normalised graph Laplacian, with eigenvalues in [0, 2]. So I − αS is invertible for α < 1, and the series Σ αᵗSᵗ converges.
Personalised PageRank. Using the random-walk matrix D⁻¹W instead of S gives F = (1 − α)(I − αD⁻¹W)⁻¹Y. Each column is a personalised PageRank vector: a random walk that restarts at the labelled class-c nodes with probability 1 − α. Label spreading is the symmetrically normalised cousin.
Behaviour as α → 1. F approaches a multiple of the leading eigenvector of S, which is proportional to √dᵢ, plus slowly decaying label information. Raw scores then mostly reflect node degree and how much label mass each class put in. Class mass normalisation, or normalising each column, becomes important.
Interview questions.
- Why use symmetric normalisation? It keeps S symmetric with eigenvalues in [−1, 1], which gives a convex quadratic objective. It also stops high-degree hubs from dominating.
- How would you find mislabelled training data? Run spreading with α near 1 and flag labelled points whose argmax disagrees with their given label, then send them for expert review.
- 1. I − αS is invertible for α < 1 because…
- 2. With D⁻¹W instead of S, each column is a…
- 3. As α → 1, raw scores increasingly reflect…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.How much label noise can spreading absorb?
History.
- D. Zhou, O. Bousquet, T. N. Lal, J. Weston and B. Schölkopf (2004) introduced learning with local and global consistency.
- M. Belkin, P. Niyogi and V. Sindhwani (2006) introduced manifold regularisation, which extends graph smoothness to out-of-sample prediction.
- Personalised PageRank variants were later used for graph neural networks (APPNP, Gasteiger et al., 2019).
Exercise 2. Two moons, 10 labels per class with 0–6 flipped, 10-NN graph, 10 datasets. Each cell gives the mean, then the worst accuracy on the unlabelled points, with class mass normalisation.
| flipped | propagation | α = 0.5 | α = 0.9 | α = 0.99 | α = 0.999 | flipped corrected at α = 0.99 / 0.999 |
|---|---|---|---|---|---|---|
| 0 of 20 | 0.999, 0.993 | 0.981, 0.900 | 0.996, 0.986 | 0.998, 0.993 | 0.998, 0.993 | – |
| 2 of 20 | 0.964, 0.836 | 0.912, 0.807 | 0.959, 0.843 | 0.999, 0.993 | 0.998, 0.993 | 95% / 100% |
| 4 of 20 | 0.872, 0.707 | 0.817, 0.696 | 0.879, 0.768 | 0.941, 0.843 | 0.997, 0.993 | 65% / 95% |
| 6 of 20 | 0.795, 0.454 | 0.705, 0.429 | 0.771, 0.554 | 0.894, 0.779 | 0.973, 0.843 | 48% / 70% |
- α near 1 turned spreading into a label cleaner. At α = 0.999 it corrected 95% of 4 flipped labels and kept accuracy at 0.997, while propagation fell to 0.872.
- Small α was worse than propagation. At α = 0.5 and 0.9, no flipped label was ever corrected, because each labelled point’s own label outweighed its neighbours. Labels also faded within a few hops, so even clean labels gave lower accuracy (0.981 at α = 0.5).
- At α near 1, class mass normalisation mattered. With 6 flipped labels and α = 0.999, the plain argmax gave 0.835 against 0.973 with normalisation, because the raw scores drift toward the degree-shaped leading eigenvector.
- Label noise has a limit. With 6 of 20 flipped (30%), even the best setting left 30% of them uncorrected.
- scikit-learn’s default
alpha=0.2trusts the given labels heavily. Raise it when labels are noisy.
Label spreading in AI, robotics and aerospace
- Cleaning annotation sets: flag images, scans or telemetry windows whose labels disagree with their neighbourhood before training a detector.
- Semi-supervised mapping: spread a few ground-truth land-cover labels across satellite imagery while tolerating some mislabelled reference plots.
- Graph neural networks: APPNP-style propagation (personalised PageRank) smooths a network’s predictions over a graph of sensors or parts.
References
- D. Zhou, O. Bousquet, T. N. Lal, J. Weston, B. Schölkopf (2004). “Learning with local and global consistency.” Advances in NeurIPS 16.
- M. Belkin, P. Niyogi, V. Sindhwani (2006). “Manifold regularization: a geometric framework for learning from labeled and unlabeled examples.” JMLR 7.
- J. Gasteiger, A. Bojchevski, S. Günnemann (2019). “Predict then propagate: graph neural networks meet personalized PageRank.” Proc. ICLR.
- X. Zhu (2005). “Semi-supervised learning literature survey.” University of Wisconsin–Madison TR 1530.