Skip to content
snumprlabPublic

About

Official implementation of 'Attention Misses Visual Risk: Risk-Adaptive Steering for Multimodal Safety Alignment' (ECCV 2026)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attention Misses Visual Risk: Risk-Adaptive Steering for Multimodal Safety Alignment (ECCV 2026)

Official implementation of "Attention Misses Visual Risk: Risk-Adaptive Steering for Multimodal Safety Alignment" (ECCV 2026). [Paper]

Jonghyun Park | Minhyuk Seo | Chaewon Yeo | Jonghyun Choi†

† Corresponding author

Installation

conda create -n moras_llava python=3.10 -y
conda activate moras_llava
python -m pip install -r requirements.txt

Dataset Preparation

Place all datasets under the repository-level datasets/ directory. The paths below are relative to the repository root.

Benchmark Required path
SPA-VL Downloaded automatically from Hugging Face (sqrti/SPA-VL)
FigStep datasets/safety/figstep/ (place the benchmark images directly in this directory)
MM-SafetyBench datasets/safety/mmsafety/processed_questions/<scenario>.json and datasets/safety/mmsafety/images/<scenario>/SD_TYPO/<id>.jpg
JOOD datasets/safety/AdvBenchM/jood_dataset.json; image paths in the JSON must resolve relative to the repository root
MM-Vet datasets/utility/mm-vet/mm-vet.json and datasets/utility/mm-vet/images/
GQA datasets/utility/gqa/llava_gqa_testdev_balanced.jsonl and datasets/utility/gqa/images/
MME datasets/utility/MME/llava_mme.jsonl and datasets/utility/MME/MME_Benchmark_release_version/
ScienceQA datasets/utility/scienceqa/llava_test_CQM-A.json and datasets/utility/scienceqa/images/test/

For VLSafe-based calibration with parameters.get_baseline_cossim, use:

datasets/calibration/VLSafe/
├── images/
└── train/
    ├── VLSafe_harmlessnss_alignment.jsonl
    └── vlsafe_convert_safe.jsonl

Parameter Calibration

Run the following command from the LLaVA directory:

cd LLaVA

Generate the unsafe-state prototypes:

python -m parameters.get_unsafe_states --eval_model=llava_v1_5_7b

Compute the baseline cosine similarity and sigmoid parameters:

python -m parameters.get_baseline_cossim --eval_model=llava_v1_5_7b

Inference

After preparing the benchmark datasets, run inference from the LLaVA directory. For example, run MoRAS on SPA-VL with:

python -m eval.spavl --eval_model=llava_v1_5_7b

Other supported safety benchmarks can be run in the same way:

python -m eval.figstep --eval_model=llava_v1_5_7b
python -m eval.mmsafety --eval_model=llava_v1_5_7b
python -m eval.jood --eval_model=llava_v1_5_7b

For utility evaluation:

python -m eval.mmvet --eval_model=llava_v1_5_7b
python -m eval.gqa --eval_model=llava_v1_5_7b
python -m eval.mme --eval_model=llava_v1_5_7b
python -m eval.sciqa --eval_model=llava_v1_5_7b

Outputs are saved under LLaVA/results/<eval_model>/moras/.

Citation

If you find this work useful, please cite:

@inproceedings{park2026attention,
  title={Attention Misses Visual Risk: Risk-Adaptive Steering for Multimodal Safety Alignment},
  author={Park, Jonghyun and Seo, Minhyuk and Yeo, Chaewon and Choi, Jonghyun},
  booktitle={European Conference on Computer Vision},
  pages={38--56},
  year={2026},
  organization={Springer}
}

About

Official implementation of 'Attention Misses Visual Risk: Risk-Adaptive Steering for Multimodal Safety Alignment' (ECCV 2026)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages