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:
55.3W
Papers: 44.6W
Citations: 704