The exception that improves the rule

Juliana Freire, Boris Glavic, Oliver Kennedy, Heiko Mueller

Introduction

Data curation—the process of cleaning, transforming, and organizing datasets—remains one of the most time-consuming tasks in data science. Currently, practitioners are caught between two suboptimal worlds. Relational databases offer scalability and reproducibility through bulk operations but struggle with "singleton" edits, such as fixing a single typo. Conversely, spreadsheets and notebooks provide intuitive, visual editing but lack robust provenance; it is often impossible to track how a value was changed or to re-apply those changes to updated data.

Vizier is a hybrid data curation system designed to bridge this gap. It introduces a domain-specific language called VizUAL to capture manual edits as formal, rewritable code. By treating manual "exceptions" as first-class citizens, Vizier ensures that ad-hoc data cleaning does not break the reproducibility of the data pipeline.

The Vizier System and VizUAL

Vizier provides a notebook-style interface integrated with an interactive spreadsheet view. Every action taken in the UI—whether adding a column, sorting a table, or manually editing a cell—is recorded as a script in the VizUAL language.

The Vizier interface showing the version history (left) and the current branch with VizUAL commands and data table (right).

Key technical innovations include:

  • Immutable Cell IDs: To ensure that manual edits "stick" to the correct data point even after sorting or filtering, Vizier assigns a globally unique, immutable ID to every cell.
  • Workflow Rewriting: Manual editing often results in verbose, redundant scripts. Vizier employs a "readability-optimizing compiler" that groups individual edits into concise, generalized rules (e.g., consolidating multiple row updates into a single conditional statement).
  • Relational Mapping: VizUAL scripts are compiled into standard relational algebra (SQL), allowing the system to leverage the power of traditional database backends while maintaining a user-friendly front end.

Stability Heuristics in Data Curation

A core challenge in merging spreadsheet flexibility with database rigor is managing "stability." The authors identify two primary types of stability that users expect:

  1. Value-stable operations: The data value remains constant even if the underlying formula must be updated (e.g., moving a row).
  2. Formula-stable operations: The formula remains constant even if the resulting value changes (e.g., sorting a list of running totals).

To inform Vizier's design, the authors conducted a behavioral logic analysis of major commercial spreadsheet applications, including Microsoft Excel, Apple Numbers, and Google Sheets.

Comparison of stability behaviors (Value vs. Formula) across Excel, Numbers, and Google Sheets for common UI actions.

The study revealed significant inconsistencies in how these tools handle data stability during moves, sorts, and filters. Vizier addresses these "unsurprising inconsistencies" by providing a unified data model that explicitly tracks provenance and stability requirements.

Key Insights and Results

The primary "aha moment" of the research is the realization that the "singleton" is not noise; it is a critical part of the data curation workflow. By formalizing spreadsheet actions into a grammar that translates to SQL CASE and UNION statements, Vizier provides a full audit trail without sacrificing the "point-and-click" ease of use.

Furthermore, the system shifts the goal of compiler optimization. While traditional compilers prioritize execution speed, Vizier’s compiler optimizes for human readability. This recognizes that data curation scripts serve as documentation that must be auditable by other humans.

Limitations and Future Directions

While Vizier demonstrates a powerful vision for hybrid data curation, several challenges remain. The performance of complex VizUAL scripts on multi-terabyte datasets requires further validation. Additionally, the authors aim to "generalize singletons"—developing heuristics that can suggest general rules based on a small number of manual fixes (e.g., identifying a pattern in date formatting errors). Finally, because "readability" is inherently subjective, future work will focus on refining the balance between script brevity and clarity to better serve diverse user needs.

Summary updated

BibTeX
@inproceedings{freire2016exception,
  author = {Juliana Freire and Boris Glavic and Oliver Kennedy and Heiko Mueller},
  title = {{The exception that improves the rule}},
  booktitle = {HILDA@SIGMOD},
  year = {2016},
  url = {https://openreview.net/forum?id=cLPKr5_vW},
}
Figure