Speed Up Your Code: Progressive Code Acceleration Through Bidirectional Tree Editing
Longhui Zhang, Jiahao Wang, Meishan Zhang, GaoXiong Cao, Ensheng Shi, Mayuchi Mayuchi, Jun Yu, Honghai Liu, Jing Li, Min Zhang
Abstract
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 trainingbased methods on average across five programming languages.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6fbf3b8c-b0d8-4484-94b9-1f7f5604bd6aCited by top-tier papers3
- Multi-objective Large Language Model Alignment with Hierarchical ExpertsZhuo Li, Guodong DU, Weiyang Guo, Yigeng Zhou et al.ICLR 2026 · 17 citations
- Bridging Functional Correctness and Runtime Efficiency Gaps in LLM-Based Code TranslationLonghui Zhang, Jiahao Wang, Chenhao Hu, Bingyu Liang et al.ICML 2026 · 1 citation
- SuCo: Sufficiency-guided Continuous Adaptive ReasoningJiahao Wang, Bingyu Liang, Chenhao Hu, Longhui Zhang et al.ICML 2026
Builds on8
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 citations
- Learning Performance-Improving Code EditsAlexander Shypula, Aman Madaan, Yimeng Zeng, Uri Alon et al.ICLR 2024 · 141 citations
- DeepDev-PERF: a deep learning-based approach for improving software performanceSpandan Garg, Roshanak Zilouchian Moghaddam, Colin B. Clement, Neel Sundaresan et al.FSE 2022 · 23 citations
Related papers
- Tree-of-Evolution: Tree-Structured Instruction Evolution for Code Generation in Large Language ModelsZiyang Luo, Kaixin Li, Hongzhan Lin, Yuchen Tian et al.ACL 2025 · 4 citations
- Exploring Parameter-Efficient Fine-Tuning of Large Language Model on Automated Program RepairGuochang Li, Chen Zhi, Jialiang Chen, Junxiao Han et al.ASE 2024 · 8 citations
- Function-to-Style Guidance of LLMs for Code TranslationLonghui Zhang, Bin Wang, Jiahao Wang, Xiaofeng Zhao et al.ICML 2025
- Bitune: Leveraging Bidirectional Attention to Improve Decoder-Only LLMsDawid Jan Kopiczko, Tijmen Blankevoort, Yuki M. AsanoEMNLP 2025
- Getting the most out of your tokenizer for pre-training and domain adaptationGautier Dagan, Gabriel Synnaeve, Baptiste RozièreICML 2024 · 68 citations
