The Challenges of Continuous Self-Supervised Learning

Senthil Purushwalkam, Pedro Morgado, Abhinav Gupta

Abstract

Self-supervised learning (SSL) has traditionally relied on static, curated datasets to learn visual representations without human labels. However, real-world applications—such as autonomous agents or web-scale crawlers—encounter data as a continuous, non-stationary, and highly correlated stream. This paper investigates the limitations of current SSL methods in these "in-the-wild" scenarios. We demonstrate that standard approaches suffer from computational inefficiency, performance degradation due to temporal correlations, and catastrophic forgetting. To address these challenges, we propose the use of replay buffers and introduce a novel Minimum Redundancy (MinRed) buffer mechanism. MinRed maintains a diverse set of samples by discarding redundant data based on learned embeddings, significantly improving representation quality and robustness in continuous learning environments.

1. Introduction: Beyond Static Datasets

The success of modern self-supervised learning (SSL) algorithms, such as SimSiam and MoCo, is largely predicated on the availability of large-scale, static datasets like ImageNet. In these settings, data is typically shuffled to ensure it is Independent and Identically Distributed (IID), and models perform multiple passes (epochs) over the same data.

In contrast, true "in-the-wild" learning involves a continuous stream of data that is:

  • Infinite: The data volume exceeds storage capacity, precluding multiple epochs.
  • Correlated (Non-IID): Sequential observations (e.g., video frames) are highly similar, breaking standard optimization assumptions.
  • Non-stationary: The underlying distribution of concepts changes over time (e.g., moving from a bedroom to a kitchen).

This work evaluates how SSL methods perform when these "cheat codes" are removed, revealing significant gaps in current methodologies and proposing a more realistic framework for continuous learning.

2. Methodology: Buffering and Redundancy Reduction

To bridge the gap between static and continuous learning, we propose two architectural shifts.

2.1 Buffered SSL

Standard SSL processes a sample once and discards it. We introduce a fixed-size replay buffer that decouples data acquisition from the training process. This allows the model to "hyper-sample" from the buffer during periods where data arrival is slower than the GPU's processing speed. This approach maximizes hardware utilization and improves data efficiency by allowing the model to revisit recent observations multiple times before they are evicted.

2.2 Minimum Redundancy (MinRed) Buffers

A simple First-In-First-Out (FIFO) buffer often fails in streaming scenarios because it fills with highly redundant, temporally correlated samples (e.g., 100 frames of the same object). We propose the MinRed buffer, which uses the model's own learned embeddings to curate the buffer. When the buffer is full, the system identifies the most redundant samples—those with the smallest cosine distance to their neighbors—and replaces them. This process effectively decorrelates the stream on the fly and ensures the buffer represents a diverse set of visual concepts.

3. Experimental Setup

We evaluated our approach across three distinct streaming scenarios designed to mimic real-world challenges:

  1. Infinite Streams (Flickr Index): A stream of up to 100 million images used to test single-pass efficiency and scalability.
  2. Correlated Streams (KrishnaCAM): Nine months of egocentric video data from a wearable camera, characterized by high temporal redundancy.
  3. Non-stationary Streams (ImageNet-21K Semantic Splits): Data grouped by semantic categories (e.g., all furniture, then all animals) to test for catastrophic forgetting as the distribution shifts.

4. Key Results

4.1 Efficiency and Data Utilization

On the Flickr Index, Buffered SSL significantly outperformed standard single-pass training. With a single pass over 20 million images, the buffered approach achieved 41.4% ImageNet accuracy, a substantial improvement over the 32.3% achieved by the non-buffered baseline.

4.2 Overcoming Temporal Correlation

The KrishnaCAM experiments highlighted the fragility of standard SSL. Without buffering, the model collapsed, achieving only 0.4% accuracy due to the extreme correlation of sequential frames. The MinRed buffer mitigated this collapse, reaching 17.9% accuracy, which nears the performance of an "oracle" model trained on perfectly shuffled data.

4.3 Mitigating Catastrophic Forgetting

In non-stationary environments, models often forget early concepts as they adapt to new ones. MinRed acts as a natural "memory" by preserving unique samples from past distributions. In the ImageNet-21K semantic split task, MinRed significantly reduced the accuracy drop on previously seen tasks compared to standard FIFO buffers, maintaining higher overall generalization.

5. Discussion and Future Work

While replay buffers and MinRed provide a path forward, several hurdles remain for truly autonomous SSL:

  • Learning Rate Schedules: Traditional schedules like cosine decay require a fixed, known horizon. Continuous learning requires adaptive schedules that can function indefinitely.
  • Model Capacity: Fixed-capacity architectures (like ResNet-18) may eventually saturate when exposed to an infinite stream of new concepts. Future work should explore expandable architectures.
  • Computational Cost: The pairwise distance calculations required for MinRed introduce overhead that must be optimized for extremely large buffer sizes.

6. Conclusion

Transitioning SSL from static datasets to continuous streams is essential for real-world deployment. By addressing redundancy and non-stationarity through MinRed buffers, we can develop representations that are more efficient, diverse, and resistant to forgetting, bringing us closer to agents that learn autonomously from their environment.

Summary updated

BibTeX
@inproceedings{purushwalkam2022challenges,
  author = {Senthil Purushwalkam and Pedro Morgado and Abhinav Gupta},
  title = {{The Challenges of Continuous Self-Supervised Learning}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19809-0\_40},
}
Figure