Abstract
Most online learning algorithms assume that ground truth labels arrive immediately after a prediction is made. This paper challenges that assumption by proposing a self-supervised $k$-NN approach that can adapt to slowly changing (incrementally drifting) data streams without needing any new labels after the initial training phase.
Introduction: The Challenge of Concept Drift
In real-world deployments, data distributions are rarely static. Sensors degrade, seasonal patterns shift, and consumer behavior evolves—a phenomenon known as concept drift. Standard supervised online learning handles this by utilizing immediate feedback to update models. However, in many domains such as remote sensor monitoring or leak detection in water networks, obtaining labels is expensive, slow, or impossible. Without continuous labeling, traditional models eventually become obsolete as data drifts.
Methodology: Self-Teaching Online $k$-NN
The authors propose a Self-Teaching Online $k$-NN framework that maintains model relevance through self-labeling. The process begins with an initial training phase on a small labeled development set. As new unlabeled data arrives, the model maintains a sliding window of recent points to stay relevant to the current state of the stream.
For each new point, the model predicts a label and calculates a certainty score ($c$). If this score exceeds a threshold ($\theta$), the model treats its own prediction as ground truth and updates its internal memory. The paper evaluates three certainty metrics:
- $c_1$: A weighted distance-based score.
- $c_2$: A standard distance-weighted confidence score.
- $c_3$: A margin-focused score comparing the closest samples of the predicted class versus other classes.
Experimental Results
The approach was tested on two datasets: Spectra (simulated hyperspectral sensor drift) and Leaks (natural drift in water demand).
As shown in the results table, the self-supervised approach significantly outperforms a static "No Learn" baseline. On the Spectra dataset, the $c_1$ score achieved ~91% accuracy, nearly matching the "Perfect Policy" (92%) which has access to all labels. On the noisier Leaks dataset, the method improved accuracy from 57% to approximately 68%, demonstrating substantial utility even in challenging environments without new labels.
Discussion and Threshold Sensitivity
A critical component of this framework is the threshold $\theta$. Theorem 1 in the paper suggests that if drift is "Lipschitz continuous" (incremental) and the model maintains a sufficient margin, self-predictions are likely accurate. However, the model's performance is sensitive to the choice of $\theta$.
Figure 1 illustrates how accuracy on the dependent set ($S_{dep}$) varies with $\theta$. While the model is robust across a range of values, performance can drop sharply if the threshold is set too high, particularly for different certainty metrics. Finding the optimal threshold automatically remains a key challenge for real-world deployment.
Conclusion and Future Work
This self-supervised $k$-NN provides a viable path for deploying models in drifting environments where labels are scarce. While highly effective for incremental drift, the method is less suited for abrupt "shocks" in data distribution. Future research directions include developing automated threshold selection mechanisms and integrating "physics-informed" modeling to better handle complex drift patterns.
Summary updated