Papers
Topics
Authors
Recent
Search
2000 character limit reached

Dualistic Meta-Learning for Open-Set DG (MEDIC)

Updated 13 January 2026
  • The paper introduces MEDIC, a framework that leverages dualistic meta-learning to jointly optimize inter-domain and inter-class splits for robust decision boundaries.
  • It employs episodic training with domain-wise and class-wise splits to mitigate class imbalance and enhance cross-domain transferability.
  • Experimental evaluations on PACS and Digits-DG datasets show that MEDIC outperforms ERM-bcls and MVDG-bcls in both OSCR and H-score metrics.

Dualistic MEta-learning with joint DomaIn-Class matching (MEDIC) is a meta-learning framework designed for the Open-Set @@@@1@@@@ (OSDG) problem. OSDG extends standard Domain Generalization (DG) to the more realistic regime where both domain distribution shift and previously unseen class categories may appear at test time. MEDIC establishes generalizable decision boundaries through dualistic meta-learning that jointly leverages inter-domain and inter-class data splits, optimized to handle the inherent class imbalance of open-set recognition and the challenges of cross-domain transferability (Wang et al., 2023).

1. Problem Formulation: Open-Set Domain Generalization

In OSDG, the training data comprises SS source domains S={D1,...,DS}S = \{D_1, ..., D_S\}, each drawn from a distinct distribution PsP_s over input-label pairs (x,y)X×C(\mathbf{x}, y) \in X \times C, with CC the set of known classes. During evaluation, a model faces TT unseen target domains T={DS+1,...,DS+T}T = \{D_{S+1}, ..., D_{S+T}\} defined by a distribution QQ over XX with labels coming from CUC \cup U, where UU is a set of unknown classes disjoint from CC. Crucially, samples with yUy \in U are never observed during training.

The objective is to train a model MΘM_\Theta to (i) correctly classify target-domain data from CC and (ii) reliably reject data from UU as unknown, despite never seeing UU during training. This scenario encompasses both distribution (domain) shift and class novelty, exceeding the complexity of standard DG or closed-set OOD detection.

2. One-vs-All Boundaries and Class Imbalance Challenge

The open-set nature of OSDG motivates the use of one-vs-all classifiers. For each kCk \in C, a binary classifier outputs pk(x)=P(xclass k)p_k(\mathbf{x}) = P(\mathbf{x} \in \text{class } k); a test example is declared "unknown" if maxkpk(x)μ\max_k p_k(\mathbf{x}) \leq \mu for some detection threshold μ\mu. This approach directly partitions the feature space, allowing explicit rejection of outliers.

However, each one-vs-all binary classifier faces extreme class imbalance: positives are rare (samples from class kk), while negatives—conceptually the union of all other classes—are much more numerous and diverse. This imbalance tends to bias decision boundaries—either crowding them against the positive region (yielding over-confident, under-generalized boundaries) or expanding them too far (reducing detection sensitivity), which degrades both known-class accuracy and unknown rejection. These limitations are accentuated under domain shift, further complicating OSDG.

3. Dualistic Meta-Learning and Joint Domain-Class Matching

MEDIC addresses OSDG via a dualistic, episodic meta-learning protocol combining inter-domain and inter-class splits:

  • Domain-wise split: Randomly divide source domains into two disjoint sets, SFS_F and SGS_G.
  • Class-wise split: Partition known classes CC into two subsets, C1C_1 and C2C_2.

This induces four training groups (episodes):

Episode Domains Classes
SF1S_{F1} SFS_F C1C_1
SF2S_{F2} SFS_F C2C_2
SG1S_{G1} SGS_G C1C_1
SG2S_{G2} SGS_G C2C_2

Meta-training uses SF1S_{F1} and SG2S_{G2} (differing in both domain and class), while meta-testing uses the crossed pair SF2S_{F2} and SG1S_{G1}.

At each iteration:

  1. Mini-batches BF1B_{F1}, BF2B_{F2}, BG1B_{G1}, BG2B_{G2} are sampled from the four splits.
  2. The meta-train loss is L1(Θ)=Lall(BF1;Θ)+Lall(BG2;Θ)L_1(\Theta) = L_{all}(B_{F1}; \Theta) + L_{all}(B_{G2}; \Theta), with LallL_{all} defined below.
  3. Take a virtual gradient step: Θ^=ΘαΘL1(Θ)\hat{\Theta} = \Theta - \alpha \nabla_\Theta L_1(\Theta).
  4. Compute the meta-test loss at Θ^\hat{\Theta}: L2(Θ^)=Lall(BF2;Θ^)+Lall(BG1;Θ^)L_2(\hat{\Theta}) = L_{all}(B_{F2}; {\hat{\Theta}}) + L_{all}(B_{G1}; {\hat{\Theta}}).
  5. The final update is ΘΘη[ΘL1(Θ)+βΘ^L2(Θ^)]\Theta \leftarrow \Theta - \eta [\nabla_\Theta L_1(\Theta) + \beta \nabla_{\hat{\Theta}} L_2(\hat{\Theta})].

A first-order Taylor expansion reveals an alignment term βαL1,L2-\beta\alpha \langle\nabla L_1, \nabla L_2\rangle in the resulting objective, which encourages the model to discover parameter updates that generalize across both domains and classes. MEDIC's regularizer combines four inner products, each linking episodes that are either same-domain/different-class or same-class/different-domain, which explicitly enforces domain and class generalization and prevents decision boundary skew from class imbalance.

4. Objective Functions, Losses, and Decision Strategy

The core losses are:

  • Closed-set cross-entropy: Lce(x,y;Θ)=logpΘ(yx)L_{ce}(\mathbf{x}, y; \Theta) = -\log p_\Theta(y | \mathbf{x}) (softmax classifier).
  • One-vs-all binary loss (Ovanet style):

Lova(x,y;Θ)=logpy(x)minjylog[1pj(x)]L_{ova}(\mathbf{x}, y; \Theta) = -\log p_y(\mathbf{x}) - \min_{j \neq y} \log [1 - p_j(\mathbf{x})]

This encourages the correct class output to be high while pushing down the strongest negative class.

  • Combined open-set loss: Lall=Lce+LovaL_{all} = L_{ce} + L_{ova}.

The per-iteration meta-objective is:

  • L1(Θ)=Lall(BF1;Θ)+Lall(BG2;Θ)L_1(\Theta) = L_{all}(B_{F1}; \Theta) + L_{all}(B_{G2}; \Theta),
  • Θ^=ΘαΘL1(Θ)\hat{\Theta} = \Theta - \alpha \nabla_\Theta L_1(\Theta),
  • L2(Θ^)=Lall(BF2;Θ^)+Lall(BG1;Θ^)L_2(\hat{\Theta}) = L_{all}(B_{F2}; {\hat{\Theta}}) + L_{all}(B_{G1}; {\hat{\Theta}}),
  • Update toward minimizing L1+βL2βα(L1L2)L_1 + \beta L_2 - \beta\alpha (\nabla L_1 \cdot \nabla L_2).

Rejection at test time: For an input x\mathbf{x}, compute class confidence by either confcls(x)=maxkpsoftmax,k(x)conf_{cls}(\mathbf{x}) = \max_k p_{softmax, k}(\mathbf{x}) or confbcls(x)=pbclf,k(x)conf_{bcls}(\mathbf{x}) = p_{bclf, k^*}(\mathbf{x}) where k=argmaxkpsoftmax,k(x)k^* = \arg\max_k p_{softmax, k}(\mathbf{x}). Classify as "known" if confμconf \geq \mu, "unknown" otherwise.

5. Addressing Class Imbalance and Generalization

MEDIC's distinct class-wise and domain-wise splits during episodic meta-learning enforce decision boundaries that are robust to the relative proportion of positives and negatives—mitigating the dominant-negative effect and ensuring that boundaries are not distorted due to imbalance. Simultaneous domain-wise splitting fosters invariance to domain shift, preventing collapse of known classes when faced with novel target domains.

In practice, this yields emphatic improvements on open-set metrics such as OSCR (Open Set Classification Rate) and H-score, while maintaining or very marginally improving closed-set recognition compared to standard DG algorithms. A plausible implication is that MEDIC's principled matching approach is particularly suited for applications where previously unseen categories are expected under domain shift (Wang et al., 2023).

6. Experimental Evaluation

Performance metrics are reported primarily on PACS (6 known, 1 unknown class splits; Deep ResNet-18/50) and Digits-DG (6 known, 4 unknown classes; ConvNet). Key results are summarized as follows:

Method Dataset OSCR H-score
ERM-bcls PACS-R18 70.3% 70.6%
MVDG-bcls PACS-R18 75.82% 70.9%
MEDIC-bcls PACS-R18 77.89% 75.98%
MVDG-bcls PACS-R50 83.21%
MEDIC-bcls PACS-R50 84.85%
ERM-bcls Digits-DG 66.03%
MEDIC-bcls Digits-DG 71.15%

MEDIC consistently outperforms ERM-bcls and MVDG-bcls on both OSCR and H-score. In all considered regimes, it also matches or slightly outperforms strong closed-domain generalization (SWAD) in closed-set recognition (Wang et al., 2023).

7. Algorithm Workflow Summary

The per-iteration workflow is as follows:

  1. Randomly split source domains into (SF,SG)(S_F, S_G) and classes into (C1,C2)(C_1, C_2).
  2. Sample mini-batches: BF1B_{F1} from (SF,C1)(S_F, C_1), BF2B_{F2} from (SF,C2)(S_F, C_2), BG1B_{G1} from (SG,C1)(S_G, C_1), BG2B_{G2} from (SG,C2)(S_G, C_2).
  3. Compute meta-train loss L1=Lall(BF1;Θ)+Lall(BG2;Θ)L_1 = L_{all}(B_{F1}; \Theta) + L_{all}(B_{G2}; \Theta).
  4. Take a virtual update: Θ^=ΘαΘL1\hat{\Theta} = \Theta - \alpha \nabla_\Theta L_1.
  5. Compute meta-test loss L2=Lall(BF2;Θ^)+Lall(BG1;Θ^)L_2 = L_{all}(B_{F2}; \hat{\Theta}) + L_{all}(B_{G1}; \hat{\Theta}).
  6. Final update: ΘΘη[ΘL1+βΘ^L2]\Theta \leftarrow \Theta - \eta [\nabla_\Theta L_1 + \beta \nabla_{\hat{\Theta}} L_2].
  7. Repeat until convergence.

This episodic, dual-split procedure underpins MEDIC's generalizability to novel domains and unknown classes (Wang et al., 2023).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Dualistic Meta-Learning for Open Set Domain Generalization (MEDIC).