
A red heart image made GPT-5.4 and Claude Opus 4.7 switch from iterative to recursive programming in every sample of a controlled coding test. The finding comes from a Google DeepMind and Stanford University study published on 27 October 2026.
Researchers also found that the models' descriptions of visual symbols often failed to match their measured effects on code.
The results suggest that images unrelated to a task can influence AI-generated answers, even without written instructions about what to do.
How a Red Heart Changed the Code
Researchers tested GPT-5.4, Claude Opus 4.7 and Gemini 3.1 Pro on a binary-tree traversal problem. Both iteration, using loops, and recursion, where a function calls itself, were valid approaches.
Without an image, GPT-5.4 and Claude chose iteration in all 20 samples for each model. With a red heart image, both produced recursive solutions in all 20 samples.
That was a shift from zero to 100% recursion under the tested conditions. It does not establish that a red heart will always change either model's code.
Gemini responded differently. A yellow checkmark increased its recursive solutions from 40% to 90%.
The researchers examined 288 combinations of 24 shapes and 12 colours. The models responded differently to individual symbols. Random noise and natural photographs did not produce comparable systematic shifts towards recursion.
Why the Models' Explanations Didn't Add Up
Researchers compared what models said visual symbols meant with how those symbols affected their coding choices. They also examined available reasoning traces, which are not necessarily complete accounts of how a model reached an answer.
For Gemini, 71.5% of traces in cases where symbols measurably influenced coding choices dismissed the images as irrelevant. The model instead cited technical considerations, including efficiency and code elegance.
GPT-5.4 showed a different mismatch. When symbols had no measurable steering effect, 74.7% of its traces still attributed coding choices to the images. When symbols did influence its choices, 50.4% of traces acknowledged their relevance.
Claude did not return comparable reasoning traces. Its direct interpretations of symbols also showed weak agreement with their measured effects.
These findings do not establish deliberate deception. They indicate that model-generated explanations may not reliably identify what influenced an answer.
Symbols Worked Without Explicit Instructions
The team also inserted images without asking models to examine them. The largest increases in recursive solutions reached 100 percentage points for Claude, 60 for Gemini and 50 for GPT-5.4.
Written descriptions of the same symbols generally failed to reproduce the images' effects. Visual influence extended beyond programming. Coloured shapes shifted writing styles, including poetic versus professional prose, and answers to simple preference questions.
What the Findings Mean for AI Users
AI assistants can process screenshots, documents and websites containing images unrelated to a user's request. The experiments suggest that such visual details could affect their responses without explicit instructions.
However, the preprint does not show that everyday icons reliably hijack AI agents or cause dangerous behaviour. Its broader implications still need independent testing.
For users, the practical lesson is to check AI-generated results rather than relying solely on explanations of how they were produced.











