Papers › LLM-wrapper: Black-Box Semantic-Aware Adaptation of Vision-Language Models for...

LLM-wrapper: Black-Box Semantic-Aware Adaptation of Vision-Language Models for Referring Expression Comprehension

18 Sep 2024arXiv:2409.11919archive 2025-07-28

Amaia Cardiel, Eloi Zablocki, Elias Ramzi, Oriane Siméoni, Matthieu Cord

Vision Language Models (VLMs) have demonstrated remarkable capabilities in various open-vocabulary tasks, yet their zero-shot performance lags behind task-specific finetuned models, particularly in complex tasks like Referring Expression Comprehension (REC). Fine-tuning usually requires 'white-box' access to the model's architecture and weights, which is not always feasible due to proprietary or privacy concerns. In this work, we propose LLM-wrapper, a method for 'black-box' adaptation of VLMs for the REC task using Large Language Models (LLMs). LLM-wrapper capitalizes on the reasoning abilities of LLMs, improved with a light fine-tuning, to select the most relevant bounding box matching the referring expression, from candidates generated by a zero-shot black-box VLM. Our approach offers several advantages: it enables the adaptation of closed-source models without needing access to their internal workings, it is versatile as it works with any VLM, it transfers to new VLMs, and it allows for the adaptation of an ensemble of VLMs. We evaluate LLM-wrapper on multiple datasets using different VLMs and LLMs, demonstrating significant performance improvements and highlighting the versatility of our method. While LLM-wrapper is not meant to directly compete with standard white-box fine-tuning, it offers a practical and effective alternative for black-box VLM adaptation. The code will be open-sourced.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 18 code samples harvested from 1 repository linked to this paper: 9 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 8 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 6 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 18 samples from 1 repository, 9 ran (1 with no instrument failure; 8 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 4 of the 9 samples that ran have no recorded date.

valeoai/LLM_wrapper officialmentioned on GitHubpytorchSyntology: 18 samples, 9 ran (8 instrument-failed) · 9 unverified 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

18 samples harvested: 9 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 8 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
6ran · our draft was wrong
2ran; the contract check could not run
9unverified

Licence: 0 of the 18 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 valeoai/LLM_wrapper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

valeoai/LLM_wrapper official repository 18 samples, 9 ran (8 instrument-failed) · 9 unverified
convert_box_coord_list llm_wrapper/LLM_inference_script.py ran; the contract check could not run (RAISES) MIT (permissive) · 496f36883982907e · report fixture: signature one_box_list:list/1/float, out_format:str/0/str, coord_noise:bool/0/bool · returned list · level recorded 2026-09-22
create_my_prompt llm_wrapper/LLM_finetuning_script.py ran · our draft was wrong MIT (permissive) · b62369eaf6443bf1 · report fixture: signature sample:dict/0/? · returned str · level recorded, date not recorded
define_modules_to_FT llm_wrapper/LLM_finetuning_script.py ran · our draft was wrong MIT (permissive) · f96ceeee851477a5 · report fixture: signature my_args:MyArgs/0/? · returned list · level recorded, date not recorded
define_short_LLM_folder_name llm_wrapper/LLM_inference_script.py ran · our draft was wrong MIT (permissive) · d1d34bdea6597b80 · report fixture: signature HF_LLM_name:str/0/str · returned str · level recorded 2026-09-22
eval_post_step_3 llm_wrapper/LLM_inference_script.py ran; the contract check could not run (RAISES) MIT (permissive) · 6921e7c0cacc7dc8 · report fixture: signature infer_bbox:Tensor/2/float, one_result_from_step_2:dict/0/?, bbox_format:str/0/str, verbose:bool/0/bool · returned tuple · level recorded 2026-09-22
extract_int_result_from_LLM_gen llm_wrapper/LLM_inference_script.py ran · our draft was wrong fingerprinted MIT (permissive) · ff499b564cc9cdab · report fixture: signature result:str/0/str, HF_LLM_name:str/0/str, return_error_type:bool/0/bool, nb_detected_boxes:int/0/int, fixed_seed:int/0/int · returned tuple · level recorded 2026-09-22
get_HF_model_id llm_wrapper/LLM_inference_script.py ran · our draft was wrong MIT (permissive) · 0262028d2a06ec2b · report fixture: signature HF_LLM_name:str/0/str · returned tuple · level recorded 2026-09-22
get_all_rec_and_thres_boxes_concat llm_wrapper/LLM_inference_script.py ran · honoured contract MIT (permissive) · 8e0fab2c4512a48c · report fixture: signature args:Args/0/?, one_result_from_step_2:dict/0/? · returned Tensor · level recorded, date not recorded
get_box_key_list llm_wrapper/LLM_inference_script.py ran · our draft was wrong MIT (permissive) · d4ea0c52a00729fd · report fixture: signature detector_name:str/0/str, prompt_context:NoneType/0/? · returned list · level recorded, date not recorded
REC_eval_step llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 9b28e2f8ef578805 · report
compute_and_save_infer_info llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · d8cd5bf64f19e875 · report
define_model_result_name llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 9c81b8cf59bd8a8f · report
design_prompt_for_step_3 llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · b2acae0f31bbf97f · report
gen_step_3_with_HF llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 1ee6940816fb4c9c · report
get_all_rec_and_thres_dict_info_concat llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 14a0b26b9f4d5f93 · report
load_FT_model_via_base_model llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 60c7a23e50408bb4 · report
load_HF_model_tok llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 69336c48b701b32e · report
unify_output_step_3 llm_wrapper/LLM_inference_script.py unverified MIT (permissive) · 10a0bb17e5386ba9 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for LLM-wrapper (graph method: LLM-wrapper). 16 bricks; individually on a fixture: 7 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 6 where Syntology's instrument failed) · 9 unverified. The assembly has not been run end-to-end.

  1. REC_eval_step entry · level 0 · unverified · 9b28e2f8ef578805
  2. compute_and_save_infer_info helper · level 0 · unverified · d8cd5bf64f19e875
  3. convert_box_coord_list helper · level 1 · ran; the contract check could not run (RAISES) · 496f36883982907e
  4. design_prompt_for_step_3 data_transform · level 0 · unverified · b2acae0f31bbf97f
  5. eval_post_step_3 metric · level 1 · ran; the contract check could not run (RAISES) · 6921e7c0cacc7dc8
  6. extract_int_result_from_LLM_gen helper · level 1 · ran · our draft was wrong · ff499b564cc9cdab
  7. gen_step_3_with_HF model · level 0 · unverified · 1ee6940816fb4c9c
  8. get_all_rec_and_thres_boxes_concat helper · level 1 · ran · honoured contract · 8e0fab2c4512a48c
  9. get_all_rec_and_thres_dict_info_concat helper · level 0 · unverified · 14a0b26b9f4d5f93
  10. get_box_key_list helper · level 1 · ran · our draft was wrong · d4ea0c52a00729fd
  11. load_HF_model_tok helper · level 0 · unverified · 69336c48b701b32e
  12. unify_output_step_3 helper · level 0 · unverified · 10a0bb17e5386ba9
  13. define_model_result_name helper · level 0 · unverified · 9c81b8cf59bd8a8f
  14. define_short_LLM_folder_name helper · level 1 · ran · our draft was wrong · d1d34bdea6597b80
  15. get_HF_model_id helper · level 1 · ran · our draft was wrong · 0262028d2a06ec2b
  16. load_FT_model_via_base_model helper · level 0 · unverified · 60c7a23e50408bb4

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2409.11919") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Referring ExpressionReferring Expression Comprehension

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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