ChatPaper.aiChatPaper

CodeOCR: Over de effectiviteit van vision-language-modellen bij het begrijpen van code

CodeOCR: On the Effectiveness of Vision Language Models in Code Understanding

February 2, 2026
Auteurs: Yuling Shi, Chaoxiang Xie, Zhensu Sun, Yeheng Chen, Chenxu Zhang, Longfei Yun, Chengcheng Wan, Hongyu Zhang, David Lo, Xiaodong Gu
cs.AI

Samenvatting

Grote Taalmodellen (LLMs) hebben opmerkelijke successen geboekt in het begrijpen van broncode, maar naarmate softwaresystemen in schaal toenemen, is computationele efficiëntie een kritieke bottleneck geworden. Momenteel vertrouwen deze modellen op een op tekst gebaseerd paradigma dat broncode behandelt als een lineaire reeks tokens, wat leidt tot een lineaire toename van de contextlengte en de daarmee gepaard gaande computationele kosten. De snelle vooruitgang van Multimodale LLMs (MLLMs) biedt een kans om de efficiëntie te optimaliseren door broncode weer te geven als gerenderde afbeeldingen. In tegenstelling tot tekst, die moeilijk te comprimeren is zonder semantische betekenis te verliezen, is de beeldmodaliteit van nature geschikt voor compressie. Door de resolutie aan te passen, kunnen afbeeldingen worden geschaald naar een fractie van hun oorspronkelijke tokenkost, terwijl ze herkenbaar blijven voor modellen met visuele capaciteiten. Om de haalbaarheid van deze aanpak te onderzoeken, voeren we de eerste systematische studie uit naar de effectiviteit van MLLMs voor codebegrip. Onze experimenten tonen aan dat: (1) MLLMs effectief code kunnen begrijpen met een aanzienlijke tokenreductie, waarbij compressie tot 8x wordt bereikt; (2) MLLMs effectief gebruik kunnen maken van visuele aanwijzingen zoals syntaxismarkering, wat de prestaties bij codecompletering verbetert bij 4x compressie; en (3) Codebegriptaken zoals klonedetectie een uitzonderlijke veerkracht vertonen ten opzichte van visuele compressie, waarbij sommige compressieverhoudingen zelfs lichtjes beter presteren dan onbewerkte tekstinvoer. Onze bevindingen belichten zowel de potentiële mogelijkheden als de huidige beperkingen van MLLMs in codebegrip, wat wijst op een verschuiving naar beeldmodaliteit-code-representatie als een weg naar efficiëntere inferentie.
English
Large Language Models (LLMs) have achieved remarkable success in source code understanding, yet as software systems grow in scale, computational efficiency has become a critical bottleneck. Currently, these models rely on a text-based paradigm that treats source code as a linear sequence of tokens, which leads to a linear increase in context length and associated computational costs. The rapid advancement of Multimodal LLMs (MLLMs) introduces an opportunity to optimize efficiency by representing source code as rendered images. Unlike text, which is difficult to compress without losing semantic meaning, the image modality is inherently suitable for compression. By adjusting resolution, images can be scaled to a fraction of their original token cost while remaining recognizable to vision-capable models. To explore the feasibility of this approach, we conduct the first systematic study on the effectiveness of MLLMs for code understanding. Our experiments reveal that: (1) MLLMs can effectively understand code with substantial token reduction, achieving up to 8x compression; (2) MLLMs can effectively leverage visual cues such as syntax highlighting, improving code completion performance under 4x compression; and (3) Code-understanding tasks like clone detection exhibit exceptional resilience to visual compression, with some compression ratios even slightly outperforming raw text inputs. Our findings highlight both the potential and current limitations of MLLMs in code understanding, which points out a shift toward image-modality code representation as a pathway to more efficient inference.
PDF914February 8, 2026