Skill Tracer
Skills › Scientific Agent Skills › waypoint-bio › compass-benchmark.md

compass-benchmark.md

138 lines · skills/waypoint-bio/references/compass-benchmark.md at 5f2bc03

Open on GitHub
1# Compass: the eight-task microbiome benchmark
2
3`outpost-bio/Compass` on the Hugging Face Hub — gated, Apache 2.0, ~605 MB, ~62.8k rows across four
4Hub configurations. Eight tasks are derived from those four configurations by filtering and by
5choosing different target columns.
6
7Hub card schemas/counts were checked on 2026-10-01 at revision
8`370f857265cab6756bb06c72451c083b13e2418f`; gated data rows were not downloaded.
9The benchmark definitions/scoring were reviewed in the 1.0.2 wheel and matching GitHub source.
11Every configuration exposes `train` / `validation` / `test` splits and carries a `Split` column
12recording the same assignment.
14```python
15from datasets import load_dataset
16ds = load_dataset("outpost-bio/Compass", "mgnify-biomes",
17 revision="370f857265cab6756bb06c72451c083b13e2418f") # requires access + HF_TOKEN
18```

Compass: the eight-task microbiome benchmark

outpost-bio/Compass on the Hugging Face Hub — gated, Apache 2.0, ~605 MB, ~62.8k rows across four Hub configurations. Eight tasks are derived from those four configurations by filtering and by choosing different target columns.

Hub card schemas/counts were checked on 2026-10-01 at revision 370f857265cab6756bb06c72451c083b13e2418f; gated data rows were not downloaded. The benchmark definitions/scoring were reviewed in the 1.0.2 wheel and matching GitHub source.

Every configuration exposes train / validation / test splits and carries a Split column recording the same assignment.

from datasets import load_dataset
ds = load_dataset("outpost-bio/Compass", "mgnify-biomes",
                  revision="370f857265cab6756bb06c72451c083b13e2418f")   # requires access + HF_TOKEN
Raw lines 1 to 19
20## The four source datasets
22| Config | Source | Rows (train/val/test) | Extra columns |
23| --- | --- | --- | --- |
24| `mgnify-biomes` | MGnify metagenomic profiles across gut, skin, oral, marine, freshwater, soil, engineered systems | 33,121 / 4,139 / 4,139 | `Biome 1`–`Biome 5`, `Run Accession`, `Data Type`, `Sequencing Method`, `Pipeline Version`, `Study Accession` |
25| `handuo` | Shi et al. — 16S amplicon study of drug–microbiome interactions in stool-derived communities | 3,168 / 396 / 396 | `SIC Name`, `Control`, `ATC Class`, `Sample ID` |
26| `mastrorilli` | Mastrorilli et al. — drug degradation by gut communities | 9,282 / 3,084 / 3,053 | `Degradation Rate`, `Drug`, `Sample ID` |
27| `roswall` | Roswall et al. — longitudinal infant gut cohort | 1,625 / 203 / 203 | `Timepoint`, `Delivery Mode`, `Sample ID` |
29All configs carry `Taxa` and `Relative Abundances` as aligned list columns.

The four source datasets

ConfigSourceRows (train/val/test)Extra columns
mgnify-biomesMGnify metagenomic profiles across gut, skin, oral, marine, freshwater, soil, engineered systems33,121 / 4,139 / 4,139Biome 1–Biome 5, Run Accession, Data Type, Sequencing Method, Pipeline Version, Study Accession
handuoShi et al. — 16S amplicon study of drug–microbiome interactions in stool-derived communities3,168 / 396 / 396SIC Name, Control, ATC Class, Sample ID
mastrorilliMastrorilli et al. — drug degradation by gut communities9,282 / 3,084 / 3,053Degradation Rate, Drug, Sample ID
roswallRoswall et al. — longitudinal infant gut cohort1,625 / 203 / 203Timepoint, Delivery Mode, Sample ID

All configs carry Taxa and Relative Abundances as aligned list columns.

