ans-benchmark / README.md
87cc2s's picture
Upload dataset
688bfd5 verified
|
Raw History Blame Contribute Delete
7.57 kB
metadata
configs:
  - config_name: exp1_counting
    data_files:
      - split: train
        path: exp1_counting/train-*.parquet
  - config_name: exp2_discrimination
    data_files:
      - split: train
        path: exp2_discrimination/train-*.parquet
  - config_name: exp3_controlled
    data_files:
      - split: train
        path: exp3_controlled/train-*.parquet
  - config_name: exp4_realworld_discrimination
    data_files:
      - split: train
        path: exp4_realworld_discrimination/train-*
  - config_name: exp4_realworld_naming
    data_files:
      - split: train
        path: exp4_realworld_naming/train-*.parquet
  - config_name: exp5_synthetic_matched
    data_files:
      - split: train
        path: exp5_synthetic_matched/train-*
dataset_info:
  - config_name: exp4_realworld_discrimination
    features:
      - name: image
        dtype: image
      - name: pair_num
        dtype: string
      - name: condition
        dtype: string
      - name: left_category
        dtype: string
      - name: right_category
        dtype: string
      - name: left_count
        dtype: string
      - name: right_count
        dtype: string
      - name: num_ratio
        dtype: string
      - name: answer
        dtype: string
      - name: prompt
        dtype: string
      - name: task
        dtype: string
      - name: tag
        dtype: string
      - name: eval_id
        dtype: int64
      - name: correct_answer
        dtype: string
    splits:
      - name: train
        num_bytes: 325752264
        num_examples: 584
    download_size: 325629874
    dataset_size: 325752264
  - config_name: exp5_synthetic_matched
    features:
      - name: image
        dtype: image
      - name: pair_num
        dtype: string
      - name: condition
        dtype: string
      - name: shape_type
        dtype: string
      - name: left_category
        dtype: string
      - name: right_category
        dtype: string
      - name: left_count
        dtype: string
      - name: right_count
        dtype: string
      - name: num_ratio
        dtype: string
      - name: answer
        dtype: string
      - name: prompt
        dtype: string
      - name: task
        dtype: string
      - name: tag
        dtype: string
      - name: eval_id
        dtype: int64
      - name: correct_answer
        dtype: string
    splits:
      - name: train
        num_bytes: 41105917
        num_examples: 1134
    download_size: 39706387
    dataset_size: 41105917

ANS Benchmark

A cognitively-grounded benchmark for numerical cognition in vision-language models, covering exact counting and approximate numerosity discrimination (ANS).

Each row is a self-contained trial: the stimulus image is embedded inline, and prompt holds the exact question text sent to the model during evaluation.

Configs (6)

Config Task Rows Stimuli
exp1_counting Count items in one image 1,994 Abstract shapes + real-world (FSC-133), small-n & large-n
exp2_discrimination Which side has more? (abstract, random sizes) 480 Pre-stitched pairs, 6 ratio conditions
exp3_controlled Which side has more? (numerosity decorrelated from area/spacing) 2,500 Pre-stitched pairs, 3 shapes × 4 colors
exp4_realworld_naming Name the object category 864 Single real-world panels
exp4_realworld_discrimination Which side has more? (real-world) 600 Pre-stitched same/diff-category pairs
exp5_synthetic_matched Which side has more? (abstract matched to real-world) 1,164 Pre-stitched pairs, counts/coords matched to Exp4

Every paired discrimination image is left | 10 px white divider | right.

Common columns (all configs)

Column Type Description
image Image Stimulus image (embedded bytes, loads as PIL)
prompt string Exact question text used in evaluation
task string Task type — see values below
tag string Analysis tag (ans, ans2, ans3, ans4, ans5)
eval_id int Global sequential trial index within each tag
answer / correct_answer string Ground-truth label (left/right/tie or integer count or category name)

task values:

Value Description
counting Exact count of objects
discrimination_abstract Which side has more? — abstract shapes, unconstrained
discrimination_controlled Which side has more? — numerosity decorrelated from surface area
discrimination_realworld Which side has more? — real-world object images
discrimination_synthetic Which side has more? — synthetic shapes matched to real-world stimuli
naming Identify the object category

Config-specific columns

exp1_counting — subset, stimulus_type {abstract, realworld}, n_range {small_n, large_n}, shape, category, count

exp2_discrimination — pair_id, shape {dots, rectangles}, anchor_n, ratio_condition, ratio_value, left_count, right_count, correct_answer

exp3_controlled — pair_num, pair_shape {dots, ellipse, rectangle}, pair_color, pair_ratio, left_numerosity, right_numerosity, left_TSA, right_TSA, left_FA, right_FA, correct_answer (TSA = total surface area; FA = field area / convex hull)

exp4_realworld_naming — category, count, original_image_name

exp4_realworld_discrimination — pair_num, condition {same_cat, diff_cat}, left_category, right_category, left_count, right_count, num_ratio, answer

exp5_synthetic_matched — pair_num, condition, shape_type {dots, rectangles}, left_category, right_category, left_count, right_count, num_ratio, answer

Prompt templates

5 semantically-equivalent templates per task, assigned one per stimulus deterministically (md5 hash of stimulus id). Each image is tested exactly once — prompts rotate across stimuli, not within.

  • Counting: "How many {item} are there in the image? Please answer with an integer directly." (+ 4 variants)
  • Discrimination abstract: "Two images of {desc} appear side by side. Which image contains more shapes? Respond with 'left' or 'right'." (+ 4 variants)
  • Discrimination same-category: "Look at these two images. Which image has more {cat}? … Answer with 'left' or 'right'." (+ 2 variants)
  • Discrimination diff-category: "Left image contains {lcat}, right image contains {rcat}. Which image has more items? … Answer with 'left' or 'right'." (+ 2 variants)
  • Naming: "What is(are) the object(s) in the image called? Please answer with one object category name directly." (+ 4 variants)

Quick start

from datasets import load_dataset

# Load one config
ds = load_dataset("87cc2s/ans-benchmark", "exp1_counting")
row = ds["train"][0]
row["image"]   # PIL Image
row["prompt"]  # "How many dots are there in the image? ..."
row["answer"]  # "1"
row["task"]    # "counting"

# Load discrimination
ds2 = load_dataset("87cc2s/ans-benchmark", "exp2_discrimination")
row2 = ds2["train"][0]
row2["prompt"]          # "Two images of white dots appear side by side ..."
row2["correct_answer"]  # "right"
row2["task"]            # "discrimination_abstract"

Provenance & notes

  • Derived from original Experiment1–Experiment4, Experiment1_1, Experiment2_1, Experiment3_1 stimulus sets.
  • Excluded: Exp1 random_largen-in-small-n bucket, real-world FSC_sampled/FSC_sampled_largen, Exp3 ellipses_white/rectangles_white (rendered incorrectly — replaced by Exp3_1 re-renders). 36 synthetic pairs with missing source images and 1 exact-duplicate counting row were dropped.
  • License: Real-world images derive from FSC-133 (Ranjan et al., 2021) / FSC-147. Abstract stimuli are procedurally generated and freely usable. Respect upstream FSC licensing.