Images shifted how three tested vision-language models chose between recursive and iterative code in a synthetic binary-tree task, but the strongest image cue differed by model. That is the result reported in an arXiv preprint dated October 27, 2026.
Vision-language models (VLMs) process images and text together. In the main test, the models had to perform an inorder traversal of a binary tree, a task with both recursive and iterative solutions. Recursion solves a problem by calling the same function again; iteration repeats a set of steps. The researchers sampled 20 solutions for each model configuration and compared the share using recursion with a no-image baseline.
Which image cues shifted each model’s choices?
The paper reports different results for the three models. A red heart was associated with a higher recursion rate for Claude Opus 4.7 and GPT-5.4, while Gemini 3.1 Pro’s reported example was a yellow checkmark.
| Model | Recursion without an image | Tested image | Recursive solutions with image | Sample size |
| Claude Opus 4.7 | 0% | Red heart | 100% | 20 |
| GPT-5.4 | 0% | Red heart | 100% | 20 |
| Gemini 3.1 Pro | 40% | Yellow checkmark | 90% | 20 |
These are results from the paper’s sampled configurations, not general rates for the models. The researchers tested 288 symbols, combining 24 shapes with 12 colors, and reported model-specific patterns rather than one symbol that consistently steered all three.
Other image conditions also mattered in the experiments. Text captions describing symbols did not reproduce the image effects: the reported correlations between image and caption effects were −0.05 for Claude Opus 4.7, 0.31 for Gemini 3.1 Pro, and 0.17 for GPT-5.4. Gaussian noise and ImageNet images did not systematically increase recursion in the main test, while pixel shuffling and rotation substantially diminished the steering effects.
What the models’ explanations revealed
The paper’s analysis found mismatches between some models’ explanations and their behavior under specific test conditions. When symbols steered Gemini 3.1 Pro’s behavior, 71.5% of its traces dismissed the symbol as irrelevant (1,524 traces). In cases where symbols did not steer that model, 19.3% of traces incorrectly attributed relevance to them (145 traces).
GPT-5.4’s traces claimed the symbol dictated the result in 74.7% of cases where symbols did not steer behavior. When symbols did steer, 50.4% of traces correctly attributed relevance to them. Claude Opus 4.7 did not emit thinking traces in this evaluation.
The authors also tested images inserted without an explicit instruction to inspect them. The maximum reported shifts in recursion probability were +1.00 for Claude Opus 4.7, +0.60 for Gemini 3.1 Pro, and +0.50 for GPT-5.4. These are maxima from the paper’s test setup, not a measure of behavior across everyday coding prompts.
The study reached beyond one coding problem, but not production tools
The paper reports effects in five additional recursion-versus-iteration problems, as well as experiments involving coding choices such as depth-first versus breadth-first search and data-structure selection. It also tested writing styles and binary preferences. An exploratory human study had seven participants.
The authors describe the tasks as synthetic and say how visual steering appears in real-world settings remains an open question. The results therefore establish model- and condition-specific patterns in the reported experiments, not how coding agents behave in deployed workflows.