Exploring the Potential of Program Flowcharts on Code Generation Using Multimodal LLMs

📅 2026-07-10
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study investigates whether incorporating program flowcharts into multimodal large language models can enhance code generation performance. Focusing on AtCoder programming problems, we automatically generate flowcharts at varying levels of detail and jointly input them with textual problem descriptions into GPT-4o for code synthesis. We present the first systematic evaluation of how flowchart granularity affects model performance and compare this approach against few-shot learning baselines. Experimental results demonstrate that integrating flowcharts improves code generation accuracy by up to 10%, with more detailed flowcharts yielding consistently stronger gains. Notably, one-shot learning combined with flowcharts exhibits greater stability than two-shot learning under the same conditions.
📝 Abstract
In recent years, Large Language Models (LLMs) have made significant strides, leading to the emergence of multimodal LLMs capable of processing diverse inputs such as images and audio. Previous research indicates that the supply of multimodal LLMs with combined textual and visual information improves the automatic code generation capabilities. In software development, diagrams such as flowcharts are widely employed to facilitate tasks like code comprehension. While existing studies investigated the impact of visual inputs on LLMs and the usage of software diagrams, the potential influence of providing flowcharts on multimodal LLM performance remains underexplored. In this study, we generated flowcharts from example solution code for AtCoder problems and provided these visual aids alongside problem statements to GPT-4o for code generation. Our findings demonstrate that integrating flowcharts with problem statements yields performance improvements of up to 10%. Furthermore, when employing abstracted flowcharts, we observed a trend indicating that increasing levels of flowchart detail correlate with enhanced performance. Additionally, we compared the effectiveness of flowchart provision to Few-Shot Learning approaches. The findings suggest that one-shot learning provides sustainable improvements, whereas two-shot learning results in only minor improvements. Our work highlights the importance of software diagrams in supporting multimodal LLM-driven code generation.
Problem

Research questions and friction points this paper is trying to address.

code generation
flowcharts
multimodal LLMs
software diagrams
program comprehension
Innovation

Methods, ideas, or system contributions that make the work stand out.

flowcharts
multimodal LLMs
code generation
visual programming aids
Few-Shot Learning