DWIM: Towards Tool-aware Visual Reasoning
via Discrepancy-aware Workflow Generation
& Instruct-Masking Tuning
This repo is the official implementation for the paper DWIM: Towards Tool-aware Visual Reasoning via Discrepancy-aware Workflow Generation & Instruct-Masking Tuning.
- [2025/07/18] π₯ The DWIM instruction code is now available under the
scriptsdirectory. - [2025/06/25] π Our DWIM paper has been accepted at ICCV 2025.
Due to company policy, we are only able to release the instruction code β including sample prompts and data β for discrepancy-aware workflow generation and the implementation of instruct-masking. The full codebase cannot be open-sourced at this stage.
Visual reasoning (VR), which is crucial in many fields for enabling human-like visual understanding, remains highly challenging. Recently, compositional visual reasoning approaches, which leverage the reasoning abilities of large language models (LLMs) with integrated tools to solve problems, have shown promise as more effective strategies than end-to-end VR methods. However, these approaches face limitations, as frozen LLMs lack tool awareness in VR, leading to performance bottlenecks. While leveraging LLMs for reasoning is widely used in other domains, they are not directly applicable to VR due to limited training data, imperfect tools that introduce errors and reduce data collection efficiency in VR, and challenging in fine-tuning on noisy workflows. To address these challenges, we propose DWIM: i) Discrepancy-aware training Workflow generation, which assesses tool usage and extracts more viable workflows for training; and ii) Instruct-Masking fine-tuning, which guides the model to only clone effective actions, enabling the generation of more practical solutions. Our experiments demonstrate that DWIM achieves state-of-the-art performance across various VR tasks, exhibiting strong generalization on multiple widely-used datasets.
If you find this work useful for your research, please consider citing it.
@article{ke2025dwim,
title={DWIM: Towards Tool-aware Visual Reasoning via Discrepancy-aware Workflow Generation \& Instruct-Masking Tuning},
author={Ke, Fucai and Leng, Xingjian and Cai, Zhixi and Khan, Zaid and Wang, Weiqing and Haghighi, Pari Delir and Rezatofighi, Hamid and Chandraker, Manmohan and others},
journal={arXiv preprint arXiv:2503.19263},
year={2025}
}