[Benchmark] Add support for HERBench benchmark - #1666
Open
GabrieleSerussi wants to merge 1 commit into
Open
Conversation
HERBench (CVPR 2026): multi-evidence integration in video QA. Datasets: HERBench / HERBench_lite / HERBench_lite_v2 (HF configs full / lite / lite_v2 of DanBenAmi/HERBench), with 8/16/32/64frame and 1fps variants in video_dataset_config.py. - Variant-aware download via snapshot_download allow_patterns: lite datasets fetch only the 4 archive chunks (~35 GB) they need, full fetches by pattern - Streaming extraction straight from the split chunks with ignore_zeros (the chunks form two complete tars back to back; no intermediate concat tar) - TSV stores choices as a JSON candidates column (per-letter columns would NaN-parse the 16 choices whose literal text is 'None'); handles the few 4-option questions everywhere - Official HERBench prompt + letter-extraction protocol; exact matching by default with the standard LLM-judge fallback via --judge (failed predictions always score 0); overall, per-task-type and per-source accuracy report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds HERBench (paper · project page · dataset · code), a CVPR 2026 benchmark for multi-evidence integration in video question answering. Every question is a five-way MCQ that requires aggregating at least 3 distinct, temporally separated visual cues from a long video (avg. ~6.6 min, mean Minimum-Required-Frame-Set ≈ 5.5). SOTA models reach only 31–42% (random = 20%).
Datasets added (plus
_8frame/_16frame/_32frame/_64frame/_1fpsvariants invideo_dataset_config.py):HERBenchfullHERBench_liteliteHERBench_lite_v2lite_v2Implementation notes
TYPE = 'Video-MCQ', subclassesVideoBaseDataset; TSV generated from the HF parquet with a JSON-encodedcandidatescolumn (per-letter TSV columns would NaN-parse the 16 choices whose literal text is "None" — verified on the real data; a handful of questions also have only 4 options, handled everywhere).snapshot_download(allow_patterns=...)instead of the full ~171 GB.tarfile(..., ignore_zeros=True)— no ~160 GB intermediate concatenated tar (halves the extra disk needed), resumable (skips already-extracted files).build_judge/extract_answer_from_itemLLM fallback when--judgeis set (defaultexact_matching); missing/failed predictions always score 0 and never reach the judge. Reports overall accuracy plus per-task-type (12 types) and per-source breakdowns.Testing
infer_data_job_videoloop +evaluate()on a HERBench_lite_v2 slice — 100% of answers parsed, accuracy in the expected range.HERBench_liteandHERBench_lite_v2: download, streaming extraction of all 68 videos, TSV generation,build_promptin both frame (decord) and video-LLM modes,evaluate()with simulated predictions (oracle predictions score exactly 1.0; per-task breakdown verified).flake8clean.