Skip to content
Back to skills

Domain Generalization Eval

ASecurity

This benchmark evaluates a model's out-of-distribution (OOD) generalization capability across multiple domain-shift datasets. It specifically probes whether models rely on true domain-invariant features learned from training domains versus leaking test-domain information through ImageNet pretraining weights or oracle hyperparameter selection. The protocol mandates training from scratch without pretrained weights and evaluating across multiple test domains to ensure a fair comparison of OOD ge...

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 11, 2026
researchpythongoperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill domain-generalization-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Domain Generalization Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Domain Generalization Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-domain-generalization-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-domain-generalization-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: domain-generalization-eval
description: This benchmark evaluates a model's out-of-distribution (OOD) generalization capability across multiple domain-shift datasets. It specifically probes whether models rely on true domain-invariant features learned from training domains versus leaking test-domain information through ImageNet pretraining weights or oracle hyperparameter selection. The protocol mandates training from scratch without pretrained weights and evaluating across multiple test domains to ensure a fair comparison of OOD generalization algorithms. Use when the user wants to benchmark on PACS, VLCS, OfficeHome, DomainNet, NICO++, or asks about evaluating this task. Reports test accuracy.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2305.15253
  bibtex_key: [REDACTED]
  confidence: high
---

# domain-generalization-eval

> Rethinking the Evaluation Protocol of Domain Generalization — Han Yu et al. (2023) (arXiv:2305.15253, 2023)

## What this evaluates

This benchmark evaluates a model's out-of-distribution (OOD) generalization capability across multiple domain-shift datasets. It specifically probes whether models rely on true domain-invariant features learned from training domains versus leaking test-domain information through ImageNet pretraining weights or oracle hyperparameter selection. The protocol mandates training from scratch without pretrained weights and evaluating across multiple test domains to ensure a fair comparison of OOD generalization algorithms.

## Datasets

- **PACS** — total 9991; splits: train (-1), val (-1), test (-1)
- **VLCS** — total 10729; splits: train (-1), val (-1), test (-1)
- **OfficeHome** — total 15588; splits: train (-1), val (-1), test (-1)
- **DomainNet** — total 586575; splits: train (-1), val (-1), test (-1)
- **NICO++** — total 88866; splits: train (-1), val (-1), test (-1)

## Metrics

- `test accuracy` **(primary)** — range: percent
  - Average classification accuracy across all test domains, computed as the mean of per-domain accuracy scores. Reported as percentage ± standard deviation over random seeds.

## Input / output format

**Input**: RGB images from multiple source domains with corresponding class labels.

**Output**: Class predictions (or probability distributions) for each test image.

## Scoring recipe

```python
def compute_accuracy(preds, golds):
    return sum(p == g for p, g in zip(preds, golds)) / len(golds) * 100

def evaluate(model, test_domains):
    domain_accs = []
    for domain in test_domains:
        preds = model.predict(domain.images)
        domain_accs.append(compute_accuracy(preds, domain.labels))
    return sum(domain_accs) / len(domain_accs)
```

## Common pitfalls

- Using ImageNet-pretrained weights for initialization, which can leak test-domain information for datasets containing real photos and inflate OOD performance.
- Performing oracle model selection by tuning hyperparameters on the test set instead of a validation set drawn from the training distribution.
- Evaluating on only a single test domain per model, which makes it easier to overfit hyperparameters to that specific domain compared to evaluating across multiple test domains simultaneously.

## Evidence (verbatim from paper)

> For IID model selection, we choose the test accuracy corresponding to the hyperparameters with the highest accuracy on validation data. For oracle model selection, we directly choose the highest test accuracy across all hyperparameter sets.

## Citation

```bibtex
@misc{yu2023rethinking,
  title={Rethinking the Evaluation Protocol of Domain Generalization},
  author={Han Yu et al. (2023)},
  year={2023},
  note={arXiv:2305.15253}
}
```

- arXiv: 2305.15253

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.