2604.05137v1 Apr 06, 2026 cs.PL

EffiPair: 상대적 대비 학습 기반 피드백을 통한 LLM 생성 코드 효율성 향상

EffiPair: Improving the Efficiency of LLM-generated Code with Relative Contrastive Feedback

Suman Jana
Suman Jana
Citations: 75
h-index: 4
Samira Hajizadeh
Samira Hajizadeh
Citations: 3
h-index: 1

대규모 언어 모델(LLM)은 종종 기능적으로는 올바르지만 실행 시간 및 메모리 사용량 측면에서 비효율적인 코드를 생성하는 경우가 많다. 기존의 코드 효율성 향상 방법은 일반적으로 단일 프로그램의 실행 시간 또는 메모리 사용량을 프로파일링하는 것과 같은 절대적인 실행 피드백에 의존하는데, 이는 비용이 많이 들고 개선을 위한 제한적인 정보를 제공한다. 본 연구에서는 모델 미세 조정 또는 파라미터 업데이트가 필요 없는 추론 시간 피드백 메커니즘인 상대적 대비 학습(Relative Contrastive Feedback, RCF)을 제안한다. RCF는 동일한 작업을 수행하는 구조적으로 유사한 두 프로그램을 비교하여 효율성이 더 좋은 프로그램과 관련된 차이점을 강조한다. 이러한 아이디어를 바탕으로, 본 연구에서는 추론 시간 반복 개선 프레임워크인 EffiPair를 소개한다. EffiPair는 여러 후보 솔루션을 생성하고, 큰 효율성 차이를 보이는 정보적인 프로그램 쌍을 식별하고, 실행 차이를 경량화된 피드백으로 요약하며, 이 신호를 사용하여 더 효율적인 솔루션을 생성함으로써 테스트 시간 동안 완전히 작동한다. EffiPair는 개별적인 스칼라 피드백을 쌍별 대비 비교로 대체함으로써, 프로파일링 및 프롬프트 오버헤드를 줄이면서 더 직접적인 지침을 제공한다. 코드 효율성 벤치마크 실험 결과, EffiPair는 정확성을 유지하면서 일관되게 효율성을 향상시키는 것으로 나타났다. 예를 들어, DeepSeek-Chat V3.2를 사용할 때, EffiPair는 성능 피드백 없이 생성된 코드에 비해 최대 1.5배의 속도 향상을 달성했으며, 이전 연구에 비해 토큰 사용량을 90% 이상 줄였다.

Original Abstract

Large language models (LLMs) often generate code that is functionally correct but inefficient in runtime and memory. Prior approaches to improving code efficiency typically rely on absolute execution feedback, such as profiling a single program's runtime or memory usage, which is costly and provides weak guidance for refinement. We propose Relative Contrastive Feedback (RCF), an inference-time feedback mechanism that requires no model fine-tuning or parameter updates. RCF compares two structurally similar programs for the same task and highlights the differences associated with better efficiency. Building on this idea, we introduce EffiPair, an inference-time iterative refinement framework that operates entirely at test time by generating multiple candidate solutions, identifying informative program pairs with large efficiency gaps, summarizing their execution differences into lightweight feedback, and using this signal to produce more efficient solutions. By replacing isolated scalar feedback with pairwise contrastive comparisons, EffiPair provides more direct guidance while reducing profiling and prompting overhead. Experiments on code-efficiency benchmarks show that EffiPair consistently improves efficiency while preserving correctness. For instance, with DeepSeek-Chat V3.2, EffiPair achieves up to 1.5x speedup over generation without performance feedback, while reducing token usage by more than 90% compared to prior work.

0 Citations
0 Influential
2 Altmetric
10.0 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!