Thyme: Think Beyond Images

YiFan Zhang, Xingyu Lu, Shukang Yin, Chaoyou Fu, Wei Chen, Xiao Hu, Bin Wen, Kaiyu Jiang, Changyi Liu, Tianke Zhang, Haonan fan, Kaibing Chen, Jiankang Chen, Haojie Ding, Kaiyu Tang, Liang Wang, Fan Yang, Tingting Gao, Guorui Zhou

Introduction

While Multimodal Large Language Models (MLLMs) have made significant strides in "thinking with images," they still struggle with two major hurdles: fine-grained perception and complex logical reasoning. Existing approaches often rely on generating new images—which is slow and loses detail—or simple bounding-box cropping, which is too limited.

Proprietary models like OpenAI's O3 have demonstrated that the ability to autonomously manipulate visual input—such as rotating a slanted text block, enhancing contrast, or zooming into a tiny detail—is essential for human-level performance. However, open-source models have lacked a unified, autonomous framework that can decide when and how to use these tools via code execution.

Thyme addresses this gap by giving models the agency to interact with their visual input through a programmable sandbox. It empowers MLLMs to autonomously generate and execute Python code for real-time image manipulation and complex mathematical reasoning.

Methods

Thyme utilizes a two-stage training strategy: Supervised Fine-Tuning (SFT) followed by Reinforcement Learning (RL).

The Sandbox

The authors developed a secure execution environment where the model can run Python code. This sandbox handles formatting and error-checking, allowing the model to focus on the logic of image operations (cropping, scaling, rotating, contrast) and mathematical computations.

The overall pipeline of Thyme, illustrating the iterative interaction between the model and the code-execution sandbox.

GRPO-ATS

The standout technical contribution during the RL phase is Group Relative Policy Optimization with Adaptive Temperature Sampling (GRPO-ATS). In standard RL, a fixed sampling temperature is used. However, code generation is extremely sensitive—a single misplaced space can break execution. Thyme adaptively sets the temperature to 0 for code blocks (ensuring precision and validity) and 1 for natural language reasoning (encouraging creative exploration).

Training Strategies

To prevent the model from "cheating" (e.g., predicting sandbox outputs directly without doing the work), the authors masked environment feedback during training. They also employed "Math Data Annealing" to ensure that mathematical reasoning skills weren't overshadowed by the larger volume of image manipulation data.

Datasets

  • SFT Dataset: A curated set of 500K samples covering image operations, rotated/low-contrast images, and multi-turn interactive scenarios.
  • RL Dataset: 10,000 manually collected high-resolution images (width/height > 2048px). Annotators designed "needle-in-a-haystack" questions targeting objects occupying less than 5% of the image area to force the model to use its zooming and cropping capabilities.

Key Insights

  • Code as a Perception Tool: Instead of treating the image as a static input, Thyme treats it as a dynamic entity that can be actively interrogated and transformed.
  • Autonomy over Prompting: Thyme doesn't wait for a user to explicitly say "zoom in." It assesses the difficulty of the question and autonomously decides if it needs to invoke the sandbox.
  • Test-Time Scaling: By allowing the model to perform multiple rounds of "thinking" and "acting" (code execution), Thyme effectively scales its intelligence at inference time without needing a massive increase in parameter count.

Key Results

Thyme-7B demonstrates substantial improvements over its base model, Qwen2.5-VL-7B, and even outperforms much larger models in perception tasks.

Radar charts showing Thyme's significant performance gains across various perception and reasoning benchmarks.
  • MME-Realworld: Thyme achieved a 10.10% overall boost in perception and a 25.37% boost in reasoning. In specific domains like Autonomous Driving, the improvement was a staggering 64.99%.
  • Perception Superiority: Thyme-7B outperformed the 32B version of Qwen2.5-VL on several perception benchmarks, proving that "acting" on images is more effective than simply scaling up parameters.
  • Reduced Hallucination: By zooming in on details, the model significantly reduced hallucination rates, evidenced by a 7.3% improvement on the Hallucination Bench.

Limitations and Future Work

  • Localization Errors: The model's performance is still tethered to its base capability to locate objects. If the initial "guess" for a crop is wrong, the subsequent reasoning fails.
  • Code Efficiency: Occasionally, the model writes code for trivial problems where a direct answer would suffice, adding unnecessary latency.
  • Evaluation Scope: Current benchmarks are not fully optimized for testing advanced operations like rotation or contrast correction, suggesting a need for more specialized evaluation sets in the future.

Summary updated

BibTeX
@inproceedings{zhang2026thyme,
  author = {YiFan Zhang and Xingyu Lu and Shukang Yin and Chaoyou Fu and Wei Chen and Xiao Hu and Bin Wen and Kaiyu Jiang and Changyi Liu and Tianke Zhang and Haonan fan and Kaibing Chen and Jiankang Chen and Haojie Ding and Kaiyu Tang and Zhang Zhang and Liang Wang and Fan Yang and Tingting Gao and Guorui Zhou},
  title = {{Thyme: Think Beyond Images}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=gCWLkqK45O},
}
Figure