mlsanityData to 14 Oct 2026

ThrowBench: Benchmarking LLMs by Predicting Runtime Exceptions

arXiv 2503.04241 ↗First posted 6 Mar 2025cs.SE cs.LGcited by 2

Not on the map. Why?

Abstract (arXiv)

Modern Large Language Models (LLMs) have shown astounding capabilities of code understanding and synthesis. In order to assess such capabilities, several benchmarks have been devised (e.g., HumanEval). However, most benchmarks focus on code synthesis from natural language instructions. Hence, such benchmarks do not test for other forms of code understanding. Moreover, there have been concerns about contamination and leakage. That is, benchmark problems (or closely related problems) may appear in training set, strongly biasing benchmark results. In this work we investigate whether large language models can correctly predict runtime program behavior. To this end, we introduce ThrowBench, a benchmark consisting of over 2,400 short user-written programs written in four different programming languages. The majority of these programs throw an exception during runtime (due to a bug). LLMs are asked to predict whether a presented program throws an exception and, if so, which one. Evaluating our benchmark on six state-of-the-art code LLMs we see modest performance ranging from 19 to 38% (F1 score). Benchmarking a wider set of code capabilities could improve the assessment of code LLMs and help identify weak points in current models. Moreover, as ground-truth answers have been determined through program execution, leakage is not a concern. We release ThrowBench as well as all of our results together with this work.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 21 of its 28 references that are in the map. First posted on arXiv 6 Mar 2025.

Builds on

21 of 28 references.

References · 21

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2021Program Synthesis with Large Language Modelscited by 3,637
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  5. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  6. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  7. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  8. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  9. 2021Measuring Coding Challenge Competence With APPScited by 902
  10. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  11. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
  12. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
9 more
  1. 2020IntelliCode Compose: Code Generation Using Transformercited by 227
  2. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  3. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  4. 2024CodeGemma: Open Code Models Based on Gemmacited by 150
  5. 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
  6. 2024McEval: Massively Multilingual Code Evaluationcited by 44
  7. 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
  8. 2023RunBugRun -- An Executable Dataset for Automated Program Repaircited by 11
  9. 2023ACES: Generating Diverse Programming Puzzles with with Autotelic Generative Modelscited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.