Raw lines 20 to 30
31## The eight tasks
33As defined in `waypoint_bio/benchmark.py`:
35| # | Internal id | Config | Targets | Type | Pre-filter |
36| --- | --- | --- | --- | --- | --- |
37| 1 | `1_biome` | `mgnify-biomes` | `Biome 1`–`Biome 5` | classification (5 outputs) | none |
38| 2 | `2_biome_gut` | `mgnify-biomes` | `Biome 4`, `Biome 5` | classification (2 outputs) | `Biome 3 == "Digestive system"` |
39| 3 | `3_sic` | `handuo` | `SIC Name` | classification | `SIC Name` starts with `SIC`, excludes `control` and `seed` |
40| 4 | `4_drug_non_drug` | `handuo` | `Control` | binary classification | none |
41| 5 | `5_drug_class` | `handuo` | `ATC Class` | classification | `ATC Class` not null |
42| 6 | `6_drug_degradation` | `mastrorilli` | `Degradation Rate` | regression | none; `Drug` used as covariate |
43| 7 | `7_infant_age` | `roswall` | `Timepoint` | classification | none |
44| 8 | `8_birth_mode` | `roswall` | `Delivery Mode` | binary classification | none |
46What each asks, in plain terms:
481. **Biome classification** — predict all five levels of the MGnify biome ontology at once
49 (e.g. `root → Host-associated → Human → Digestive system → Large intestine`).
502. **Gut biome classification** — same, restricted to digestive-system samples, predicting only the
51 two finest levels. Harder: the easy environmental separations are gone.
523. **SIC classification** — identify which stool-derived in-vitro community a drug-perturbed sample
53 came from.
544. **Drug vs. control** — did this community receive a drug?
555. **Drug class** — recover the ATC class of the applied drug from the resulting composition.
566. **Drug degradation** — regress the degradation rate from composition plus drug identity. The
57 `Drug` covariate is one-hot encoded and concatenated to the pooled embedding.
587. **Infant age** — predict the sampling timepoint from an infant gut sample.
598. **Birth mode** — vaginal vs. caesarean delivery.

The eight tasks

As defined in waypoint_bio/benchmark.py:

#Internal idConfigTargetsTypePre-filter
11_biomemgnify-biomesBiome 1–Biome 5classification (5 outputs)none
22_biome_gutmgnify-biomesBiome 4, Biome 5classification (2 outputs)Biome 3 == "Digestive system"
33_sichanduoSIC NameclassificationSIC Name starts with SIC, excludes control and seed
44_drug_non_drughanduoControlbinary classificationnone
55_drug_classhanduoATC ClassclassificationATC Class not null
66_drug_degradationmastrorilliDegradation Rateregressionnone; Drug used as covariate
77_infant_ageroswallTimepointclassificationnone
88_birth_moderoswallDelivery Modebinary classificationnone

What each asks, in plain terms:

  1. Biome classification — predict all five levels of the MGnify biome ontology at once (e.g. root → Host-associated → Human → Digestive system → Large intestine).
  2. Gut biome classification — same, restricted to digestive-system samples, predicting only the two finest levels. Harder: the easy environmental separations are gone.
  3. SIC classification — identify which stool-derived in-vitro community a drug-perturbed sample came from.
  4. Drug vs. control — did this community receive a drug?
  5. Drug class — recover the ATC class of the applied drug from the resulting composition.
  6. Drug degradation — regress the degradation rate from composition plus drug identity. The Drug covariate is one-hot encoded and concatenated to the pooled embedding.
  7. Infant age — predict the sampling timepoint from an infant gut sample.
  8. Birth mode — vaginal vs. caesarean delivery.
Raw lines 31 to 60
61## Scoring
63- **Classification:** macro-averaged F1 — F1 per class, averaged with equal weight. Chosen so the
64 metric is not dominated by majority classes. Where a task has several target columns (1 and 2),
65 the per-target macro-F1s are averaged.
66- **Regression (task 6):** R², clamped to `[0, 1]` so it shares a scale with the F1 scores. A
67 negative R² therefore reads as `0.0`, not as "worse than the mean".
68- **Final score:** unweighted arithmetic mean of the eight task scores.
70Supplementary metrics are computed and stored but do not enter the score: one-vs-one macro ROC-AUC,
71macro PR-AUC (pairwise average precision over the same OVO pairs), balanced accuracy, plain
72accuracy; and MSE, Pearson, Spearman for regression.

