Skip to content
arXiv· arXiv:2609.14839· Sarah Wilson, Gail Kaiser, Patrick Musau·Indexed by this site · Originally published

Efficiency Hallucination: Formalizing and Measuring Behavioral Calibration in Large Language Model Code Optimization

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

AI summary

The researchers propose the concept of "efficiency hallucination," referring to large language models making changes with no actual effect on already-optimized code and attaching unsupported performance claims. Its driving factor is the "evaluation trap," namely that binary benchmarks incentivize models to make unnecessary changes rather than safely abstaining. The study uses a classification penalty method to build a verification framework, and evaluates 180 optimization runs on EffiBench with nine models from GPT, Claude, and Gemini. Under standard prompts, the models' over-modification rate on already-optimized code is 100%; the guardrail proposed by the researchers raises the correct abstention rate from 0% to 44.4%, while maintaining a 100% modification rate on suboptimal code and zero erroneous abstentions. Calibration is uneven: GPT-5.4 Mini is close to perfect abstention, and simple code is more easily correctly identified than complex code.

Read originalarxiv.org