Large Language Models as Code Executors: An Exploratory Study
Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Xinjiang University(新疆大学);University of Melbourne(墨尔本大学);Tsinghua University(清华大学);Shanghai Jiao Tong University(上海交通大学);IBM Research(IBM研究院);Nantong University(南通大学);Alibaba(阿里巴巴)
Chenyang Lyu, Lecheng Yan, Rui Xing, Wenxi Li, Younes Samih, Tianbo Ji, Longyue Wang
The capabilities of Large Language Models (LLMs) have significantly evolved, extending from natural language processing to complex tasks like code understanding and generation. We expand the scope of LLMs' capabilities to a broader context, using LLMs to execute code snippets to obtain the output. This paper pioneers the exploration of LLMs as code executors, where code snippets are directly fed to the models for execution, and outputs are returned. We are the first to comprehensively examine this feasibility across various LLMs, including OpenAI's o1, GPT-4o, GPT-3.5, DeepSeek, and Qwen-Coder. Notably, the o1 model achieved over 90% accuracy in code execution, while others demonstrated lower accuracy levels. Furthermore, we introduce an Iterative Instruction Prompting (IIP) technique that processes code snippets line by line, enhancing the accuracy of weaker models by an average of 7.22% (with the highest improvement of 18.96%) and an absolute average improvement of 3.86% against CoT prompting (with the highest improvement of 19.46%). Our study not only highlights the transformative potential of LLMs in coding but also lays the groundwork for future advancements in automated programming and the completion of complex tasks.
SURGE: On the Potential of Large Language Models as General-Purpose Surrogate Code Executors
Department of Computer Science and Technology, Tsinghua(清华大学计算机科学与技术系);Institute for Interdisciplinary Information Sciences (IIIS), Tsinghua(清华大学交叉信息研究院)
Mastermind: Strategy-grounded Learning for Repository-Scale Vulnerability Reproduction
National University of Singapore(新加坡国立大学);Nanyang Technological University(南洋理工大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州))
MergeRepair: An Exploratory Study on Merging Task-Specific Adapters in Code LLMs for Automated Program Repair
University of British Columbia, Department of Computer Science(不列颠哥伦比亚大学计算机科学系);École de technologie supérieure, Department of Software and IT Engineering(高等技术学院软件与信息技术工程系)
DyFlow: Dynamic Workflow Framework for Agentic Reasoning
Mohamed bin Zayed University of Artificial Intelligence(莫扎大学人工智能大学);University of Notre Dame(诺特大学);Yale University(耶鲁大学);University of Southern California(南加州大学)
From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debugging
Shanghai Jiao Tong University(上海交通大学);University of California, Davis(加州大学戴维斯分校);East China Normal University(华东师范大学);University of Pennsylvania(宾夕法尼亚大学)
Harnessing LLMs for Automated Video Content Analysis: An Exploratory Workflow of Short Videos on Depression
The University of Texas at Austin(德克萨斯大学奥斯汀分校);Institute of High Performance Computing (IHPC), A*STAR(高性能计算研究所(A*STAR));Pennsylvania State University(宾夕法尼亚州立大学);Clark University(克拉克大学);Columbia University(哥伦比亚大学)
COHERENT: Collaboration of Heterogeneous Multi-Robot System with Large Language Models
Northwestern Polytechnical University(西北工业大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);The Chinese University of Hong Kong(香港中文大学);Institute of Artificial Intelligence, China Telecom Corp Ltd(中国电信集团有限公司人工智能研究院)