biological-visual-eval
BioCLIP 2: Emergent Properties from Scaling Hierarchical Contrastive Learning — Jianyang Gu et al. (2025) (arXiv:2505.23883, 2025)
What this evaluates
Evaluates frozen visual embedding extractors on ecological trait alignment, fine-grained intra-species variation preservation, and zero-shot/few-shot transfer learning across diverse biological domains.
Datasets
- FishNet — total 94532; splits: train (75631), test (18901)
- NeWT — total ?; splits: train (-1), test (-1)
- AwA2 — total 37322; splits: train (-1), test (-1)
- Herb — total ?; splits: train (-1), test (-1)
- PlantDoc — total 2598; splits: train (-1), test (-1)
- Life stage-Diff/Align — total ?; splits: train (-1), test (-1)
- Sex-Diff/Align — total 13624; splits: train (-1), test (-1)
Metrics
accuracy (primary) — range: [0, 1]
- Fraction of correctly predicted instances. For FishNet, a sample is counted correct only if all 9 binary labels are predicted correctly.
average F1 score — range: [0, 1]
- Macro-averaged F1 score computed across all 85 numeric attributes in AwA2.
clustering accuracy — range: [0, 1]
- Accuracy of semi-supervised K-means cluster assignments compared to ground-truth species labels.
Input / output format
Input: Frozen visual embeddings extracted from input images using the evaluated model.
Output: Predicted class labels (binary or multi-class), attribute scores, or cluster assignments.
Scoring recipe
def compute_metric(predictions, gold, metric_name):
if metric_name == 'accuracy':
if predictions.ndim > 1: # FishNet multi-label
correct = (predictions == gold).all(axis=1)
else:
correct = (predictions == gold)
return correct.mean()
elif metric_name == 'average F1 score':
return f1_score(gold, predictions, average='macro')
elif metric_name == 'clustering accuracy':
return hungarian_algorithm_accuracy(gold, predictions)
return 0.0
Common pitfalls
- Fine-tuning the vision model instead of using it as a frozen embedding extractor, which violates the protocol's design to isolate embedding quality.
- Reporting per-label accuracy for FishNet instead of requiring all 9 binary labels to be correct simultaneously for a sample.
- Using the full AwA2 class split instead of the specified 45 train / 5 unseen test zero-shot transfer setting.
Evidence (verbatim from paper)
The average F1 score over all the attributes is reported for this benchmark.
Citation
@misc{gu2025bioclip2,
title={BioCLIP 2: Emergent Properties from Scaling Hierarchical Contrastive Learning},
author={Jianyang Gu et al. (2025)},
year={2025},
note={arXiv:2505.23883}
}
1---2name: biological-visual-eval3description: Evaluates frozen visual embedding extractors on ecological trait alignment, fine-grained intra-species variation preservation, and zero-shot/few-shot transfer learning across diverse biological domains. Use when the user wants to benchmark on FishNet, NeWT, AwA2, Herb, PlantDoc, Life stage-Diff/Align, Sex-Diff/Align, or asks about evaluating this task. Reports accuracy.4---56# biological-visual-eval78> BioCLIP 2: Emergent Properties from Scaling Hierarchical Contrastive Learning — Jianyang Gu et al. (2025) (arXiv:2505.23883, 2025)910## What this evaluates1112Evaluates frozen visual embedding extractors on ecological trait alignment, fine-grained intra-species variation preservation, and zero-shot/few-shot transfer learning across diverse biological domains.1314## Datasets1516- **FishNet** — total 94532; splits: train (75631), test (18901)17- **NeWT** — total ?; splits: train (-1), test (-1)18- **AwA2** — total 37322; splits: train (-1), test (-1)19- **Herb** — total ?; splits: train (-1), test (-1)20- **PlantDoc** — total 2598; splits: train (-1), test (-1)21- **Life stage-Diff/Align** — total ?; splits: train (-1), test (-1)22- **Sex-Diff/Align** — total 13624; splits: train (-1), test (-1)2324## Metrics2526- `accuracy` **(primary)** — range: [0, 1]27 - Fraction of correctly predicted instances. For FishNet, a sample is counted correct only if all 9 binary labels are predicted correctly.28- `average F1 score` — range: [0, 1]29 - Macro-averaged F1 score computed across all 85 numeric attributes in AwA2.30- `clustering accuracy` — range: [0, 1]31 - Accuracy of semi-supervised K-means cluster assignments compared to ground-truth species labels.3233## Input / output format3435**Input**: Frozen visual embeddings extracted from input images using the evaluated model.3637**Output**: Predicted class labels (binary or multi-class), attribute scores, or cluster assignments.3839## Scoring recipe4041```python42def compute_metric(predictions, gold, metric_name):43 if metric_name == 'accuracy':44 if predictions.ndim > 1: # FishNet multi-label45 correct = (predictions == gold).all(axis=1)46 else:47 correct = (predictions == gold)48 return correct.mean()49 elif metric_name == 'average F1 score':50 return f1_score(gold, predictions, average='macro')51 elif metric_name == 'clustering accuracy':52 return hungarian_algorithm_accuracy(gold, predictions)53 return 0.054```5556## Common pitfalls5758- Fine-tuning the vision model instead of using it as a frozen embedding extractor, which violates the protocol's design to isolate embedding quality.59- Reporting per-label accuracy for FishNet instead of requiring all 9 binary labels to be correct simultaneously for a sample.60- Using the full AwA2 class split instead of the specified 45 train / 5 unseen test zero-shot transfer setting.6162## Evidence (verbatim from paper)6364> The average F1 score over all the attributes is reported for this benchmark.6566## Citation6768```bibtex69@misc{gu2025bioclip2,70 title={BioCLIP 2: Emergent Properties from Scaling Hierarchical Contrastive Learning},71 author={Jianyang Gu et al. (2025)},72 year={2025},73 note={arXiv:2505.23883}74}75```7677- arXiv: 2505.23883