Table of Contents
Fetching ...

MADOD: Generalizing OOD Detection to Unseen Domains via G-Invariance Meta-Learning

Haoliang Wang, Chen Zhao, Feng Chen

TL;DR

Meta-learned Across Domain Out-of-distribution Detection (MADOD), a novel framework designed to address both covariate and semantic shifts concurrently, leverages meta-learning and G-invariance to enhance model generalizability and OOD detection in unseen domains.

Abstract

Real-world machine learning applications often face simultaneous covariate and semantic shifts, challenging traditional domain generalization and out-of-distribution (OOD) detection methods. We introduce Meta-learned Across Domain Out-of-distribution Detection (MADOD), a novel framework designed to address both shifts concurrently. MADOD leverages meta-learning and G-invariance to enhance model generalizability and OOD detection in unseen domains. Our key innovation lies in task construction: we randomly designate in-distribution classes as pseudo-OODs within each meta-learning task, simulating OOD scenarios using existing data. This approach, combined with energy-based regularization, enables the learning of robust, domain-invariant features while calibrating decision boundaries for effective OOD detection. Operating in a test domain-agnostic setting, MADOD eliminates the need for adaptation during inference, making it suitable for scenarios where test data is unavailable. Extensive experiments on real-world and synthetic datasets demonstrate MADOD's superior performance in semantic OOD detection across unseen domains, achieving an AUPR improvement of 8.48% to 20.81%, while maintaining competitive in-distribution classification accuracy, representing a significant advancement in handling both covariate and semantic shifts.

MADOD: Generalizing OOD Detection to Unseen Domains via G-Invariance Meta-Learning

TL;DR

Meta-learned Across Domain Out-of-distribution Detection (MADOD), a novel framework designed to address both covariate and semantic shifts concurrently, leverages meta-learning and G-invariance to enhance model generalizability and OOD detection in unseen domains.

Abstract

Real-world machine learning applications often face simultaneous covariate and semantic shifts, challenging traditional domain generalization and out-of-distribution (OOD) detection methods. We introduce Meta-learned Across Domain Out-of-distribution Detection (MADOD), a novel framework designed to address both shifts concurrently. MADOD leverages meta-learning and G-invariance to enhance model generalizability and OOD detection in unseen domains. Our key innovation lies in task construction: we randomly designate in-distribution classes as pseudo-OODs within each meta-learning task, simulating OOD scenarios using existing data. This approach, combined with energy-based regularization, enables the learning of robust, domain-invariant features while calibrating decision boundaries for effective OOD detection. Operating in a test domain-agnostic setting, MADOD eliminates the need for adaptation during inference, making it suitable for scenarios where test data is unavailable. Extensive experiments on real-world and synthetic datasets demonstrate MADOD's superior performance in semantic OOD detection across unseen domains, achieving an AUPR improvement of 8.48% to 20.81%, while maintaining competitive in-distribution classification accuracy, representing a significant advancement in handling both covariate and semantic shifts.

Paper Structure

This paper contains 18 sections, 16 equations, 4 figures, 3 tables, 1 algorithm.

Figures (4)

  • Figure 1: Problem setting for "Semantic OOD Detection in Unseen Domains", which involves both covariate shift (testing on an unseen target domain) and semantic shift (target domain contains OOD samples with novel semantics).
  • Figure 2: Overview of our proposed framework: Meta-learned Across Domain Out-of-distribution Detection (MADOD). The framework comprises four main stages: (1) Task construction: We randomly designate ID classes as pseudo-OOD classes for each task, simulating diverse OOD scenarios within the known class space. (2) Meta-learning: We perform bi-level optimization through inner and outer loop training. The inner loop focuses on task-specific adaptation across multiple domains, while the outer loop strengthens decision boundaries between ID and OOD, enhancing the model's sensitivity to distributional shifts. (3) All-class adaptation: We fine-tune the classification head on all ID classes while freezing the featurizer $\phi$, ensuring the classification head can effectively handle all in-distribution classes, including those previously used as pseudo-OODs, while preserving the learned domain-invariant features. (4) Test: We evaluate the model, trained on multiple source domains, on an unseen target domain for both ID classification and OOD detection. This framework aims to learn robust, domain-invariant features through meta-learning, achieving superior generalization to unseen target domains and effectively addressing the dual challenge of covariate and semantic shifts.
  • Figure 3: Comparison of t-SNE visualizations of the latent feature space for MADOD (ours) versus MBDG. These plots are generated on the PACS dataset, with "Photo" as the test domain. Red stars are OODs of the same semantic label.
  • Figure 4: Ablation study results in terms of AUROC and AUPR, comparing: 'CE only' (baseline with cross-entropy), 'MADOD w/o GI Reg' (without GI regularization), 'MADOD w/o OOD Reg' (without OOD regularization), and 'MADOD' (full model with both regularizations).