Built upon the Qwen2.5-VL architecture, MetaphorStar achieves State-of-the-Art (SOTA) performance on image implication tasks and demonstrates robust generalization capabilities on complex visual reasoning benchmarks (e.g., MMMU, MathVerse).
Current MLLMs struggle with metaphors because they lack the sophisticated multi-hop reasoning and Theory of Mind (ToM) required. We introduce TFQ-GRPO, a framework that leverages:
1from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
2from qwen_vl_utils import process_vision_info
3import torch
4
5model_id = "MING-ZCH/MetaphorStar-32B"
6
7model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
8 model_id, torch_dtype=torch.bfloat16, device_map="auto"
9)
10processor = AutoProcessor.from_pretrained(model_id)
11
12messages = [
13 {
14 "role": "user",
15 "content": [
16 {"type": "image", "image": "path/to/metaphor_image.jpg"},
17 {"type": "text", "text": "True-false questions: The wilted plant in the office implies a stressful working environment.
18
19First, describe the image, then analyze the image implication, and finally reason to get the answer. Output the thinking process in <think></think> and the final correct answer in <answer></answer> tags."}
20 ]
21 }
22]
23
24# Inference setup (standard Qwen2.5-VL generation)
25text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
26inputs = processor(text=[text], images=[...], padding=True, return_tensors="pt").to("cuda")
27
28generated_ids = model.generate(**inputs, max_new_tokens=2048)
29output_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
30print(output_text)
1@article{metaphorstar2026,
2 title={MetaphorStar: Image Metaphor Understanding and Reasoning with End-to-End Visual Reinforcement Learning},
3 author={Chenhao Zhang, Yazhe Niu, Hongsheng Li},
4 journal={arXiv preprint arXiv:2602.10575},
5 year={2026}
6}