This repository reproduces and extends VASE-style hallucination analysis on VQA-RAD with fast metrics:
SE, VASE, RadFlag (baseline uncertainty/confidence)fast_metric_score (image vs null-image gain)gain_score (image vs text-only gain)ITBG (Important-Token Bayesian Gain)CEBG (Concentrated-Evidence Bayesian Gain with model-adaptive lambda sweep)--model_id.google/medgemma-1.5-4b-it, concise prompting materially improves fast-metric stability.bash scripts/reproduce_table.sh
This runs:
google/medgemma-1.5-4b-itconcisePrimary outputs:
outputs/itbg_comparison_table_medgemma15_concise.csvoutputs/cebg_lambda_sweep_medgemma15_concise.csvoutputs/cebg_best_medgemma15_concise.jsonbash scripts/run_experiment.sh <model_id> <prompt_style> <tag> <num_gpus>
Examples:
# MedGemma 1.5 concise (default behavior)
bash scripts/run_experiment.sh google/medgemma-1.5-4b-it concise medgemma15_concise 8
# MedGemma 1.5 standard prompt
bash scripts/run_experiment.sh google/medgemma-1.5-4b-it standard medgemma15_standard 8
# Legacy MedGemma 4b baseline
bash scripts/run_experiment.sh google/medgemma-4b-it standard medgemma4b_standard 8
Environment variables for lambda sweep:
LAMBDA_MIN=-1.5 LAMBDA_MAX=1.5 LAMBDA_STEP=0.125 LAMBDA_SELECT_BY=auc \
bash scripts/run_experiment.sh google/medgemma-1.5-4b-it concise medgemma15_concise 8
torch, transformers, datasets, torchvision, pandas, scikit-learn, Pillow.2 commits
Python
91.7%
Shell
8.3%
This repository reproduces and extends VASE-style hallucination analysis on VQA-RAD with fast metrics:
SE, VASE, RadFlag (baseline uncertainty/confidence)fast_metric_score (image vs null-image gain)gain_score (image vs text-only gain)ITBG (Important-Token Bayesian Gain)CEBG (Concentrated-Evidence Bayesian Gain with model-adaptive lambda sweep)--model_id.google/medgemma-1.5-4b-it, concise prompting materially improves fast-metric stability.bash scripts/reproduce_table.sh
This runs:
google/medgemma-1.5-4b-itconcisePrimary outputs:
outputs/itbg_comparison_table_medgemma15_concise.csvoutputs/cebg_lambda_sweep_medgemma15_concise.csvoutputs/cebg_best_medgemma15_concise.jsonbash scripts/run_experiment.sh <model_id> <prompt_style> <tag> <num_gpus>
Examples:
# MedGemma 1.5 concise (default behavior)
bash scripts/run_experiment.sh google/medgemma-1.5-4b-it concise medgemma15_concise 8
# MedGemma 1.5 standard prompt
bash scripts/run_experiment.sh google/medgemma-1.5-4b-it standard medgemma15_standard 8
# Legacy MedGemma 4b baseline
bash scripts/run_experiment.sh google/medgemma-4b-it standard medgemma4b_standard 8
Environment variables for lambda sweep:
LAMBDA_MIN=-1.5 LAMBDA_MAX=1.5 LAMBDA_STEP=0.125 LAMBDA_SELECT_BY=auc \
bash scripts/run_experiment.sh google/medgemma-1.5-4b-it concise medgemma15_concise 8
torch, transformers, datasets, torchvision, pandas, scikit-learn, Pillow.2 commits
Python
91.7%
Shell
8.3%