VisualCoder: Guiding Large Language Models in Code Execution with Fine-grained Multimodal Chain-of-Thought Reasoning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Le, Cuong Chi, Truong-Vinh, Hoang-Chau, Phan, Huy Nhat, Le, Dung Duy, Nguyen, Tien N., Bui, Nghi D. Q.
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915144191180800
author Le, Cuong Chi
Truong-Vinh, Hoang-Chau
Phan, Huy Nhat
Le, Dung Duy
Nguyen, Tien N.
Bui, Nghi D. Q.
author_facet Le, Cuong Chi
Truong-Vinh, Hoang-Chau
Phan, Huy Nhat
Le, Dung Duy
Nguyen, Tien N.
Bui, Nghi D. Q.
contents Predicting program behavior and reasoning about code execution remain significant challenges in software engineering, particularly for large language models (LLMs) designed for code analysis. While these models excel at understanding static syntax, they often struggle with dynamic reasoning tasks. We introduce VisualCoder, a simple yet effective approach that enhances code reasoning by integrating multimodal Chain-of-Thought (CoT) reasoning with a visual Control Flow Graph (CFG). By aligning code snippets with their corresponding CFGs, VisualCoder provides deeper insights into execution flows. We address challenges in multimodal CoT integration through a reference mechanism, ensuring consistency between code and its execution path, thereby improving performance in program behavior prediction, error detection, and output generation.
format Preprint
id arxiv_https___arxiv_org_abs_2410_23402
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle VisualCoder: Guiding Large Language Models in Code Execution with Fine-grained Multimodal Chain-of-Thought Reasoning
Le, Cuong Chi
Truong-Vinh, Hoang-Chau
Phan, Huy Nhat
Le, Dung Duy
Nguyen, Tien N.
Bui, Nghi D. Q.
Software Engineering
Predicting program behavior and reasoning about code execution remain significant challenges in software engineering, particularly for large language models (LLMs) designed for code analysis. While these models excel at understanding static syntax, they often struggle with dynamic reasoning tasks. We introduce VisualCoder, a simple yet effective approach that enhances code reasoning by integrating multimodal Chain-of-Thought (CoT) reasoning with a visual Control Flow Graph (CFG). By aligning code snippets with their corresponding CFGs, VisualCoder provides deeper insights into execution flows. We address challenges in multimodal CoT integration through a reference mechanism, ensuring consistency between code and its execution path, thereby improving performance in program behavior prediction, error detection, and output generation.
title VisualCoder: Guiding Large Language Models in Code Execution with Fine-grained Multimodal Chain-of-Thought Reasoning
topic Software Engineering
url https://arxiv.org/abs/2410.23402