2601.01215v2 Jan 03, 2026 cs.SE

정확성이 효율성을 보장하지 않는다: LLM 생성 코드의 런타임 메모리 불일치

Correctness isnt Efficiency: Runtime Memory Divergence in LLM-Generated Code

Yewei Song
Yewei Song
Citations: 178
h-index: 7
Prateek Rajput
Prateek Rajput
Citations: 21
h-index: 1
Abdoul Aziz Bonkoungou
Abdoul Aziz Bonkoungou
Citations: 3
h-index: 1
Iyiola E. Olatunji
Iyiola E. Olatunji
Citations: 440
h-index: 10
A. Kaboré
A. Kaboré
Citations: 279
h-index: 7
Jacques Klein
Jacques Klein
Citations: 30
h-index: 3
Tegawend'e F. Bissyand'e
Tegawend'e F. Bissyand'e
Citations: 1
h-index: 1

대규모 언어 모델(LLM)은 단위 테스트를 통과하는 프로그램을 생성할 수 있지만, 테스트 통과가 안정적인 런타임 동작을 보장하지는 않습니다. 동일한 작업에 대한 서로 다른 올바른 솔루션이 매우 다른 메모리 사용 패턴과 성능 특성을 나타낼 수 있으며, 이는 잠재적인 운영 위험을 초래할 수 있습니다. 우리는 여러 개의 올바른 생성 결과에 대한 실행 시간 메모리 안정성을 측정하는 프레임워크를 제시합니다. 솔루션 수준에서, 우리는 동적 시간 왜곡(Dynamic Time Warping)을 사용하여 메모리 사용 추적의 형태를 비교하고, 일시적인 노이즈를 줄이기 위해 단조 피크 프로필(Monotonic Peak Profiles, MPP)로 변환한 후, 동적 평균 쌍별 거리(Dynamic Mean Pairwise Distance, DMPD)를 도입합니다. 작업을 기준으로 DMPD를 집계하면 모델 수준의 모델 불안정성 점수(Model Instability Score, MIS)를 얻을 수 있습니다. BigOBench 및 CodeContests에 대한 실험 결과, 올바른 솔루션 간에 상당한 런타임 불일치가 발생하는 것을 확인했습니다. 불안정성은 pass@1이 향상되는 경우에도 샘플링 온도가 높을수록 증가하는 경향이 있습니다. 또한, 우리의 안정성 측정 지표와 인지적 복잡성 및 순환적 복잡성과 같은 소프트웨어 엔지니어링 지표 간의 상관 관계를 관찰했으며, 이는 운영 동작과 유지 관리 가능성 간의 연관성을 시사합니다. 우리의 결과는 CI/CD 환경에서 정확성을 희생하지 않고 운영 위험을 줄이기 위해, 통과하는 후보들 중에서 안정성을 고려한 선택을 하는 것을 뒷받침합니다. 관련 자료는 제공됩니다.

Original Abstract

Large language models (LLMs) can generate programs that pass unit tests, but passing tests does not guarantee reliable runtime behavior. We find that different correct solutions to the same task can show very different memory and performance patterns, which can lead to hidden operational risks. We present a framework to measure execution-time memory stability across multiple correct generations. At the solution level, we introduce Dynamic Mean Pairwise Distance (DMPD), which uses Dynamic Time Warping to compare the shapes of memory-usage traces after converting them into Monotonic Peak Profiles (MPPs) to reduce transient noise. Aggregating DMPD across tasks yields a model-level Model Instability Score (MIS). Experiments on BigOBench and CodeContests show substantial runtime divergence among correct solutions. Instability often increases with higher sampling temperature even when pass@1 improves. We also observe correlations between our stability measures and software engineering indicators such as cognitive and cyclomatic complexity, suggesting links between operational behavior and maintainability. Our results support stability-aware selection among passing candidates in CI/CD to reduce operational risk without sacrificing correctness. Artifacts are available.

0 Citations
0 Influential
5 Altmetric
25.0 Score

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

댓글

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

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