NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CLX: Towards verifiable PBE data transformation

Zhongjun Jin, Michael J. Cafarella, H. V. Jagadish, Sean Kandel, Michael Minar, Joseph M. Hellerstein

Introduction

Data wrangling—the process of cleaning and reformatting messy data—remains a significant bottleneck in data science. Programming By Example (PBE) systems, such as Microsoft Excel’s FlashFill, have emerged as powerful tools to automate these tasks by synthesizing transformation programs from a few user-provided examples. However, these systems face a critical "trust problem." In large datasets, users must verify the correctness of transformations across thousands of rows. This instance-by-instance verification is time-consuming and error-prone, often leaving users uncertain if the system failed on a "needle in a haystack" row deep within the data.

The CLX Model: Cluster-Label-Transform

To address the verification challenge, the authors introduce CLX (pronounced "clicks"), a paradigm that shifts the focus from individual data instances to high-level structural patterns. The CLX model decomposes the transformation process into three distinct phases: Clustering, Labeling, and Transforming.

The CLX Model workflow: Clustering messy data into patterns, labeling target formats, and transforming via synthesized regex operations.
  1. Clustering: CLX tokenizes raw data into structural patterns (e.g., representing a phone number as (digit)3-(digit)3-(digit)4). It then employs an agglomerative refinement algorithm to group similar patterns into a hierarchy. This allows users to grasp the overall "shape" and diversity of their dataset immediately.
  2. Labeling: Instead of providing output examples for every variation, the user identifies a desired target pattern. If the dataset already contains some correctly formatted rows, the user can simply select that existing pattern as the goal.
  3. Transforming: The system synthesizes a transformation program using a specialized Domain Specific Language (DSL) called UniFi. To ensure transparency, these programs are presented as standard regular expression (regex) replace operations, which are widely understood and easily inspectable by users.

Pattern-Level Verification

The core insight of CLX is that humans are significantly more efficient at verifying structural patterns than individual strings. By presenting data in clusters, CLX allows a user to verify a single transformation rule that applies to thousands of rows simultaneously.

Example of messy phone number data (left) and the corresponding structural patterns identified by CLX (right).

As shown in Figure 1, rather than scanning every phone number, a user can review the dominant patterns identified by the system. If the transformation logic for a pattern is correct, the instances within that cluster are highly likely to be correct as well. This approach makes the verification time nearly independent of the total number of rows.

Key Results and Scalability

The researchers evaluated CLX against state-of-the-art PBE systems using real-world messy data and a comprehensive benchmark of 47 transformation tasks.

  • Verification Efficiency: In user studies, as data size increased 30-fold, the time required for users to verify FlashFill results grew by 11.4x. In contrast, CLX users saw only a 1.3x increase in verification time, demonstrating superior scalability.
  • Explainability: Because CLX provides regex-based explanations, users were twice as successful at predicting how the system would handle new, unseen data compared to "black-box" PBE systems.
  • Expressivity: CLX successfully synthesized correct transformations for 90% of the benchmark tasks. While slightly lower than FlashFill's 96%, CLX provides a much higher level of trust and verifiability.

Conclusion and Future Work

CLX represents a significant step toward making automated data transformation both scalable and trustworthy. By leveraging pattern-level abstraction and explainable regex operations, it empowers users to manage large-scale data cleaning with confidence. Future work aims to extend CLX to support semantic transformations (e.g., converting "March" to "03") and more complex string operations involving loops and variable-length elements.

Summary updated

BibTeX
@inproceedings{jin2019clx,
  author = {Zhongjun Jin and Michael J. Cafarella and H. V. Jagadish and Sean Kandel and Michael Minar and Joseph M. Hellerstein},
  title = {{CLX: Towards verifiable PBE data transformation}},
  booktitle = {EDBT},
  year = {2019},
  url = {https://openreview.net/forum?id=FuB534lzW7y},
}
Figure