← 返回论文检索
ACL 2025longmain

Speed Up Your Code: Progressive Code Acceleration Through Bidirectional Tree Editing

Longhui Zhang, Jiahao Wang, Meishan Zhang, Gaoxiong Cao, Ensheng Shi, Yuchi Ma, Jun Yu, Honghai Liu, Jing Li, Min Zhang

Harbin Institute of Technology · Harbin Institute of Technology (Shenzhen), China · South China University of Technology, South China University of Technology · Huawei Technologies Ltd. · Harbin Institute of Technology, Shenzhen

PDF 由论文原始站点提供,PaperCompass 不保存论文文件。DOI 10.18653/v1/2025.acl-long.1387 ↗

摘要

Large language models (LLMs) have made significant strides in code acceleration (CA) tasks. Current works typically fine-tune LLMs using slow-fast code pairs mined from online programming platforms. Although these methods are widely recognized for their effectiveness, the training data often lack clear code acceleration patterns and offer only limited speed improvements. Moreover, existing training methods, such as direct instruction fine-tuning (IFT), tend to overlook the hierarchical relationships among acceleration patterns. In this work, we introduce BITE, a novel training paradigm designed to improve LLMs’ CA capabilities through two key innovations: (1) Bidirectional tree editing, which generates high-quality training data by incrementally transforming given code into both its most efficient and least efficient variants, and (2) Progressive code acceleration learning, which enables LLMs to internalize multi-level CA strategies by learning increasingly sophisticated acceleration patterns. Additionally, we introduce a new CA evaluation benchmark and metric for comprehensive assessment of model performance on CA tasks. Extensive experiments on both our benchmark and existing benchmarks demonstrate the effectiveness of our approach. Notably, BITE enables Qwen-1.5B to outperform prompt-enhanced GPT-4 and current training-based methods on average across five programming languages.