CRABS: A syntactic-semantic pincer strategy for bounding LLM interpretation of Python notebooks
Meng Li, Timothy M. McPhillips, Dingmin Wang, Shin-Rong Tsai, Bertram Lud\"ascher

TL;DR
CRABS combines syntactic analysis with LLMs to accurately interpret data flow and dependencies in Python notebooks, overcoming hallucination and context challenges for better understanding and reuse.
Contribution
It introduces a novel pincer strategy that integrates shallow syntactic parsing with LLMs to improve notebook comprehension without execution.
Findings
Achieves 98% accuracy in identifying cell-to-cell information flows.
Reaches 99% accuracy in determining transitive cell dependencies.
Successfully resolves 98% of ambiguities in a dataset of Kaggle notebooks.
Abstract
Recognizing the information flows and operations comprising data science and machine learning Python notebooks is critical for evaluating, reusing, and adapting notebooks for new tasks. Investigating a notebook via re-execution often is impractical due to the challenges of resolving data and software dependencies. While Large Language Models (LLMs) pre-trained on large codebases have demonstrated effectiveness in understanding code without running it, we observe that they fail to understand some realistic notebooks due to hallucinations and long-context challenges. To address these issues, we propose a notebook understanding task yielding an information flow graph and corresponding cell execution dependency graph for a notebook, and demonstrate the effectiveness of a pincer strategy that uses limited syntactic analysis to assist full comprehension of the notebook using an LLM. Our…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Mathematics, Computing, and Information Processing · Topic Modeling
