IC-317More detailed execution feedback (LDB) induces exploitative behavior in Llama 3.1 models, reducing code diversity and hurting performance at large sample budgets

Kunhao Zheng, Juliette Decugis, Jonas Gehring, Taco Cohen, benjamin negrevergne, Gabriel Synnaeve

SourceWhat Makes Large Language Models Reason in (Multi-Turn) Code Generation?

The paper measures similarity between consecutive code attempts within a multi-turn trajectory. When given LDB-style feedback (debugger information with intermediate variable values), Llama 3.1 8B and 70B produce highly similar consecutive solutions (exploitative behavior), whereas binary or failed-tests feedback yields more diverse attempts (exploratory behavior). This reduced diversity translates to lower pass rates at large budgets: Llama 3.1 70B drops from 29.5 to 26.5 on pass 1@3 and from 56.2 to 54.8 on pass 100@300 when switching from failed-tests to LDB feedback. The paper posits that for hard competitive programming problems, the model's error is algorithmic (wrong approach) rather than a simple bug, so exploitation of a flawed solution is counterproductive.

Evidence
correlational
Key metric
Llama 3.1 70B pass 1@3 / 100@300: failed tests 29.5/56.2, LDB 26.5/54.8; Llama 3.1 8B: failed tests 10.9/29.5, LDB 9.9/29.1
Caveat
The similarity score is computed via difflib.SequenceMatcher on AST-normalized code; 1-2% of codes fail parsing and skip normalization. The effect is measured on CodeContests test set only.
Model
Llama 3.1 8B, 70B
Concepts
Failure mode
Datasets
CodeContests [eval]
Related work
LDB [compared-to]
Related findings
IC-315, IC-316
Extraction
automatic-extraction