Pattern Over Pixels: Measuring Pattern Completion Bias in Multimodal Code Generation
收藏资源简介:
Multimodal large language models (MLLMs) are increasingly usedto translate webpage screenshots into front-end code, but repeatedUI patterns may sway them toward visually incorrect yet pattern-consistentoutputs. In this work, we test how repeated webpagepatterns hurt MLLM accuracy on an objective screenshot-to-codefill-in-the-blank task. We introduce the first benchmark for visualpattern-completion bias, where one localized element in a repeatedUI pattern is perturbed and the model must recover the maskedwidth or font-size value from the screenshot and HTML context.Starting from 30 webpages curated from Design2Code, we built1,440 evaluated screenshots spanning structural card and text-stylepatterns under standard and noise-overlaid conditions. We evaluatefive frontier MLLMs and find that all are strongly biased towardthe repeated baseline. Mean bias rate reaches 69.61% on card-widthperturbations and 80.22% on text font-size perturbations, whilemean accuracy is only 23.11% and 7.89%, respectively. Codex-5.3performs best but still drops from 65.83% accuracy on cards to13.89% on text, while Flash-3.0 reaches 96.11% bias on text. Noise,subtler perturbations, and boundary positions further increase biasrate. Reasoning analysis further shows that greater reasoning effortreduces bias, yet qualitative evidence reveals that models canidentify the anomalous element and still override it with the pattern-consistentanswer. Our results identify a concrete failure mode inmultimodal code generation and show that its severity is governedby visual saliency.



