Skip to content

feat(leaderboard): read architecture and parameter count from v2 metadata - #581

Merged
KartikP merged 2 commits into
masterfrom
kp/filters-read-v2
Oct 9, 2026
Merged

KartikP merged 2 commits into
masterfrom
kp/filters-read-v2

Conversation

@KartikP

@KartikP KartikP commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Leaderboard model filters read v2 metadata records first and fall back to v1 brainscore_modelmeta (HAG-60).

Change

mv_final_model_context.model_meta:

  • architecture: a comma-separated tag list derived from the single v2 architecture_family, using the existing filter labels: convolutional_neural_network = DCNN; vision_transformer = Transformer; hybrid_convolutional_transformer = DCNN, Transformer, Hybrid; recurrent_convolutional_neural_network = DCNN, RNN; hybrid_biological_convolutional = DCNN; raw_pixels = Pixels; plus RNN whenever v2 recurrent is true. Other families, and models without a v2 record, keep the v1 value. The frontend already splits on commas, so no schema or JS filter change. Recurrent models use the existing RNN label (14 public models) rather than Recurrent (1 public model, grcnn, which v2 tags RNN); old architecture=Recurrent links are mapped to RNN in url-state.js.
  • total_parameter_count: v2 parameter_count, else v1.
  • Unchanged, still v1: runnable (v2 has no runnable field; it only exists in the legacy: block, which the publisher already writes into brainscore_modelmeta), model_size_mb, total_layers (no v2 field yet), and every other key.
  • Records join on case-insensitive (domain, name). A unique constraint guarantees at most one record per model, so no row duplication.

Compare, export and wayback are untouched: they read the same keys.

Migration (NOT run anywhere shared)

0034_final_model_context_reads_v2_metadata drops and recreates only mv_final_model_context (no CASCADE), keeping its indexes, grants, comment and owner, the same way 0031 does. The other views are not rebuilt. The reverse direction restores the 0027 definition. mv.sql is updated to match, and test_migrations checks that 0027 + 0034 reproduce mv.sql.

Rehearsed on a disposable local PostgreSQL: full migrate, then back to 0033, then forward again; the view definition switches as expected each time. Needs explicit approval before running on dev or prod.

Tests

  • New FinalModelContextV2MetadataTests: v2 family wins and is shown as filter tags (hybrid = DCNN, Transformer, Hybrid; recurrent family or recurrent flag = RNN) (case-insensitive name match); an unmapped family and a missing count fall back to v1; runnable, size and layers stay on v1. The first test fails against the old view definition.
  • benchmarks.tests.test_model_metadata + test_migrations on disposable PostgreSQL (web.metadata_test_settings): 43 tests OK.

Read-only comparison: prod (vision, mv_final_model_context, 2069 distinct model names, 220 rows with a v2 record)

Filter Models that change Detail
Architecture 34 public models change tags today; 67 after the proposed curation see the tag table below
Parameter count 49 values change, 0 cross a band (<10M, 10-50M, 50-100M, 100-500M, 500M-1B, >=1B) 8 differ by >10%: 7 alexnet_training_seed_* 50.3M -> 61.1M, resnet50-VITO-8deg-cc 42.3M -> 25.6M (the 8 disagreements the back-fill kept as v2).
Runnable 0 still v1

Architecture tags, public vision models (prod, read-only):

Tag v1 today with this PR after proposed curation
DCNN 200 198 (+10 / -12) 185 (+11 / -26)
Transformer 42 43 (+7 / -6) 35 (+7 / -14)
Hybrid 7 8 (+1) 9 (+2)
RNN 14 16 (+2: grcnn, VOneCORnet-S) 16
Recurrent 1 0 (grcnn moves to RNN; links aliased) 0
SKIP_CONNECTIONS 14 9 (-5 CORnet-S-based) 0 (-14)
Pixels 1 1 1

The 59 models with comma-joined or empty v1 architecture need curation separately; they keep their v1 label until then.

…data

mv_final_model_context now takes the architecture family and parameter
count from brainscore_model_metadata, falling back to brainscore_modelmeta.
Families are mapped to the existing filter labels, so filter options and
URL state are unchanged. Runnable, size and layers stay on v1.
Each v2 family expands into the existing filter labels (a hybrid is
DCNN, Transformer and Hybrid; a recurrent model also gets RNN), so one
curated family keeps the multi-tag filter. Old Recurrent links map to
RNN.
@KartikP
KartikP marked this pull request as ready for review October 9, 2026 12:01
@KartikP
KartikP merged commit e9a0188 into master Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant