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

CLX: Towards a scalable and comprehensible design of PBE data transformations

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

Introduction

Data wrangling—the process of cleaning and reformatting raw data—remains a significant bottleneck in data science. While Programming by Example (PBE) systems like Excel’s FlashFill have simplified this by generating scripts from user-provided examples, they face two critical "usability walls." First, as datasets grow in size and heterogeneity, the manual effort required to find representative examples and verify results becomes prohibitive. Second, most PBE systems are "black boxes," generating complex code that is difficult for non-experts to audit or debug.

CLX (pronounced "clicks") addresses these challenges by shifting the user interaction from individual data instances to structural patterns. This approach significantly reduces user effort while ensuring the transformation logic remains human-readable.

The Cluster-Label-Transform Paradigm

CLX introduces a novel workflow designed to make data normalization scalable and transparent. Instead of row-by-row interaction, the system follows a three-step process: Clustering, Labeling, and Transforming.

The Cluster-Label-Transform workflow, illustrating the transition from messy raw data to structured output through user-guided labeling.

1. Pattern Profiling and Clustering

Rather than presenting a raw table, CLX employs a pattern profiling algorithm to group data into hierarchical clusters based on structural format. For example, phone numbers formatted as (XXX) XXX-XXXX are grouped separately from those formatted as XXX-XXX-XXXX. This allows users to see the "shape" of their data at a glance.

Pattern-level profiling of heterogeneous data, showing how thousands of rows are condensed into a few structural patterns.

2. Labeling and Synthesis

The user identifies a cluster that represents the desired "target" format. CLX then treats the remaining clusters as "source" patterns and automatically synthesizes a program to map them to that target. If a target format does not exist in the data, the user can manually define one.

3. The UniFi DSL and MDL Principle

To ensure comprehensibility, CLX utilizes a custom Domain Specific Language (DSL) called UniFi. UniFi represents transformations as a series of simple Replace operations using regular expressions and token extractions. To select the most robust program, CLX applies the Minimum Description Length (MDL) principle—a mathematical implementation of Occam’s Razor—to prioritize the simplest and most readable logic.

Key Insights

  • Patterns over Instances: While a dataset may contain millions of rows, the number of structural patterns typically grows much more slowly. By interacting with patterns, user effort becomes largely independent of dataset size.
  • Explanation as Verification: Because UniFi is human-readable, users can verify the system's logic before execution, eliminating the need to manually inspect thousands of output rows for errors.
  • Token-Based Alignment: CLX breaks strings into tokens (digits, letters, literals) to determine if a source pattern can be validly transformed into a target without inventing data.

Evaluation and Results

The researchers evaluated CLX against a benchmark of 47 data normalization tasks and a large dataset of messy phone numbers. Key findings include:

  • Scalability: When data size increased 30x, user effort for CLX grew only 1.2x, compared to 9.1x for FlashFill.
  • Comprehensibility: Users were twice as successful at predicting transformation outcomes using CLX’s explanations compared to FlashFill’s opaque results.
  • Efficiency: In 79% of test cases, CLX inferred the correct program in just two user steps.

Conclusion

CLX demonstrates that data wrangling can be both scalable and user-friendly by leveraging pattern-level interactions and a readable DSL. While currently limited by a lack of support for loops and semantic transformations (e.g., mapping "UCB" to "UC Berkeley"), it provides a powerful framework for future tools that aim to bridge the gap between automated synthesis and human oversight.

Summary updated

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