arrow
Return

RELOPT: A Retriever-Augmented Framework for Optimizing Code with Long-Range Dependencies

delete2026-01-01
delete0
PRE
AI
L
Lei Qiu
F
Fang Lyu *
Z
Zhong Ming
L
Lulin Wang
X
Xiaobing Feng
DOI:10.1007/978-981-95-4367-0_4delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code optimization is essential for improving application runtime performance, yet traditional methods rely heavily on expert-crafted rules, requiring substantial manual effort. While large language models (LLMs) have shown promise in various code-related tasks, their effectiveness in optimizing code with long-range dependencies remains limited. This is primarily due to the challenge of identifying scattered relevant code and the inherent complexity of code analysis. In this paper, we introduce ReLOpt, a novel framework that addresses these challenges by incorporating a Code Dependence-aware Retriever (CDR). The CDR enables distance-agnostic retrieval of relevant code segments and offers domain-specific optimization analysis as guidance. To evaluate ReLOpt, we construct OptiIR, a runnable code optimization dataset that includes input/output pairs for verifying the correctness of the model-optimized code. Experiments show that ReLOpt outperforms base models solely fine-tuned by OptiIR, achieving up to a 65.31% relative improvement in BLEU score. We release all of our code and data at https://github.com/ict-ql/ReLOpt.
Keywords:
Code Optimization
Code Generation
NLP Applications

Journal

N
NEURAL INFORMATION PROCESSING, ICONIP 2025, PT I
IF:
0
Papers:
28
Citations:
0

Organization

C
chinese academy of sciences
Scholars:
56.7W
Papers: 45.0W
Citations: 704
Cited Papers

Cited Papers

BLEU
err2001-01-01
err0
errOAAI
errKishore Papineni; Salim Roukos; Todd Ward; Wei-Jing Zhu
errShare
errSave
ExeBench: an ML-scale dataset of executable C functions
err2022-06-13
err0
PREAI
errArmengol-Estapé,Jordi; Woodruff,Jackson; Brauckmann,Alexander; Magalhães,José Wesley de Souza; O'Boyle,Michael F. P.
errShare
errSave
OpenTuner
err2014-08-24
err0
errOAAI
errJason Ansel; Shoaib Kamil; Kalyan Veeramachaneni; Jonathan Ragan-Kelley; Jeffrey Bosboom; Una-May O'Reilly; Saman Amarasinghe
errShare
errSave
Lost in the Middle: How Language Models Use Long Contexts
err2024-02-23
err56
errOAAI
errLiu, Nelson F.; Lin, Kevin; Hewitt, John; Paranjape, Ashwin; Bevilacqua, Michele; Petroni, Fabio; Liang, Percy
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Shall We Pretrain Autoregressive Language Models with Retrieval? A Comprehensive Study
err2023-01-01
err0
errOAAI
errBoxin Wang; Wei Ping; Peng Xu; Lawrence McAfee; Zihan Liu; Mohammad Shoeybi; Yi Dong; Oleksii Kuchaiev; Bo Li; Chaowei Xiao; Anima Anandkumar; Bryan Catanzaro
errShare
errSave
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
researcher View more