Self-Supervised Model Generalization using Out-of-Distribution Detection

Matt Foutter, Rohan Sinha, Somrita Banerjee, Marco PavoneOOD @ CoRL 2023

TL;DR

This paper introduces DANN-DL, a novel self-supervised approach that uses an Out-of-Distribution (OOD) detector to identify unfamiliar data encountered during deployment. By leveraging these OOD examples, DANN-DL learns domain-invariant features, significantly improving classification accuracy on new, unseen data distributions without requiring any labels for the OOD data. This is crucial for safety-critical autonomous systems that must operate reliably even when encountering unexpected scenarios.

What Problem Does This Paper Address?

Autonomous agents, like robots or self-driving cars, rely heavily on machine learning models trained on vast datasets to make decisions. However, these models often perform poorly or unpredictably when faced with data that differs from their training distribution – known as Out-of-Distribution (OOD) data. This is a critical problem in safety-sensitive applications, such as satellite rendezvous, where encountering an unfamiliar image (e.g., Earth in the background instead of just space) could lead to disastrous consequences. The challenge is to enable these agents to generalize to new, unseen data distributions encountered during deployment, especially when this OOD data is sparse, unlabeled, and mixed with familiar data. Traditional domain adaptation methods often fail because they assume a static and distinct OOD distribution, which isn't realistic for real-world robotic deployments where distributions can shift over time and contain a mix of familiar and unfamiliar inputs.

Methods

The core of the proposed solution is the Domain Adversarial Neural Networks in the Data Lifecycle (DANN-DL) algorithm. It operates in an episodic manner, simulating deployment over time.

  1. OOD Detection: The system first uses a Sketching Curvature of OoD Detection (SCOD) module. This module, trained on the initial source data, identifies potentially OOD inputs by analyzing the model's prediction uncertainty. Crucially, the SCOD object is kept constant throughout deployment to ensure consistent OOD identification.
  2. Domain-Invariant Feature Learning: Once OOD examples are identified, they are added to a growing target dataset. Then, a Domain Adversarial Neural Network (DANN) is trained offline. DANNs are designed to learn features that are invariant across different domains, meaning they are useful for both the original training data (source) and the newly acquired OOD data (target).
  3. Self-Supervised Learning: The key innovation is that this process is self-supervised. The OOD examples are not manually labeled. Instead, the DANN-DL algorithm leverages the identified OOD inputs to improve its understanding of the target distribution, thereby enhancing its generalization capabilities.

Datasets

The experiments were conducted using:

  • MNIST: A standard dataset of handwritten digits, used as the source distribution.
  • MNIST-M: A modified version of MNIST, created by adding random noise and color to the digits, serving as the target distribution. This dataset simulates a domain shift.

The paper does not introduce a new benchmark dataset but uses a common setup to demonstrate the effectiveness of their approach on shifted distributions.

Key Insights and Ideas

  • Leveraging Sparse, Unlabeled OOD Data: The most significant insight is that even a small amount of unlabeled OOD data, when intelligently processed, can dramatically improve a model's performance on new distributions. This bypasses the need for expensive manual labeling of OOD examples.
  • Constant OOD Detector for Stability: Maintaining a fixed OOD detector (SCOD) throughout deployment, rather than re-training it, is crucial. This prevents the OOD detector from becoming overly specialized to the current, evolving target distribution, which could lead to a decay in performance over time.
  • Domain Invariance as the Key to Generalization: The DANN component effectively learns features that are robust to domain shifts. This means the model learns "what matters" for classification, regardless of superficial changes in the input data's background or style.
  • Balancing Source and Target Performance: The DANN-DL approach successfully improves target accuracy without sacrificing accuracy on the original source domain, a critical requirement for real-world agents that must continue to perform well on familiar tasks.

Key Results

  • Doubled Target Accuracy: DANN-DL more than doubles the model's accuracy on the OOD domain compared to a naive model trained only on the source data (e.g., from 24% to 67% on shifted MNIST).
  • Efficient Learning: The algorithm achieves comparable target accuracy to a full DANN model (trained on 60,000 labeled target examples) using only about 0.25% of that data (around 150 OOD examples).
  • Maintained Source Accuracy: The method preserves high accuracy on the original source domain (achieving 99% in experiments).
  • Progressive Improvement: Through episodic learning, the target accuracy progressively increases as more OOD data is encountered and incorporated.

Limitations and Future Work

  • OOD Detector Reliance: The current OOD detection relies on functional uncertainty of a naive source-only model. The authors suggest exploring more task-aware OOD detection methods that might ignore inputs where misclassification has minimal impact on the downstream task.
  • Realistic Deployment Scenarios: The authors are working to adapt DANN-DL for more complex robotic applications like satellite pose estimation and warehouse manipulation.
  • OOD Identification Nuance: Future work could involve identifying OOD inputs in a more nuanced, task-aware manner, potentially improving the quality of data used for adaptation.
  • Training Frequency Optimization: The paper explores variable training frequencies, suggesting that optimizing how often the model is updated based on new OOD data could further accelerate learning and improve efficiency.

Summary updated

BibTeX
@inproceedings{foutter2023self,
  author = {Matt Foutter and Rohan Sinha and Somrita Banerjee and Marco Pavone},
  title = {{Self-Supervised Model Generalization using Out-of-Distribution Detection}},
  booktitle = {OOD @ CoRL},
  year = {2023},
  url = {https://openreview.net/forum?id=z5XS3BY13J},
}
Figure