Skip to main content

Beyond Hit@1: Metric Choice, Implementation Channels, and a Standardized Evaluation Protocol for Zero-Shot Multi-Label Recognition

The problem. Naive evaluation of zero-shot multi-label recognition defaults to Hit@1 (top-1 accuracy), which is lenient for multi-label tasks and systematically flatters zero-shot models — even making zero-shot appear to beat supervised models. This project formalizes the metric-asymmetry finding (first surfaced in scb5-zeroshot) into a standardized evaluation protocol + open-source benchmark harness.

Status: 🚧 M0–M3 draft complete (2026-08-14). Evidence chain independently cross-validated (109/109 checks); manuscript drafted (paper/EvalAnchor.tex, 8pp, compiles clean). Pre-submission items: author lists, one bib verification, series-status re-grep.

What this research is about

For a multi-label image, a "correct" prediction means hitting any of the true labels — so top-1 accuracy (Hit@1) systematically under-punishes misses and overstates zero-shot performance. The seed finding: on TeacherBehavior (8-class multi-label), zero-shot Hit@1 = 85.56% (appears to beat the supervised linear probe's 77.10%), yet proper multi-label Sample-F1 = 59.94% vs the supervised 88–90%.

This project delivers three things:

  1. The ranking-flip matrix — a systematic cross-model × cross-dataset × cross-metric study showing that metric choice changes which zero-shot model appears best.
  2. The protocol — primary metrics (Sample-F1 + Macro-F1 + mAP), Hit@1 demoted to coarse screening with an explicit caveat, and a threshold-selection procedure.
  3. The harness — open-source evaluation framework (splits + metric suite + one-command reproduction) on existing public datasets.

What this is NOT: a new method, theory, or dataset. "Hit@1 is lenient for multi-label" is known (Zhang & Zhou 2014, TKDE review; Madjarov et al. 2012). The contribution is the zero-shot × multi-label intersection and the systematic protocol — see AGENTS.md for the full novelty boundary.

Series relationship

This is the capstone of a 6-paper series on visual anchoring in the SCB5 classroom-behavior setting. It audits the series' own metric choices and provides the shared evaluation standard.

LA (llm-annotation)       IEEE Access ✅    concept: visual anchoring / AnchorProxy
  └─> VA (VisualAnchor)    EAAI (review)     class-level AnchorScore diagnostic
        └─> IA (InstanceAnchor) preprint      instance-level cross-backbone agreement
  └─> SV (SharedVisual)    preprint          mechanism: shared class-neighborhood geometry
scb5-zeroshot             Symmetry ✅         CAPE prompts, 5-backbone registry, metric-asymmetry seed
evalanchor (THIS)         🚧                capstone: evaluation protocol + harness

Planned repository structure

analysis/     — statistical analyses (CPU-only; ranking-flip matrix, protocol validation)
experiments/  — feature/metric extraction (GPU; reuses sibling caches)
results/      — committed evidence JSONs (single source of truth)
paper/        — manuscript (LaTeX)
todo.md       — executable task breakdown
AGENTS.md     — absorbed discipline + project-specific rules

Key results

The ranking flip (M1 v2, results/ranking_flip_report.txt; siglip2 on the corrected open_clip channel, see results/cache/README.md): the model that Hit@1 crowns "best" is overturned by every strict multi-label metric on 2 of 4 datasets, with coupled-bootstrap flip probability 1.000 and BH-FDR q ≤ 4e-4:

dataset Hit@1 winner strict-metric winner(s) verdict
TeacherBehavior siglip2 eva02 (all strict metrics) stable flip (q≤4e-4)
MultiTHUMOS eva02 openai (sample-F1, exact, Hamming) stable flip (q≤4e-4)
VOC2007 siglip2 siglip2 (dominates all metrics) stable
COCO siglip2 siglip2 (dominates all metrics) stable

The flip is conditional, and the conditions are diagnostic: it occurs on the high-label-cardinality classroom data (card. 3.61, 94.6% multi-label) and the dense-annotation action data (24% empty frames), and not on the moderate-cardinality detection sets. On TeacherBehavior even Hit@1→Hit@3 flips the winner (openai vs siglip2). A loading-channel audit additionally shows the same architecture name ("siglip2") yields hit@1 0.046 vs 0.965 depending on whether weights come from HF transformers or open_clip (logit corr ≈ 0) — implementation choices act as hidden evaluation variables.

Honesty note: an earlier run of this matrix (before the channel fix) showed voc2007/coco flips that were artifacts of a collapsed siglip2 cache; they disappeared after re-extraction and a full-chain re-run (results/README.md).

Seed finding (from scb5-zeroshot, accepted at Symmetry): TeacherBehavior zero-shot Hit@1 85.56% vs Sample-F1 59.94% vs supervised 88–90%.

The protocol (M2, paper/EvalAnchor.tex, evidence results/protocol_validation.json)

  • Primary suite: Sample-F1 + Macro-F1 + mAP, reported together; split verdicts reported as split.
  • Hit@1 demoted to screening with a mandatory caveat: its leniency is a per-sample function of cardinality (on TeacherBehavior P(Hit@1) climbs 0.20→0.83 from 1→4 true labels while Sample-F1 plateaus at ~0.78). No predictive flip rule is claimed (n=4 datasets; the dataset-level Hit@1−Sample-F1 gap does NOT separate flipping from stable sets — documented).
  • Threshold procedure: 5-fold out-of-fold per-class τ + argmax fallback. Validation: within 0.002–0.005 Sample-F1 of the in-sample oracle, vs 0.07–0.52 lost by fixed global τ.
  • Retroactive series audit: scb5's CAPE prompt-set ranking (Set-C best under Hit@1, unanimous) inverts under Sample-F1 (Set-B on 4/5 backbones); VisualAnchor-style argmax-recall class difficulty is uncorrelated (point estimates) with protocol F1 on TeacherBehavior (ρ∈[−0.36,0.24], underpowered n=8) but preserved on VOC2007 (ρ=0.858) — diagnostics inherit the same conditionality.

The harness (M3, evalanchor/)

python -m evalanchor.run --dataset voc2007 --output report.json   # full suite + verdict

Audited metric suite (30 known-value + sklearn cross-checks), channel-pinned cache loading with override dir, coupled bootstrap + BH-FDR. P3.4 self-check: outputs bit-identical to the committed evidence on teacher/voc/coco.

Reproduce

python analysis/audit_metrics.py          # metric suite audit (30 checks)
python analysis/scope_inventory.py        # cache inventory -> results/scope_inventory.json
python analysis/ranking_flip.py           # headline matrix -> results/ranking_flip_report.json
python analysis/protocol_validation.py    # protocol validation + series audits
python -m evalanchor.run --dataset coco    # one-command evaluation

Citation

🚧 TBD (preprint; manuscript under preparation).

Data

Multi-label datasets (TeacherBehavior, VOC2007, COCO, MultiTHUMOS) are third-party public benchmarks; feature caches already exist in the sibling repos (InstanceAnchor/results/per_image/, scb5-zeroshot/data/feature_cache/). See AGENTS.md §"Existing assets to reuse".

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evalanchor-0.1.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evalanchor-0.1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file evalanchor-0.1.0.tar.gz.

File metadata

  • Download URL: evalanchor-0.1.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for evalanchor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff8458b68ca4b91179594734701cedb0c66c0a4ca4737b45079a31eccd625663
MD5 e21b99f7bd48ef7d30ced288a345c46e
BLAKE2b-256 690b338ece223e5ba0685e6aef64cd9dffaa6c9e2c39331379535b2c89cd8119

See more details on using hashes here.

File details

Details for the file evalanchor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: evalanchor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for evalanchor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4f68e619f6aa2dea43d944f92e128e0488055c819f3bf418de77c926b659f1
MD5 2b4649c3ea103a0f5576b983bae0be53
BLAKE2b-256 6e9ac148927186348c950675850a63f1c34df0969052afe63dee06ba759fad13

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page