OTClean: Data Cleaning for Conditional Independence Violations using Optimal Transport

Alireza Pirhadi, Mohammad Hossein Moslemi, Alexander Cloninger, Mostafa Milani, Babak Salimi

TL;DR

OTClean is a new framework that uses Optimal Transport (OT) theory to "repair" datasets that violate Conditional Independence (CI) constraints. By reframing data cleaning as a distribution-shifting problem rather than just fixing individual errors, it enables the creation of machine learning models that are both more accurate and significantly fairer.

What Problem Does This Paper Address?

In the world of machine learning, "garbage in, garbage out" is a fundamental law. Often, datasets contain spurious correlations—statistical relationships that shouldn't exist. For example, a medical dataset might show a correlation between a patient's ZIP code and their recovery rate. While the ZIP code itself doesn't cause recovery, it might be a proxy for healthcare access or socioeconomic status. If an ML model learns this, it becomes biased.

Statistically, we want certain variables to be Conditionally Independent (CI). In the medical example, we want Recovery to be independent of ZIP code given Causal Factors (like treatment and biology). Traditional data cleaning focuses on missing values or outliers, but it rarely addresses these deeper statistical violations. Existing methods that do try to enforce CI often struggle with scalability or destroy the "utility" (usefulness) of the data by changing it too much.

Methods

The authors introduce OTClean, which treats data repair as an optimization problem. The goal is to find a "repaired" version of the dataset that satisfies CI constraints while staying as close as possible to the original data.

  1. Probabilistic Repair: Instead of a deterministic "if X, then Y" rule, OTClean learns a transport plan. This is a probabilistic mapping that describes how to shift the mass of the original data distribution to a new, "clean" distribution.
  2. QCLP Formulation: They first model the problem as a Quadratically Constrained Linear Program (QCLP). While this provides an exact solution, it is NP-hard and doesn't scale to large datasets.
  3. FastOTClean: To solve the scalability issue, they propose a regularized version using Entropic Regularization and Sinkhorn’s algorithm. This transforms the problem into a smooth, iterative process that is orders of magnitude faster.
  4. Alternating Optimization: The algorithm uses a two-layered approach: an outer loop finds the best way to move data points (the OT map), and an inner loop refines the target distribution to ensure it strictly obeys the CI constraints using techniques inspired by Non-negative Matrix Factorization (NMF).

Datasets

The researchers evaluated OTClean on four well-known datasets:

  • Adult (Census Income): Used for fairness tasks (predicting income while ensuring independence from sensitive attributes like sex).
  • COMPAS: Used for fairness in recidivism prediction (ensuring independence from race).
  • Car Evaluation: Used for data cleaning tasks involving attribute noise.
  • Boston Housing: Used for data cleaning and handling missing values (MAR and MNAR).

Key Insights and Ideas

  • Distribution over Tuples: A key "aha" moment is that for ML, the specific values of individual rows (tuples) are less important than the underlying distribution they collectively represent. OTClean prioritizes preserving the statistical "shape" of the data.
  • CI as an Integrity Constraint: The paper successfully bridges the gap between database theory (integrity constraints like Functional Dependencies) and statistics (Conditional Independence).
  • Warm-Starting Sinkhorn: The authors found that instead of starting the Sinkhorn algorithm from scratch in every iteration, "warm-starting" it with the results from the previous step reduced the number of iterations by over sevenfold.
  • Handling "Unsaturated" Constraints: Most real-world CI constraints only involve a few variables. The authors developed a strategy to split the dataset attributes, only performing the expensive OT calculations on the relevant subset, which drastically improves performance on high-dimensional data.

Key Results

  • Fairness vs. Accuracy: On the Adult and COMPAS datasets, OTClean achieved a better balance than state-of-the-art baselines. It produced models with higher AUC (accuracy) and lower ROD (bias).
  • Robustness to Noise: In experiments with "dirty" data (attribute noise), OTClean-cleaned data allowed models to perform almost as well as if they were trained on the original "clean" ground truth, significantly outperforming the popular Baran cleaning tool.
  • Efficiency: The FastOTClean algorithm showed a 7x speedup on the Adult dataset compared to naive implementations and remained stable even as the complexity of the constraints (domain size) increased.
  • Memory Usage: FastOTClean consistently required significantly less memory than the QCLP approach, making it viable for large-scale industrial applications.

Limitations and Future Work

The authors acknowledge a few areas for growth:

  • Discrete vs. Continuous: The current framework is primarily designed for discrete data. While many real-world features are categorical, extending this to fully continuous distributions is a logical next step.
  • Multiple Constraints: The paper focuses on enforcing a single CI constraint at a time. Future work will explore how to handle multiple, potentially interacting CI constraints simultaneously.
  • Relational Data: The current model works on flat tables; the authors plan to explore how these OT-based repairs function in complex relational databases with multiple joined tables.

Summary updated

BibTeX
@inproceedings{pirhadi2024otclean,
  author = {Alireza Pirhadi and Mohammad Hossein Moslemi and Alexander Cloninger and Mostafa Milani and Babak Salimi},
  title = {{OTClean: Data Cleaning for Conditional Independence Violations using Optimal Transport}},
  booktitle = {Proc. ACM Manag. Data},
  year = {2024},
  url = {https://openreview.net/forum?id=QLS0uar5MT},
}

Loading related content...

Figure