Scoring

  • Classification: macro-averaged F1 — F1 per class, averaged with equal weight. Chosen so the metric is not dominated by majority classes. Where a task has several target columns (1 and 2), the per-target macro-F1s are averaged.
  • Regression (task 6): R², clamped to [0, 1] so it shares a scale with the F1 scores. A negative R² therefore reads as 0.0, not as "worse than the mean".
  • Final score: unweighted arithmetic mean of the eight task scores.

Supplementary metrics are computed and stored but do not enter the score: one-vs-one macro ROC-AUC, macro PR-AUC (pairwise average precision over the same OVO pairs), balanced accuracy, plain accuracy; and MSE, Pearson, Spearman for regression.

Raw lines 61 to 73
74## `benchmark_results.json`
76```
77benchmark_results.json
78├── model string — the value passed to --model
79├── final_score number — mean of every results[].score
80└── results array, one object per task
81 ├── task string — "1_biome", "6_drug_degradation", ...
82 ├── task_type "classification" | "regression"
83 ├── score number — macro F1, or R² clamped to [0,1]
84 └── metrics object — keys depend on task_type
85```
87`metrics` keys are suffixed with the target column name:
89| Task type | Keys |
90| --- | --- |
91| `classification` | `accuracy_<target>`, `balanced_accuracy_<target>`, `f1_macro_<target>`; with probabilities, binary `roc_auc_<target>` / `pr_auc_<target>` or multiclass `roc_auc_macro_ovo_<target>` / `pr_auc_macro_ovo_<target>`. Means: `f1_macro_mean`, optionally `roc_auc_mean`, `pr_auc_mean`. |
92| `regression` | `mse_<target>`, `r2_<target>`, usually `pearson_<target>` and `spearman_<target>`. Mean: `r2_mean`. |
94Example:
96```json
98 "model": "outpost-bio/Waypoint-6m",
99 "final_score": 0.545,
100 "results": [
101 {"task": "1_biome", "task_type": "classification", "score": 0.65,
102 "metrics": {"f1_macro_mean": 0.65, "roc_auc_mean": 0.81, "pr_auc_mean": 0.74}},
103 {"task": "6_drug_degradation", "task_type": "regression", "score": 0.44,
104 "metrics": {"mse_Degradation Rate": 0.019, "r2_Degradation Rate": 0.44, "r2_mean": 0.44}}
105 ]
107```
109The numbers above are synthetic, not measured results. They illustrate a two-task subset,
110whose mean is `(0.65 + 0.44) / 2 = 0.545`; this is not an eight-task Compass score.
111The upstream README example has inconsistent numbers, so do not treat it as output validation.

benchmark_results.json

benchmark_results.json
├── model          string — the value passed to --model
├── final_score    number — mean of every results[].score
└── results        array, one object per task
    ├── task       string — "1_biome", "6_drug_degradation", ...
    ├── task_type  "classification" | "regression"
    ├── score      number — macro F1, or R² clamped to [0,1]
    └── metrics    object — keys depend on task_type

metrics keys are suffixed with the target column name:

Task typeKeys
classificationaccuracy_<target>, balanced_accuracy_<target>, f1_macro_<target>; with probabilities, binary roc_auc_<target> / pr_auc_<target> or multiclass roc_auc_macro_ovo_<target> / pr_auc_macro_ovo_<target>. Means: f1_macro_mean, optionally roc_auc_mean, pr_auc_mean.
regressionmse_<target>, r2_<target>, usually pearson_<target> and spearman_<target>. Mean: r2_mean.

Example:

