paper-with-me

홈 › Papers

CRABS: A syntactic-semantic pincer strategy for bounding LLM interpretation of Python notebooks

2025-07-15 · Meng Li, Timothy M. McPhillips, Dingmin Wang, Shin-Rong Tsai, Bertram Ludäscher arxiv

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 Capture and Resolve Assisted Bounding Strategy (CRABS) employs shallow syntactic parsing and analysis of the abstract syntax tree (AST) to capture the correct interpretation of a notebook between lower and upper estimates of the inter-cell I/O set$\unicode{x2014}$the flows of information into or out of cells via variables$\unicode{x2014}$then uses an LLM to resolve remaining ambiguities via cell-by-cell zero-shot learning, thereby identifying the true data inputs and outputs of each cell. We evaluate and demonstrate the effectiveness of our approach using an annotated dataset of 50 representative, highly up-voted Kaggle notebooks that together represent 3454 actual cell inputs and outputs. The LLM correctly resolves 1397 of 1425 (98%) ambiguities left by analyzing the syntactic structure of these notebooks. Across 50 notebooks, CRABS achieves average F1 scores of 98% identifying cell-to-cell information flows and 99% identifying transitive cell execution dependencies.

📄 PDF Abstract BibTeX arXiv:2507.11742

Code (0)

등록된 구현이 없습니다.

Tasks

Zero-Shot Learning

Similar Papers 제목 키워드 기반

Object detection for crabs in top-view seabed imagery

2021-05-02 · Vlad Velici, Adam Prügel-Bennett

This report presents the application of object detection on a database of underwater images of different species of crabs, as well as aerial images of sea lions and finally the Pascal VOC dataset. The model is an end-to-…

Objectobject-detectionObject Detection

Monitoring of Hermit Crabs Using drone-captured imagery and Deep Learning based Super-Resolution Reconstruction and Improved YOLOv8

2024-08-07 · Fan Zhao, Yijia Chen, Dianhan Xi, Yongying Liu 외

Hermit crabs play a crucial role in coastal ecosystems by dispersing seeds, cleaning up debris, and disturbing soil. They serve as vital indicators of marine environmental health, responding to climate change and polluti…

Computational EfficiencyImage ReconstructionSuper-Resolution

Visual art inspired by the collective feeding behavior of sand-bubbler crabs

2017-09-01 · Hendrik Richter

Sand--bubblers are crabs of the genera Dotilla and Scopimera which are known to produce remarkable patterns and structures at tropical beaches. From these pattern-making abilities, we may draw inspiration for digital vis…

Sand

Retrofitting Structure-aware Transformer Language Model for End Tasks

2020-09-16 · EMNLP 2020 11 · Hao Fei, Yafeng Ren, Donghong Ji

We consider retrofitting structure-aware Transformer-based language model for facilitating end tasks by proposing to exploit syntactic distance to encode both the phrasal constituency and dependency connection into the l…

Language ModelingLanguage ModellingMulti-Task Learning

Multiple Tasks Integration: Tagging, Syntactic and Semantic Parsing as a Single Task

2021-04-01 · EACL 2021 2 · Timoth{\'e}e Bernard

Departing from both sequential pipelines and monotask systems, we propose Multiple Tasks Integration (MTI), a multitask paradigm orthogonal to weight sharing. The essence of MTI is to process the input iteratively but co…

Dependency ParsingPart-Of-Speech TaggingReinforcement Learning (RL)Semantic Dependency Parsing+1