arXiv AI

Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in LLM-Based Code Optimization

arXiv AI
Aug 18

T-LLM Compiler: Trusted LLM-based Code Optimization and Verification Framework

arXiv:2608. 14953v1 Announce Type: new Abstract: Recent advances in Large Language Models (LLMs) have opened opportunities to apply high-level code transformations to the field of code optimization, and it has since emerged as one of the most fundamental tasks for LLMs to perform; however, at present, LLMs struggle to apply wide-ranging code optimization tasks due to both the complexity of the code and the inability to independently verify the correctness of the transformations.

By Zahra Fazel, Sunanda Gamage, Shayan Shirahmad Gale Bagi, Amir H. Ashouri, Tomasz S. Czajkowski, Bryan Chan, Reza Azimi, Yaoqing Gao
arXiv AI
Oct 9

Characterizing Overconfident Failure in LLM-Based Code Generation

The paper investigates how large language models (LLMs) used for code generation can produce syntactically plausible but incorrect programs, a phenomenon termed overconfident failure. By evaluating four open-source code models across three execution-based benchmarks, the authors examine whether token-level uncertainty metrics can predict execution correctness, analyze overconfidence at both global and local levels, and test mitigation strategies such as selective generation and instruction tuning. Their findings show that existing uncertainty signals are only partially reliable, overconfidence persists across models, instruction tuning can increase certainty without improving correctness discrimination, and common mitigation techniques do not fully resolve the issue. "whyItMatters":"The study highlights that current uncertainty metrics and mitigation strategies are insufficient to reliably detect or prevent incorrect code generation, underscoring the need for better reliability signals in LLM-based code synthesis."

By Ravishka Rathnasuriya, Wei Yang
arXiv AI
Oct 27

Evaluating Harmful Memorization in LLM Code Generation

The paper introduces the Harmful Memorization Index (HMI) to measure when large language models (LLMs) fail to adapt to small semantic changes in coding tasks, producing code that is superficially similar to the original solution. It proposes an automated code‑rewriting pipeline that generates semantically different variants of tasks by altering core logic elements, and uses HMI to combine similarity metrics with performance degradation. Experiments on MBPP+ and BigCodeBench show that HMI does not simply grow with model size, is higher for certain logic‑edit types, and that supervised fine‑tuning can increase HMI while PPO offers a better accuracy–HMI trade‑off.

By Lizhe Zhang, Wentao Chen, Li Zhong, Letian Peng, Zilong Wang, Jingbo Shang
arXiv AI
Sep 2

Predicting Program Exit Code with LLMs and Programming Language Semantics

The paper introduces Program Executability Prediction (PrEx), a task that asks large language models (LLMs) to determine whether a program is semantically valid or invalid and, if invalid, to identify the violated formal rule. To evaluate this, the authors create a dataset of systematically generated invalid programs derived from valid ones and test open‑source coding LLMs across different semantic formalisms, semantic shifts, and program splits (human‑written, LLM‑translated, fuzzer‑generated). Results show that LLMs rely more on pre‑training priors than on the provided semantics, performing poorly on modified semantics and with increasing program complexity.

By Lara Marinov, Aditya Thimmaiah, Jayanth Srinivasa, Junyi Jessy Li, Milos Gligoric
arXiv AI
Aug 26

Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shaping

The paper introduces RobustTests, a framework that improves reinforcement learning for code generation by synthesizing test cases from faulty code and refining rewards with a dense, stepwise function. It uses validator agents and behavioral clustering to filter out invalid or redundant tests, and incorporates pass‑rate‑based rewards to counter hallucination noise. Experiments on CodeContests and LiveCodeBench show that fine‑tuning Qwen3‑32B with RobustTests yields a 3% absolute performance gain over baseline methods.

By Yiwen Zhang, Xiaodong Yan, Zhenyu Huang, Deng Zhao, Liang Jiang, Qing Cui, Zujie Wen, Zhiqiang Zhang, Jun Zhou
arXiv AI
Aug 18

ReLoop: Structured Modeling and Behavioral Verification for Reliable LLM-Based Optimization

arXiv:2602. 15983v3 Announce Type: replace-cross Abstract: Large language models (LLMs) can translate natural language into optimization code, but silent failures pose a critical risk: code that executes and returns solver-feasible solutions may encode semantically incorrect formulations---a feasibility--correctness gap reaching 90 percentage points on compositional problems.

By Junbo Jacob Lian, Yujun Sun, Huiling Chen, Chaoyu Zhang, Hanzhang Qin, Chung-Piaw Teo
arXiv AI
Oct 28

BUSTA: Teaching Small Language Models to Reason About Binary Execution

The paper introduces BUSTA, a method for training small language models to reason about binary execution. By fine‑tuning Qwen3‑1.7B and Nemotron‑3‑Nano with Group Relative Policy Optimization, the authors improve the models’ ability to predict input register values for a given x86‑64 basic block, raising accuracy from 73.2% to 85.3% and from 63.3% to 95.2% respectively. The fine‑tuned Nemotron‑3‑Nano achieves performance within four points of frontier models while using far fewer parameters, and the authors release both the fine‑tuned models and the training dataset.

By Ritika Poddar, Aidan Fennelly, Deirdre Murphy, Eric Wolos, Corre L. Steele, Michael Doyle
arXiv AI
Oct 16

How to Train Your Little Dragon: Teaching a Small Language Model to Construct and Refine GPU Optimization Scripts

The paper introduces HOW TO TRAIN YOUR LITTLE DRAGON, a method for teaching a small language model to generate and refine GPU optimization scripts. Using a compact, lossless representation of compiler traces, the authors train the model on 108,594 examples derived from TVM MetaSchedule, first with supervised fine‑tuning and then with reinforcement learning that rewards correctness and performance. After training, an 8‑billion‑parameter model achieves over 91% correctness in both construction and refinement tasks and outperforms several much larger LLMs on kernel performance.

By Annabelle Sujun Tang, Wei Tang, Songyao Jiang, Tianhui Li, Shengzhe Xu, Jiin Woo, Kaan Ozkara, Youngsuk Park, Zhen Jia, Hadi Esmaeilzadeh