arXiv · 2602.18537
CRANE-LLM: Runtime-Augmented LLMs for Crash Prediction and Diagnosis in ML Notebooks
Abstract
Jupyter notebooks have become popular for early machine learning (ML) development, enabling interactive and iterative experimentation. However, ML notebooks are prone to bugs, among which crashes are the most disruptive. Despite their practical importance, crash prediction and diagnosis in ML notebooks remain largely unexplored. We present CRANE-LLM, a runtime-augmented source code analysis approach that provides large language models (LLMs) with structured runtime information extracted from the notebook kernel, together with source code, to predict and diagnose crashes in a target cell before executing it. We evaluate CRANE-LLM on JunoBench, a benchmark of 111 Kaggle ML notebooks containing crashes across multiple ML libraries and crash types. Across three state-of-the-art LLMs (Gemini, Qwen, and GPT-5), our results show that runtime information significantly improves crash prediction and diagnosis performance by 7-10 percentage points in accuracy and 8-11 in F1-score, compared to using source code alone. The improvements are more pronounced when diagnosis is required, indicating that runtime context is especially valuable for reasoning about crash causes than merely predicting their presence.
Explore related subjects
Keep this discovery
Yiran Wang, José Antonio Hernández López, Ulf Nilsson, Dániel Varró. 2026-02-20. CRANE-LLM: Runtime-Augmented LLMs for Crash Prediction and Diagnosis in ML Notebooks. https://arxiv.org/abs/2602.18537
Cite the original work for its findings. Save a collection to share your selection of sources.