Papers › Instruction-Guided Visual Masking

Instruction-Guided Visual Masking

30 May 2024arXiv:2405.19783archive 2025-07-28

Jinliang Zheng, Jianxiong Li, Sijie Cheng, Yinan Zheng, Jiaming Li, Jihao Liu, Yu Liu, Jingjing Liu, Xianyuan Zhan

Instruction following is crucial in contemporary LLM. However, when extended to multimodal setting, it often suffers from misalignment between specific textual instruction and targeted local region of an image. To achieve more accurate and nuanced multimodal instruction following, we introduce Instruction-guided Visual Masking (IVM), a new versatile visual grounding model that is compatible with diverse multimodal models, such as LMM and robot model. By constructing visual masks for instruction-irrelevant regions, IVM-enhanced multimodal models can effectively focus on task-relevant image regions to better align with complex instructions. Specifically, we design a visual masking data generation pipeline and create an IVM-Mix-1M dataset with 1 million image-instruction pairs. We further introduce a new learning technique, Discriminator Weighted Supervised Learning (DWSL) for preferential IVM training that prioritizes high-quality data samples. Experimental results on generic multimodal tasks such as VQA and embodied robotic control demonstrate the versatility of IVM, which as a plug-and-play tool, significantly boosts the performance of diverse multimodal models, yielding new state-of-the-art results across challenging multimodal benchmarks. Code, model and data are available at https://github.com/2toinf/IVM.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.19783")

Code

Syntology Ran 16 of 28 code samples harvested from 1 repository linked to this paper; 12 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 8 ran · fixture could not drive it; 7 ran with no contract checked.

By repository: official repository: 28 samples from 1 repository, 16 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

2toinf/ivm officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

28 samples harvested; 16 ran; 0 honoured the contract we drafted; 12 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
8ran · fixture could not drive it
7ran
12unverified

Licence: 0 of the 28 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2toinf/ivm. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Attention 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · b5bf903edd1dcafd · report
ConditionedMaskDecoder 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 256eb3b402dbb02a · report
LayerNorm2d 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) · 738b5dcde12052ba · report
MLP 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · d0650d05ab2c4a12 · report
MLPBlock 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) · 1da9d87f536d9241 · report
PatchEmbed 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 7ed2e6b526e58fd3 · report
PositionEmbeddingRandom 2toinf/ivm/model/IVM.py official repository ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 2cb4a7bc53ea5022 · report
add_decomposed_rel_pos 2toinf/ivm/model/IVM.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 30cb45bcc9fc27d0 · report
dice_loss 2toinf/ivm/model/IVM.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · d91fd9b31c41684e · report
get_rel_pos 2toinf/IVM/model/sam_components/image_encoder.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 733d7f0bedcb74c2 · report
get_rel_pos 2toinf/ivm/model/IVM.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 5cf5ba2c32195b02 · report
llavaTextPreprocess 2toinf/ivm/model/IVM.py official repository ran · our draft was wrong Apache-2.0 (permissive) · eeb6e13ac80aed43 · report
sigmoid_ce_loss 2toinf/ivm/model/IVM.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 1033e9116b1e2573 · report
window_partition 2toinf/ivm/model/IVM.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 89c1f2e801f0e941 · report
window_partition 2toinf/IVM/model/sam_components/image_encoder.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 105fa08885dc36cc · report
window_unpartition 2toinf/ivm/model/IVM.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 3ade8cb3a2133a3f · report
Block 2toinf/ivm/model/IVM.py official repository unverified Apache-2.0 (permissive) · 2dcf225b97d045ae · report
IVM 2toinf/ivm/model/IVM.py official repository unverified Apache-2.0 (permissive) · 28446a46dff45e88 · report
ImageEncoderViT 2toinf/ivm/model/IVM.py official repository unverified Apache-2.0 (permissive) · d930ca853fbfe859 · report
LLaVAEncoder 2toinf/ivm/model/IVM.py official repository unverified Apache-2.0 (permissive) · d6c5069b5e0fd935 · report
TwoWayAttentionBlock 2toinf/ivm/model/IVM.py official repository unverified Apache-2.0 (permissive) · 718ac29e8d9232bb · report
TwoWayTransformer 2toinf/ivm/model/IVM.py official repository unverified Apache-2.0 (permissive) · 227d8c19ab9e7cbb · report
apply_mask_to_rgb 2toinf/IVM/model/llava_encoder.py official repository unverified Apache-2.0 (permissive) · 3a06fee7a1f09df9 · report
auto_postprocess 2toinf/IVM/IVM.py official repository unverified Apache-2.0 (permissive) · 58ede5faa9cd2f1c · report
forward_batch 2toinf/IVM/IVM.py official repository unverified Apache-2.0 (permissive) · 1f0e4db7df0cd3fe · report
generate_boxes_mask 2toinf/IVM/utils.py official repository unverified Apache-2.0 (permissive) · 33b1f0add9c27a54 · report
read_masks 2toinf/IVM/IVM_1M_Mix/datareader.py official repository unverified Apache-2.0 (permissive) · 7e8dcee39799a2b0 · report
window_unpartition 2toinf/IVM/model/sam_components/image_encoder.py official repository unverified Apache-2.0 (permissive) · 27be441cc8213e52 · report

Tasks

Instruction FollowingVisual GroundingVisual Question AnsweringVisual Question Answering (VQA)

Datasets

Introduced by this paper, per the archive.

IVM-Mix-1M

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Visual Question Answering V*bench IVM-Enhanced GPT4-V Accuracy 81.2 #3 of 5 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

ALIGNFocus

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections