This is the implementation of the interpretability and model editing experiments from NeurIPS 2024 paper : https://arxiv.org/abs/2406.04236.
================================================
The constraint annotations are in ./data_constraints. The directory contains constraints for OK-VQA, Multimodal Known and Multimodal Movies.
================================================
For OK-VQA, we use the val set images from https://okvqa.allenai.org/. For Multimodal Known the images are at: Link 1 and for Multimodal Movies the images are at: Link 2.
================================================
Our codebase is built on Llava's code. Clone Llava and transfer the code from this repository to ./llava/eval .
-
Multimodal Causal Trace:
python -m llava.eval.multimodal_trace --trace_answer <Answer for the prompt> --trace_question <Question> --trace_image <Image Path> --trace_constraint <Constraint in the question> -
Multimodal Edit:
python -m llava.eval.multimodal_edit --edit_prompt <Prompt used for running model editing> --edit_constraint <Constraints in th prompt> --edit_target <Target Answer> --edit_og_answer <Original Answer to the prompt>
================================================
