OccludeBench: Can VLMs See the Hint?
Code for the experiments in the paper, organized by paper section.
Setup
pip install -r requirements.txt
cp .env.example .env
python prepare_data.py
Run everything from this code/ folder, e.g. python sec3_occludebench/eval_script.py --model gpt-5.4. The shell wrappers cd here themselves, and each notebook does so in its first cell.
Models: gpt-5.4, claude-opus-4-6, gemini-3.1-pro-preview, and Llama 4 Maverick / Qwen3-VL-8B via Together.
Layout
§3 OccludeBench: sec3_occludebench/
| Paper |
Code |
| Dataset distribution (§3.1) |
image_category_plots.ipynb |
| Main occluded query + reflection follow-up (§3.2, App. A) |
eval_script.py |
| Occluder follow-up for Llama / Qwen responses that name the mask itself |
vetter_script.py |
| Two-judge grading, Claude Opus 4.6 + GPT-5.4 (§3.2, App. A) |
judger_script.py |
| Human baseline grading (§3.3) |
human_baseline/judger_human.py |
| Human accuracy and per-image difficulty distribution (§4.1, App. D) |
human_baseline/human_accuracy_breakdown_pub_quality.ipynb |
§4.1 Main Results: sec4_1_main_results/
| Paper |
Code |
| Occluded + unmasked runs, all five models |
run_all_evals.sh |
| Accuracy tables (occluded / unmasked, human solvability) |
accuracy_breakdown_pub_quality.ipynb |
| Fig. 4: accuracy across base / thinking / tool use / steering |
nudge_comparison.ipynb |
| Localization control, unmasked bounding box (Table 1) |
localization_unmasked/generate_transparent.py, localization_unmasked/eval_transparent.py |
| Per-category accuracy + chi-square tests (Fig. 5, App. B) |
category_accuracy/accuracy_by_category.ipynb |
| Model vs. human difficulty (Fig. 6) |
human_model_correlation/human_model_difficulty_correlation.ipynb |
§4.2 Why do VLMs fail?: sec4_2_why_vlms_fail/
| Paper |
Code |
| Tool-trace failure modes (App. H) |
tool_trace_failures/build_visualizer.py |
| Cue removal (Table 1) |
cue_removal/run_cue_removed_eval.sh, cue_removal/accuracy_breakdown_physical.ipynb |
| Seeing failure rate on the highlighted projection region (Table 1) |
seeing_failure/eval_wrong_transparent.py, seeing_failure/judge_wrong_transparent.py |
| Stage 1: cue detection (Table 2) |
stage1_cue_detection/ |
| Stage 2: zoomed-in object recognition (Table 2) |
stage2_zoomed_recognition/ (app.py is the manual cropping tool) |
| Stage 3: source mapping (Table 2) |
stage3_source_mapping/ (map_eval.py, reverse_map_eval.py) |
| Stage 4: highlighted-region recovery (Table 2) |
stage4_highlighted_region/ |
§4.3 Can we improve performance on direct images?: sec4_3_improvements/
| Paper |
Code |
| Fig. 8: improvement summary |
accuracy_improvements.ipynb |
| Extended reasoning |
extended_reasoning/ |
| Tool use + tool-call analysis (Fig. 7, App. G) |
tool_use/ (run_tool_use_eval.sh; the paper's run used OUTPUT_DIR=data/eval_results_tool_use_thinking_v2) |
| Agentic harness, Codex + GPT-5.4 |
coding_agents/coding_agent_eval.sh (needs the Codex CLI) |
| Steering prompts, short and long (App. A) |
steering_prompts/run_nudge_eval.sh, steering_prompts/run_occlusion_nudge_eval.sh |
| Few-shot prompting |
few_shot/ |
| Inpainting multi-step execution (Table 3) |
inpainting_multistep/ (gap_analysis_final.py computes the Fisher tests) |
Appendix: appendix/
| Paper |
Code |
| Sensitivity to bounding-box style (App. C) |
box_sensitivity/ |
| Lexical analysis of answers (App. D) |
lexical_metrics/answer_lexical_metrics.py |
| Token count vs. accuracy (App. E) |
token_length/token_length_vs_correctness_all_models_no_outliers.ipynb |
| Image understanding vs. generation (App. F) |
image_generation/eval_image_gen.py |
| Learning effects in the human survey (App. I) |
human_learning_effects/learning_effect_test.py |
Paths
prepare_data.py builds data/combined_output/ (annotations.json plus <id>.<ext>, <id>_occluded.png), data/combined_output_blue/, data/annotated/ (highlighted cue region) and data/Image categories (3).xlsx from the dataset one level up. For the localization control, python sec4_1_main_results/localization_unmasked/generate_transparent.py draws the unmasked <id>_transparent.png images. It also writes the stage 2 crops (crop_meta.json) and stage 3 source-mapping images (regions_reverse.json) into their sec4_2_why_vlms_fail/ folders. Scripts write results to data/eval_results*/ and figures to data/figures/.