Automatic weighted matching rectifying rule discovery for data repairing

Hiba Abu Ahmad, Hongzhi Wang

TL;DR

Data cleaning is notoriously expensive and manual, often requiring domain experts to write repairing rules or relying on pristine "master" databases. This paper introduces Weighted Matching Rectifying Rules (WMRRs) and a fully automated pipeline to discover these rules directly from dirty data. By leveraging similarity matching and frequency statistics, the method dramatically improves error-correction recall without sacrificing precision, outperforming existing expert-reliant systems.

What Problem Does This Paper Address?

Real-world data is messy, and fixing it (data repairing) is a major challenge in database management. Traditional automated methods rely on data dependencies (like Functional Dependencies) to detect errors, but they cannot actually fix them.

To actually correct data, the industry relies on rule-based methods. However, these usually require an external, verified "master" database or a human expert to manually write the rules—both of which are expensive and time-consuming. While some "fixing rules" can run automatically without master data, they rely on exact matches. This means if there is even a slight typo in the "evidence" column (e.g., Nation = "Chiena" instead of "China"), the rule fails to fire, resulting in very low recall (it misses a lot of errors). The authors tackle this by asking: Can we automatically discover flexible, highly effective repairing rules directly from the dirty data we already have?

Methods

The authors propose a three-part automated pipeline:

  1. Weighted Matching Rectifying Rules (WMRRs): Instead of relying on exact matches, WMRRs use similarity metrics (like Edit distance for strings or Euclidean distance for numbers). This allows a rule to trigger even if the evidence attributes contain typos, fixing both the target attribute and the evidence attribute simultaneously. Each rule is assigned two weights based on its statistical confidence and frequency in the dataset.
  2. Rule Discovery (WMRRD): This algorithm takes the dirty dataset and a set of known Functional Dependencies (FDs). It operates on the assumption that correct values appear more frequently than specific typos. It groups data by FD patterns, identifies the most frequent "correct" pattern, and automatically generates rules that map the less frequent "wrong" patterns to the correct one.
  3. Inconsistency Resolution & Repairing (Inconsis-Res & WMRR-DR): Because rules are mined from dirty data, some will inevitably conflict. The Inconsis-Res algorithm automatically detects conflicting rules and discards the one with the lower confidence weight. Finally, the WMRR-DR algorithm applies the surviving rules to the dataset. If multiple rules match a single row, it uses a distance metric to select the most accurate rule.

Datasets

The authors evaluated their approach on two datasets, injecting synthetic typos and domain errors at varying rates (0% to 100%) to test robustness:

  • HOSP (Hospital Compare): A real-world public dataset from the US Department of Health and Human Services containing 115K tuples, 17 attributes, and 24 FDs.
  • UIS (Address Data): A synthetic dataset generated by the standard UIS data generator, containing 15K tuples, 11 attributes, and 18 FDs.

Key Insights and Ideas

  • Frequency as a Proxy for Truth: By assuming that correct data naturally clusters and appears more frequently than random typos, the system can bootstrap its own cleaning rules without needing a pristine master database.
  • Similarity Matching Unlocks Recall: Traditional rules are brittle. If a rule says "If Country is China, Capital is Beijing," a typo like "Chiena" breaks the rule. By using similarity matching (Country ≈ "China"), the system can confidently fix the capital to "Beijing" and fix the typo in the country column to "China" in one fell swoop.
  • Automated Conflict Resolution is Crucial: When generating tens of thousands of rules automatically, edge cases will clash. Using a probabilistic weight to automatically prune conflicting rules eliminates the need for a human-in-the-loop, making the system truly autonomous.

Key Results

  • Massive Recall Improvements: WMRR-DR maintained a strict 100% precision across experiments while vastly outperforming the state-of-the-art baseline (FR-DR, which uses expert-provided fixing rules) in recall.
  • F-Measure Boost: The proposed method improved the average f-measure (the harmonic mean of precision and recall) by up to 9.4% on the UIS dataset and a massive 73% on the HOSP dataset compared to the baseline.
  • Scale of Discovery: The algorithm successfully discovered and utilized tens of thousands of rules automatically (e.g., over 75,000 rules on the HOSP dataset), whereas expert systems rely on a tiny, manually curated fraction of that.

Limitations and Future Work

The primary limitation acknowledged by the authors is computational efficiency during the repairing phase. Because the system generates, checks, and applies thousands of rules using similarity metrics (which are computationally heavier than exact string matching), it is slower than applying a small set of expert-curated rules. There is a clear trade-off between execution time and data quality.

For future work, the authors plan to investigate optimization techniques to prune or reduce the number of discovered rules. The goal is to speed up the repairing process without sacrificing the high recall and precision their current method achieves.

Summary updated

BibTeX
@inproceedings{ahmad2020automatic,
  author = {Hiba Abu Ahmad and Hongzhi Wang},
  title = {{Automatic weighted matching rectifying rule discovery for data repairing}},
  booktitle = {VLDB J},
  year = {2020},
  url = {https://openreview.net/forum?id=R07NvJHkXAp},
}
Figure