SDDT 2026 / OPEN RESEARCH

How LLMs Fail
in Code
Generation.

A Cross-Benchmark and Unified
Fine-Grained Error Taxonomy

Passing is only part of the story. A closer look at what fails, how it fails, and how much.

FIG. 01 / ANATOMY OF A FAILURE
FROM A VERDICT
TO AN EXPLANATION
generated_solution.pyPY
×
AssertionErrorexpected 3  ·  received 4
FAILED
A.01

EQUALITY / INEQUALITY

A_EQ_NEQ

Correct syntax. Incorrect semantics.
ILLUSTRATIVE EXAMPLEOne failure. A more precise vocabulary.
20fine-grained
error subtypes
03top-level
error categories
06model
configurations
88archived
research artifacts

Beyond a
binary verdict.

A failed solution is more than a zero on a leaderboard.

We study code generated by DeepSeek-V3.1, Kimi-K2, Qwen-Plus, and Qwen3-Coder-Plus, including thinking-mode configurations for DeepSeek and Qwen-Plus. A shared taxonomy connects evaluator evidence across HumanEval, MBPP, and BigCodeBench.

Three complementary views separate complete correctness, the semantics of a failure, and its severity.

I

Does it pass?

Pass@1 measures whether one generated solution passes every official test.

correctness
II

What goes wrong?

Twenty subtypes describe observed failure semantics across three evaluator categories.

failure semantics
III

How much fails?

Macro and micro error ratios measure the share of failed tests among failed tasks.

conditional severity

Put a name
to the failure.

Explore the vocabulary behind the verdict.
Choose a category to inspect its subtypes.

Definitions and illustrative examples adapted from the paper. These describe observed failure semantics; model-generated labels are research annotations, not verified root causes.

Full taxonomy & scope

The taxonomy covers AssertionError / WrongAnswer, ValueError, and TypeError. Other outcomes remain outside its scope. UNKNOWN is a classifier fallback, not a 21st subtype.

Same models.
Different challenges.

Explore pass@1 across six benchmark settings.
Higher means more fully correct solutions.

HumanEval

PASS@1 / fraction of tasks
Model configurationHighest pass@1 in this setting
View the complete results table
Paper-reported pass@1, at the paper’s three-decimal precision
Model configurationHumanEvalHumanEval+MBPPMBPP+BCB FullBCB Hard

Historical results, not new runs. Values are transcribed from the supplied paper. HumanEval/+ and MBPP/+ each share a task set with different tests; BCB Hard is a subset of BCB Full. Machine-readable data ↗

A pass rate cannot
tell the whole story.

01

Semantics remain
the bottleneck.

Equality and inequality failures (A_EQ_NEQ) are a central failure pattern across the study’s benchmarks and model configurations. Syntactically valid code can still miss the intended behavior.

02

Thinking changes
the shape of failure.

On BCB Hard, DeepSeek thinking-mode pass@1 decreases from 0.304 to 0.284, while its micro error ratio among failed tasks decreases slightly from 0.514 to 0.512. Correctness and conditional severity can move differently.

03

A shared language
makes comparison possible.

The same 20 subtypes connect evaluator-specific evidence. EvalPlus’s WrongAnswer and BigCodeBench’s AssertionError map to the same nine assertion subtypes.

READING THE ERROR RATIOS

Failed tasks are
the denominator.

Macro averages each failed task’s fraction of failing tests, giving tasks equal weight.

Micro pools failing tests across failed tasks, weighting tasks by their test counts.

Both are conditional severity measures. Neither is the overall task failure rate. See Table 3 and metric definitions ↗.

The work behind
the paper. Open.

Retained research artifacts and analysis tools.
Start with an offline, standard-library workflow.

START EXPLORING

Clone. Verify.
Inspect.

Python 3.10+ · No API calls.
These commands do not execute archived model-generated code.

TERMINAL / OFFLINE QUICK START
git clone https://github.com/Yujun-Lu/llm-codegen-error-taxonomy.git
cd llm-codegen-error-taxonomy
python scripts/verify_artifacts.py
python scripts/summarize_results.py --section paper

The release preserves research artifacts; it is not a complete, locked end-to-end reproduction of every experiment. LiveCodeBench generation files are supplemental and carry no inferred evaluation score.

06 / BUILD ON THIS WORK

Good research
is a conversation.

If the taxonomy or artifacts support your work, please cite the paper and credit the upstream benchmarks you use.

10.1145/3838938.3838941
BIBTEX
@inproceedings{lu2026llmsfail,
  author    = {Lu, Yujun},
  title     = {How {LLMs} Fail in Code Generation:
               A Cross-Benchmark and Unified
               Fine-Grained Error Taxonomy},
  booktitle = {The 2nd International Conference on
               Sustainable Development and Digital Transformation},
  series    = {SDDT 2026},
  year      = {2026},
  publisher = {ACM},
  doi       = {10.1145/3838938.3838941},
  url       = {https://doi.org/10.1145/3838938.3838941},
  numpages  = {9}
}