Struggling at the Start: Structural Causes of Decoding Difficulty in Code Generation
Yuqi ZhuJia LiSLShengze LiJieyuan ZhangAng LiJiang Hao
Yuqi Zhu
Jia Li
SLShengze Li
Jieyuan Zhang
Ang Li
Jiang Hao
+6
The paper analyzes token-level decoding differences between natural language and code generation in LLMs, finding that decoding difficulty in code concentrates at structurally critical positions, especially line-initial tokens. It proposes that this difficulty reflects increased predictive uncertainty at high-level structural decision points. A lightweight prompt-level intervention providing structural guidance, without modifying models or decoding strategies, consistently reduces predictive entropy at these positions on HumanEval and MBPP, supporting the localized-difficulty interpretation and motivating structure-aware code generation.

OpenReview · January 4, 2026