mlsanityData to 7 Oct 2026

Contextualized Data-Wrangling Code Generation in Computational Notebooks

arXiv 2409.13551 ↗First posted 20 Sep 2024cs.SE cs.CL cs.DBcited by 3

Not on the map. Why?

Abstract (arXiv)

Data wrangling, the process of preparing raw data for further analysis in computational notebooks, is a crucial yet time-consuming step in data science. Code generation has the potential to automate the data wrangling process to reduce analysts' overhead by translating user intents into executable code. Precisely generating data wrangling code necessitates a comprehensive consideration of the rich context present in notebooks, including textual context, code context and data context. However, notebooks often interleave multiple non-linear analysis tasks into linear sequence of code blocks, where the contextual dependencies are not clearly reflected. Directly training models with source code blocks fails to fully exploit the contexts for accurate wrangling code generation. To bridge the gap, we aim to construct a high quality datasets with clear and rich contexts to help training models for data wrangling code generation tasks. In this work, we first propose an automated approach, CoCoMine to mine data-wrangling code generation examples with clear multi-modal contextual dependency. It first adopts data flow analysis to identify the code blocks containing data wrangling codes. Then, CoCoMine extracts the contextualized datawrangling code examples through tracing and replaying notebooks. With CoCoMine, we construct CoCoNote, a dataset containing 58,221 examples for Contextualized Data-wrangling Code generation in Notebooks. To demonstrate the effectiveness of our dataset, we finetune a range of pretrained code models and prompt various large language models on our task. Furthermore, we also propose DataCoder, which encodes data context and code&textual contexts separately to enhance code generation. Experiment results demonstrate the significance of incorporating data context in data-wrangling code generation and the effectiveness of our model. We release code and data at url...

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 58 of its 100 references that are in the map. First posted on arXiv 20 Sep 2024.

Builds on

58 of 100 references.

References · 58

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  6. 2021Program Synthesis with Large Language Modelscited by 3,509
  7. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  8. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  10. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  11. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  12. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
38 more
  1. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  2. 2021Measuring Coding Challenge Competence With APPScited by 879
  3. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  4. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  5. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  6. 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 668
  7. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  8. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  9. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  10. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  11. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  12. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  13. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  14. 2022Natural Language to Code Translation with Executioncited by 122
  15. 2018Mapping Language to Code in Programmatic Contextcited by 104
  16. 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
  17. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
  18. 2018NL2Bash: A Corpus and Semantic Parser for Natural Language Interface to the Linux Operating Systemcited by 97
  19. 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 89
  20. 2022Natural Language to Code Generation in Interactive Data Science Notebookscited by 86
  21. 2016Neuro-Symbolic Program Synthesiscited by 84
  22. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
  23. 2020Deep Learning for Source Code Modeling and Generation: Models, Applications and Challengescited by 55
  24. 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 54
  25. 2019JuICe: A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generationcited by 49
  26. 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
  27. 2022MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languagescited by 41
  28. 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
  29. 2021Latent Execution for Neural Program Synthesiscited by 35
  30. 2023Data Formulator: AI-powered Concept-driven Visualization Authoringcited by 31
  31. 2020TF-Coder: Program Synthesis for Tensor Manipulationscited by 27
  32. 2021Documentation Matters: Human-Centered AI System to Assist Data Science Code Documentation in Computational Notebookscited by 17
  33. 2021The Art and Practice of Data Science Pipelines: A Comprehensive Study of Data Science Pipelines In Theory, In-The-Small, and In-The-Largecited by 17
  34. 2022Mixed-modality Representation Learning and Pre-training for Joint Table-and-Text Retrieval in OpenQAcited by 17
  35. 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
  36. 2021On The Ingredients of an Effective Zero-shot Semantic Parsercited by 13
  37. 2023From Words to Code: Harnessing Data for Program Synthesis from Natural Languagecited by 11
  38. 2024Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Contextcited by 10

50 most cited of 58 All 58 (JSON)

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 2.

3 papers.