Exploring the Potential of Diffusion Large Language Models in Code Generation
College of AI, Tsinghua University(清华大学人工智能学院);School of Computer Science, Nanjing University(南京大学计算机科学学院);School of Computer Science and Engineering, Beihang University(北航计算机科学与工程学院);School of Computer Science, Peking University(北京大学计算机科学学院)
LLMs have become the mainstream approaches to code generation. Existing LLMs mainly employ autoregressive generation, i.e. generating code token-by-token from left to right. However, the underlying autoregressive generation has two limitations in code generation. First, autoregressive LLMs only generate a token at each step, showing low efficiency in practice. Second, programming is a non-sequential process involving back-and-forth editing, while autoregressive LLMs only employ the left-to-right generation order. These two intrinsic limitations hinder the further development of LLMs in code generation. Recently, diffusion LLMs have emerged as a promising alternative. Diffusion LLMs address the above limitations with two advances, including multi-token prediction (i.e. generating multiple tokens at each step) and flexible generation order (i.e. flexibly determining which positions to generate tokens). However, there is no systematic study exploring diffusion LLMs in code generation. To bridge the knowledge gap, we present the first empirical study of diffusion LLMs for code generation. Our study involves 9 representative diffusion LLMs and conduct experiments on 4 widely used benchmarks. Based on the results, we summarize the following findings. (1) Existing diffusion LLMs are competitive with autoregressive LLMs with similar sizes. (2) Diffusion LLMs have a stronger length extrapolation ability than autoregressive LLMs and perform better in long code understanding. (3) We explore factors impacting the effectiveness and efficiency of diffusion LLMs, and provide practical guidance. (4) We discuss several promising further directions to improve diffusion LLMs on code generation. We open-source all source code, data, and results to facilitate the following research. The code is publicly available at https://github.com/zhangyitonggg/dllm4code.
Frontend Diffusion: Exploring Intent-Based User Interfaces through Abstract-to-Detailed Task Transitions
University of California, San Diego(加利福尼亚大学圣迭戈分校);City University of Hong Kong(香港城市大学);Purdue University(普渡大学);University of Maryland, College Park(马里兰大学学院公园分校)
Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Code
2 State Key Laboratory of Complex \& Critical Software Environment (SKLCCSE) School of Computer Science;Engineering, Beihang University, Beijing, China;3 School of Software, Beihang University, Beijing, China;4 School of Computer Science;Technology, Shandong University, Qingdao, China;5 Huawei Cloud Computing Technologies Co., Ltd, China
How Diversely Can Language Models Solve Problems? Exploring the Algorithmic Diversity of Model-Generated Code
School of Computer Science and Engineering, Kyungpook National University(庆北国立大学计算机科学与工程学院);POSTECH(浦项科技大学);Department of Artificial Intelligence, Yonsei University(延世大学人工智能系)
Exploring Representation-Level Augmentation for Code Search
Nanyang Technological University(南洋理工大学);China-Singapore International Joint Research Institute(中新国际联合研究院);Sun Yat-sen University(中山大学);The University of Newcastle(纽卡斯尔大学)