NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MLDebugging: Towards Benchmarking Code Debugging Across Multi-Library Scenarios

Jinyang Huang, Xiachong Feng, Qiguang Chen, Hanjie Zhao, Zihui Cheng, Jiesong Bai, Jingxuan Zhou, Min Li, Libo Qin

Abstract

While Large Language Models (LLMs) have become remarkably proficient at fixing isolated logic errors, they frequently stumble when code involves complex interactions between multiple software libraries. This paper introduces MLDebugging, the first comprehensive benchmark specifically designed to evaluate multi-library Python debugging. Our evaluation reveals that even state-of-the-art models like GPT-4o and DeepSeek-V3 struggle to reach a 60% success rate in these real-world scenarios, highlighting a significant gap in current AI coding capabilities.

Introduction

Most existing code debugging benchmarks, such as HumanEval or MBPP, focus on "LeetCode-style" problems: self-contained algorithms with zero or single-library dependencies. However, real-world software engineering is rarely that simple. Developers constantly manage data flow between disparate libraries, such as pandas dataframes, scikit-learn models, and matplotlib plots.

The authors identify a "multi-library gap" where bugs arise not from simple syntax errors, but from variable adaptation issues and cross-library semantic misunderstandings. For example, a model might fail to realize that a byte-stream from one library requires specific decoding before being passed to a base64 encoder from another. Current benchmarks fail to capture these nuances, leading to an overestimation of LLM capabilities in production environments.

Comparison of simple logic debugging versus complex multi-library scenarios.

Methodology

The authors developed a rigorous pipeline to create a realistic, high-quality benchmark:

  1. Source Collection: Tasks were sourced from BigCodeBench, ensuring the baseline code was functional and utilized between two and six different Python libraries.
  2. Bug Injection: Using GPT-4o, bugs were systematically injected into these correct snippets.
  3. Categorization: Bugs were classified into seven distinct types, ranging from "Type Mismatches" (TM) and "Function Misuse" (FM) to more abstract "Requirement Misunderstandings" (RM).
  4. Quality Control: To ensure ground-truth accuracy, four experienced programmers (4+ years of experience) manually verified and fixed 1,175 samples.
  5. Evaluation Framework: Models were tested using a "Pass@1" metric, providing models with the buggy code, task descriptions, and—in specific experiments—execution feedback such as error messages and test results.

The MLDebugging Benchmark

The primary contribution of this work is the MLDebugging benchmark, which features:

  • Size: 1,175 manually verified samples.
  • Diversity: Coverage of 126 distinct Python libraries.
  • Complexity: Each sample involves interactions between 2 to 6 libraries.
  • Comparison: Unlike benchmarks like xCodeEval or QuickBugs, MLDebugging is the only one focusing on multi-library, real-world scenarios with comprehensive reference code and test cases.

Key Results and Insights

Performance Plateau and Scaling

DeepSeek-V3 emerged as the top performer, but only achieved a 58.7% pass rate, leaving massive room for improvement. GPT-4o followed at 55.6%, while open-source models like Qwen2.5-72B reached 53.7%. Interestingly, increasing model size showed diminishing returns; the jump from 32B to 72B parameters often resulted in a performance plateau, suggesting that multi-library debugging requires better reasoning and domain knowledge rather than just more parameters.

Library Popularity Bias

There is a strong correlation (0.4094) between a library's prevalence on the internet and a model's ability to debug it. Models excel with "well-regularized" libraries like itertools or sklearn but struggle with dynamic or niche libraries like bs4 or nltk.

Bug Type Sensitivity

Models performed best on "Parameter Configuration Errors" (~70-76%) but struggled significantly with "Requirement Misunderstanding" (~20-25%). This proves that models still find it difficult to grasp the high-level intent of multi-library code. Furthermore, providing both test cases and runtime error messages significantly boosted performance, emphasizing that "closed-loop" debugging is essential for complex tasks.

Conclusion

The MLDebugging benchmark demonstrates that the next frontier for AI coding assistants isn't just writing better functions, but mastering the "glue" that holds the modern, multi-library software ecosystem together. While models are proficient at function-level fixes, they often fail to understand how data should flow between different packages, particularly when those packages are less common or require specific data adaptations.

Summary updated

BibTeX
@inproceedings{huang2025mldebugging,
  author = {Jinyang Huang and Xiachong Feng and Qiguang Chen and Hanjie Zhao and Zihui Cheng and Jiesong Bai and Jingxuan Zhou and Min Li and Libo Qin},
  title = {{MLDebugging: Towards Benchmarking Code Debugging Across Multi-Library Scenarios}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure