TL;DR
This paper introduces DataVinci, a novel system for automatically detecting and repairing errors in string data within tables. It uniquely handles strings with both syntactic (e.g., formatting) and semantic (e.g., named entities) errors by combining regular expression learning with large language models (LLMs) and program execution information, all in an unsupervised manner. This approach significantly outperforms existing methods in both error detection and repair accuracy.
What Problem Does This Paper Address?
Tabular data, especially in spreadsheets, is rife with string data errors. These errors, ranging from simple typos and formatting inconsistencies (syntactic errors) to incorrect or ambiguous named entities (semantic errors), can lead to flawed analyses and broken data pipelines. While prior work has tackled these issues, they often fall into one of two camps: focusing solely on syntactic or semantic errors, or requiring significant user input (annotations, examples, or constraints) to guide the repair process. This leaves a critical gap for a system that can handle the complex interplay of both error types and operate autonomously.
Methods
DataVinci employs a multi-stage, unsupervised approach:
- Semantic Abstraction: To handle semantic errors, DataVinci uses an LLM to identify and mask semantic substrings (like country names or dates) within strings. This abstraction allows the system to treat these semantic parts as a single unit, simplifying pattern learning. The LLM can also suggest corrections for misspelled semantic entities.
- Pattern Learning: After semantic abstraction, DataVinci uses a pattern learner (FlashProfile) to identify regular-expression-based patterns that cover a majority of the values in a column. Values that don't conform to these "significant patterns" are flagged as potential data errors.
- Edit Program Generation: For flagged errors, DataVinci generates "edit programs" – sequences of actions (insert, delete, substitute) – that transform the erroneous string into one that satisfies a significant pattern. This is achieved by interpreting the pattern as a finite automaton and finding the lowest-cost path to an accepting state.
- Concretization and Ranking: Abstract edits (e.g., "insert a digit") are concretized into specific actions using learned decision trees (concretization constraints) derived from non-erroneous data. Finally, multiple repair suggestions are ranked using a heuristic that considers edit distance and pattern coverage.
- Execution-Guided Repair: To address cases where majority patterns are insufficient or absent, DataVinci leverages execution information from existing programs that use the target data. If a program fails on a specific row, DataVinci uses this signal to identify errors and guide its repair process, leading to improved formula execution success.
Datasets
DataVinci was evaluated on four benchmarks:
- Wikipedia Tables: An existing benchmark from prior work, extended with manual annotations.
- Excel: A new benchmark comprising 200 tables sampled from a large corpus of public Excel workbooks.
- Synthetic Errors: A new benchmark of 1000 Excel tables with synthetically introduced errors to measure recall.
- Excel Formulas: A new benchmark consisting of Excel formulas and their input data, designed to evaluate execution-guided repair.
Key Insights and Ideas
- LLMs for Semantic Abstraction are Crucial: The paper highlights that effectively handling semantic errors requires more than just syntactic pattern matching. Using LLMs to abstract and even correct semantic parts of strings is key to DataVinci's success, significantly boosting repair precision.
- Unsupervised Learning is Achievable: DataVinci demonstrates that robust string error detection and repair can be achieved without requiring users to provide any examples, constraints, or annotations, making it highly practical.
- Program Execution as a Signal: Leveraging the success or failure of existing programs that use the target data provides a powerful, albeit indirect, signal for identifying and correcting errors, especially in complex scenarios where simple pattern matching falls short.
- Syntactic and Semantic Synergy: The core innovation lies in the seamless integration of syntactic pattern learning with semantic understanding via LLMs, allowing DataVinci to tackle errors that are a blend of both, a common challenge in real-world data.
Key Results
- Superior Performance: DataVinci consistently outperformed 7 baselines in both error detection and repair across all benchmarks.
- Detection Accuracy: Achieved higher precision on Wikipedia and Excel benchmarks and higher recall on the synthetic benchmark. For example, it reported a precision of 80.1% on Wikipedia tables.
- Repair Accuracy: Demonstrated the highest precision, recall, and F1 score on the synthetic test set, with a repair precision of 71.3% (certain) and 64.9% (possible) on Wikipedia.
- Execution-Guided Improvement: Execution-guided repair significantly boosted formula execution success rates, from 43.2% to 54.0% for single-column inputs and 35.7% to 47.8% for multi-column inputs.
- Efficiency: DataVinci is competitive in terms of runtime and disk space, using substantially less RAM than many alternatives.
Limitations and Future Work
- Language Dependency: The current evaluation is limited to English language values, and applicability to non-English datasets is an open question.
- Inter-Table Constraints: DataVinci does not currently handle data consistency that relies on relationships across multiple tables.
- Pattern Reliance: While execution-guided repair mitigates this, the core detection mechanism relies on identifying recurring patterns, which may not be present in all datasets.
- Program Availability: The effectiveness of execution-guided repair is contingent on the availability and executability of programs that interact with the target data.
Future work could explore extending DataVinci to handle inter-table constraints, support non-English languages, and further integrate with more sophisticated program analysis techniques.
Summary updated