{
  "model": "outpost-bio/Waypoint-6m",
  "final_score": 0.545,
  "results": [
    {"task": "1_biome", "task_type": "classification", "score": 0.65,
     "metrics": {"f1_macro_mean": 0.65, "roc_auc_mean": 0.81, "pr_auc_mean": 0.74}},
    {"task": "6_drug_degradation", "task_type": "regression", "score": 0.44,
     "metrics": {"mse_Degradation Rate": 0.019, "r2_Degradation Rate": 0.44, "r2_mean": 0.44}}
  ]
}

The numbers above are synthetic, not measured results. They illustrate a two-task subset, whose mean is (0.65 + 0.44) / 2 = 0.545; this is not an eight-task Compass score. The upstream README example has inconsistent numbers, so do not treat it as output validation.

Raw lines 74 to 112
113## Interpreting a benchmark run
115**Baselines matter more than the absolute score.** The paper compares Waypoint against classical
116baselines (random forest and logistic regression on relative abundances) and against MGM, the prior
117microbiome foundation model. Two findings shape how a Compass number should be read:
119- In the paper, Waypoint beats the random-forest baseline from roughly **10,000 training examples upward**, and
120 was weaker in some small-data settings. This is not a universal threshold. Report training-set
121 size and held-out study/subject composition next to any score.
122- Baselines can use every taxon; the transformer sees only its fixed vocabulary. The paper's fair
123 comparison is the `(no unk)` baseline, with out-of-vocabulary taxa stripped from the baseline's
124 input too. Report both vocabulary-matched baselines for representation comparisons and
125 full-table baselines for practical method selection; clearly state each input restriction.
127**Scale does not monotonically help.** Pretraining loss falls all the way to 170M, but the best
128Compass score in the paper came from the **45M** model. Non-pretrained transformers get *worse* as
129they grow — the gain from scale is a property of pretraining, not of capacity.
131**Reproducibility.** The bundled config uses one epoch; the paper describes up to 300 epochs
132with early stopping. Matching the YAML alone does not reproduce the paper. Record the protocol,
133avoid `--max_samples` for a full benchmark, and report repeated independent seeds plus uncertainty.
134However, the reviewed CLI seeds Torch/NumPy once but does not pass `--seed` into
135`TrainingArguments`, which defaults to 42; YAML `seed` is unused.
136A seed study requires an explicit local correction and disclosure. The CLI also loads unpinned
137Compass revisions internally. Record actual revisions, task subset and software versions; a run
138with changed hyperparameters or capped splits must be labelled as a different protocol.

Interpreting a benchmark run

Baselines matter more than the absolute score. The paper compares Waypoint against classical baselines (random forest and logistic regression on relative abundances) and against MGM, the prior microbiome foundation model. Two findings shape how a Compass number should be read:

  • In the paper, Waypoint beats the random-forest baseline from roughly 10,000 training examples upward, and was weaker in some small-data settings. This is not a universal threshold. Report training-set size and held-out study/subject composition next to any score.
  • Baselines can use every taxon; the transformer sees only its fixed vocabulary. The paper's fair comparison is the (no unk) baseline, with out-of-vocabulary taxa stripped from the baseline's input too. Report both vocabulary-matched baselines for representation comparisons and full-table baselines for practical method selection; clearly state each input restriction.

Scale does not monotonically help. Pretraining loss falls all the way to 170M, but the best Compass score in the paper came from the 45M model. Non-pretrained transformers get worse as they grow — the gain from scale is a property of pretraining, not of capacity.

Reproducibility. The bundled config uses one epoch; the paper describes up to 300 epochs with early stopping. Matching the YAML alone does not reproduce the paper. Record the protocol, avoid --max_samples for a full benchmark, and report repeated independent seeds plus uncertainty. However, the reviewed CLI seeds Torch/NumPy once but does not pass --seed into TrainingArguments, which defaults to 42; YAML seed is unused. A seed study requires an explicit local correction and disclosure. The CLI also loads unpinned Compass revisions internally. Record actual revisions, task subset and software versions; a run with changed hyperparameters or capped splits must be labelled as a different protocol.

Raw lines 113 to 138