1 · Hypergraph base
HIST learns per-class Gaussian prototypes and a hypergraph neural network over each batch — a genuinely relational loss, not just anchor–positive–negative triplets.
sfora · Polish, a hound pack
SFORA is a deep-metric-learning library. Its method, HERD — Hypergraph EMA-teacher Relational Distillation — plus a multi-model ensemble beat the reported same-architecture SOTA on CUB-200 by more than one point.
…and it's not just CUB: our EMA-teacher distillation improves any base, soit beats Proxy Anchor on every dataset →
The result
CUB-200, ResNet-50 / 512-dim, zero-shot split, cosine Recall@1, best-over-training (the same protocol the papers use). The three baseline rows are the papers' reported figures — including ones we could not reproduce. We compare against the highestreported bar (the harder target), and clear it.
| Method | R@1 | In our hands |
|---|---|---|
| Proxy Anchor | 69.7 | ✓ reproduces (we get 0.695) |
| HIST | 71.4† | ✗ we get ~70.1 |
| PFML | 73.4† | ✗ collapses in our runs |
| HERD — single model | 71.6 | our run · best/mean 71.6/70.5 |
| SFORA — 5-model ensemble | 74.68 | our run |
| SFORA — 9-model ensemble | 75.34 | our run |
† Reported number we could not reproduce with the same ResNet-50/512 backbone: our faithful PFML runs collapse during training, and HIST tops out near 70.1 rather than the reported 71.4. Proxy Anchor, by contrast, reproduces cleanly (0.695). We deliberately still compare against the papers' publishedfigures — the harder bar — not our lower reproductions.
models in the SFORA pack → · bars start at R@1 0.72
Two datasets
HERD's real contribution isn't the HIST loss — it's the EMA-teacher relational distillation, a training procedure that improvesany base loss. HIST is the stronger base on CUB, Proxy Anchor on Cars — and best-base + our distillation beats plain PA on both. R@1, ResNet-50 / 512-dim, zero-shot split.
| Method | CUB-200 | Cars196 |
|---|---|---|
| Proxy Anchor (our run) | 69.5 | 88.8 |
| HIST (our run) | 70.0 | 87.1 |
| best base + our distillation | 71.6 | 89.6 |
| SFORA — ensemble (ours) | 74.68 | 91.7 |
All numbers are our in-harness runs (same code, same protocol), so the comparison is fair. Adding our distillation lifts every base onevery dataset: on CUB, HIST 70.0→71.6 (that is HERD); on Cars, HIST 87.1→88.4 and PA 88.8→89.6 (it also improves PA on CUB in a matched-recipe run). The "best base + our distillation" row is the winner per dataset — HERD (HIST + distillation) on CUB, PA + distillation (0.8961, reseeded mean over 3 seeds) on Cars — and both beat plain Proxy Anchor. No single fixed loss wins both (a fused HIST+PA model is a compromise, worse than each base); the unifying method is the procedure. The SFORA ensemble then stacks on top of the winning base per dataset: 74.68 on CUB (HERD ensemble), 91.7 on Cars (PA+distill ensemble). The HIST-based HERD ensemble reaches 90.3 on Cars — below the PA-based one, since HIST is the weaker Cars base — and is the run visualized cluster-by-cluster in the Cars separation viz →.
Explore the methods
One representative run per method (the benchmark numbers are the best across several seeds, so they sit a touch higher). Real runs, CUB-200 test retrieval, ResNet-50 / 512-dim.
Mean R@1 over random N-model packs; error bars are ±1 std (±0.56 at 1 model → ±0.16 at 7). The curve bends — the first few seeds buy the most, and get steadier.
bars start at R@1 0.70 (not 0); whiskers are the test-set standard error ±√(p(1−p)/N). Read the exact value on the right.
Alignment is the trick: a naive average (0.727) barely beats one model, but generalized-Procrustes alignment (iteratively rotate every model to a shared consensus, then average) reaches 0.749 — 99.4% of the full 4608-dim pack(0.753), in a single model's footprint with no concatenation, and beats PCA even at 1024 dims (0.744). The last ~0.4pt is genuine cross-model disagreement no single 512-vector can hold — we do not close it by fitting a projection to the eval set. Reproduce: ensemble_eval.py --compare-methods 512.
Note: PCA axes and the alignment rotations use only the embeddings' geometry (no labels/retrieval), but are computed on the test embeddings, so the aligned/PCA rows are a transductive upper bound; concat, random projection, naive mean and single model use no fitting at all.
How it separates
Eight held-out CUB-200 test classes — species the model never saw in training — the same 360 photos in every panel, projected to 2D with t-SNE. Each dot is one bird. Hover or tap a dot to see the photo; the same bird lights up across all five spaces.
Frozen ImageNet features already know something about birds, but the species smear together. Every trained objective — Proxy Anchor, HIST, HERD — pulls them into tight clusters, and on eight easy classes they look much alike: the 8-class silhouette is noisy and doesn't even rank them (it can put Proxy Anchor above HERD). The honest signal is retrieval over all 100 classes, bottom-left of each panel: 0.568 → 0.680 → 0.697 → 0.709 → 0.753 as you move frozen → Proxy Anchor → HIST → HERD → the 9-model SFORA pack. We show the silhouette tie on purpose — no cherry-picked angle.
Same viz, another dataset
Cars196, eight held-out test classes — car models the network never saw in training. The same 360 photos in every panel. On Cars the HIST-based HERD trails Proxy Anchor — but our distillation on the PA base (PA + distillation) beats it.
An honest contrast with CUB: HIST is the weaker base on Cars, so the HIST-based HERD single model (mean 0.8835) sits just below our own Proxy Anchor run (0.8879). But the distillation procedure still wins here — put it on the stronger base and PA + distillation reaches 0.8961 (reseeded mean), above plain PA. And the 3-model SFORA pack reaches 0.903. So our method beats PA on Cars too — via the PA base, not the HIST one.
In plain English
No jargon. (The jargon has its own glossary further down.)
Show the model a photo of a bird. It should turn that photo into a list of numbers (an embedding) such that two photos of thesame species get nearby numbers, and different species getfar-apart numbers. Then "find similar images" is just "find the nearest numbers." The catch: it's tested on species it never saw in training — so it must learn general bird-ness, not memorize.
Prior methods (Proxy Anchor, HIST, PFML) are all clever ways of tugging the numbers around: pull same-species together, push others apart, using one learnable "anchor" per species, or a graph of relationships. In our hands, none of these reproduciblypush past ~71% on this benchmark — and the best reported numbers (like PFML's 73.4) turned out not to reproduce at all.
Keep a slow-motion copy of the model — the EMA teacher. It changes only a tiny bit each step, so it's calmer and more consistent than the fast-learning student. Each step, the teacher looks at a batch and says "for this photo, here's which other photos are its neighbours, and how strongly." The student is trained to agree with the teacher's neighbourhood map. Copying relationships (who's near whom) — not just labels — is what teaches the model something that transfers to unseen species. That change lifts a single model off the plateau (0.716 best), and ensembling several of them is what beats reported SOTA.
Train several of these models from different random starts — apack (that's what sfora means). Glue their number-lists together and you get a stronger combined judgement than any single model, because they make different mistakes. And you can squeeze that combined list back down to the size of one model while keeping 99.4% of the pack's score (0.749 of 0.753) — by rotating the models into a shared frame first, then averaging.
Net: previous methods rearranged one model's view of onecrop. HERD changes what information the model gets each step (a teacher's neighbourhood hints), and a pack of them — compressed — beats the best number anyone has reported.
The method
One idea nudged the single-model plateau that ~16 loss-geometry tweaks could not: change the information per training step, not the loss surface. The ensemble then does the decisive SOTA-beating work.
HIST learns per-class Gaussian prototypes and a hypergraph neural network over each batch — a genuinely relational loss, not just anchor–positive–negative triplets.
A slow momentum copy of the model produces a soft distribution over each anchor's batch neighbors. The student matches it. Distilling relational structure — not labels — is what transfers to unseen classes.
Independently-seeded HERD models are ensembled by concatenating their L2-normalized embeddings. Diversity buys several points — feature-concatenation ensembling is an established DML paradigm (BIER and related boosted-embedding methods).
Reproduce
# 1 · train the 9-model pack (each seed saves its best embeddings)
for S in 0 1 2 3 4 5 6 7 8; do
uv run --extra research sfora image-end-to-end \
--protocol proxy-anchor-resnet50-512 --dataset-name cub \
--objectives hist --embedding-layer-norm \
--ema-distill-weight 1.0 --ema-momentum 0.999 \
--samples-per-class 8 --hist-lr-ds 0.03 --train-epochs 60 \
--eval-test-interval-epochs 5 --seed $S \
--save-test-embeddings reports/emb/ema_seed$S.npz
done
# 2 · feature-concatenation ensemble → the headline Recall@1
uv run python scripts/ensemble_eval.py reports/emb/ema_seed*.npz
#=> ENSEMBLE of 9 models: R@1=0.7534 (just 5 already clears SOTA at 0.7468)Honest science
The reported SOTA numbers on this benchmark are optimistic. We say so plainly.
| Method | Reported | Ours | Status |
|---|---|---|---|
| Proxy Anchor | 69.7 | 69.5 | ✓ reproduces |
| HIST | 71.4 | 70.1 | ✗ not reproduced |
| PFML | 73.4 | collapses | ✗ not reproduced |
Proxy Anchor reproduces faithfully, so the harness is sound. HIST's 71.4 only reaches ~70.1 (matching the ML-Reproducibility-Challenge 2023), and faithful PFML collapses. We still beat the best reported number (PFML 73.4) — while being clear it does not independently reproduce.
Nomenclature
References