Pattern-Driven Data Cleaning

El Kindi Rezig, Mourad Ouzzani, Walid G. Aref, Ahmed K. Elmagarmid, Ahmed R. MahmoodarXiv 2017

TL;DR

This paper introduces a pattern-driven approach to data cleaning that moves beyond simple "minimal change" repairs. By leveraging the frequency and interaction of data patterns induced by functional dependencies, the authors achieve higher repair accuracy, better interpretability, and linear-time scalability.

What Problem Does This Paper Address?

Data cleaning is a messy but essential part of data science. Most existing tools use Functional Dependencies (FDs)—rules like "if the cyclist is Marcel Kittel, the country must be Germany"—to find errors. When a rule is violated (e.g., a record says Kittel is from Russia), standard algorithms try to fix it by making the "minimal change" possible.

The problem? Minimal change doesn't always mean the correct change. Fixing one cell in isolation can create nonsensical combinations of values elsewhere. Furthermore, these tools are often "black boxes"; they provide a cleaned table but offer no explanation for why specific values were chosen. Finally, many state-of-the-art repair algorithms are computationally expensive, making them impractical for the massive datasets common in industry today.

Methods

The authors propose a framework that treats FD patterns—specific combinations of values that satisfy a rule—as first-class citizens.

  1. Instance Graph (IG): The system builds a graph where nodes are attribute values and directed edges represent FD patterns. For example, an edge from "Germany" to "Berlin" represents the pattern for the rule Country -> Capital.
  2. Pattern Quality: Not all patterns are equal. The authors calculate a quality score for each edge based on its Support (how often it appears) and Confidence (how likely it is to lead to other high-quality patterns). The Instance Graph visualizes how values relate through FDs, with edge weights indicating pattern quality.

  3. The GRH Algorithm: To repair a "dirty" tuple, the algorithm "chases" these patterns through the graph. It fixes certain "bound" attributes and then selects the highest-quality path (the Chase Graph) to determine the values for the remaining "free" attributes. The "chase" process: fixing a bound attribute (rank) and following high-quality edges to determine the correct cyclist, country, and capital.

  4. Interpretability: Instead of just changing a cell, the system outputs a Pattern Expression. This allows a user to see exactly which original data patterns were composed to create the repaired record.

Figure 3: Instance Graph of Instance Tour_rank with quality scores
The "chase" process: fixing a bound attribute (rank) and following high-quality edges to determine the correct cyclist, country, and capital.

Datasets

The approach was evaluated using:

  • Tax: A synthetic dataset containing tax information for individuals, scaled from 100,000 to 5 million tuples to test scalability.
  • Hospital: A real-world dataset of 100,000 tuples containing healthcare provider and hospital information.
  • BART: A standard benchmark tool used to inject synthetic errors into these datasets at varying noise levels.

Key Insights and Ideas

  • Context is King: Repairing a violation in one rule should consider its impact on related rules. Patterns often interact—for instance, the choice of Country in Cyclist -> Country directly affects the valid Capital in Country -> Capital. Four cases of how FD patterns can interact, from independent choices to circular dependencies.

  • Frequency as a Proxy for Truth: In most datasets, the majority of the data is correct. Therefore, patterns that appear frequently are much more likely to be the "ground truth" than rare ones.

  • Linear Time is Possible: By using a heuristic traversal of the Instance Graph based on pre-calculated quality scores, the authors achieved linear-time complexity ($O(|V| + |E|)$), a massive improvement over the exponential or high-polynomial complexity of previous methods.
Figure 2: FD Patterns interaction cases

Key Results

  • Superior Accuracy: The pattern-driven approach consistently outperformed state-of-the-art baselines like Holistic and SAMP in both precision and recall. It was particularly robust as the error rate in the data increased.
  • Massive Speedups: On the 100K-tuple Tax dataset, the new algorithm was three orders of magnitude faster than the recent TREP algorithm.
  • Extreme Scalability: While many existing tools failed to finish or ran out of memory on large datasets, this approach cleaned a 5-million-tuple dataset in just 75 seconds.
  • Better Debugging: The use of pattern expressions allowed researchers to trace repair decisions back to specific evidence in the original data, making the cleaning process transparent.

Limitations and Future Work

The authors acknowledge that their method relies on the "minimality principle"—the assumption that most of the data is correct. If a dataset is overwhelmingly noisy (e.g., more than 50% errors), the most "frequent" patterns might actually be the wrong ones.

Future work includes extending this pattern-driven logic to more complex types of rules, such as Denial Constraints, which can express a wider variety of data quality requirements beyond simple functional dependencies.

Summary updated

BibTeX
@misc{rezig2017pattern,
  author = {El Kindi Rezig and Mourad Ouzzani and Walid G. Aref and Ahmed K. Elmagarmid and Ahmed R. Mahmood},
  title = {{Pattern-Driven Data Cleaning}},
  year = {2017},
  eprint = {1712.09437},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.09437},
}
Figure